@dxos/plugin-simple-layout 0.8.4-main.7996785055 → 0.8.4-main.8baae0fced

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/neutral/SimpleLayoutPlugin.mjs +52 -0
  3. package/dist/lib/neutral/SimpleLayoutPlugin.mjs.map +7 -0
  4. package/dist/lib/neutral/app-graph-builder-EYQKLRRP.mjs +21 -0
  5. package/dist/lib/neutral/app-graph-builder-EYQKLRRP.mjs.map +7 -0
  6. package/dist/lib/neutral/capabilities/index.mjs +21 -0
  7. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  8. package/dist/lib/neutral/chunk-5LQGH5KW.mjs +20 -0
  9. package/dist/lib/neutral/chunk-5LQGH5KW.mjs.map +7 -0
  10. package/dist/lib/{browser/chunk-XJVW3PRY.mjs → neutral/chunk-7UDV3JDT.mjs} +4 -4
  11. package/dist/lib/neutral/chunk-7UDV3JDT.mjs.map +7 -0
  12. package/dist/lib/neutral/chunk-FD2CAY4Q.mjs +26 -0
  13. package/dist/lib/neutral/chunk-FD2CAY4Q.mjs.map +7 -0
  14. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  15. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
  16. package/dist/lib/neutral/chunk-Y2QR5SYD.mjs +8 -0
  17. package/dist/lib/neutral/chunk-Y2QR5SYD.mjs.map +7 -0
  18. package/dist/lib/{browser/close-OT5JOGVY.mjs → neutral/close-WKMURGUB.mjs} +5 -4
  19. package/dist/lib/{node-esm/close-PEVHREL2.mjs.map → neutral/close-WKMURGUB.mjs.map} +1 -1
  20. package/dist/lib/{browser/chunk-J5FQ32AV.mjs → neutral/components/index.mjs} +261 -591
  21. package/dist/lib/neutral/components/index.mjs.map +7 -0
  22. package/dist/lib/neutral/hooks/index.mjs +332 -0
  23. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  24. package/dist/lib/neutral/index.mjs +14 -0
  25. package/dist/lib/neutral/index.mjs.map +7 -0
  26. package/dist/lib/neutral/meta.json +1 -0
  27. package/dist/lib/neutral/meta.mjs +8 -0
  28. package/dist/lib/neutral/meta.mjs.map +7 -0
  29. package/dist/lib/neutral/open-PEVXNVTV.mjs +51 -0
  30. package/dist/lib/neutral/open-PEVXNVTV.mjs.map +7 -0
  31. package/dist/lib/neutral/operation-handler-EAIE7KPR.mjs +13 -0
  32. package/dist/lib/neutral/operation-handler-EAIE7KPR.mjs.map +7 -0
  33. package/dist/lib/neutral/operations/index.mjs +8 -0
  34. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  35. package/dist/lib/neutral/plugin.mjs +16 -0
  36. package/dist/lib/neutral/plugin.mjs.map +7 -0
  37. package/dist/lib/{browser/react-root-6KIGPLUT.mjs → neutral/react-root-VE265VX4.mjs} +5 -8
  38. package/dist/lib/neutral/react-root-VE265VX4.mjs.map +7 -0
  39. package/dist/lib/{node-esm/react-surface-WLKB6AET.mjs → neutral/react-surface-YHXOHJI7.mjs} +16 -15
  40. package/dist/lib/neutral/react-surface-YHXOHJI7.mjs.map +7 -0
  41. package/dist/lib/{browser/revert-workspace-DLE265AN.mjs → neutral/revert-workspace-ST6NZUNG.mjs} +5 -4
  42. package/dist/lib/{node-esm/revert-workspace-XZXT64YA.mjs.map → neutral/revert-workspace-ST6NZUNG.mjs.map} +1 -1
  43. package/dist/lib/{browser/set-52HGTSH4.mjs → neutral/set-6ZRLWPJS.mjs} +5 -4
  44. package/dist/lib/{node-esm/set-5I6LFH5L.mjs.map → neutral/set-6ZRLWPJS.mjs.map} +1 -1
  45. package/dist/lib/{browser/set-layout-mode-T6QI3DGU.mjs → neutral/set-layout-mode-L22HRCKS.mjs} +4 -2
  46. package/dist/lib/neutral/set-layout-mode-L22HRCKS.mjs.map +7 -0
  47. package/dist/lib/{browser/spotlight-dismiss-67PHYS5B.mjs → neutral/spotlight-dismiss-EIYW5E7M.mjs} +7 -15
  48. package/dist/lib/{node-esm/spotlight-dismiss-RMLRZUVY.mjs.map → neutral/spotlight-dismiss-EIYW5E7M.mjs.map} +3 -3
  49. package/dist/lib/{browser/state-TXSMUWYI.mjs → neutral/state-7NXKBLPY.mjs} +5 -6
  50. package/dist/lib/neutral/state-7NXKBLPY.mjs.map +7 -0
  51. package/dist/lib/{browser/switch-workspace-5Y6T4BWJ.mjs → neutral/switch-workspace-PYWPTMFO.mjs} +5 -4
  52. package/dist/lib/{node-esm/switch-workspace-PB6T2SGY.mjs.map → neutral/switch-workspace-PYWPTMFO.mjs.map} +1 -1
  53. package/dist/lib/neutral/translations.mjs +36 -0
  54. package/dist/lib/neutral/translations.mjs.map +7 -0
  55. package/dist/lib/neutral/types/index.mjs +10 -0
  56. package/dist/lib/neutral/types/index.mjs.map +7 -0
  57. package/dist/lib/{browser/update-complementary-MX3TTVAB.mjs → neutral/update-complementary-HKWF5OXT.mjs} +8 -6
  58. package/dist/lib/neutral/update-complementary-HKWF5OXT.mjs.map +7 -0
  59. package/dist/lib/{browser/update-dialog-FPAPZXKO.mjs → neutral/update-dialog-P4ASXCE7.mjs} +5 -4
  60. package/dist/lib/{node-esm/update-dialog-ID267DCL.mjs.map → neutral/update-dialog-P4ASXCE7.mjs.map} +1 -1
  61. package/dist/lib/{browser/update-popover-6V5ZTIYN.mjs → neutral/update-popover-REAKC2GN.mjs} +5 -4
  62. package/dist/lib/{node-esm/update-popover-RLHU2HF4.mjs.map → neutral/update-popover-REAKC2GN.mjs.map} +1 -1
  63. package/dist/lib/{browser/update-sidebar-WHDKYMV7.mjs → neutral/update-sidebar-O5SQPR6Q.mjs} +4 -2
  64. package/dist/lib/neutral/update-sidebar-O5SQPR6Q.mjs.map +7 -0
  65. package/dist/lib/{node-esm/url-handler-WMONO2T6.mjs → neutral/url-handler-GZXUUAHD.mjs} +45 -80
  66. package/dist/lib/neutral/url-handler-GZXUUAHD.mjs.map +7 -0
  67. package/dist/types/src/SimpleLayoutPlugin.d.ts +1 -0
  68. package/dist/types/src/SimpleLayoutPlugin.d.ts.map +1 -1
  69. package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
  70. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  71. package/dist/types/src/capabilities/index.d.ts +21 -6
  72. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  73. package/dist/types/src/capabilities/{operation-handler/operation-handler.d.ts → operation-handler.d.ts} +1 -1
  74. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  75. package/dist/types/src/capabilities/react-root.d.ts.map +1 -0
  76. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  77. package/dist/types/src/capabilities/{spotlight-dismiss/spotlight-dismiss.d.ts → spotlight-dismiss.d.ts} +1 -1
  78. package/dist/types/src/capabilities/spotlight-dismiss.d.ts.map +1 -0
  79. package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +3 -3
  80. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  81. package/dist/types/src/capabilities/{url-handler/url-handler.d.ts → url-handler.d.ts} +1 -1
  82. package/dist/types/src/capabilities/url-handler.d.ts.map +1 -0
  83. package/dist/types/src/components/ContentError.stories.d.ts +21 -19
  84. package/dist/types/src/components/ContentError.stories.d.ts.map +1 -1
  85. package/dist/types/src/components/DebugOverlay/DebugOverlay.d.ts.map +1 -1
  86. package/dist/types/src/components/Dialog/Dialog.d.ts.map +1 -1
  87. package/dist/types/src/components/Home/Home.d.ts.map +1 -1
  88. package/dist/types/src/components/Loading/Loading.stories.d.ts.map +1 -1
  89. package/dist/types/src/components/MobileLayout/MobileLayout.d.ts +2 -2
  90. package/dist/types/src/components/MobileLayout/MobileLayout.d.ts.map +1 -1
  91. package/dist/types/src/components/MobileLayout/MobileLayout.stories.d.ts.map +1 -1
  92. package/dist/types/src/components/NavBranch/NavBranch.d.ts.map +1 -1
  93. package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
  94. package/dist/types/src/components/SimpleLayout/AppBar.d.ts +1 -5
  95. package/dist/types/src/components/SimpleLayout/AppBar.d.ts.map +1 -1
  96. package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts +21 -19
  97. package/dist/types/src/components/SimpleLayout/AppBar.stories.d.ts.map +1 -1
  98. package/dist/types/src/components/SimpleLayout/Drawer.d.ts +4 -7
  99. package/dist/types/src/components/SimpleLayout/Drawer.d.ts.map +1 -1
  100. package/dist/types/src/components/SimpleLayout/Main.d.ts +4 -7
  101. package/dist/types/src/components/SimpleLayout/Main.d.ts.map +1 -1
  102. package/dist/types/src/components/SimpleLayout/NavBar.d.ts +1 -5
  103. package/dist/types/src/components/SimpleLayout/NavBar.d.ts.map +1 -1
  104. package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts +22 -24
  105. package/dist/types/src/components/SimpleLayout/NavBar.stories.d.ts.map +1 -1
  106. package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts +21 -19
  107. package/dist/types/src/components/SimpleLayout/SimpleLayout.stories.d.ts.map +1 -1
  108. package/dist/types/src/components/hooks.d.ts.map +1 -1
  109. package/dist/types/src/hooks/actions.d.ts +3 -3
  110. package/dist/types/src/hooks/actions.d.ts.map +1 -1
  111. package/dist/types/src/hooks/useAppBarProps.d.ts +2 -2
  112. package/dist/types/src/hooks/useAppBarProps.d.ts.map +1 -1
  113. package/dist/types/src/hooks/useCompanions.d.ts.map +1 -1
  114. package/dist/types/src/hooks/useDrawerActions.d.ts.map +1 -1
  115. package/dist/types/src/hooks/useSimpleLayoutState.d.ts +3 -3
  116. package/dist/types/src/hooks/useSimpleLayoutState.d.ts.map +1 -1
  117. package/dist/types/src/index.d.ts +2 -1
  118. package/dist/types/src/index.d.ts.map +1 -1
  119. package/dist/types/src/meta.d.ts.map +1 -1
  120. package/dist/types/src/operations/close.d.ts +1 -1
  121. package/dist/types/src/operations/close.d.ts.map +1 -1
  122. package/dist/types/src/operations/index.d.ts +1 -1
  123. package/dist/types/src/operations/index.d.ts.map +1 -1
  124. package/dist/types/src/operations/open.d.ts +1 -1
  125. package/dist/types/src/operations/open.d.ts.map +1 -1
  126. package/dist/types/src/operations/revert-workspace.d.ts +1 -1
  127. package/dist/types/src/operations/revert-workspace.d.ts.map +1 -1
  128. package/dist/types/src/operations/set-layout-mode.d.ts +1 -1
  129. package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -1
  130. package/dist/types/src/operations/set.d.ts +1 -1
  131. package/dist/types/src/operations/set.d.ts.map +1 -1
  132. package/dist/types/src/operations/state-access.d.ts +3 -3
  133. package/dist/types/src/operations/state-access.d.ts.map +1 -1
  134. package/dist/types/src/operations/switch-workspace.d.ts +1 -1
  135. package/dist/types/src/operations/switch-workspace.d.ts.map +1 -1
  136. package/dist/types/src/operations/update-complementary.d.ts +1 -1
  137. package/dist/types/src/operations/update-complementary.d.ts.map +1 -1
  138. package/dist/types/src/operations/update-dialog.d.ts +1 -1
  139. package/dist/types/src/operations/update-dialog.d.ts.map +1 -1
  140. package/dist/types/src/operations/update-popover.d.ts +1 -1
  141. package/dist/types/src/operations/update-popover.d.ts.map +1 -1
  142. package/dist/types/src/operations/update-sidebar.d.ts +1 -1
  143. package/dist/types/src/operations/update-sidebar.d.ts.map +1 -1
  144. package/dist/types/src/plugin.d.ts +4 -0
  145. package/dist/types/src/plugin.d.ts.map +1 -0
  146. package/dist/types/src/translations.d.ts +21 -20
  147. package/dist/types/src/translations.d.ts.map +1 -1
  148. package/dist/types/src/types/{capabilities.d.ts → SimpleLayoutCapabilities.d.ts} +12 -10
  149. package/dist/types/src/types/SimpleLayoutCapabilities.d.ts.map +1 -0
  150. package/dist/types/src/types/SimpleLayoutEvents.d.ts +4 -0
  151. package/dist/types/src/types/SimpleLayoutEvents.d.ts.map +1 -0
  152. package/dist/types/src/types/index.d.ts +2 -2
  153. package/dist/types/src/types/index.d.ts.map +1 -1
  154. package/dist/types/tsconfig.tsbuildinfo +1 -1
  155. package/package.json +87 -33
  156. package/src/SimpleLayoutPlugin.ts +17 -6
  157. package/src/capabilities/app-graph-builder.ts +21 -0
  158. package/src/capabilities/index.ts +13 -6
  159. package/src/capabilities/{operation-handler/operation-handler.ts → operation-handler.ts} +2 -2
  160. package/src/capabilities/{react-root/react-root.tsx → react-root.tsx} +2 -2
  161. package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +13 -6
  162. package/src/capabilities/{state/state.tsx → state.tsx} +5 -6
  163. package/src/capabilities/url-handler.ts +164 -0
  164. package/src/components/ContentError.stories.tsx +1 -1
  165. package/src/components/Dialog/Dialog.tsx +14 -3
  166. package/src/components/Home/Home.tsx +3 -2
  167. package/src/components/Loading/Loading.tsx +1 -1
  168. package/src/components/MobileLayout/MobileLayout.stories.tsx +13 -13
  169. package/src/components/MobileLayout/MobileLayout.tsx +0 -2
  170. package/src/components/NavBranch/NavBranch.tsx +4 -7
  171. package/src/components/Popover/Popover.tsx +10 -5
  172. package/src/components/SimpleLayout/AppBar.stories.tsx +7 -7
  173. package/src/components/SimpleLayout/AppBar.tsx +45 -42
  174. package/src/components/SimpleLayout/Drawer.tsx +24 -16
  175. package/src/components/SimpleLayout/Main.tsx +5 -5
  176. package/src/components/SimpleLayout/NavBar.stories.tsx +2 -2
  177. package/src/components/SimpleLayout/SimpleLayout.stories.tsx +10 -10
  178. package/src/components/SimpleLayout/SimpleLayout.tsx +9 -9
  179. package/src/components/hooks.ts +1 -1
  180. package/src/hooks/actions.ts +8 -5
  181. package/src/hooks/useAppBarProps.ts +4 -24
  182. package/src/hooks/useDrawerActions.ts +6 -6
  183. package/src/hooks/useNavbarActions.ts +4 -4
  184. package/src/hooks/useSimpleLayoutState.ts +7 -5
  185. package/src/index.ts +2 -1
  186. package/src/meta.ts +3 -1
  187. package/src/operations/close.ts +1 -1
  188. package/src/operations/index.ts +1 -1
  189. package/src/operations/open.ts +36 -3
  190. package/src/operations/revert-workspace.ts +1 -1
  191. package/src/operations/set-layout-mode.ts +1 -1
  192. package/src/operations/set.ts +1 -1
  193. package/src/operations/state-access.ts +5 -3
  194. package/src/operations/switch-workspace.ts +1 -1
  195. package/src/operations/update-complementary.ts +4 -3
  196. package/src/operations/update-dialog.ts +1 -1
  197. package/src/operations/update-popover.ts +1 -1
  198. package/src/operations/update-sidebar.ts +1 -1
  199. package/src/plugin.ts +11 -0
  200. package/src/translations.ts +20 -19
  201. package/src/types/{capabilities.ts → SimpleLayoutCapabilities.ts} +6 -18
  202. package/src/types/SimpleLayoutEvents.ts +15 -0
  203. package/src/types/index.ts +2 -2
  204. package/dist/lib/browser/chunk-J5FQ32AV.mjs.map +0 -7
  205. package/dist/lib/browser/chunk-MRR7PXSM.mjs +0 -29
  206. package/dist/lib/browser/chunk-MRR7PXSM.mjs.map +0 -7
  207. package/dist/lib/browser/chunk-XJVW3PRY.mjs.map +0 -7
  208. package/dist/lib/browser/close-OT5JOGVY.mjs.map +0 -7
  209. package/dist/lib/browser/index.mjs +0 -102
  210. package/dist/lib/browser/index.mjs.map +0 -7
  211. package/dist/lib/browser/meta.json +0 -1
  212. package/dist/lib/browser/open-4FQ44Z5G.mjs +0 -31
  213. package/dist/lib/browser/open-4FQ44Z5G.mjs.map +0 -7
  214. package/dist/lib/browser/operation-handler-OAD7LISD.mjs +0 -16
  215. package/dist/lib/browser/operation-handler-OAD7LISD.mjs.map +0 -7
  216. package/dist/lib/browser/react-root-6KIGPLUT.mjs.map +0 -7
  217. package/dist/lib/browser/react-surface-JLIEQGOL.mjs +0 -44
  218. package/dist/lib/browser/react-surface-JLIEQGOL.mjs.map +0 -7
  219. package/dist/lib/browser/revert-workspace-DLE265AN.mjs.map +0 -7
  220. package/dist/lib/browser/set-52HGTSH4.mjs.map +0 -7
  221. package/dist/lib/browser/set-layout-mode-T6QI3DGU.mjs.map +0 -7
  222. package/dist/lib/browser/spotlight-dismiss-67PHYS5B.mjs.map +0 -7
  223. package/dist/lib/browser/state-TXSMUWYI.mjs.map +0 -7
  224. package/dist/lib/browser/switch-workspace-5Y6T4BWJ.mjs.map +0 -7
  225. package/dist/lib/browser/update-complementary-MX3TTVAB.mjs.map +0 -7
  226. package/dist/lib/browser/update-dialog-FPAPZXKO.mjs.map +0 -7
  227. package/dist/lib/browser/update-popover-6V5ZTIYN.mjs.map +0 -7
  228. package/dist/lib/browser/update-sidebar-WHDKYMV7.mjs.map +0 -7
  229. package/dist/lib/browser/url-handler-GUJ3L7Y3.mjs +0 -163
  230. package/dist/lib/browser/url-handler-GUJ3L7Y3.mjs.map +0 -7
  231. package/dist/lib/node-esm/chunk-27K22G6S.mjs +0 -23
  232. package/dist/lib/node-esm/chunk-27K22G6S.mjs.map +0 -7
  233. package/dist/lib/node-esm/chunk-EXNDYZTP.mjs +0 -1257
  234. package/dist/lib/node-esm/chunk-EXNDYZTP.mjs.map +0 -7
  235. package/dist/lib/node-esm/chunk-WMNTJ2MK.mjs +0 -31
  236. package/dist/lib/node-esm/chunk-WMNTJ2MK.mjs.map +0 -7
  237. package/dist/lib/node-esm/close-PEVHREL2.mjs +0 -35
  238. package/dist/lib/node-esm/index.mjs +0 -103
  239. package/dist/lib/node-esm/index.mjs.map +0 -7
  240. package/dist/lib/node-esm/meta.json +0 -1
  241. package/dist/lib/node-esm/open-LMJY7JCJ.mjs +0 -32
  242. package/dist/lib/node-esm/open-LMJY7JCJ.mjs.map +0 -7
  243. package/dist/lib/node-esm/operation-handler-A2DC4WHC.mjs +0 -18
  244. package/dist/lib/node-esm/operation-handler-A2DC4WHC.mjs.map +0 -7
  245. package/dist/lib/node-esm/react-root-5SCW2KTH.mjs +0 -22
  246. package/dist/lib/node-esm/react-root-5SCW2KTH.mjs.map +0 -7
  247. package/dist/lib/node-esm/react-surface-WLKB6AET.mjs.map +0 -7
  248. package/dist/lib/node-esm/revert-workspace-XZXT64YA.mjs +0 -22
  249. package/dist/lib/node-esm/set-5I6LFH5L.mjs +0 -22
  250. package/dist/lib/node-esm/set-layout-mode-F5B6QLZM.mjs +0 -13
  251. package/dist/lib/node-esm/set-layout-mode-F5B6QLZM.mjs.map +0 -7
  252. package/dist/lib/node-esm/spotlight-dismiss-RMLRZUVY.mjs +0 -68
  253. package/dist/lib/node-esm/state-JMX6FAG4.mjs +0 -49
  254. package/dist/lib/node-esm/state-JMX6FAG4.mjs.map +0 -7
  255. package/dist/lib/node-esm/switch-workspace-PB6T2SGY.mjs +0 -25
  256. package/dist/lib/node-esm/update-complementary-FTW423IY.mjs +0 -32
  257. package/dist/lib/node-esm/update-complementary-FTW423IY.mjs.map +0 -7
  258. package/dist/lib/node-esm/update-dialog-ID267DCL.mjs +0 -30
  259. package/dist/lib/node-esm/update-popover-RLHU2HF4.mjs +0 -34
  260. package/dist/lib/node-esm/update-sidebar-BJ7HTNZ4.mjs +0 -12
  261. package/dist/lib/node-esm/update-sidebar-BJ7HTNZ4.mjs.map +0 -7
  262. package/dist/lib/node-esm/url-handler-WMONO2T6.mjs.map +0 -7
  263. package/dist/types/src/capabilities/operation-handler/index.d.ts +0 -4
  264. package/dist/types/src/capabilities/operation-handler/index.d.ts.map +0 -1
  265. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +0 -1
  266. package/dist/types/src/capabilities/react-root/index.d.ts +0 -6
  267. package/dist/types/src/capabilities/react-root/index.d.ts.map +0 -1
  268. package/dist/types/src/capabilities/react-root/react-root.d.ts.map +0 -1
  269. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  270. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  271. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  272. package/dist/types/src/capabilities/spotlight-dismiss/index.d.ts +0 -3
  273. package/dist/types/src/capabilities/spotlight-dismiss/index.d.ts.map +0 -1
  274. package/dist/types/src/capabilities/spotlight-dismiss/spotlight-dismiss.d.ts.map +0 -1
  275. package/dist/types/src/capabilities/state/index.d.ts +0 -13
  276. package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
  277. package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
  278. package/dist/types/src/capabilities/url-handler/index.d.ts +0 -3
  279. package/dist/types/src/capabilities/url-handler/index.d.ts.map +0 -1
  280. package/dist/types/src/capabilities/url-handler/url-handler.d.ts.map +0 -1
  281. package/dist/types/src/types/capabilities.d.ts.map +0 -1
  282. package/dist/types/src/types/events.d.ts +0 -6
  283. package/dist/types/src/types/events.d.ts.map +0 -1
  284. package/src/capabilities/operation-handler/index.ts +0 -9
  285. package/src/capabilities/react-root/index.ts +0 -7
  286. package/src/capabilities/react-surface/index.ts +0 -7
  287. package/src/capabilities/spotlight-dismiss/index.ts +0 -7
  288. package/src/capabilities/state/index.ts +0 -9
  289. package/src/capabilities/url-handler/index.ts +0 -7
  290. package/src/capabilities/url-handler/url-handler.ts +0 -145
  291. package/src/types/events.ts +0 -15
  292. /package/dist/types/src/capabilities/{react-root/react-root.d.ts → react-root.d.ts} +0 -0
  293. /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
  294. /package/src/capabilities/{spotlight-dismiss/spotlight-dismiss.ts → spotlight-dismiss.ts} +0 -0
