@dxos/plugin-deck 0.8.4-main.72ec0f3 → 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 (468) hide show
  1. package/dist/lib/browser/Banner-TJ4ZQ7A6.mjs +16 -0
  2. package/dist/lib/browser/Banner-TJ4ZQ7A6.mjs.map +7 -0
  3. package/dist/lib/browser/DeckSettings-CZ3KWAXT.mjs +96 -0
  4. package/dist/lib/browser/DeckSettings-CZ3KWAXT.mjs.map +7 -0
  5. package/dist/lib/browser/add-toast-XOLZDESF.mjs +24 -0
  6. package/dist/lib/browser/add-toast-XOLZDESF.mjs.map +7 -0
  7. package/dist/lib/browser/adjust-N4YCWW3J.mjs +96 -0
  8. package/dist/lib/browser/adjust-N4YCWW3J.mjs.map +7 -0
  9. package/dist/lib/browser/app-graph-builder-34HXGUI2.mjs +123 -0
  10. package/dist/lib/browser/app-graph-builder-34HXGUI2.mjs.map +7 -0
  11. package/dist/lib/browser/change-companion-ONLIPI6F.mjs +34 -0
  12. package/dist/lib/browser/change-companion-ONLIPI6F.mjs.map +7 -0
  13. package/dist/lib/browser/check-app-scheme-72BBQSF6.mjs +33 -0
  14. package/dist/lib/browser/check-app-scheme-72BBQSF6.mjs.map +7 -0
  15. package/dist/lib/browser/chunk-26ZKVZIN.mjs +112 -0
  16. package/dist/lib/browser/chunk-26ZKVZIN.mjs.map +7 -0
  17. package/dist/lib/browser/chunk-4RO3FRCR.mjs +187 -0
  18. package/dist/lib/browser/chunk-4RO3FRCR.mjs.map +7 -0
  19. package/dist/lib/browser/chunk-4TLX2UGY.mjs +88 -0
  20. package/dist/lib/browser/chunk-4TLX2UGY.mjs.map +7 -0
  21. package/dist/lib/browser/chunk-J6OERAED.mjs +69 -0
  22. package/dist/lib/browser/chunk-J6OERAED.mjs.map +7 -0
  23. package/dist/lib/browser/chunk-PPM7LZSC.mjs +8 -0
  24. package/dist/lib/browser/chunk-PPM7LZSC.mjs.map +7 -0
  25. package/dist/lib/browser/chunk-RCLJGMR7.mjs +1417 -0
  26. package/dist/lib/browser/chunk-RCLJGMR7.mjs.map +7 -0
  27. package/dist/lib/browser/{chunk-UXLU6CMW.mjs → chunk-UN7XQWDE.mjs} +9 -2
  28. package/dist/lib/browser/chunk-UN7XQWDE.mjs.map +7 -0
  29. package/dist/lib/browser/{chunk-F3VCCHVL.mjs → chunk-WZXKWTDN.mjs} +74 -35
  30. package/dist/lib/browser/chunk-WZXKWTDN.mjs.map +7 -0
  31. package/dist/lib/browser/chunk-YAAXLCVX.mjs +30 -0
  32. package/dist/lib/browser/chunk-YAAXLCVX.mjs.map +7 -0
  33. package/dist/lib/browser/close-SPUQQH2F.mjs +44 -0
  34. package/dist/lib/browser/close-SPUQQH2F.mjs.map +7 -0
  35. package/dist/lib/browser/index.mjs +77 -76
  36. package/dist/lib/browser/index.mjs.map +4 -4
  37. package/dist/lib/browser/meta.json +1 -1
  38. package/dist/lib/browser/open-2DK2GFUW.mjs +95 -0
  39. package/dist/lib/browser/open-2DK2GFUW.mjs.map +7 -0
  40. package/dist/lib/browser/operation-handler-ETCDHJUK.mjs +16 -0
  41. package/dist/lib/browser/operation-handler-ETCDHJUK.mjs.map +7 -0
  42. package/dist/lib/browser/operations/index.mjs +12 -0
  43. package/dist/lib/browser/react-root-2IXL32LF.mjs +50 -0
  44. package/dist/lib/browser/react-root-2IXL32LF.mjs.map +7 -0
  45. package/dist/lib/browser/react-surface-LMALTBUM.mjs +44 -0
  46. package/dist/lib/browser/react-surface-LMALTBUM.mjs.map +7 -0
  47. package/dist/lib/browser/revert-workspace-NIXRKBAQ.mjs +21 -0
  48. package/dist/lib/browser/revert-workspace-NIXRKBAQ.mjs.map +7 -0
  49. package/dist/lib/browser/scroll-into-view-QUORIGE3.mjs +21 -0
  50. package/dist/lib/browser/scroll-into-view-QUORIGE3.mjs.map +7 -0
  51. package/dist/lib/browser/set-GKTHE4IZ.mjs +37 -0
  52. package/dist/lib/browser/set-GKTHE4IZ.mjs.map +7 -0
  53. package/dist/lib/browser/set-layout-mode-TRWCEJAO.mjs +91 -0
  54. package/dist/lib/browser/set-layout-mode-TRWCEJAO.mjs.map +7 -0
  55. package/dist/lib/browser/settings-3MYJVL5V.mjs +40 -0
  56. package/dist/lib/browser/settings-3MYJVL5V.mjs.map +7 -0
  57. package/dist/lib/browser/show-undo-OSWJQUSO.mjs +60 -0
  58. package/dist/lib/browser/show-undo-OSWJQUSO.mjs.map +7 -0
  59. package/dist/lib/browser/state-CFEZH3DH.mjs +100 -0
  60. package/dist/lib/browser/state-CFEZH3DH.mjs.map +7 -0
  61. package/dist/lib/browser/switch-workspace-JXIYKYFR.mjs +68 -0
  62. package/dist/lib/browser/switch-workspace-JXIYKYFR.mjs.map +7 -0
  63. package/dist/lib/browser/types/index.mjs +12 -8
  64. package/dist/lib/browser/update-complementary-IDQANYVM.mjs +28 -0
  65. package/dist/lib/browser/update-complementary-IDQANYVM.mjs.map +7 -0
  66. package/dist/lib/browser/update-dialog-LEF6XOAA.mjs +29 -0
  67. package/dist/lib/browser/update-dialog-LEF6XOAA.mjs.map +7 -0
  68. package/dist/lib/browser/update-plank-size-VMGJQJKT.mjs +28 -0
  69. package/dist/lib/browser/update-plank-size-VMGJQJKT.mjs.map +7 -0
  70. package/dist/lib/browser/update-popover-HLFD3DXD.mjs +33 -0
  71. package/dist/lib/browser/update-popover-HLFD3DXD.mjs.map +7 -0
  72. package/dist/lib/browser/update-sidebar-NJ3PB2Z4.mjs +25 -0
  73. package/dist/lib/browser/update-sidebar-NJ3PB2Z4.mjs.map +7 -0
  74. package/dist/lib/browser/url-handler-2QE6C6KP.mjs +106 -0
  75. package/dist/lib/browser/url-handler-2QE6C6KP.mjs.map +7 -0
  76. package/dist/lib/node-esm/Banner-3Y6W3VK3.mjs +17 -0
  77. package/dist/lib/node-esm/Banner-3Y6W3VK3.mjs.map +7 -0
  78. package/dist/lib/node-esm/DeckSettings-ULPBDAT3.mjs +97 -0
  79. package/dist/lib/node-esm/DeckSettings-ULPBDAT3.mjs.map +7 -0
  80. package/dist/lib/node-esm/add-toast-HQEPHXHX.mjs +25 -0
  81. package/dist/lib/node-esm/add-toast-HQEPHXHX.mjs.map +7 -0
  82. package/dist/lib/node-esm/adjust-MR6Z7HI3.mjs +97 -0
  83. package/dist/lib/node-esm/adjust-MR6Z7HI3.mjs.map +7 -0
  84. package/dist/lib/node-esm/app-graph-builder-4BD6BABT.mjs +124 -0
  85. package/dist/lib/node-esm/app-graph-builder-4BD6BABT.mjs.map +7 -0
  86. package/dist/lib/node-esm/change-companion-JJ6MFJYZ.mjs +35 -0
  87. package/dist/lib/node-esm/change-companion-JJ6MFJYZ.mjs.map +7 -0
  88. package/dist/lib/node-esm/check-app-scheme-NNJD4MJ3.mjs +34 -0
  89. package/dist/lib/node-esm/check-app-scheme-NNJD4MJ3.mjs.map +7 -0
  90. package/dist/lib/node-esm/chunk-2K2OUSFN.mjs +10 -0
  91. package/dist/lib/node-esm/chunk-2K2OUSFN.mjs.map +7 -0
  92. package/dist/lib/node-esm/chunk-3QUPGLN4.mjs +188 -0
  93. package/dist/lib/node-esm/chunk-3QUPGLN4.mjs.map +7 -0
  94. package/dist/lib/node-esm/chunk-4EIUXR64.mjs +71 -0
  95. package/dist/lib/node-esm/chunk-4EIUXR64.mjs.map +7 -0
  96. package/dist/lib/node-esm/chunk-4NLQZESJ.mjs +89 -0
  97. package/dist/lib/node-esm/chunk-4NLQZESJ.mjs.map +7 -0
  98. package/dist/lib/node-esm/chunk-CMISPQAO.mjs +24 -0
  99. package/dist/lib/node-esm/chunk-CMISPQAO.mjs.map +7 -0
  100. package/dist/lib/node-esm/chunk-HM4KJZ6L.mjs +1418 -0
  101. package/dist/lib/node-esm/chunk-HM4KJZ6L.mjs.map +7 -0
  102. package/dist/lib/node-esm/chunk-J2AFCKMH.mjs +202 -0
  103. package/dist/lib/node-esm/chunk-J2AFCKMH.mjs.map +7 -0
  104. package/dist/lib/node-esm/chunk-WD6BJV6B.mjs +32 -0
  105. package/dist/lib/node-esm/chunk-WD6BJV6B.mjs.map +7 -0
  106. package/dist/lib/node-esm/chunk-YYXVVZSS.mjs +114 -0
  107. package/dist/lib/node-esm/chunk-YYXVVZSS.mjs.map +7 -0
  108. package/dist/lib/node-esm/close-FWQQ3IH2.mjs +45 -0
  109. package/dist/lib/node-esm/close-FWQQ3IH2.mjs.map +7 -0
  110. package/dist/lib/node-esm/index.mjs +176 -0
  111. package/dist/lib/node-esm/index.mjs.map +7 -0
  112. package/dist/lib/node-esm/meta.json +1 -0
  113. package/dist/lib/node-esm/open-FCSJ42AD.mjs +96 -0
  114. package/dist/lib/node-esm/open-FCSJ42AD.mjs.map +7 -0
  115. package/dist/lib/node-esm/operation-handler-A3FWOT4M.mjs +17 -0
  116. package/dist/lib/node-esm/operation-handler-A3FWOT4M.mjs.map +7 -0
  117. package/dist/lib/node-esm/operations/index.mjs +13 -0
  118. package/dist/lib/node-esm/operations/index.mjs.map +7 -0
  119. package/dist/lib/node-esm/react-root-44EZV4V7.mjs +51 -0
  120. package/dist/lib/node-esm/react-root-44EZV4V7.mjs.map +7 -0
  121. package/dist/lib/node-esm/react-surface-KFFPAGAC.mjs +45 -0
  122. package/dist/lib/node-esm/react-surface-KFFPAGAC.mjs.map +7 -0
  123. package/dist/lib/node-esm/revert-workspace-APB6WY3W.mjs +22 -0
  124. package/dist/lib/node-esm/revert-workspace-APB6WY3W.mjs.map +7 -0
  125. package/dist/lib/node-esm/scroll-into-view-YZVRLJKB.mjs +22 -0
  126. package/dist/lib/node-esm/scroll-into-view-YZVRLJKB.mjs.map +7 -0
  127. package/dist/lib/node-esm/set-WSNRQ3DI.mjs +38 -0
  128. package/dist/lib/node-esm/set-WSNRQ3DI.mjs.map +7 -0
  129. package/dist/lib/node-esm/set-layout-mode-LGAF5R4U.mjs +92 -0
  130. package/dist/lib/node-esm/set-layout-mode-LGAF5R4U.mjs.map +7 -0
  131. package/dist/lib/node-esm/settings-77JXSDLC.mjs +41 -0
  132. package/dist/lib/node-esm/settings-77JXSDLC.mjs.map +7 -0
  133. package/dist/lib/node-esm/show-undo-R3LATVTS.mjs +61 -0
  134. package/dist/lib/node-esm/show-undo-R3LATVTS.mjs.map +7 -0
  135. package/dist/lib/node-esm/state-I3LRM7SB.mjs +101 -0
  136. package/dist/lib/node-esm/state-I3LRM7SB.mjs.map +7 -0
  137. package/dist/lib/node-esm/switch-workspace-FKZT6EL4.mjs +69 -0
  138. package/dist/lib/node-esm/switch-workspace-FKZT6EL4.mjs.map +7 -0
  139. package/dist/lib/node-esm/types/index.mjs +37 -0
  140. package/dist/lib/node-esm/types/index.mjs.map +7 -0
  141. package/dist/lib/node-esm/update-complementary-KVLJTKK3.mjs +29 -0
  142. package/dist/lib/node-esm/update-complementary-KVLJTKK3.mjs.map +7 -0
  143. package/dist/lib/node-esm/update-dialog-EXY2PCHT.mjs +30 -0
  144. package/dist/lib/node-esm/update-dialog-EXY2PCHT.mjs.map +7 -0
  145. package/dist/lib/node-esm/update-plank-size-67U7Z5VK.mjs +29 -0
  146. package/dist/lib/node-esm/update-plank-size-67U7Z5VK.mjs.map +7 -0
  147. package/dist/lib/node-esm/update-popover-MDOZNY2D.mjs +34 -0
  148. package/dist/lib/node-esm/update-popover-MDOZNY2D.mjs.map +7 -0
  149. package/dist/lib/node-esm/update-sidebar-5LEWTTGW.mjs +26 -0
  150. package/dist/lib/node-esm/update-sidebar-5LEWTTGW.mjs.map +7 -0
  151. package/dist/lib/node-esm/url-handler-WSC5K5ME.mjs +107 -0
  152. package/dist/lib/node-esm/url-handler-WSC5K5ME.mjs.map +7 -0
  153. package/dist/types/src/DeckPlugin.d.ts +2 -1
  154. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  155. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  156. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  157. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  158. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  159. package/dist/types/src/capabilities/check-app-scheme/check-app-scheme.d.ts +5 -0
  160. package/dist/types/src/capabilities/check-app-scheme/check-app-scheme.d.ts.map +1 -0
  161. package/dist/types/src/capabilities/check-app-scheme/index.d.ts +3 -0
  162. package/dist/types/src/capabilities/check-app-scheme/index.d.ts.map +1 -0
  163. package/dist/types/src/capabilities/index.d.ts +7 -13
  164. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  165. package/dist/types/src/capabilities/operation-handler/index.d.ts +4 -0
  166. package/dist/types/src/capabilities/operation-handler/index.d.ts.map +1 -0
  167. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts +6 -0
  168. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +1 -0
  169. package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
  170. package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
  171. package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
  172. package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
  173. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  174. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  175. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  176. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  177. package/dist/types/src/capabilities/settings/index.d.ts +19 -0
  178. package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
  179. package/dist/types/src/capabilities/settings/settings.d.ts +22 -0
  180. package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
  181. package/dist/types/src/capabilities/state/index.d.ts +172 -0
  182. package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
  183. package/dist/types/src/capabilities/state/state.d.ts +175 -0
  184. package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
  185. package/dist/types/src/capabilities/tools/index.d.ts +3 -0
  186. package/dist/types/src/capabilities/tools/index.d.ts.map +1 -0
  187. package/dist/types/src/capabilities/tools/tools.d.ts +12 -0
  188. package/dist/types/src/capabilities/tools/tools.d.ts.map +1 -0
  189. package/dist/types/src/capabilities/url-handler/index.d.ts +3 -0
  190. package/dist/types/src/capabilities/url-handler/index.d.ts.map +1 -0
  191. package/dist/types/src/capabilities/url-handler/url-handler.d.ts +5 -0
  192. package/dist/types/src/capabilities/url-handler/url-handler.d.ts.map +1 -0
  193. package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +1 -1
  194. package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +1 -1
  195. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
  196. package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts +2 -1
  197. package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts.map +1 -1
  198. package/dist/types/src/components/DeckLayout/DeckMain.d.ts.map +1 -1
  199. package/dist/types/src/components/DeckLayout/Dialog.d.ts.map +1 -1
  200. package/dist/types/src/components/DeckLayout/Fallback.d.ts.map +1 -1
  201. package/dist/types/src/components/DeckLayout/Popover.d.ts.map +1 -1
  202. package/dist/types/src/components/DeckLayout/Toast.d.ts +3 -3
  203. package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
  204. package/dist/types/src/components/Plank/Plank.d.ts +5 -5
  205. package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
  206. package/dist/types/src/components/Plank/Plank.stories.d.ts +26 -7
  207. package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -1
  208. package/dist/types/src/components/Plank/PlankControls.d.ts +1 -1
  209. package/dist/types/src/components/Plank/PlankControls.d.ts.map +1 -1
  210. package/dist/types/src/components/Plank/PlankError.d.ts +7 -5
  211. package/dist/types/src/components/Plank/PlankError.d.ts.map +1 -1
  212. package/dist/types/src/components/Plank/PlankHeading.d.ts +2 -2
  213. package/dist/types/src/components/Plank/PlankHeading.d.ts.map +1 -1
  214. package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +1 -1
  215. package/dist/types/src/components/Sidebar/Sidebar.d.ts.map +1 -1
  216. package/dist/types/src/components/Sidebar/SidebarButton.d.ts.map +1 -1
  217. package/dist/types/src/components/fragments.d.ts +4 -1
  218. package/dist/types/src/components/fragments.d.ts.map +1 -1
  219. package/dist/types/src/components/index.d.ts +0 -1
  220. package/dist/types/src/components/index.d.ts.map +1 -1
  221. package/dist/types/src/containers/Banner/Banner.d.ts +2 -0
  222. package/dist/types/src/containers/Banner/Banner.d.ts.map +1 -0
  223. package/dist/types/src/containers/Banner/index.d.ts +3 -0
  224. package/dist/types/src/containers/Banner/index.d.ts.map +1 -0
  225. package/dist/types/src/containers/DeckSettings/DeckSettings.d.ts +8 -0
  226. package/dist/types/src/containers/DeckSettings/DeckSettings.d.ts.map +1 -0
  227. package/dist/types/src/containers/DeckSettings/index.d.ts +3 -0
  228. package/dist/types/src/containers/DeckSettings/index.d.ts.map +1 -0
  229. package/dist/types/src/containers/index.d.ts +4 -0
  230. package/dist/types/src/containers/index.d.ts.map +1 -0
  231. package/dist/types/src/hooks/index.d.ts +2 -0
  232. package/dist/types/src/hooks/index.d.ts.map +1 -1
  233. package/dist/types/src/hooks/useDeckCompanions.d.ts +3 -4
  234. package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
  235. package/dist/types/src/hooks/useDeckState.d.ts +17 -0
  236. package/dist/types/src/hooks/useDeckState.d.ts.map +1 -0
  237. package/dist/types/src/hooks/useHoistStatusbar.d.ts +1 -1
  238. package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +1 -1
  239. package/dist/types/src/hooks/useMainSize.d.ts +2 -2
  240. package/dist/types/src/hooks/useNodeActionExpander.d.ts +1 -1
  241. package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
  242. package/dist/types/src/hooks/useSelectedCompanion.d.ts +13 -0
  243. package/dist/types/src/hooks/useSelectedCompanion.d.ts.map +1 -0
  244. package/dist/types/src/index.d.ts +1 -2
  245. package/dist/types/src/index.d.ts.map +1 -1
  246. package/dist/types/src/layout.d.ts +1 -7
  247. package/dist/types/src/layout.d.ts.map +1 -1
  248. package/dist/types/src/meta.d.ts +2 -2
  249. package/dist/types/src/meta.d.ts.map +1 -1
  250. package/dist/types/src/operations/add-toast.d.ts +5 -0
  251. package/dist/types/src/operations/add-toast.d.ts.map +1 -0
  252. package/dist/types/src/operations/adjust.d.ts +5 -0
  253. package/dist/types/src/operations/adjust.d.ts.map +1 -0
  254. package/dist/types/src/operations/change-companion.d.ts +5 -0
  255. package/dist/types/src/operations/change-companion.d.ts.map +1 -0
  256. package/dist/types/src/operations/close.d.ts +5 -0
  257. package/dist/types/src/operations/close.d.ts.map +1 -0
  258. package/dist/types/src/operations/definitions.d.ts +18 -0
  259. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  260. package/dist/types/src/operations/helpers.d.ts +3 -0
  261. package/dist/types/src/operations/helpers.d.ts.map +1 -0
  262. package/dist/types/src/operations/index.d.ts +4 -0
  263. package/dist/types/src/operations/index.d.ts.map +1 -0
  264. package/dist/types/src/operations/open.d.ts +5 -0
  265. package/dist/types/src/operations/open.d.ts.map +1 -0
  266. package/dist/types/src/operations/revert-workspace.d.ts +5 -0
  267. package/dist/types/src/operations/revert-workspace.d.ts.map +1 -0
  268. package/dist/types/src/operations/scroll-into-view.d.ts +5 -0
  269. package/dist/types/src/operations/scroll-into-view.d.ts.map +1 -0
  270. package/dist/types/src/operations/set-layout-mode.d.ts +5 -0
  271. package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -0
  272. package/dist/types/src/operations/set.d.ts +5 -0
  273. package/dist/types/src/operations/set.d.ts.map +1 -0
  274. package/dist/types/src/operations/show-undo.d.ts +5 -0
  275. package/dist/types/src/operations/show-undo.d.ts.map +1 -0
  276. package/dist/types/src/operations/switch-workspace.d.ts +5 -0
  277. package/dist/types/src/operations/switch-workspace.d.ts.map +1 -0
  278. package/dist/types/src/operations/update-complementary.d.ts +5 -0
  279. package/dist/types/src/operations/update-complementary.d.ts.map +1 -0
  280. package/dist/types/src/operations/update-dialog.d.ts +5 -0
  281. package/dist/types/src/operations/update-dialog.d.ts.map +1 -0
  282. package/dist/types/src/operations/update-plank-size.d.ts +5 -0
  283. package/dist/types/src/operations/update-plank-size.d.ts.map +1 -0
  284. package/dist/types/src/operations/update-popover.d.ts +5 -0
  285. package/dist/types/src/operations/update-popover.d.ts.map +1 -0
  286. package/dist/types/src/operations/update-sidebar.d.ts +5 -0
  287. package/dist/types/src/operations/update-sidebar.d.ts.map +1 -0
  288. package/dist/types/src/translations.d.ts +2 -1
  289. package/dist/types/src/translations.d.ts.map +1 -1
  290. package/dist/types/src/{capabilities → types}/capabilities.d.ts +96 -90
  291. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  292. package/dist/types/src/types/events.d.ts +7 -0
  293. package/dist/types/src/types/events.d.ts.map +1 -0
  294. package/dist/types/src/types/index.d.ts +2 -0
  295. package/dist/types/src/types/index.d.ts.map +1 -1
  296. package/dist/types/src/types/schema.d.ts +40 -38
  297. package/dist/types/src/types/schema.d.ts.map +1 -1
  298. package/dist/types/src/util/index.d.ts +1 -0
  299. package/dist/types/src/util/index.d.ts.map +1 -1
  300. package/dist/types/src/util/sanitize-persisted-state.d.ts +19 -0
  301. package/dist/types/src/util/sanitize-persisted-state.d.ts.map +1 -0
  302. package/dist/types/src/util/sanitize-persisted-state.test.d.ts +2 -0
  303. package/dist/types/src/util/sanitize-persisted-state.test.d.ts.map +1 -0
  304. package/dist/types/src/util/set-active.d.ts +18 -3
  305. package/dist/types/src/util/set-active.d.ts.map +1 -1
  306. package/dist/types/src/util/set-active.test.d.ts +2 -0
  307. package/dist/types/src/util/set-active.test.d.ts.map +1 -0
  308. package/dist/types/tsconfig.tsbuildinfo +1 -1
  309. package/package.json +69 -49
  310. package/src/DeckPlugin.ts +26 -52
  311. package/src/capabilities/app-graph-builder/app-graph-builder.ts +119 -0
  312. package/src/capabilities/app-graph-builder/index.ts +7 -0
  313. package/src/capabilities/check-app-scheme/check-app-scheme.ts +45 -0
  314. package/src/capabilities/check-app-scheme/index.ts +7 -0
  315. package/src/capabilities/index.ts +8 -14
  316. package/src/capabilities/operation-handler/index.ts +11 -0
  317. package/src/capabilities/operation-handler/operation-handler.ts +16 -0
  318. package/src/capabilities/react-root/index.ts +7 -0
  319. package/src/capabilities/react-root/react-root.tsx +47 -0
  320. package/src/capabilities/react-surface/index.ts +7 -0
  321. package/src/capabilities/react-surface/react-surface.tsx +38 -0
  322. package/src/capabilities/settings/index.ts +7 -0
  323. package/src/capabilities/settings/settings.ts +39 -0
  324. package/src/capabilities/state/index.ts +7 -0
  325. package/src/capabilities/state/state.ts +97 -0
  326. package/src/capabilities/tools/index.ts +7 -0
  327. package/src/capabilities/tools/tools.ts +91 -0
  328. package/src/capabilities/url-handler/index.ts +7 -0
  329. package/src/capabilities/url-handler/url-handler.ts +108 -0
  330. package/src/components/DeckLayout/ActiveNode.tsx +3 -2
  331. package/src/components/DeckLayout/Banner.tsx +9 -9
  332. package/src/components/DeckLayout/ContentEmpty.tsx +5 -6
  333. package/src/components/DeckLayout/DeckLayout.stories.tsx +20 -31
  334. package/src/components/DeckLayout/DeckLayout.tsx +13 -11
  335. package/src/components/DeckLayout/DeckMain.tsx +65 -59
  336. package/src/components/DeckLayout/Dialog.tsx +22 -13
  337. package/src/components/DeckLayout/Fallback.tsx +2 -6
  338. package/src/components/DeckLayout/Popover.tsx +83 -22
  339. package/src/components/DeckLayout/StatusBar.tsx +4 -4
  340. package/src/components/DeckLayout/Toast.tsx +4 -4
  341. package/src/components/Plank/Plank.stories.tsx +18 -9
  342. package/src/components/Plank/Plank.tsx +41 -38
  343. package/src/components/Plank/PlankControls.tsx +9 -11
  344. package/src/components/Plank/PlankError.tsx +49 -19
  345. package/src/components/Plank/PlankHeading.tsx +41 -46
  346. package/src/components/Plank/PlankLoading.tsx +1 -1
  347. package/src/components/Sidebar/ComplementarySidebar.tsx +78 -86
  348. package/src/components/Sidebar/Sidebar.tsx +7 -7
  349. package/src/components/Sidebar/SidebarButton.tsx +31 -26
  350. package/src/components/fragments.ts +10 -5
  351. package/src/components/index.ts +0 -1
  352. package/src/containers/Banner/Banner.tsx +5 -0
  353. package/src/containers/Banner/index.ts +7 -0
  354. package/src/{components → containers}/DeckSettings/DeckSettings.tsx +41 -31
  355. package/src/containers/DeckSettings/index.ts +7 -0
  356. package/src/containers/index.ts +8 -0
  357. package/src/hooks/index.ts +2 -0
  358. package/src/hooks/useCompanions.ts +2 -2
  359. package/src/hooks/useDeckCompanions.ts +7 -11
  360. package/src/hooks/useDeckState.ts +82 -0
  361. package/src/hooks/useHoistStatusbar.ts +3 -6
  362. package/src/hooks/useMainSize.ts +2 -2
  363. package/src/hooks/useNodeActionExpander.ts +4 -4
  364. package/src/hooks/useSelectedCompanion.ts +32 -0
  365. package/src/index.ts +1 -2
  366. package/src/layout.ts +1 -14
  367. package/src/meta.ts +3 -3
  368. package/src/operations/add-toast.ts +24 -0
  369. package/src/operations/adjust.ts +83 -0
  370. package/src/operations/change-companion.ts +35 -0
  371. package/src/operations/close.ts +35 -0
  372. package/src/operations/definitions.ts +61 -0
  373. package/src/operations/helpers.ts +22 -0
  374. package/src/operations/index.ts +26 -0
  375. package/src/operations/open.ts +89 -0
  376. package/src/operations/revert-workspace.ts +22 -0
  377. package/src/operations/scroll-into-view.ts +24 -0
  378. package/src/operations/set-layout-mode.ts +80 -0
  379. package/src/operations/set.ts +36 -0
  380. package/src/operations/show-undo.ts +46 -0
  381. package/src/operations/switch-workspace.ts +60 -0
  382. package/src/operations/update-complementary.ts +33 -0
  383. package/src/operations/update-dialog.ts +34 -0
  384. package/src/operations/update-plank-size.ts +29 -0
  385. package/src/operations/update-popover.ts +36 -0
  386. package/src/operations/update-sidebar.ts +28 -0
  387. package/src/translations.ts +2 -1
  388. package/src/types/capabilities.ts +33 -0
  389. package/src/types/events.ts +21 -0
  390. package/src/types/index.ts +2 -0
  391. package/src/types/schema.ts +32 -25
  392. package/src/util/index.ts +1 -0
  393. package/src/util/layoutAppliesTopbar.ts +1 -1
  394. package/src/util/overscroll.ts +3 -3
  395. package/src/util/sanitize-persisted-state.test.ts +79 -0
  396. package/src/util/sanitize-persisted-state.ts +52 -0
  397. package/src/util/set-active.test.ts +106 -0
  398. package/src/util/set-active.ts +49 -29
  399. package/dist/lib/browser/app-graph-builder-D74NTOMK.mjs +0 -128
  400. package/dist/lib/browser/app-graph-builder-D74NTOMK.mjs.map +0 -7
  401. package/dist/lib/browser/check-app-scheme-HIEVFAAX.mjs +0 -32
  402. package/dist/lib/browser/check-app-scheme-HIEVFAAX.mjs.map +0 -7
  403. package/dist/lib/browser/chunk-5KMJPIQC.mjs +0 -16
  404. package/dist/lib/browser/chunk-5KMJPIQC.mjs.map +0 -7
  405. package/dist/lib/browser/chunk-CNTGBCMK.mjs +0 -145
  406. package/dist/lib/browser/chunk-CNTGBCMK.mjs.map +0 -7
  407. package/dist/lib/browser/chunk-F3VCCHVL.mjs.map +0 -7
  408. package/dist/lib/browser/chunk-OLDBLCAX.mjs +0 -128
  409. package/dist/lib/browser/chunk-OLDBLCAX.mjs.map +0 -7
  410. package/dist/lib/browser/chunk-SDIYDK47.mjs +0 -1553
  411. package/dist/lib/browser/chunk-SDIYDK47.mjs.map +0 -7
  412. package/dist/lib/browser/chunk-UXLU6CMW.mjs.map +0 -7
  413. package/dist/lib/browser/chunk-VBYJ664A.mjs +0 -132
  414. package/dist/lib/browser/chunk-VBYJ664A.mjs.map +0 -7
  415. package/dist/lib/browser/intent-resolver-UA4YQGAC.mjs +0 -524
  416. package/dist/lib/browser/intent-resolver-UA4YQGAC.mjs.map +0 -7
  417. package/dist/lib/browser/react-root-76RSDA6R.mjs +0 -44
  418. package/dist/lib/browser/react-root-76RSDA6R.mjs.map +0 -7
  419. package/dist/lib/browser/react-surface-2CSKDN7K.mjs +0 -40
  420. package/dist/lib/browser/react-surface-2CSKDN7K.mjs.map +0 -7
  421. package/dist/lib/browser/settings-SDPTOCCM.mjs +0 -30
  422. package/dist/lib/browser/settings-SDPTOCCM.mjs.map +0 -7
  423. package/dist/lib/browser/state-7IFAGZQO.mjs +0 -12
  424. package/dist/lib/browser/toolkit-L5CFXJCF.mjs +0 -52
  425. package/dist/lib/browser/toolkit-L5CFXJCF.mjs.map +0 -7
  426. package/dist/lib/browser/url-handler-QEYGYE2H.mjs +0 -70
  427. package/dist/lib/browser/url-handler-QEYGYE2H.mjs.map +0 -7
  428. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  429. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  430. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  431. package/dist/types/src/capabilities/check-app-scheme.d.ts +0 -4
  432. package/dist/types/src/capabilities/check-app-scheme.d.ts.map +0 -1
  433. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  434. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  435. package/dist/types/src/capabilities/react-root.d.ts +0 -7
  436. package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
  437. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  438. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  439. package/dist/types/src/capabilities/settings.d.ts +0 -4
  440. package/dist/types/src/capabilities/settings.d.ts.map +0 -1
  441. package/dist/types/src/capabilities/state.d.ts +0 -104
  442. package/dist/types/src/capabilities/state.d.ts.map +0 -1
  443. package/dist/types/src/capabilities/toolkit.d.ts +0 -25
  444. package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
  445. package/dist/types/src/capabilities/tools.d.ts +0 -11
  446. package/dist/types/src/capabilities/tools.d.ts.map +0 -1
  447. package/dist/types/src/capabilities/url-handler.d.ts +0 -4
  448. package/dist/types/src/capabilities/url-handler.d.ts.map +0 -1
  449. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts +0 -6
  450. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +0 -1
  451. package/dist/types/src/components/DeckSettings/index.d.ts +0 -2
  452. package/dist/types/src/components/DeckSettings/index.d.ts.map +0 -1
  453. package/dist/types/src/events.d.ts +0 -4
  454. package/dist/types/src/events.d.ts.map +0 -1
  455. package/src/capabilities/app-graph-builder.ts +0 -143
  456. package/src/capabilities/capabilities.ts +0 -14
  457. package/src/capabilities/check-app-scheme.ts +0 -40
  458. package/src/capabilities/intent-resolver.ts +0 -471
  459. package/src/capabilities/react-root.tsx +0 -40
  460. package/src/capabilities/react-surface.tsx +0 -30
  461. package/src/capabilities/settings.ts +0 -27
  462. package/src/capabilities/state.ts +0 -113
  463. package/src/capabilities/toolkit.ts +0 -66
  464. package/src/capabilities/tools.ts +0 -84
  465. package/src/capabilities/url-handler.ts +0 -60
  466. package/src/components/DeckSettings/index.ts +0 -5
  467. package/src/events.ts +0 -11
  468. /package/dist/lib/browser/{state-7IFAGZQO.mjs.map → operations/index.mjs.map} +0 -0
@@ -2,19 +2,15 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { type Label } from '@dxos/app-framework';
6
- import { useAppGraph } from '@dxos/app-framework/react';
7
- import { type Node, ROOT_ID, useConnections } from '@dxos/plugin-graph';
5
+ import { useAppGraph } from '@dxos/app-toolkit/ui';
6
+ import { Node, type Node as NodeType } from '@dxos/plugin-graph';
7
+ import { useConnections } from '@dxos/plugin-graph';
8
+ import { type Label } from '@dxos/ui-types';
8
9
  import { type Position, byPosition } from '@dxos/util';
9
10
 
10
- import { ATTENDABLE_PATH_SEPARATOR, DECK_COMPANION_TYPE } from '../types';
11
+ import { DECK_COMPANION_TYPE } from '../types';
11
12
 
12
- export const getCompanionId = (id: string) => {
13
- const [_, companionId] = id.split(ATTENDABLE_PATH_SEPARATOR);
14
- return companionId ?? 'never';
15
- };
16
-
17
- export type DeckCompanion = Node<
13
+ export type DeckCompanion = NodeType.Node<
18
14
  any,
19
15
  {
20
16
  label: Label;
@@ -28,7 +24,7 @@ export type DeckCompanion = Node<
28
24
 
29
25
  export const useDeckCompanions = (): DeckCompanion[] => {
30
26
  const { graph } = useAppGraph();
31
- const connections = useConnections(graph, ROOT_ID);
27
+ const connections = useConnections(graph, Node.RootId, 'child');
32
28
  const companions = connections.filter((node) => node.type === DECK_COMPANION_TYPE) as DeckCompanion[];
33
29
  return companions.toSorted((a, b) => byPosition(a.properties, b.properties));
34
30
  };
@@ -0,0 +1,82 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { useAtomValue } from '@effect-atom/atom-react';
6
+ import { useCallback, useMemo } from 'react';
7
+
8
+ import { Capabilities } from '@dxos/app-framework';
9
+ import { useCapability } from '@dxos/app-framework/ui';
10
+ import { invariant } from '@dxos/invariant';
11
+
12
+ import {
13
+ DeckCapabilities,
14
+ type DeckEphemeralStateProps,
15
+ type DeckPluginState,
16
+ type DeckState,
17
+ type DeckStateProps,
18
+ } from '../types';
19
+
20
+ export type DeckStateHook = {
21
+ /** Combined state value (reactive). Includes both persisted and ephemeral state. */
22
+ state: DeckPluginState;
23
+ /** The active deck, computed from decks[activeDeck]. */
24
+ deck: DeckState;
25
+ /** Update persisted state. */
26
+ updateState: (fn: (current: DeckStateProps) => DeckStateProps) => void;
27
+ /** Update ephemeral state. */
28
+ updateEphemeral: (fn: (current: DeckEphemeralStateProps) => DeckEphemeralStateProps) => void;
29
+ };
30
+
31
+ /**
32
+ * Hook to access the deck plugin state reactively.
33
+ * Returns the combined state, the active deck, and update functions for each atom.
34
+ */
35
+ export const useDeckState = (): DeckStateHook => {
36
+ const registry = useCapability(Capabilities.AtomRegistry);
37
+ const stateAtom = useCapability(DeckCapabilities.State);
38
+ const ephemeralAtom = useCapability(DeckCapabilities.EphemeralState);
39
+
40
+ const persistedState = useAtomValue(stateAtom);
41
+ const ephemeralState = useAtomValue(ephemeralAtom);
42
+
43
+ // Compute deck from decks[activeDeck] to ensure it's always current.
44
+ const deck = useMemo(() => {
45
+ const d = persistedState.decks[persistedState.activeDeck];
46
+ invariant(d, `Deck not found: ${persistedState.activeDeck}`);
47
+ return d;
48
+ }, [persistedState.decks, persistedState.activeDeck]);
49
+
50
+ // Combine persisted and ephemeral state into a unified view.
51
+ const state = useMemo(
52
+ (): DeckPluginState => ({
53
+ ...persistedState,
54
+ ...ephemeralState,
55
+ }),
56
+ [persistedState, ephemeralState],
57
+ );
58
+
59
+ const updateState = useCallback(
60
+ (fn: (current: DeckStateProps) => DeckStateProps) => {
61
+ registry.set(stateAtom, fn(registry.get(stateAtom)));
62
+ },
63
+ [registry, stateAtom],
64
+ );
65
+
66
+ const updateEphemeral = useCallback(
67
+ (fn: (current: DeckEphemeralStateProps) => DeckEphemeralStateProps) => {
68
+ registry.set(ephemeralAtom, fn(registry.get(ephemeralAtom)));
69
+ },
70
+ [registry, ephemeralAtom],
71
+ );
72
+
73
+ return useMemo(
74
+ () => ({
75
+ state,
76
+ deck,
77
+ updateState,
78
+ updateEphemeral,
79
+ }),
80
+ [state, deck, updateState, updateEphemeral],
81
+ );
82
+ };
@@ -4,17 +4,14 @@
4
4
 
5
5
  import { useMemo } from 'react';
6
6
 
7
- import { Capabilities } from '@dxos/app-framework';
8
- import { useCapability } from '@dxos/app-framework/react';
7
+ import { useAtomCapability } from '@dxos/app-framework/ui';
9
8
  import { useThemeContext } from '@dxos/react-ui';
10
9
 
11
- import { meta } from '../meta';
12
- import type { DeckSettingsProps, LayoutMode } from '../types';
10
+ import { DeckCapabilities, type LayoutMode } from '../types';
13
11
 
14
12
  export const useHoistStatusbar = (breakpoint: string, layoutMode?: LayoutMode): boolean => {
15
13
  const { safeAreaPadding } = useThemeContext();
16
- const enableStatusbar = useCapability(Capabilities.SettingsStore).getStore<DeckSettingsProps>(meta.id)?.value
17
- .enableStatusbar;
14
+ const enableStatusbar = useAtomCapability(DeckCapabilities.Settings).enableStatusbar;
18
15
 
19
16
  return useMemo(() => {
20
17
  return (
@@ -7,7 +7,7 @@ import { useMainContext } from '@dxos/react-ui';
7
7
  export const useMainSize = () => {
8
8
  const { navigationSidebarState, complementarySidebarState } = useMainContext('DeckPluginPlank');
9
9
  return {
10
- 'data-sidebar-inline-start-state': navigationSidebarState,
11
- 'data-sidebar-inline-end-state': complementarySidebarState,
10
+ 'data-sidebar-left-state': navigationSidebarState,
11
+ 'data-sidebar-right-state': complementarySidebarState,
12
12
  };
13
13
  };
@@ -4,14 +4,14 @@
4
4
 
5
5
  import { useEffect } from 'react';
6
6
 
7
- import { type Node, getGraph } from '@dxos/plugin-graph';
7
+ import { Graph, type Node } from '@dxos/plugin-graph';
8
8
 
9
- export const useNodeActionExpander = (node?: Node) => {
9
+ export const useNodeActionExpander = (node?: Node.Node) => {
10
10
  useEffect(() => {
11
11
  if (node) {
12
12
  const frame = requestAnimationFrame(() => {
13
- const graph = getGraph(node);
14
- void graph.expand(node.id);
13
+ const graph = Graph.getGraph(node);
14
+ void Graph.expand(graph, node.id, 'action');
15
15
  });
16
16
  return () => cancelAnimationFrame(frame);
17
17
  }
@@ -0,0 +1,32 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { useMemo } from 'react';
6
+
7
+ import { getCompanionVariant } from '@dxos/app-toolkit';
8
+ import { type Node } from '@dxos/plugin-graph';
9
+
10
+ /**
11
+ * Resolves which companion to show based on variant preference.
12
+ * Falls back to first available if preferred variant not found.
13
+ */
14
+ export const useSelectedCompanion = (companions: Node.Node[], preferredVariant?: string) => {
15
+ return useMemo(() => {
16
+ if (companions.length === 0) {
17
+ return { companionId: undefined, variant: undefined };
18
+ }
19
+
20
+ // Try to find companion matching the preferred variant.
21
+ if (preferredVariant) {
22
+ const preferred = companions.find((companion) => getCompanionVariant(companion.id) === preferredVariant);
23
+ if (preferred) {
24
+ return { companionId: preferred.id, variant: getCompanionVariant(preferred.id) };
25
+ }
26
+ }
27
+
28
+ // Fallback to first companion.
29
+ const first = companions[0];
30
+ return { companionId: first.id, variant: getCompanionVariant(first.id) };
31
+ }, [companions, preferredVariant]);
32
+ };
package/src/index.ts CHANGED
@@ -2,8 +2,7 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- export { DeckCapabilities } from './capabilities';
6
- export { DeckEvents } from './events';
5
+ export { DeckCapabilities, DeckEvents } from './types';
7
6
  export * from './DeckPlugin';
8
7
  export * from './meta';
9
8
  export { useCompanions } from './hooks';
package/src/layout.ts CHANGED
@@ -4,29 +4,16 @@
4
4
 
5
5
  import { produce } from 'immer';
6
6
 
7
- import { ATTENDABLE_PATH_SEPARATOR } from '@dxos/react-ui-attention';
8
-
9
7
  import { type DeckAction, type NewPlankPositioning } from './types';
10
8
 
11
- export const createEntryId = (entryId: string, variant?: string) =>
12
- variant ? `${entryId}${ATTENDABLE_PATH_SEPARATOR}${variant}` : entryId;
13
-
14
- export const parseEntryId = (entryId: string) => {
15
- const [id, variant] = entryId.split(ATTENDABLE_PATH_SEPARATOR);
16
- return { id, variant };
17
- };
18
-
19
9
  type OpenLayoutEntryOptions = {
20
10
  key?: string;
21
11
  positioning?: NewPlankPositioning;
22
12
  pivotId?: string;
23
- variant?: string;
24
13
  };
25
14
 
26
- export const openEntry = (deck: string[], _entryId: string, options?: OpenLayoutEntryOptions): string[] => {
15
+ export const openEntry = (deck: string[], entryId: string, options?: OpenLayoutEntryOptions): string[] => {
27
16
  return produce(deck, (draft) => {
28
- const entryId = createEntryId(_entryId, options?.variant);
29
-
30
17
  // Check that the entry is not already in the part
31
18
  if (draft.find((id) => id === entryId)) {
32
19
  return;
package/src/meta.ts CHANGED
@@ -2,11 +2,11 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type PluginMeta } from '@dxos/app-framework';
5
+ import { type Plugin } from '@dxos/app-framework';
6
6
  import { trim } from '@dxos/util';
7
7
 
8
- export const meta: PluginMeta = {
9
- id: 'dxos.org/plugin/deck',
8
+ export const meta: Plugin.Meta = {
9
+ id: 'org.dxos.plugin.deck',
10
10
  name: 'Layout',
11
11
  description: trim`
12
12
  Flexible layout system for arranging workspace views in tabs, splits, and panels.
@@ -0,0 +1,24 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities } from '@dxos/app-framework';
8
+ import { LayoutOperation } from '@dxos/app-toolkit';
9
+ import { Operation } from '@dxos/operation';
10
+
11
+ import { DeckCapabilities } from '../types';
12
+
13
+ const handler: Operation.WithHandler<typeof LayoutOperation.AddToast> = LayoutOperation.AddToast.pipe(
14
+ Operation.withHandler(
15
+ Effect.fnUntraced(function* (input) {
16
+ yield* Capabilities.updateAtomValue(DeckCapabilities.EphemeralState, (state) => ({
17
+ ...state,
18
+ toasts: [...state.toasts, input as LayoutOperation.Toast],
19
+ }));
20
+ }),
21
+ ),
22
+ );
23
+
24
+ export default handler;
@@ -0,0 +1,83 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import * as Function from 'effect/Function';
7
+ import * as Option from 'effect/Option';
8
+
9
+ import { Capabilities, Capability } from '@dxos/app-framework';
10
+ import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
11
+ import { Operation } from '@dxos/operation';
12
+ import { AttentionCapabilities } from '@dxos/plugin-attention';
13
+ import { Graph } from '@dxos/plugin-graph';
14
+ import { byPosition } from '@dxos/util';
15
+
16
+ import { Adjust, ChangeCompanion } from './definitions';
17
+ import { updateActiveDeck } from './helpers';
18
+ import { incrementPlank } from '../layout';
19
+ import { DeckCapabilities, PLANK_COMPANION_TYPE } from '../types';
20
+ import { computeActiveUpdates } from '../util';
21
+
22
+ const handler: Operation.WithHandler<typeof Adjust> = Adjust.pipe(
23
+ Operation.withHandler(
24
+ Effect.fnUntraced(function* (input) {
25
+ const _state = yield* Capabilities.getAtomValue(DeckCapabilities.State);
26
+ const deck = yield* DeckCapabilities.getDeck();
27
+ const attention = yield* Capability.get(AttentionCapabilities.Attention);
28
+ const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
29
+
30
+ let soloOperation:
31
+ | { type: 'solo'; entryId: string; mode: string }
32
+ | { type: 'unsolo'; entryId: string }
33
+ | undefined;
34
+
35
+ if (input.type === 'increment-end' || input.type === 'increment-start') {
36
+ const next = incrementPlank(deck.active, input);
37
+ const { deckUpdates } = computeActiveUpdates({ next, deck, attention });
38
+ yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => updateActiveDeck(state, deckUpdates));
39
+ }
40
+
41
+ if (input.type.startsWith('solo')) {
42
+ const entryId = input.id;
43
+ if (!deck.solo) {
44
+ soloOperation = { type: 'solo', entryId, mode: input.type };
45
+ } else {
46
+ if (input.type === 'solo--fullscreen') {
47
+ soloOperation = { type: 'solo', entryId, mode: 'solo--fullscreen' };
48
+ } else if (input.type === 'solo') {
49
+ soloOperation = { type: 'unsolo', entryId };
50
+ }
51
+ }
52
+ }
53
+
54
+ if (soloOperation?.type === 'solo') {
55
+ yield* Operation.invoke(LayoutOperation.SetLayoutMode, {
56
+ subject: soloOperation.entryId,
57
+ mode: soloOperation.mode,
58
+ });
59
+ } else if (soloOperation?.type === 'unsolo') {
60
+ yield* Operation.invoke(LayoutOperation.SetLayoutMode, { mode: 'deck' });
61
+ yield* Operation.invoke(LayoutOperation.Open, { subject: [soloOperation.entryId] });
62
+ }
63
+
64
+ if (input.type === 'companion') {
65
+ const companion = Function.pipe(
66
+ Graph.getNode(graph, input.id),
67
+ Option.map((node) =>
68
+ Graph.getConnections(graph, node.id, 'child')
69
+ .filter((n) => n.type === PLANK_COMPANION_TYPE)
70
+ .toSorted((a, b) => byPosition(a.properties, b.properties)),
71
+ ),
72
+ Option.flatMap((companions) => (companions.length > 0 ? Option.some(companions[0]) : Option.none())),
73
+ );
74
+
75
+ if (Option.isSome(companion)) {
76
+ yield* Operation.invoke(ChangeCompanion, { companion: companion.value.id });
77
+ }
78
+ }
79
+ }),
80
+ ),
81
+ );
82
+
83
+ export default handler;
@@ -0,0 +1,35 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities } from '@dxos/app-framework';
8
+ import { getCompanionVariant } from '@dxos/app-toolkit';
9
+ import { Operation } from '@dxos/operation';
10
+
11
+ import { ChangeCompanion } from './definitions';
12
+ import { updateActiveDeck } from './helpers';
13
+ import { DeckCapabilities } from '../types';
14
+
15
+ const handler: Operation.WithHandler<typeof ChangeCompanion> = ChangeCompanion.pipe(
16
+ Operation.withHandler(
17
+ Effect.fnUntraced(function* (input) {
18
+ if (input.companion === null) {
19
+ yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) =>
20
+ updateActiveDeck(state, { companionOpen: false }),
21
+ );
22
+ } else {
23
+ const variant = getCompanionVariant(input.companion);
24
+ yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) =>
25
+ updateActiveDeck(state, {
26
+ companionOpen: true,
27
+ companionVariant: variant,
28
+ }),
29
+ );
30
+ }
31
+ }),
32
+ ),
33
+ );
34
+
35
+ export default handler;
@@ -0,0 +1,35 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities, Capability } from '@dxos/app-framework';
8
+ import { LayoutOperation } from '@dxos/app-toolkit';
9
+ import { Operation } from '@dxos/operation';
10
+ import { AttentionCapabilities } from '@dxos/plugin-attention';
11
+
12
+ import { updateActiveDeck } from './helpers';
13
+ import { closeEntry } from '../layout';
14
+ import { DeckCapabilities } from '../types';
15
+ import { computeActiveUpdates } from '../util';
16
+
17
+ const handler: Operation.WithHandler<typeof LayoutOperation.Close> = LayoutOperation.Close.pipe(
18
+ Operation.withHandler(
19
+ Effect.fnUntraced(function* (input) {
20
+ const deck = yield* DeckCapabilities.getDeck();
21
+ const attention = yield* Capability.get(AttentionCapabilities.Attention);
22
+
23
+ const active = deck.solo ? [deck.solo] : deck.active;
24
+ const next = input.subject.reduce((acc, id) => closeEntry(acc, id), active);
25
+ const { deckUpdates, toAttend } = computeActiveUpdates({ next, deck, attention });
26
+ yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => updateActiveDeck(state, deckUpdates));
27
+
28
+ if (toAttend) {
29
+ yield* Operation.schedule(LayoutOperation.ScrollIntoView, { subject: toAttend });
30
+ }
31
+ }),
32
+ ),
33
+ );
34
+
35
+ export default handler;
@@ -0,0 +1,61 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Schema from 'effect/Schema';
6
+
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { Operation } from '@dxos/operation';
9
+
10
+ import { meta } from '../meta';
11
+
12
+ const PartAdjustmentSchema = Schema.Union(
13
+ Schema.Literal('close').annotations({ description: 'Close the plank.' }),
14
+ Schema.Literal('companion').annotations({ description: 'Open the companion plank.' }),
15
+ Schema.Literal('solo').annotations({ description: 'Solo the plank.' }),
16
+ Schema.Literal('solo--fullscreen').annotations({ description: 'Fullscreen the plank.' }),
17
+ Schema.Literal('increment-start').annotations({ description: 'Move the plank towards the start of the deck.' }),
18
+ Schema.Literal('increment-end').annotations({ description: 'Move the plank towards the end of the deck.' }),
19
+ );
20
+ export type PartAdjustment = Schema.Schema.Type<typeof PartAdjustmentSchema>;
21
+
22
+ export const Adjust = Operation.make({
23
+ meta: {
24
+ key: `${meta.id}.operation.adjust`,
25
+ name: 'Adjust',
26
+ description: 'Adjust the layout of a plank.',
27
+ },
28
+ services: [Capability.Service],
29
+ input: Schema.Struct({
30
+ id: Schema.String.annotations({ description: 'The id of the plank to adjust.' }),
31
+ type: PartAdjustmentSchema.annotations({ description: 'The type of adjustment to make.' }),
32
+ }),
33
+ output: Schema.Void,
34
+ });
35
+
36
+ export const UpdatePlankSize = Operation.make({
37
+ meta: {
38
+ key: `${meta.id}.operation.update-plank-size`,
39
+ name: 'Update Plank Size',
40
+ description: 'Update the size of a plank.',
41
+ },
42
+ services: [Capability.Service],
43
+ input: Schema.Struct({
44
+ id: Schema.String.annotations({ description: 'The id of the plank to resize.' }),
45
+ size: Schema.Number.annotations({ description: 'The new size of the plank.' }),
46
+ }),
47
+ output: Schema.Void,
48
+ });
49
+
50
+ export const ChangeCompanion = Operation.make({
51
+ meta: {
52
+ key: `${meta.id}.operation.change-companion`,
53
+ name: 'Change Companion',
54
+ description: 'Change the companion plank for a primary plank.',
55
+ },
56
+ services: [Capability.Service],
57
+ input: Schema.Struct({
58
+ companion: Schema.Union(Schema.String, Schema.Null),
59
+ }),
60
+ output: Schema.Void,
61
+ });
@@ -0,0 +1,22 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { invariant } from '@dxos/invariant';
6
+
7
+ import { type DeckState, type DeckStateProps } from '../types';
8
+
9
+ export const updateActiveDeck = (current: DeckStateProps, deckUpdates: Partial<DeckState>): DeckStateProps => {
10
+ const currentDeck = current.decks[current.activeDeck];
11
+ invariant(currentDeck, `Deck not found: ${current.activeDeck}`);
12
+ return {
13
+ ...current,
14
+ decks: {
15
+ ...current.decks,
16
+ [current.activeDeck]: {
17
+ ...currentDeck,
18
+ ...deckUpdates,
19
+ },
20
+ },
21
+ };
22
+ };
@@ -0,0 +1,26 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { OperationHandlerSet } from '@dxos/operation';
6
+
7
+ export * as DeckOperation from './definitions';
8
+
9
+ export const DeckOperationHandlerSet = OperationHandlerSet.lazy(
10
+ () => import('./add-toast'),
11
+ () => import('./adjust'),
12
+ () => import('./change-companion'),
13
+ () => import('./close'),
14
+ () => import('./open'),
15
+ () => import('./revert-workspace'),
16
+ () => import('./scroll-into-view'),
17
+ () => import('./set'),
18
+ () => import('./set-layout-mode'),
19
+ () => import('./show-undo'),
20
+ () => import('./switch-workspace'),
21
+ () => import('./update-complementary'),
22
+ () => import('./update-dialog'),
23
+ () => import('./update-plank-size'),
24
+ () => import('./update-popover'),
25
+ () => import('./update-sidebar'),
26
+ );
@@ -0,0 +1,89 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import * as Option from 'effect/Option';
7
+
8
+ import { Capabilities, Capability } from '@dxos/app-framework';
9
+ import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
10
+ import { Obj } from '@dxos/echo';
11
+ import { Operation } from '@dxos/operation';
12
+ import { AttentionCapabilities } from '@dxos/plugin-attention';
13
+ import { Graph } from '@dxos/plugin-graph';
14
+ import { ObservabilityOperation } from '@dxos/plugin-observability/operations';
15
+
16
+ import { updateActiveDeck } from './helpers';
17
+ import { openEntry } from '../layout';
18
+ import { DeckCapabilities } from '../types';
19
+ import { computeActiveUpdates } from '../util';
20
+
21
+ const handler: Operation.WithHandler<typeof LayoutOperation.Open> = LayoutOperation.Open.pipe(
22
+ Operation.withHandler(
23
+ Effect.fnUntraced(function* (input) {
24
+ const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
25
+ const attention = yield* Capability.get(AttentionCapabilities.Attention);
26
+ const settings = yield* Capabilities.getAtomValue(DeckCapabilities.Settings);
27
+
28
+ {
29
+ const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);
30
+ if (input.workspace && state.activeDeck !== input.workspace) {
31
+ yield* Operation.invoke(LayoutOperation.SwitchWorkspace, { subject: input.workspace });
32
+ }
33
+ }
34
+
35
+ let previouslyOpenIds: Set<string>;
36
+ {
37
+ const deck = yield* DeckCapabilities.getDeck();
38
+ previouslyOpenIds = new Set<string>(deck.solo ? [deck.solo] : deck.active);
39
+ const next =
40
+ deck.solo || !deck.initialized
41
+ ? [...input.subject]
42
+ : input.subject.reduce(
43
+ (acc, entryId) =>
44
+ openEntry(acc, entryId, {
45
+ key: input.key,
46
+ positioning: input.positioning ?? settings?.newPlankPositioning,
47
+ pivotId: input.pivotId,
48
+ }),
49
+ deck.active,
50
+ );
51
+
52
+ const { deckUpdates, toAttend: _toAttend } = computeActiveUpdates({ next, deck, attention });
53
+ yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => updateActiveDeck(state, deckUpdates));
54
+ }
55
+
56
+ {
57
+ const deck = yield* DeckCapabilities.getDeck();
58
+ const ids = deck.solo ? [deck.solo] : deck.active;
59
+ const newlyOpen = ids.filter((i: string) => !previouslyOpenIds.has(i));
60
+
61
+ if (input.scrollIntoView !== false && (newlyOpen[0] ?? input.subject[0])) {
62
+ yield* Operation.schedule(LayoutOperation.ScrollIntoView, {
63
+ subject: newlyOpen[0] ?? input.subject[0],
64
+ });
65
+ }
66
+
67
+ if (newlyOpen[0] ?? input.subject[0]) {
68
+ yield* Operation.schedule(LayoutOperation.Expose, { subject: newlyOpen[0] ?? input.subject[0] });
69
+ }
70
+
71
+ for (const subjectId of newlyOpen) {
72
+ const typename = Option.match(Graph.getNode(graph, subjectId), {
73
+ onNone: () => undefined,
74
+ onSome: (node) => {
75
+ const active = node.data;
76
+ return Obj.isObject(active) ? Obj.getTypename(active) : undefined;
77
+ },
78
+ });
79
+ yield* Operation.schedule(ObservabilityOperation.SendEvent, {
80
+ name: 'navigation.activate',
81
+ properties: { subjectId, typename },
82
+ });
83
+ }
84
+ }
85
+ }),
86
+ ),
87
+ );
88
+
89
+ export default handler;
@@ -0,0 +1,22 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities } from '@dxos/app-framework';
8
+ import { LayoutOperation } from '@dxos/app-toolkit';
9
+ import { Operation } from '@dxos/operation';
10
+
11
+ import { DeckCapabilities } from '../types';
12
+
13
+ const handler: Operation.WithHandler<typeof LayoutOperation.RevertWorkspace> = LayoutOperation.RevertWorkspace.pipe(
14
+ Operation.withHandler(
15
+ Effect.fnUntraced(function* () {
16
+ const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);
17
+ yield* Operation.invoke(LayoutOperation.SwitchWorkspace, { subject: state.previousDeck });
18
+ }),
19
+ ),
20
+ );
21
+
22
+ export default handler;