@@ -1,10 +1,52 @@
1
- import {
2
- SimpleLayoutState,
3
- meta
4
- } from "./chunk-MRR7PXSM.mjs";
1
+ import "../chunk-J5LGTIGS.mjs";
2
+
3
+ // src/components/DebugOverlay/DebugOverlay.tsx
4
+ import { createContext } from "@radix-ui/react-context";
5
+ import React, { useCallback, useRef } from "react";
6
+ var DEBUG_OVERLAY_NAME = "DebugOverlay";
7
+ var [DebugOverlayProvider, useDebugLog] = createContext(DEBUG_OVERLAY_NAME, {
8
+ dbg: () => {
9
+ }
10
+ });
11
+ var DebugOverlayRoot = ({ children, enabled = true, maxLines = 10 }) => {
12
+ const overlayRef = useRef(null);
13
+ const dbg = useCallback((msg) => {
14
+ if (!overlayRef.current) {
15
+ return;
16
+ }
17
+ const line = document.createElement("pre");
18
+ line.textContent = `${(performance.now() / 1e3).toFixed(2).padStart(8, " ")} ${msg}`;
19
+ overlayRef.current.prepend(line);
20
+ while (overlayRef.current.children.length > maxLines) {
21
+ overlayRef.current.lastChild?.remove();
22
+ }
23
+ }, []);
24
+ return /* @__PURE__ */ React.createElement(DebugOverlayProvider, {
25
+ dbg
26
+ }, children, enabled && /* @__PURE__ */ React.createElement("div", {
27
+ ref: overlayRef,
28
+ style: {
29
+ position: "fixed",
30
+ bottom: "calc(var(--kb-height, 0px) + 8px)",
31
+ left: 8,
32
+ right: 8,
33
+ background: "rgba(0,0,0,0.8)",
34
+ color: "#0f0",
35
+ fontSize: 10,
36
+ fontFamily: "monospace",
37
+ padding: 6,
38
+ borderRadius: 4,
39
+ zIndex: 9999,
40
+ pointerEvents: "none"
41
+ }
42
+ }));
43
+ };
44
+ var DebugOverlay = {
45
+ Root: DebugOverlayRoot
46
+ };
5
47
 
6
48
  // src/components/Home/Home.tsx
7
- import React, { useCallback, useEffect as useEffect2, useMemo, useRef } from "react";
49
+ import React2, { useCallback as useCallback2, useEffect as useEffect2, useMemo, useRef as useRef2 } from "react";
8
50
  import { useOperationInvoker } from "@dxos/app-framework/ui";
9
51
  import { LayoutOperation } from "@dxos/app-toolkit";
10
52
  import { useAppGraph as useAppGraph2 } from "@dxos/app-toolkit/ui";
@@ -15,12 +57,13 @@ import { Mosaic } from "@dxos/react-ui-mosaic";
15
57
  import { SearchPanel, useSearchListItem, useSearchListResults } from "@dxos/react-ui-search";
16
58
  import { mx } from "@dxos/ui-theme";
17
59
  import { byPosition, getHostPlatform, isTauri } from "@dxos/util";
60
+ import { meta } from "#meta";
18
61
 
19
62
  // src/components/hooks.ts
20
63
  import { useEffect } from "react";
21
- import { expandAttendableId } from "@dxos/react-ui-attention";
22
64
  import { useAppGraph } from "@dxos/app-toolkit/ui";
23
65
  import { Graph } from "@dxos/plugin-graph";
66
+ import { expandAttendableId } from "@dxos/react-ui-attention";
24
67
  var useExpandPath = (nodeId) => {
25
68
  const { graph } = useAppGraph();
26
69
  useEffect(() => {
@@ -58,15 +101,15 @@ var Home = (_) => {
58
101
  extract: (node) => toLocalizedString(node.properties.label, t)
59
102
  });
60
103
  const autoFocus = !isTauri() || getHostPlatform() !== "ios";
61
- return /* @__PURE__ */ React.createElement(SearchPanel, {
104
+ return /* @__PURE__ */ React2.createElement(SearchPanel, {
62
105
  onSearch: handleSearch
63
- }, /* @__PURE__ */ React.createElement(Mosaic.Container, {
106
+ }, /* @__PURE__ */ React2.createElement(Mosaic.Container, {
64
107
  asChild: true
65
- }, /* @__PURE__ */ React.createElement(ScrollArea.Root, {
108
+ }, /* @__PURE__ */ React2.createElement(ScrollArea.Root, {
66
109
  centered: true,
67
110
  padding: true,
68
111
  thin: true
69
- }, /* @__PURE__ */ React.createElement(ScrollArea.Viewport, null, /* @__PURE__ */ React.createElement(Mosaic.Stack, {
112
+ }, /* @__PURE__ */ React2.createElement(ScrollArea.Viewport, null, /* @__PURE__ */ React2.createElement(Mosaic.Stack, {
70
113
  classNames: "gap-1",
71
114
  draggable: false,
72
115
  items: results,
@@ -81,9 +124,9 @@ var WorkspaceTile = (props) => {
81
124
  const { selectedValue, registerItem, unregisterItem } = useSearchListItem();
82
125
  const name = toLocalizedString(data.properties.label, t);
83
126
  const isSelected = selectedValue === data.id;
84
- const cardRef = useRef(null);
127
+ const cardRef = useRef2(null);
85
128
  useExpandPath(data.id);
86
- const handleSelect = useCallback(() => invokePromise(LayoutOperation.SwitchWorkspace, {
129
+ const handleSelect = useCallback2(() => invokePromise(LayoutOperation.SwitchWorkspace, {
87
130
  subject: data.id
88
131
  }), [
89
132
  invokePromise,
@@ -110,26 +153,26 @@ var WorkspaceTile = (props) => {
110
153
  }, [
111
154
  isSelected
112
155
  ]);
113
- return /* @__PURE__ */ React.createElement(Card.Root, {
156
+ return /* @__PURE__ */ React2.createElement(Card.Root, {
114
157
  role: "button",
115
158
  fullWidth: true,
116
159
  tabIndex: -1,
117
160
  "data-selected": isSelected,
118
- classNames: mx("dx-focus-ring", isSelected && "bg-hover-overlay"),
161
+ classNames: mx("dx-focus-ring", isSelected && "bg-selected-surface"),
119
162
  onClick: handleSelect,
120
163
  ref: cardRef
121
- }, /* @__PURE__ */ React.createElement(Card.Toolbar, {
164
+ }, /* @__PURE__ */ React2.createElement(Card.Toolbar, {
122
165
  density: "fine"
123
- }, /* @__PURE__ */ React.createElement(Avatar.Root, null, /* @__PURE__ */ React.createElement(Avatar.Content, {
166
+ }, /* @__PURE__ */ React2.createElement(Avatar.Root, null, /* @__PURE__ */ React2.createElement(Avatar.Content, {
124
167
  icon: data.properties.icon,
125
168
  hue: data.properties.hue,
126
169
  hueVariant: "transparent",
127
170
  variant: "square",
128
171
  size: 8,
129
172
  fallback: name
130
- }), /* @__PURE__ */ React.createElement(Avatar.Label, {
173
+ }), /* @__PURE__ */ React2.createElement(Avatar.Label, {
131
174
  classNames: "cursor-pointer"
132
- }, name), /* @__PURE__ */ React.createElement(Icon, {
175
+ }, name), /* @__PURE__ */ React2.createElement(Icon, {
133
176
  icon: "ph--caret-right--regular"
134
177
  }))));
135
178
  };
@@ -149,239 +192,10 @@ var useItemsByDisposition = (disposition, sort = false) => {
149
192
  ]);
150
193
  };
151
194
 
152
- // src/components/SimpleLayout/SimpleLayout.tsx
153
- import React12, { useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as useState3 } from "react";
154
- import { Splitter } from "@dxos/react-ui";
155
- import { Mosaic as Mosaic3 } from "@dxos/react-ui-mosaic";
156
-
157
- // src/hooks/useAppBarProps.ts
158
- import { Atom, useAtomValue } from "@effect-atom/atom-react";
159
- import * as Effect from "effect/Effect";
160
- import * as Option from "effect/Option";
161
- import { useCallback as useCallback2, useMemo as useMemo2 } from "react";
162
- import { useCapability, useOperationInvoker as useOperationInvoker2 } from "@dxos/app-framework/ui";
163
- import { LayoutOperation as LayoutOperation2 } from "@dxos/app-toolkit";
164
- import { useAppGraph as useAppGraph3 } from "@dxos/app-toolkit/ui";
165
- import { Graph as Graph2, Node as Node2, useActionRunner, useNode } from "@dxos/plugin-graph";
166
- import { toLocalizedString as toLocalizedString2, useTranslation as useTranslation2 } from "@dxos/react-ui";
167
- var useAppBarProps = () => {
168
- const { t } = useTranslation2(meta.id);
169
- const stateAtom = useCapability(SimpleLayoutState);
170
- const state = useAtomValue(stateAtom);
171
- const { graph } = useAppGraph3();
172
- const { invokePromise } = useOperationInvoker2();
173
- const runAction = useActionRunner();
174
- const activeId = state.active ?? state.workspace;
175
- const node = useNode(graph, activeId);
176
- const title = node ? toLocalizedString2(node.properties.label, t) : void 0;
177
- const actionsAtom = useMemo2(() => Atom.make((get) => {
178
- const state2 = get(stateAtom);
179
- const activeId2 = state2.active ?? state2.workspace;
180
- const allActions = activeId2 ? get(graph.actions(activeId2)) : [];
181
- const filtered = allActions.filter((action) => [
182
- "list-item",
183
- "list-item-primary",
184
- "heading-list-item"
185
- ].includes(action.properties.disposition));
186
- const nodes = filtered;
187
- const edges = filtered.map((action) => ({
188
- source: "root",
189
- target: action.id,
190
- relation: "child"
191
- }));
192
- const workspaceConnections = state2.workspace ? get(graph.connections(state2.workspace, "child")) : [];
193
- const alternateTreeNode = workspaceConnections.find((node2) => node2.properties.disposition === "alternate-tree");
194
- if (alternateTreeNode && activeId2 !== alternateTreeNode.id) {
195
- const settingsAction = {
196
- id: `appbar-settings-${alternateTreeNode.id}`,
197
- type: Node2.ActionType,
198
- data: () => Effect.promise(() => invokePromise(LayoutOperation2.Open, {
199
- subject: [
200
- alternateTreeNode.id
201
- ]
202
- })),
203
- properties: {
204
- label: alternateTreeNode.properties.label ?? alternateTreeNode.id,
205
- icon: alternateTreeNode.properties.icon ?? "ph--placeholder--regular"
206
- }
207
- };
208
- nodes.push(settingsAction);
209
- edges.push({
210
- source: "root",
211
- target: settingsAction.id,
212
- relation: "child"
213
- });
214
- }
215
- return {
216
- nodes,
217
- edges
218
- };
219
- }), [
220
- graph,
221
- stateAtom
222
- ]);
223
- const showBackButton = activeId !== void 0 && activeId !== Node2.RootId;
224
- const onBack = useCallback2(() => {
225
- if (state.active) {
226
- const isWorkspace = Graph2.getNode(graph, state.active).pipe(Option.map((node2) => node2.properties.disposition === "workspace"), Option.getOrElse(() => false));
227
- if (state.history.length === 0 && isWorkspace) {
228
- void invokePromise(LayoutOperation2.SwitchWorkspace, {
229
- subject: Node2.RootId
230
- });
231
- } else {
232
- void invokePromise(LayoutOperation2.Close, {
233
- subject: [
234
- state.active
235
- ]
236
- });
237
- }
238
- } else {
239
- void invokePromise(LayoutOperation2.SwitchWorkspace, {
240
- subject: Node2.RootId
241
- });
242
- }
243
- }, [
244
- graph,
245
- invokePromise,
246
- state.active,
247
- state.history.length
248
- ]);
249
- const popoverAnchorId = node && state.popoverAnchorId === `${meta.id}:${node.id}` ? state.popoverAnchorId : void 0;
250
- return {
251
- title,
252
- actions: actionsAtom,
253
- showBackButton,
254
- popoverAnchorId,
255
- onBack,
256
- onAction: runAction
257
- };
258
- };
259
-
260
- // src/hooks/useCompanions.ts
261
- import { useMemo as useMemo3 } from "react";
262
- import { useAppGraph as useAppGraph4 } from "@dxos/app-toolkit/ui";
263
- import { useConnections as useConnections2 } from "@dxos/plugin-graph";
264
- import { byPosition as byPosition3 } from "@dxos/util";
265
-
266
- // src/hooks/actions.ts
267
- import * as Effect2 from "effect/Effect";
268
- import { getCompanionVariant } from "@dxos/app-toolkit";
269
- import { Node as Node3 } from "@dxos/plugin-graph";
270
- import { byPosition as byPosition2 } from "@dxos/util";
271
- var PLANK_COMPANION_TYPE = "org.dxos.plugin.deck.plank-companion";
272
- var createCompanionActions = (graph, stateAtom, get, config) => {
273
- const { idPrefix, selectedVariant, updateState } = config;
274
- const state = get(stateAtom);
275
- const activeId = state.active ?? state.workspace;
276
- const activeConnections = activeId ? get(graph.connections(activeId, "child")) : [];
277
- const companions = activeConnections.filter((node) => node.type === PLANK_COMPANION_TYPE).toSorted((a, b) => byPosition2(a.properties, b.properties));
278
- const nodes = [];
279
- const edges = [];
280
- companions.forEach((companion) => {
281
- const companionVariant = getCompanionVariant(companion.id);
282
- const companionAction = {
283
- id: `${idPrefix}-companion-${companion.id}`,
284
- type: Node3.ActionType,
285
- properties: {
286
- icon: companion.properties.icon ?? "ph--placeholder--regular",
287
- label: companion.properties.label,
288
- iconOnly: true,
289
- ...selectedVariant !== void 0 && {
290
- variant: selectedVariant === companionVariant ? "primary" : "ghost"
291
- }
292
- },
293
- data: () => Effect2.sync(() => updateState((current) => {
294
- const closing = current.companionVariant === companionVariant && current.drawerState !== "closed";
295
- return {
296
- ...current,
297
- companionVariant: closing ? void 0 : companionVariant,
298
- drawerState: closing ? "closed" : "open"
299
- };
300
- }))
301
- };
302
- nodes.push(companionAction);
303
- edges.push({
304
- source: "root",
305
- target: companionAction.id,
306
- relation: "child"
307
- });
308
- });
309
- return {
310
- nodes,
311
- edges
312
- };
313
- };
314
-
315
- // src/hooks/useCompanions.ts
316
- var useCompanions = (nodeId) => {
317
- const { graph } = useAppGraph4();
318
- const nodes = useConnections2(graph, nodeId, "child");
319
- const companions = nodes.filter((node) => node.type === PLANK_COMPANION_TYPE);
320
- return useMemo3(() => companions.toSorted((a, b) => byPosition3(a.properties, b.properties)), [
321
- companions
322
- ]);
323
- };
324
-
325
- // src/hooks/useDrawerActions.ts
326
- import { Atom as Atom2 } from "@effect-atom/atom-react";
327
- import * as Effect3 from "effect/Effect";
328
- import { useMemo as useMemo7 } from "react";
329
- import { useCapability as useCapability3 } from "@dxos/app-framework/ui";
330
- import { useAppGraph as useAppGraph7 } from "@dxos/app-toolkit/ui";
331
- import { Node as Node4, useActionRunner as useActionRunner2 } from "@dxos/plugin-graph";
332
- import { useTranslation as useTranslation6 } from "@dxos/react-ui";
333
- import { createGapSeparator } from "@dxos/react-ui-menu";
334
-
335
- // src/components/DebugOverlay/DebugOverlay.tsx
336
- import { createContext } from "@radix-ui/react-context";
337
- import React2, { useCallback as useCallback3, useRef as useRef2 } from "react";
338
- var DEBUG_OVERLAY_NAME = "DebugOverlay";
339
- var [DebugOverlayProvider, useDebugLog] = createContext(DEBUG_OVERLAY_NAME, {
340
- dbg: () => {
341
- }
342
- });
343
- var DebugOverlayRoot = ({ children, enabled = true, maxLines = 10 }) => {
344
- const overlayRef = useRef2(null);
345
- const dbg = useCallback3((msg) => {
346
- if (!overlayRef.current) {
347
- return;
348
- }
349
- const line = document.createElement("pre");
350
- line.textContent = `${(performance.now() / 1e3).toFixed(2).padStart(8, " ")} ${msg}`;
351
- overlayRef.current.prepend(line);
352
- while (overlayRef.current.children.length > maxLines) {
353
- overlayRef.current.lastChild?.remove();
354
- }
355
- }, []);
356
- return /* @__PURE__ */ React2.createElement(DebugOverlayProvider, {
357
- dbg
358
- }, children, enabled && /* @__PURE__ */ React2.createElement("div", {
359
- ref: overlayRef,
360
- style: {
361
- position: "fixed",
362
- bottom: "calc(var(--kb-height, 0px) + 8px)",
363
- left: 8,
364
- right: 8,
365
- background: "rgba(0,0,0,0.8)",
366
- color: "#0f0",
367
- fontSize: 10,
368
- fontFamily: "monospace",
369
- padding: 6,
370
- borderRadius: 4,
371
- zIndex: 9999,
372
- pointerEvents: "none"
373
- }
374
- }));
375
- };
376
- var DebugOverlay = {
377
- Root: DebugOverlayRoot
378
- };
379
-
380
195
  // src/components/Loading/Loading.tsx
381
196
  import React3 from "react";
382
197
  var Loading = () => {
383
198
  return /* @__PURE__ */ React3.createElement("div", {
384
- role: "none",
385
199
  className: "grid place-items-center dx-attention-surface"
386
200
  });
387
201
  };
@@ -409,7 +223,6 @@ var MobileLayoutRoot = /* @__PURE__ */ forwardRef(({ classNames, children, trans
409
223
  keyboardOpen
410
224
  }, /* @__PURE__ */ React4.createElement("div", {
411
225
  ...props,
412
- role: "none",
413
226
  style: {
414
227
  height: "calc(100vh - var(--kb-height, 0px))",
415
228
  transition: `height ${keyboardOpen ? 0 : transition}ms ease-out`
@@ -422,7 +235,6 @@ MobileLayoutRoot.displayName = MOBILE_LAYOUT_ROOT_NAME;
422
235
  var MobileLayoutPanel = /* @__PURE__ */ forwardRef(({ classNames, children, safe, ...props }, forwardedRef) => {
423
236
  return /* @__PURE__ */ React4.createElement("div", {
424
237
  ...props,
425
- role: "none",
426
238
  style: {
427
239
  paddingTop: safe?.top ? "env(safe-area-inset-top)" : void 0,
428
240
  paddingBottom: safe?.bottom ? `calc((1 - var(--kb-open, 0)) * env(safe-area-inset-bottom))` : void 0
@@ -558,12 +370,7 @@ var useIOSKeyboard = () => {
558
370
  keyboardHeight,
559
371
  keyboardOpen,
560
372
  animationDuration
561
- }, {
562
- F: __dxlog_file,
563
- L: 318,
564
- S: void 0,
565
- C: (f, a) => f(...a)
566
- });
373
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 211, S: void 0 });
567
374
  };
568
375
  let rafId;
569
376
  return combine(
@@ -577,12 +384,7 @@ var useIOSKeyboard = () => {
577
384
  type,
578
385
  height: height2,
579
386
  duration: duration2
580
- }, {
581
- F: __dxlog_file,
582
- L: 338,
583
- S: void 0,
584
- C: (f, a) => f(...a)
585
- });
387
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 228, S: void 0 });
586
388
  updateState(height2, type === "show", durationMs);
587
389
  const end = performance.now() + durationMs + 300;
588
390
  let prevOffsetTop = vp?.offsetTop ?? 0;
@@ -622,10 +424,13 @@ var useIOSKeyboard = () => {
622
424
 
623
425
  // src/components/Popover/Popover.tsx
624
426
  import { createContext as createContext3 } from "@radix-ui/react-context";
625
- import React5, { useCallback as useCallback4, useEffect as useEffect4, useMemo as useMemo4, useRef as useRef3, useState as useState2 } from "react";
427
+ import React5, { useCallback as useCallback3, useEffect as useEffect4, useMemo as useMemo2, useRef as useRef3, useState as useState2 } from "react";
626
428
  import { Surface } from "@dxos/app-framework/ui";
627
- import { Popover, toLocalizedString as toLocalizedString3, useTranslation as useTranslation3 } from "@dxos/react-ui";
429
+ import { AppSurface } from "@dxos/app-toolkit/ui";
430
+ import { Popover, toLocalizedString as toLocalizedString2, useTranslation as useTranslation2 } from "@dxos/react-ui";
628
431
  import { Card as Card2 } from "@dxos/react-ui";
432
+ import { useSimpleLayoutState } from "#hooks";
433
+ import { meta as meta2 } from "#meta";
629
434
  var DEBOUNCE_DELAY = 40;
630
435
  var [LayoutPopoverProvider, useLayoutPopoverContext] = createContext3("LayoutPopover");
631
436
  var PopoverRoot = ({ children }) => {
@@ -663,10 +468,10 @@ var PopoverRoot = ({ children }) => {
663
468
  }), children));
664
469
  };
665
470
  var PopoverContent = () => {
666
- const { t } = useTranslation3(meta.id);
471
+ const { t } = useTranslation2(meta2.id);
667
472
  const { state, updateState } = useSimpleLayoutState();
668
473
  const { setOpen } = useLayoutPopoverContext("PopoverContent");
669
- const handleClose = useCallback4(() => {
474
+ const handleClose = useCallback3(() => {
670
475
  setOpen(false);
671
476
  updateState((s) => ({
672
477
  ...s,
@@ -679,7 +484,7 @@ var PopoverContent = () => {
679
484
  setOpen,
680
485
  updateState
681
486
  ]);
682
- const handleInteractOutside = useCallback4((event) => {
487
+ const handleInteractOutside = useCallback3((event) => {
683
488
  if (
684
489
  // TODO(thure): CodeMirror should not focus itself when it updates.
685
490
  event.type === "dismissableLayer.focusOutside" && event.currentTarget?.classList.contains("cm-content")
@@ -691,7 +496,7 @@ var PopoverContent = () => {
691
496
  }, [
692
497
  handleClose
693
498
  ]);
694
- const collisionBoundaries = useMemo4(() => {
499
+ const collisionBoundaries = useMemo2(() => {
695
500
  const closest = state.popoverAnchor?.closest("[data-popover-collision-boundary]");
696
501
  return closest ? [
697
502
  closest
@@ -706,40 +511,43 @@ var PopoverContent = () => {
706
511
  collisionBoundary: collisionBoundaries,
707
512
  onInteractOutside: handleInteractOutside,
708
513
  onEscapeKeyDown: handleInteractOutside
709
- }, /* @__PURE__ */ React5.createElement(Popover.Viewport, null, state.popoverKind === "base" && /* @__PURE__ */ React5.createElement(Surface.Surface, {
710
- role: "popover",
514
+ }, /* @__PURE__ */ React5.createElement(Popover.Viewport, null, state.popoverKind === "base" && state.popoverContent && "component" in state.popoverContent && /* @__PURE__ */ React5.createElement(Surface.Surface, {
515
+ type: AppSurface.Popover,
711
516
  data: state.popoverContent,
712
517
  limit: 1
713
518
  }), state.popoverKind === "card" && /* @__PURE__ */ React5.createElement(Card2.Root, {
714
519
  border: false,
715
520
  classNames: "dx-card-popover"
716
- }, /* @__PURE__ */ React5.createElement(Card2.Toolbar, null, /* @__PURE__ */ React5.createElement("span", null), state.popoverTitle ? /* @__PURE__ */ React5.createElement(Card2.Title, null, toLocalizedString3(state.popoverTitle, t)) : /* @__PURE__ */ React5.createElement("span", null), /* @__PURE__ */ React5.createElement(Card2.CloseIconButton, {
521
+ }, /* @__PURE__ */ React5.createElement(Card2.Toolbar, null, /* @__PURE__ */ React5.createElement("span", null), state.popoverTitle ? /* @__PURE__ */ React5.createElement(Card2.Title, null, toLocalizedString2(state.popoverTitle, t)) : /* @__PURE__ */ React5.createElement("span", null), /* @__PURE__ */ React5.createElement(Card2.CloseIconButton, {
717
522
  onClick: handleClose
718
- })), /* @__PURE__ */ React5.createElement(Surface.Surface, {
719
- role: "card--content",
523
+ })), state.popoverContent && "subject" in state.popoverContent && /* @__PURE__ */ React5.createElement(Surface.Surface, {
524
+ type: AppSurface.Card,
720
525
  data: state.popoverContent,
721
526
  limit: 1
722
527
  }))), /* @__PURE__ */ React5.createElement(Popover.Arrow, null)));
723
528
  };
724
529
 
725
530
  // src/components/SimpleLayout/AppBar.tsx
726
- import { useAtomValue as useAtomValue2 } from "@effect-atom/atom-react";
531
+ import { useAtomValue } from "@effect-atom/atom-react";
727
532
  import React6, { Fragment } from "react";
728
- import { IconButton, Popover as Popover2, Toolbar, useTranslation as useTranslation4 } from "@dxos/react-ui";
533
+ import { DensityProvider, IconButton, Popover as Popover2, Toolbar, useTranslation as useTranslation3 } from "@dxos/react-ui";
729
534
  import { Menu, useMenuActions } from "@dxos/react-ui-menu";
730
535
  import { composable, composableProps, osTranslations } from "@dxos/ui-theme";
536
+ import { meta as meta3 } from "#meta";
731
537
  var APP_BAR_NAME = "SimpleLayout.AppBar";
732
538
  var AppBar = composable(({ classNames, title, actions, showBackButton, popoverAnchorId, onAction, onBack, ...props }, forwardedRef) => {
733
- const { t } = useTranslation4(meta.id);
539
+ const { t } = useTranslation3(meta3.id);
734
540
  const menuActions = useMenuActions(actions);
735
- const actionsValue = useAtomValue2(actions);
541
+ const actionsValue = useAtomValue(actions);
736
542
  const hasActions = actionsValue.nodes.length > 0;
737
543
  const { keyboardOpen } = useMobileLayout(APP_BAR_NAME);
738
- const displayTitle = title ?? t("current app name", {
544
+ const displayTitle = title ?? t("current-app.name", {
739
545
  ns: osTranslations
740
546
  });
741
547
  const AnchorRoot = popoverAnchorId ? Popover2.Anchor : Fragment;
742
- return /* @__PURE__ */ React6.createElement(Toolbar.Root, {
548
+ return /* @__PURE__ */ React6.createElement(DensityProvider, {
549
+ density: "fine"
550
+ }, /* @__PURE__ */ React6.createElement(Toolbar.Root, {
743
551
  ...composableProps(props, {
744
552
  role: "banner",
745
553
  classNames: "grid grid-cols-[var(--dx-rail-size)_1fr_var(--dx-rail-size)] items-center dx-density-fine"
@@ -749,18 +557,18 @@ var AppBar = composable(({ classNames, title, actions, showBackButton, popoverAn
749
557
  variant: "ghost",
750
558
  icon: "ph--x--regular",
751
559
  iconOnly: true,
752
- label: t("done label")
560
+ label: t("done.label")
753
561
  }) : showBackButton ? /* @__PURE__ */ React6.createElement(IconButton, {
754
562
  variant: "ghost",
755
563
  icon: "ph--caret-left--regular",
756
564
  iconOnly: true,
757
- label: t("back label"),
565
+ label: t("back.label"),
758
566
  onClick: onBack
759
567
  }) : /* @__PURE__ */ React6.createElement("div", null), /* @__PURE__ */ React6.createElement("h1", {
760
568
  className: "text-center truncate font-thin uppercase"
761
569
  }, displayTitle), hasActions ? /* @__PURE__ */ React6.createElement(AnchorRoot, null, /* @__PURE__ */ React6.createElement(Menu.Root, {
762
570
  ...menuActions,
763
- caller: meta.id,
571
+ caller: meta3.id,
764
572
  onAction
765
573
  }, /* @__PURE__ */ React6.createElement(Menu.Trigger, {
766
574
  asChild: true
@@ -768,18 +576,19 @@ var AppBar = composable(({ classNames, title, actions, showBackButton, popoverAn
768
576
  variant: "ghost",
769
577
  icon: "ph--dots-three-vertical--regular",
770
578
  iconOnly: true,
771
- label: t("actions menu label")
772
- })), /* @__PURE__ */ React6.createElement(Menu.Content, null))) : /* @__PURE__ */ React6.createElement("span", null));
579
+ label: t("actions-menu.label")
580
+ })), /* @__PURE__ */ React6.createElement(Menu.Content, null))) : /* @__PURE__ */ React6.createElement("span", null)));
773
581
  });
774
582
  AppBar.displayName = APP_BAR_NAME;
775
583
 
776
584
  // src/components/SimpleLayout/Main.tsx
777
- import React8, { useMemo as useMemo5 } from "react";
585
+ import React8, { useMemo as useMemo3 } from "react";
778
586
  import { Surface as Surface2 } from "@dxos/app-framework/ui";
779
- import { useAppGraph as useAppGraph5 } from "@dxos/app-toolkit/ui";
780
- import { useNode as useNode2 } from "@dxos/plugin-graph";
587
+ import { AppSurface as AppSurface2, useAppGraph as useAppGraph3 } from "@dxos/app-toolkit/ui";
588
+ import { useNode } from "@dxos/plugin-graph";
781
589
  import { ErrorFallback, Panel } from "@dxos/react-ui";
782
590
  import { useAttentionAttributes } from "@dxos/react-ui-attention";
591
+ import { useAppBarProps, useNavbarActions, useSimpleLayoutState as useSimpleLayoutState2 } from "#hooks";
783
592
 
784
593
  // src/components/SimpleLayout/NavBar.tsx
785
594
  import React7 from "react";
@@ -802,16 +611,16 @@ NavBar.displayName = NAVBAR_NAME;
802
611
  // src/components/SimpleLayout/Main.tsx
803
612
  var MAIN_NAME = "SimpleLayout.Main";
804
613
  var Main = () => {
805
- const { state } = useSimpleLayoutState();
614
+ const { state } = useSimpleLayoutState2();
806
615
  const id = state.active ?? state.workspace;
807
616
  const attentionAttrs = useAttentionAttributes(id);
808
617
  const { keyboardOpen } = useMobileLayout(MAIN_NAME);
809
618
  const { actions, onAction } = useNavbarActions();
810
619
  const appBarProps = useAppBarProps();
811
- const placeholder = useMemo5(() => /* @__PURE__ */ React8.createElement(Loading, null), []);
812
- const { graph } = useAppGraph5();
813
- const node = useNode2(graph, id);
814
- const data = useMemo5(() => {
620
+ const placeholder = useMemo3(() => /* @__PURE__ */ React8.createElement(Loading, null), []);
621
+ const { graph } = useAppGraph3();
622
+ const node = useNode(graph, id);
623
+ const data = useMemo3(() => {
815
624
  return node && {
816
625
  attendableId: id,
817
626
  subject: node.data,
@@ -837,7 +646,7 @@ var Main = () => {
837
646
  className: "bg-base-surface"
838
647
  }, /* @__PURE__ */ React8.createElement(Surface2.Surface, {
839
648
  key: id,
840
- role: "article",
649
+ type: AppSurface2.Article,
841
650
  data,
842
651
  limit: 1,
843
652
  fallback: ErrorFallback,
@@ -851,314 +660,71 @@ var Main = () => {
851
660
  };
852
661
  Main.displayName = MAIN_NAME;
853
662
 
854
- // src/components/NavBranch/NavBranch.tsx
855
- import React9, { useCallback as useCallback5, useEffect as useEffect5, useMemo as useMemo6, useRef as useRef4 } from "react";
856
- import { useOperationInvoker as useOperationInvoker3 } from "@dxos/app-framework/ui";
857
- import { LayoutOperation as LayoutOperation3 } from "@dxos/app-toolkit";
858
- import { useAppGraph as useAppGraph6 } from "@dxos/app-toolkit/ui";
859
- import { useConnections as useConnections3 } from "@dxos/plugin-graph";
860
- import { Avatar as Avatar2, Icon as Icon2, ScrollArea as ScrollArea2, toLocalizedString as toLocalizedString4, useTranslation as useTranslation5 } from "@dxos/react-ui";
861
- import { Card as Card3 } from "@dxos/react-ui";
663
+ // src/components/SimpleLayout/SimpleLayout.tsx
664
+ import React11, { useLayoutEffect as useLayoutEffect2, useRef as useRef4, useState as useState3 } from "react";
665
+ import { Splitter } from "@dxos/react-ui";
862
666
  import { Mosaic as Mosaic2 } from "@dxos/react-ui-mosaic";
863
- import { SearchPanel as SearchPanel2, useSearchListItem as useSearchListItem2, useSearchListResults as useSearchListResults2 } from "@dxos/react-ui-search";
864
- import { mx as mx3 } from "@dxos/ui-theme";
865
- var NavBranch = ({ id }) => {
866
- const { t } = useTranslation5(meta.id);
867
- const { graph } = useAppGraph6();
868
- useExpandPath(id);
869
- const children = useConnections3(graph, id, "child");
870
- const visibleChildren = useMemo6(() => children.filter((node) => node.properties.disposition !== "alternate-tree" && node.properties.disposition !== "hidden"), [
871
- children
872
- ]);
873
- const { results, handleSearch } = useSearchListResults2({
874
- items: visibleChildren,
875
- extract: (child) => toLocalizedString4(child.properties.label, t)
876
- });
877
- return /* @__PURE__ */ React9.createElement(SearchPanel2, {
878
- onSearch: handleSearch
879
- }, /* @__PURE__ */ React9.createElement(Mosaic2.Container, {
880
- asChild: true
881
- }, /* @__PURE__ */ React9.createElement(ScrollArea2.Root, {
882
- centered: true,
883
- padding: true,
884
- thin: true
885
- }, /* @__PURE__ */ React9.createElement(ScrollArea2.Viewport, null, /* @__PURE__ */ React9.createElement(Mosaic2.Stack, {
886
- classNames: "gap-1",
887
- draggable: false,
888
- items: results,
889
- getId: (item) => item.id,
890
- Tile: NavBranchTile
891
- })))));
892
- };
893
- var NavBranchTile = (props) => {
894
- const data = props.data;
895
- const { t } = useTranslation5(meta.id);
896
- const { invokePromise } = useOperationInvoker3();
897
- const ref = useRef4(null);
898
- const { selectedValue, registerItem, unregisterItem } = useSearchListItem2();
899
- const isSelected = selectedValue === data.id;
900
- const name = toLocalizedString4(data.properties.label, t);
901
- const handleSelect = useCallback5(() => void invokePromise(LayoutOperation3.Open, {
902
- subject: [
903
- data.id
904
- ]
905
- }), [
906
- invokePromise,
907
- data.id
908
- ]);
909
- useEffect5(() => {
910
- if (ref.current) {
911
- registerItem(data.id, ref.current, handleSelect);
912
- }
913
- return () => unregisterItem(data.id);
914
- }, [
915
- data.id,
916
- handleSelect,
917
- registerItem,
918
- unregisterItem
919
- ]);
920
- useEffect5(() => {
921
- if (isSelected && ref.current) {
922
- ref.current.scrollIntoView({
923
- block: "nearest",
924
- behavior: "smooth"
925
- });
926
- }
927
- }, [
928
- isSelected
929
- ]);
930
- return /* @__PURE__ */ React9.createElement(Card3.Root, {
931
- ref,
932
- role: "button",
933
- fullWidth: true,
934
- tabIndex: -1,
935
- "data-selected": isSelected,
936
- classNames: mx3("dx-focus-ring cursor-pointer", isSelected && "bg-hover-overlay"),
937
- onClick: handleSelect
938
- }, /* @__PURE__ */ React9.createElement(Card3.Toolbar, null, /* @__PURE__ */ React9.createElement(Avatar2.Root, null, /* @__PURE__ */ React9.createElement(Avatar2.Content, {
939
- hue: data.properties.hue,
940
- icon: data.properties.icon,
941
- hueVariant: "transparent",
942
- variant: "square",
943
- size: 8,
944
- fallback: name
945
- }), /* @__PURE__ */ React9.createElement(Avatar2.Label, null, name), /* @__PURE__ */ React9.createElement(Icon2, {
946
- icon: "ph--caret-right--regular"
947
- }))));
948
- };
949
-
950
- // src/hooks/useSimpleLayoutState.ts
951
- import { RegistryContext, useAtomValue as useAtomValue3 } from "@effect-atom/atom-react";
952
- import { useCallback as useCallback6, useContext } from "react";
953
- import { useCapability as useCapability2 } from "@dxos/app-framework/ui";
954
- var useSimpleLayoutState = () => {
955
- const registry = useContext(RegistryContext);
956
- const stateAtom = useCapability2(SimpleLayoutState);
957
- const state = useAtomValue3(stateAtom);
958
- const updateState = useCallback6((fn) => {
959
- registry.set(stateAtom, fn(registry.get(stateAtom)));
960
- }, [
961
- registry,
962
- stateAtom
963
- ]);
964
- return {
965
- state,
966
- updateState
967
- };
968
- };
969
-
970
- // src/hooks/useDrawerActions.ts
971
- var useDrawerActions = (consumerName) => {
972
- const { t } = useTranslation6(meta.id);
973
- const stateAtom = useCapability3(SimpleLayoutState);
974
- const { graph } = useAppGraph7();
975
- const runAction = useActionRunner2();
976
- const { updateState } = useSimpleLayoutState();
977
- const { keyboardOpen } = useMobileLayout(consumerName);
978
- const actionsAtom = useMemo7(() => Atom2.make((get) => {
979
- const state = get(stateAtom);
980
- const { nodes, edges } = createCompanionActions(graph, stateAtom, get, {
981
- idPrefix: "drawer",
982
- selectedVariant: state.drawerState !== "closed" ? state.companionVariant : void 0,
983
- updateState
984
- });
985
- const gapSeparator = createGapSeparator("drawer-gap");
986
- nodes.push(...gapSeparator.nodes);
987
- edges.push(...gapSeparator.edges);
988
- if (!keyboardOpen) {
989
- const isExpanded = state.drawerState === "expanded";
990
- const toggleExpandAction = {
991
- id: "drawer-toggle-expand",
992
- type: Node4.ActionType,
993
- properties: {
994
- icon: isExpanded ? "ph--arrow-down--regular" : "ph--arrow-up--regular",
995
- label: isExpanded ? t("collapse drawer label") : t("expand drawer label"),
996
- iconOnly: true
997
- },
998
- data: () => Effect3.sync(() => updateState((state2) => ({
999
- ...state2,
1000
- drawerState: isExpanded ? "open" : "expanded"
1001
- })))
1002
- };
1003
- nodes.push(toggleExpandAction);
1004
- edges.push({
1005
- source: "root",
1006
- target: toggleExpandAction.id,
1007
- relation: "child"
1008
- });
1009
- }
1010
- const closeAction = {
1011
- id: "drawer-close",
1012
- type: Node4.ActionType,
1013
- properties: {
1014
- icon: "ph--x--regular",
1015
- label: t("close drawer label"),
1016
- iconOnly: true
1017
- },
1018
- data: () => Effect3.sync(() => updateState((state2) => ({
1019
- ...state2,
1020
- drawerState: "closed",
1021
- companionVariant: void 0
1022
- })))
1023
- };
1024
- nodes.push(closeAction);
1025
- edges.push({
1026
- source: "root",
1027
- target: closeAction.id,
1028
- relation: "child"
1029
- });
1030
- return {
1031
- nodes,
1032
- edges
1033
- };
1034
- }), [
1035
- graph,
1036
- stateAtom,
1037
- updateState,
1038
- keyboardOpen,
1039
- t
1040
- ]);
1041
- return {
1042
- actions: actionsAtom,
1043
- onAction: runAction
1044
- };
1045
- };
1046
-
1047
- // src/hooks/useNavbarActions.ts
1048
- import { Atom as Atom3 } from "@effect-atom/atom-react";
1049
- import { useMemo as useMemo8 } from "react";
1050
- import { useCapability as useCapability4 } from "@dxos/app-framework/ui";
1051
- import { useAppGraph as useAppGraph8 } from "@dxos/app-toolkit/ui";
1052
- import { Node as Node5, useActionRunner as useActionRunner3 } from "@dxos/plugin-graph";
1053
- import { useTranslation as useTranslation7 } from "@dxos/react-ui";
1054
- import { createGapSeparator as createGapSeparator2, createMenuItemGroup } from "@dxos/react-ui-menu";
1055
- var MAIN_MENU_GROUP_ID = "navbar-main-menu";
1056
- var useNavbarActions = () => {
1057
- const { t } = useTranslation7(meta.id);
1058
- const { graph } = useAppGraph8();
1059
- const runAction = useActionRunner3();
1060
- const stateAtom = useCapability4(SimpleLayoutState);
1061
- const { updateState } = useSimpleLayoutState();
1062
- const actionsAtom = useMemo8(() => Atom3.make((get) => {
1063
- const { nodes, edges } = createCompanionActions(graph, stateAtom, get, {
1064
- idPrefix: "navbar",
1065
- updateState
1066
- });
1067
- const gapSeparator = createGapSeparator2("navbar-gap");
1068
- nodes.push(...gapSeparator.nodes);
1069
- edges.push(...gapSeparator.edges);
1070
- const mainMenuGroup = createMenuItemGroup(MAIN_MENU_GROUP_ID, {
1071
- variant: "dropdownMenu",
1072
- icon: "ph--list--regular",
1073
- iconOnly: true,
1074
- label: t("main menu label"),
1075
- testId: "simpleLayoutPlugin.addSpace"
1076
- });
1077
- nodes.push(mainMenuGroup);
1078
- edges.push({
1079
- source: "root",
1080
- target: mainMenuGroup.id,
1081
- relation: "child"
1082
- });
1083
- const rootActions = get(graph.actions(Node5.RootId));
1084
- const menuActions = rootActions.filter((node) => node.properties.disposition === "menu");
1085
- menuActions.forEach((menuAction) => {
1086
- nodes.push(menuAction);
1087
- edges.push({
1088
- source: MAIN_MENU_GROUP_ID,
1089
- target: menuAction.id,
1090
- relation: "child"
1091
- });
1092
- });
1093
- return {
1094
- nodes,
1095
- edges
1096
- };
1097
- }), [
1098
- graph,
1099
- stateAtom,
1100
- updateState,
1101
- t
1102
- ]);
1103
- return {
1104
- actions: actionsAtom,
1105
- onAction: runAction
1106
- };
1107
- };
667
+ import { useSimpleLayoutState as useSimpleLayoutState5 } from "#hooks";
1108
668
 
1109
669
  // src/components/Dialog/Dialog.tsx
1110
- import React10 from "react";
670
+ import React9 from "react";
1111
671
  import { Surface as Surface3 } from "@dxos/app-framework/ui";
672
+ import { AppSurface as AppSurface3 } from "@dxos/app-toolkit/ui";
1112
673
  import { AlertDialog, Dialog as NaturalDialog } from "@dxos/react-ui";
1113
674
  import { ErrorFallback as ErrorFallback2 } from "@dxos/react-ui";
675
+ import { useSimpleLayoutState as useSimpleLayoutState3 } from "#hooks";
1114
676
  var Dialog = () => {
1115
- const { state, updateState } = useSimpleLayoutState();
677
+ const { state, updateState } = useSimpleLayoutState3();
1116
678
  const DialogRoot = state.dialogType === "alert" ? AlertDialog.Root : NaturalDialog.Root;
1117
679
  const DialogOverlay = state.dialogType === "alert" ? AlertDialog.Overlay : NaturalDialog.Overlay;
1118
- return /* @__PURE__ */ React10.createElement(DialogRoot, {
680
+ return /* @__PURE__ */ React9.createElement(DialogRoot, {
1119
681
  modal: state.dialogBlockAlign !== "end",
1120
682
  open: state.dialogOpen,
1121
683
  onOpenChange: (nextOpen) => updateState((state2) => ({
1122
684
  ...state2,
1123
685
  dialogOpen: nextOpen
1124
686
  }))
1125
- }, state.dialogBlockAlign === "end" ? /* @__PURE__ */ React10.createElement(Surface3.Surface, {
1126
- role: "dialog",
1127
- data: state.dialogContent,
687
+ }, state.dialogBlockAlign === "end" ? /* @__PURE__ */ React9.createElement(Surface3.Surface, {
688
+ type: AppSurface3.Dialog,
689
+ data: state.dialogContent ?? void 0,
1128
690
  limit: 1,
1129
691
  fallback: ErrorFallback2
1130
- }) : /* @__PURE__ */ React10.createElement(DialogOverlay, {
692
+ }) : /* @__PURE__ */ React9.createElement(DialogOverlay, {
1131
693
  blockAlign: state.dialogBlockAlign,
1132
694
  classNames: state.dialogOverlayClasses,
1133
695
  style: state.dialogOverlayStyle
1134
- }, /* @__PURE__ */ React10.createElement(Surface3.Surface, {
1135
- role: "dialog",
1136
- data: state.dialogContent,
696
+ }, /* @__PURE__ */ React9.createElement(Surface3.Surface, {
697
+ type: AppSurface3.Dialog,
698
+ data: state.dialogContent ?? void 0,
1137
699
  limit: 1,
1138
700
  fallback: ErrorFallback2
1139
701
  })));
1140
702
  };
1141
703
 
1142
704
  // src/components/SimpleLayout/Drawer.tsx
1143
- import React11, { useMemo as useMemo9 } from "react";
705
+ import React10, { useMemo as useMemo4 } from "react";
1144
706
  import { Surface as Surface4 } from "@dxos/app-framework/ui";
1145
- import { getCompanionVariant as getCompanionVariant2 } from "@dxos/app-toolkit";
1146
- import { useAppGraph as useAppGraph9 } from "@dxos/app-toolkit/ui";
1147
- import { useNode as useNode3 } from "@dxos/plugin-graph";
707
+ import { AppSurface as AppSurface4, useAppGraph as useAppGraph4 } from "@dxos/app-toolkit/ui";
708
+ import { useNode as useNode2 } from "@dxos/plugin-graph";
1148
709
  import { ErrorFallback as ErrorFallback3, Panel as Panel2 } from "@dxos/react-ui";
710
+ import { getLinkedVariant } from "@dxos/react-ui-attention";
1149
711
  import { Menu as Menu3, useMenuActions as useMenuActions3 } from "@dxos/react-ui-menu";
712
+ import { useCompanions, useDrawerActions, useSimpleLayoutState as useSimpleLayoutState4 } from "#hooks";
1150
713
  var DRAWER_NAME = "SimpleLayout.Drawer";
1151
714
  var Drawer = () => {
1152
- const { graph } = useAppGraph9();
1153
- const { state: layoutState } = useSimpleLayoutState();
1154
- const placeholder = useMemo9(() => /* @__PURE__ */ React11.createElement(Loading, null), []);
715
+ const { graph } = useAppGraph4();
716
+ const { state: layoutState } = useSimpleLayoutState4();
717
+ const placeholder = useMemo4(() => /* @__PURE__ */ React10.createElement(Loading, null), []);
1155
718
  const activeId = layoutState.active ?? layoutState.workspace;
1156
719
  const companions = useCompanions(activeId);
1157
720
  const { companionId, variant } = useSelectedCompanion(companions, layoutState.companionVariant);
1158
- const node = useNode3(graph, companionId);
1159
- const parentNode = useNode3(graph, activeId);
1160
- const data = useMemo9(() => {
1161
- return node && {
721
+ const node = useNode2(graph, companionId);
722
+ const parentNode = useNode2(graph, activeId);
723
+ const data = useMemo4(() => {
724
+ if (!node || !companionId) {
725
+ return void 0;
726
+ }
727
+ return {
1162
728
  attendableId: companionId,
1163
729
  subject: node.data,
1164
730
  companionTo: parentNode?.data,
@@ -1173,12 +739,12 @@ var Drawer = () => {
1173
739
  ]);
1174
740
  const { actions, onAction } = useDrawerActions(DRAWER_NAME);
1175
741
  const menuActions = useMenuActions3(actions);
1176
- return /* @__PURE__ */ React11.createElement(Panel2.Root, null, /* @__PURE__ */ React11.createElement(Panel2.Toolbar, null, /* @__PURE__ */ React11.createElement(Menu3.Root, {
742
+ return /* @__PURE__ */ React10.createElement(Panel2.Root, null, /* @__PURE__ */ React10.createElement(Panel2.Toolbar, null, /* @__PURE__ */ React10.createElement(Menu3.Root, {
1177
743
  ...menuActions,
1178
744
  alwaysActive: true,
1179
745
  onAction
1180
- }, /* @__PURE__ */ React11.createElement(Menu3.Toolbar, null))), /* @__PURE__ */ React11.createElement(Panel2.Content, null, /* @__PURE__ */ React11.createElement(Surface4.Surface, {
1181
- role: "article",
746
+ }, /* @__PURE__ */ React10.createElement(Menu3.Toolbar, null))), /* @__PURE__ */ React10.createElement(Panel2.Content, null, /* @__PURE__ */ React10.createElement(Surface4.Surface, {
747
+ type: AppSurface4.Article,
1182
748
  data,
1183
749
  limit: 1,
1184
750
  fallback: ErrorFallback3,
@@ -1187,12 +753,12 @@ var Drawer = () => {
1187
753
  };
1188
754
  Drawer.displayName = DRAWER_NAME;
1189
755
  var useSelectedCompanion = (companions, preferredVariant) => {
1190
- const selectedCompanion = useMemo9(() => {
756
+ const selectedCompanion = useMemo4(() => {
1191
757
  if (companions.length === 0) {
1192
758
  return void 0;
1193
759
  }
1194
760
  if (preferredVariant) {
1195
- const preferred = companions.find((c) => getCompanionVariant2(c.id) === preferredVariant);
761
+ const preferred = companions.find((c) => getLinkedVariant(c.id) === preferredVariant);
1196
762
  if (preferred) {
1197
763
  return preferred;
1198
764
  }
@@ -1203,7 +769,7 @@ var useSelectedCompanion = (companions, preferredVariant) => {
1203
769
  preferredVariant
1204
770
  ]);
1205
771
  const companionId = selectedCompanion?.id;
1206
- const variant = companionId ? getCompanionVariant2(companionId) : void 0;
772
+ const variant = companionId ? getLinkedVariant(companionId) : void 0;
1207
773
  return {
1208
774
  selectedCompanion,
1209
775
  companionId,
@@ -1213,44 +779,148 @@ var useSelectedCompanion = (companions, preferredVariant) => {
1213
779
 
1214
780
  // src/components/SimpleLayout/SimpleLayout.tsx
1215
781
  var SimpleLayout = () => {
1216
- const { state } = useSimpleLayoutState();
782
+ const { state } = useSimpleLayoutState5();
1217
783
  const [keyboardOpen, setKeyboardOpen] = useState3(false);
1218
- const [splitterMode, setSplitterMode] = useState3("upper");
1219
- const drawerRef = useRef5(null);
784
+ const [splitterMode, setSplitterMode] = useState3("top");
785
+ const drawerRef = useRef4(null);
1220
786
  useLayoutEffect2(() => {
1221
787
  if (!keyboardOpen) {
1222
- setSplitterMode(state.drawerState === "closed" ? "upper" : state.drawerState === "open" ? "both" : "lower");
788
+ setSplitterMode(state.drawerState === "closed" ? "top" : state.drawerState === "open" ? "split" : "bottom");
1223
789
  }
1224
790
  }, [
1225
791
  state.drawerState,
1226
792
  keyboardOpen
1227
793
  ]);
1228
- return /* @__PURE__ */ React12.createElement(DebugOverlay.Root, {
794
+ return /* @__PURE__ */ React11.createElement(DebugOverlay.Root, {
1229
795
  enabled: false
1230
- }, /* @__PURE__ */ React12.createElement(PopoverRoot, null, /* @__PURE__ */ React12.createElement(Mosaic3.Root, {
1231
- classNames: "dx-container grid relative"
1232
- }, /* @__PURE__ */ React12.createElement(MobileLayout.Root, {
1233
- classNames: "bg-toolbar-surface",
796
+ }, /* @__PURE__ */ React11.createElement(PopoverRoot, null, /* @__PURE__ */ React11.createElement(Mosaic2.Root, null, /* @__PURE__ */ React11.createElement(MobileLayout.Root, {
797
+ classNames: "dx-container grid relative bg-toolbar-surface",
1234
798
  onKeyboardOpenChange: (nextKeyboardOpen) => setKeyboardOpen(nextKeyboardOpen)
1235
- }, /* @__PURE__ */ React12.createElement(MobileLayout.Panel, {
799
+ }, /* @__PURE__ */ React11.createElement(MobileLayout.Panel, {
1236
800
  safe: {
1237
801
  top: true,
1238
- bottom: splitterMode === "upper"
802
+ bottom: splitterMode === "top"
1239
803
  }
1240
- }, /* @__PURE__ */ React12.createElement(Splitter.Root, {
804
+ }, /* @__PURE__ */ React11.createElement(Splitter.Root, {
1241
805
  mode: splitterMode,
1242
806
  ratio: 0.55
1243
- }, /* @__PURE__ */ React12.createElement(Splitter.Panel, {
1244
- position: "upper"
1245
- }, /* @__PURE__ */ React12.createElement(Main, null)), /* @__PURE__ */ React12.createElement(Splitter.Panel, {
1246
- position: "lower",
807
+ }, /* @__PURE__ */ React11.createElement(Splitter.Panel, {
808
+ position: "top"
809
+ }, /* @__PURE__ */ React11.createElement(Main, null)), /* @__PURE__ */ React11.createElement(Splitter.Panel, {
810
+ position: "bottom",
1247
811
  ref: drawerRef
1248
- }, /* @__PURE__ */ React12.createElement(Drawer, null))), /* @__PURE__ */ React12.createElement(Dialog, null), /* @__PURE__ */ React12.createElement(PopoverContent, null))))));
812
+ }, /* @__PURE__ */ React11.createElement(Drawer, null))), /* @__PURE__ */ React11.createElement(Dialog, null), /* @__PURE__ */ React11.createElement(PopoverContent, null))))));
1249
813
  };
1250
814
 
815
+ // src/components/NavBranch/NavBranch.tsx
816
+ import React12, { useCallback as useCallback4, useEffect as useEffect5, useMemo as useMemo5, useRef as useRef5 } from "react";
817
+ import { useOperationInvoker as useOperationInvoker2 } from "@dxos/app-framework/ui";
818
+ import { LayoutOperation as LayoutOperation2 } from "@dxos/app-toolkit";
819
+ import { useAppGraph as useAppGraph5 } from "@dxos/app-toolkit/ui";
820
+ import { useConnections as useConnections2 } from "@dxos/plugin-graph";
821
+ import { Avatar as Avatar2, Icon as Icon2, ScrollArea as ScrollArea2, toLocalizedString as toLocalizedString3, useTranslation as useTranslation4 } from "@dxos/react-ui";
822
+ import { Card as Card3 } from "@dxos/react-ui";
823
+ import { Mosaic as Mosaic3 } from "@dxos/react-ui-mosaic";
824
+ import { SearchPanel as SearchPanel2, useSearchListItem as useSearchListItem2, useSearchListResults as useSearchListResults2 } from "@dxos/react-ui-search";
825
+ import { mx as mx3 } from "@dxos/ui-theme";
826
+ import { meta as meta4 } from "#meta";
827
+ var NavBranch = ({ id }) => {
828
+ const { t } = useTranslation4(meta4.id);
829
+ const { graph } = useAppGraph5();
830
+ useExpandPath(id);
831
+ const children = useConnections2(graph, id, "child");
832
+ const visibleChildren = useMemo5(() => children.filter((node) => node.properties.disposition !== "hidden"), [
833
+ children
834
+ ]);
835
+ const { results, handleSearch } = useSearchListResults2({
836
+ items: visibleChildren,
837
+ extract: (child) => toLocalizedString3(child.properties.label, t)
838
+ });
839
+ return /* @__PURE__ */ React12.createElement(SearchPanel2, {
840
+ onSearch: handleSearch
841
+ }, /* @__PURE__ */ React12.createElement(Mosaic3.Container, {
842
+ asChild: true
843
+ }, /* @__PURE__ */ React12.createElement(ScrollArea2.Root, {
844
+ centered: true,
845
+ padding: true,
846
+ thin: true
847
+ }, /* @__PURE__ */ React12.createElement(ScrollArea2.Viewport, null, /* @__PURE__ */ React12.createElement(Mosaic3.Stack, {
848
+ classNames: "gap-1",
849
+ draggable: false,
850
+ items: results,
851
+ getId: (item) => item.id,
852
+ Tile: NavBranchTile
853
+ })))));
854
+ };
855
+ var NavBranchTile = (props) => {
856
+ const data = props.data;
857
+ const { t } = useTranslation4(meta4.id);
858
+ const { invokePromise } = useOperationInvoker2();
859
+ const ref = useRef5(null);
860
+ const { selectedValue, registerItem, unregisterItem } = useSearchListItem2();
861
+ const isSelected = selectedValue === data.id;
862
+ const name = toLocalizedString3(data.properties.label, t);
863
+ const handleSelect = useCallback4(() => void invokePromise(LayoutOperation2.Open, {
864
+ subject: [
865
+ data.id
866
+ ]
867
+ }), [
868
+ invokePromise,
869
+ data.id
870
+ ]);
871
+ useEffect5(() => {
872
+ if (ref.current) {
873
+ registerItem(data.id, ref.current, handleSelect);
874
+ }
875
+ return () => unregisterItem(data.id);
876
+ }, [
877
+ data.id,
878
+ handleSelect,
879
+ registerItem,
880
+ unregisterItem
881
+ ]);
882
+ useEffect5(() => {
883
+ if (isSelected && ref.current) {
884
+ ref.current.scrollIntoView({
885
+ block: "nearest",
886
+ behavior: "smooth"
887
+ });
888
+ }
889
+ }, [
890
+ isSelected
891
+ ]);
892
+ return /* @__PURE__ */ React12.createElement(Card3.Root, {
893
+ ref,
894
+ role: "button",
895
+ fullWidth: true,
896
+ tabIndex: -1,
897
+ "data-selected": isSelected,
898
+ classNames: mx3("dx-focus-ring cursor-pointer", isSelected && "bg-selected-surface"),
899
+ onClick: handleSelect
900
+ }, /* @__PURE__ */ React12.createElement(Card3.Toolbar, null, /* @__PURE__ */ React12.createElement(Avatar2.Root, null, /* @__PURE__ */ React12.createElement(Avatar2.Content, {
901
+ hue: data.properties.hue,
902
+ icon: data.properties.icon,
903
+ hueVariant: "transparent",
904
+ variant: "square",
905
+ size: 8,
906
+ fallback: name
907
+ }), /* @__PURE__ */ React12.createElement(Avatar2.Label, null, name), /* @__PURE__ */ React12.createElement(Icon2, {
908
+ icon: "ph--caret-right--regular"
909
+ }))));
910
+ };
1251
911
  export {
912
+ AppBar,
913
+ DebugOverlay,
1252
914
  Home,
915
+ Loading,
916
+ Main,
917
+ MobileLayout,
918
+ NavBar,
919
+ NavBranch,
920
+ PopoverContent,
921
+ PopoverRoot,
1253
922
  SimpleLayout,
1254
- NavBranch
923
+ useDebugLog,
924
+ useMobileLayout
1255
925
  };
1256
- //# sourceMappingURL=chunk-J5FQ32AV.mjs.map
926
+ //# sourceMappingURL=index.mjs.map