@dxos/plugin-deck 0.8.4-main.b97322e → 0.8.4-main.bcb3aa67d6

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 (470) hide show
  1. package/dist/lib/browser/add-toast-QUWRKFDD.mjs +24 -0
  2. package/dist/lib/browser/add-toast-QUWRKFDD.mjs.map +7 -0
  3. package/dist/lib/browser/adjust-J6F24WWJ.mjs +96 -0
  4. package/dist/lib/browser/adjust-J6F24WWJ.mjs.map +7 -0
  5. package/dist/lib/browser/change-companion-EZI57WDZ.mjs +34 -0
  6. package/dist/lib/browser/change-companion-EZI57WDZ.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-2YNVGCOQ.mjs +88 -0
  8. package/dist/lib/browser/chunk-2YNVGCOQ.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-AYFQHPPP.mjs +69 -0
  10. package/dist/lib/browser/chunk-AYFQHPPP.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-GCDWE37Y.mjs +220 -0
  12. package/dist/lib/browser/chunk-GCDWE37Y.mjs.map +7 -0
  13. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  14. package/dist/lib/browser/chunk-KUTDCWZF.mjs +30 -0
  15. package/dist/lib/browser/chunk-KUTDCWZF.mjs.map +7 -0
  16. package/dist/lib/browser/chunk-OHKLENIG.mjs +45 -0
  17. package/dist/lib/browser/chunk-OHKLENIG.mjs.map +7 -0
  18. package/dist/lib/browser/close-6RB62DEY.mjs +44 -0
  19. package/dist/lib/browser/close-6RB62DEY.mjs.map +7 -0
  20. package/dist/lib/browser/index.mjs +177 -130
  21. package/dist/lib/browser/index.mjs.map +4 -4
  22. package/dist/lib/browser/meta.json +1 -1
  23. package/dist/lib/browser/open-YL3JKXGK.mjs +115 -0
  24. package/dist/lib/browser/open-YL3JKXGK.mjs.map +7 -0
  25. package/dist/lib/browser/operations/index.mjs +13 -0
  26. package/dist/lib/browser/operations/index.mjs.map +7 -0
  27. package/dist/lib/browser/revert-workspace-JC66YMWB.mjs +21 -0
  28. package/dist/lib/browser/revert-workspace-JC66YMWB.mjs.map +7 -0
  29. package/dist/lib/browser/scroll-into-view-QSSFZ3KD.mjs +21 -0
  30. package/dist/lib/browser/scroll-into-view-QSSFZ3KD.mjs.map +7 -0
  31. package/dist/lib/browser/set-LPAGXY3F.mjs +37 -0
  32. package/dist/lib/browser/set-LPAGXY3F.mjs.map +7 -0
  33. package/dist/lib/browser/set-layout-mode-XZ4VHS2X.mjs +90 -0
  34. package/dist/lib/browser/set-layout-mode-XZ4VHS2X.mjs.map +7 -0
  35. package/dist/lib/browser/show-undo-IWX4S777.mjs +59 -0
  36. package/dist/lib/browser/show-undo-IWX4S777.mjs.map +7 -0
  37. package/dist/lib/browser/switch-workspace-5RKQ2LVK.mjs +68 -0
  38. package/dist/lib/browser/switch-workspace-5RKQ2LVK.mjs.map +7 -0
  39. package/dist/lib/browser/types/index.mjs +12 -12
  40. package/dist/lib/browser/update-complementary-QIIZWLGY.mjs +28 -0
  41. package/dist/lib/browser/update-complementary-QIIZWLGY.mjs.map +7 -0
  42. package/dist/lib/browser/update-dialog-5IKCWFPW.mjs +29 -0
  43. package/dist/lib/browser/update-dialog-5IKCWFPW.mjs.map +7 -0
  44. package/dist/lib/browser/update-plank-size-YDM67P65.mjs +28 -0
  45. package/dist/lib/browser/update-plank-size-YDM67P65.mjs.map +7 -0
  46. package/dist/lib/browser/update-popover-AUVAWH3D.mjs +33 -0
  47. package/dist/lib/browser/update-popover-AUVAWH3D.mjs.map +7 -0
  48. package/dist/lib/browser/update-sidebar-BT3L5GJN.mjs +25 -0
  49. package/dist/lib/browser/update-sidebar-BT3L5GJN.mjs.map +7 -0
  50. package/dist/lib/node-esm/add-toast-MR53ZMTS.mjs +25 -0
  51. package/dist/lib/node-esm/add-toast-MR53ZMTS.mjs.map +7 -0
  52. package/dist/lib/node-esm/adjust-IXRBIVAO.mjs +97 -0
  53. package/dist/lib/node-esm/adjust-IXRBIVAO.mjs.map +7 -0
  54. package/dist/lib/node-esm/change-companion-RLMI5EYL.mjs +35 -0
  55. package/dist/lib/node-esm/change-companion-RLMI5EYL.mjs.map +7 -0
  56. package/dist/lib/node-esm/chunk-7BNWWWAF.mjs +221 -0
  57. package/dist/lib/node-esm/chunk-7BNWWWAF.mjs.map +7 -0
  58. package/dist/lib/node-esm/chunk-C2AWKR2S.mjs +71 -0
  59. package/dist/lib/node-esm/chunk-C2AWKR2S.mjs.map +7 -0
  60. package/dist/lib/node-esm/chunk-GI5JXNBT.mjs +89 -0
  61. package/dist/lib/node-esm/chunk-GI5JXNBT.mjs.map +7 -0
  62. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  63. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  64. package/dist/lib/node-esm/chunk-MLVJ2ODW.mjs +32 -0
  65. package/dist/lib/node-esm/chunk-MLVJ2ODW.mjs.map +7 -0
  66. package/dist/lib/node-esm/chunk-TFFZ7NWH.mjs +47 -0
  67. package/dist/lib/node-esm/chunk-TFFZ7NWH.mjs.map +7 -0
  68. package/dist/lib/node-esm/close-UD7KBYZP.mjs +45 -0
  69. package/dist/lib/node-esm/close-UD7KBYZP.mjs.map +7 -0
  70. package/dist/lib/node-esm/index.mjs +216 -0
  71. package/dist/lib/node-esm/index.mjs.map +7 -0
  72. package/dist/lib/node-esm/meta.json +1 -0
  73. package/dist/lib/node-esm/open-XZ7YGVPZ.mjs +116 -0
  74. package/dist/lib/node-esm/open-XZ7YGVPZ.mjs.map +7 -0
  75. package/dist/lib/node-esm/operations/index.mjs +14 -0
  76. package/dist/lib/node-esm/operations/index.mjs.map +7 -0
  77. package/dist/lib/node-esm/revert-workspace-F3FUP4ZL.mjs +22 -0
  78. package/dist/lib/node-esm/revert-workspace-F3FUP4ZL.mjs.map +7 -0
  79. package/dist/lib/node-esm/scroll-into-view-24TF2WYQ.mjs +22 -0
  80. package/dist/lib/node-esm/scroll-into-view-24TF2WYQ.mjs.map +7 -0
  81. package/dist/lib/node-esm/set-F2QWLSJR.mjs +38 -0
  82. package/dist/lib/node-esm/set-F2QWLSJR.mjs.map +7 -0
  83. package/dist/lib/node-esm/set-layout-mode-Z54OX33H.mjs +91 -0
  84. package/dist/lib/node-esm/set-layout-mode-Z54OX33H.mjs.map +7 -0
  85. package/dist/lib/node-esm/show-undo-B2XVCKGX.mjs +60 -0
  86. package/dist/lib/node-esm/show-undo-B2XVCKGX.mjs.map +7 -0
  87. package/dist/lib/node-esm/switch-workspace-PM57REEV.mjs +69 -0
  88. package/dist/lib/node-esm/switch-workspace-PM57REEV.mjs.map +7 -0
  89. package/dist/lib/node-esm/types/index.mjs +33 -0
  90. package/dist/lib/node-esm/types/index.mjs.map +7 -0
  91. package/dist/lib/node-esm/update-complementary-26H5UYJP.mjs +29 -0
  92. package/dist/lib/node-esm/update-complementary-26H5UYJP.mjs.map +7 -0
  93. package/dist/lib/node-esm/update-dialog-EYP3QNFG.mjs +30 -0
  94. package/dist/lib/node-esm/update-dialog-EYP3QNFG.mjs.map +7 -0
  95. package/dist/lib/node-esm/update-plank-size-LLFUB57G.mjs +29 -0
  96. package/dist/lib/node-esm/update-plank-size-LLFUB57G.mjs.map +7 -0
  97. package/dist/lib/node-esm/update-popover-G55PS7T4.mjs +34 -0
  98. package/dist/lib/node-esm/update-popover-G55PS7T4.mjs.map +7 -0
  99. package/dist/lib/node-esm/update-sidebar-W4ND5MUL.mjs +26 -0
  100. package/dist/lib/node-esm/update-sidebar-W4ND5MUL.mjs.map +7 -0
  101. package/dist/types/src/DeckPlugin.d.ts +2 -1
  102. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  103. package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
  104. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  105. package/dist/types/src/capabilities/check-app-scheme.d.ts +17 -2
  106. package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -1
  107. package/dist/types/src/capabilities/index.d.ts +196 -12
  108. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  109. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  110. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  111. package/dist/types/src/capabilities/react-root.d.ts +4 -2
  112. package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
  113. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  114. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  115. package/dist/types/src/capabilities/settings.d.ts +20 -2
  116. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  117. package/dist/types/src/capabilities/state.d.ts +115 -41
  118. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  119. package/dist/types/src/capabilities/tools.d.ts +4 -3
  120. package/dist/types/src/capabilities/tools.d.ts.map +1 -1
  121. package/dist/types/src/capabilities/url-handler.d.ts +3 -2
  122. package/dist/types/src/capabilities/url-handler.d.ts.map +1 -1
  123. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts +4 -4
  124. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +1 -1
  125. package/dist/types/src/components/DeckSettings/DeckSettings.stories.d.ts +85 -0
  126. package/dist/types/src/components/DeckSettings/DeckSettings.stories.d.ts.map +1 -0
  127. package/dist/types/src/components/DeckSettings/index.d.ts +2 -1
  128. package/dist/types/src/components/DeckSettings/index.d.ts.map +1 -1
  129. package/dist/types/src/components/Matrix/Matrix.d.ts +49 -0
  130. package/dist/types/src/components/Matrix/Matrix.d.ts.map +1 -0
  131. package/dist/types/src/components/Matrix/Matrix.stories.d.ts +17 -0
  132. package/dist/types/src/components/Matrix/Matrix.stories.d.ts.map +1 -0
  133. package/dist/types/src/components/Matrix/index.d.ts +3 -0
  134. package/dist/types/src/components/Matrix/index.d.ts.map +1 -0
  135. package/dist/types/src/components/index.d.ts +3 -2
  136. package/dist/types/src/components/index.d.ts.map +1 -1
  137. package/dist/types/src/containers/Deck/Banner.d.ts.map +1 -0
  138. package/dist/types/src/containers/Deck/Deck.d.ts +25 -0
  139. package/dist/types/src/containers/Deck/Deck.d.ts.map +1 -0
  140. package/dist/types/src/containers/Deck/Deck.stories.d.ts +85 -0
  141. package/dist/types/src/containers/Deck/Deck.stories.d.ts.map +1 -0
  142. package/dist/types/src/containers/Deck/DeckContent.d.ts +7 -0
  143. package/dist/types/src/containers/Deck/DeckContent.d.ts.map +1 -0
  144. package/dist/types/src/containers/Deck/DeckRoot.d.ts +42 -0
  145. package/dist/types/src/containers/Deck/DeckRoot.d.ts.map +1 -0
  146. package/dist/types/src/containers/Deck/DeckViewport.d.ts +19 -0
  147. package/dist/types/src/containers/Deck/DeckViewport.d.ts.map +1 -0
  148. package/dist/types/src/containers/Deck/StatusBar.d.ts.map +1 -0
  149. package/dist/types/src/containers/Deck/index.d.ts +2 -0
  150. package/dist/types/src/containers/Deck/index.d.ts.map +1 -0
  151. package/dist/types/src/containers/DeckLayout/ActiveNode.d.ts.map +1 -0
  152. package/dist/types/src/containers/DeckLayout/DeckLayout.d.ts +5 -0
  153. package/dist/types/src/containers/DeckLayout/DeckLayout.d.ts.map +1 -0
  154. package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts +87 -0
  155. package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts.map +1 -0
  156. package/dist/types/src/containers/DeckLayout/Dialog.d.ts.map +1 -0
  157. package/dist/types/src/containers/DeckLayout/Fallback.d.ts +2 -0
  158. package/dist/types/src/containers/DeckLayout/Fallback.d.ts.map +1 -0
  159. package/dist/types/src/containers/DeckLayout/Popover.d.ts +5 -0
  160. package/dist/types/src/containers/DeckLayout/Popover.d.ts.map +1 -0
  161. package/dist/types/src/containers/DeckLayout/Toast.d.ts +10 -0
  162. package/dist/types/src/containers/DeckLayout/Toast.d.ts.map +1 -0
  163. package/dist/types/src/containers/DeckLayout/constants.d.ts.map +1 -0
  164. package/dist/types/src/containers/DeckLayout/index.d.ts +4 -0
  165. package/dist/types/src/containers/DeckLayout/index.d.ts.map +1 -0
  166. package/dist/types/src/containers/Plank/Plank.d.ts +21 -0
  167. package/dist/types/src/containers/Plank/Plank.d.ts.map +1 -0
  168. package/dist/types/src/containers/Plank/Plank.stories.d.ts +84 -0
  169. package/dist/types/src/containers/Plank/Plank.stories.d.ts.map +1 -0
  170. package/dist/types/src/containers/Plank/PlankComponent.d.ts +15 -0
  171. package/dist/types/src/containers/Plank/PlankComponent.d.ts.map +1 -0
  172. package/dist/types/src/containers/Plank/PlankContent.d.ts +14 -0
  173. package/dist/types/src/containers/Plank/PlankContent.d.ts.map +1 -0
  174. package/dist/types/src/{components → containers}/Plank/PlankControls.d.ts +5 -6
  175. package/dist/types/src/containers/Plank/PlankControls.d.ts.map +1 -0
  176. package/dist/types/src/containers/Plank/PlankError.d.ts +15 -0
  177. package/dist/types/src/containers/Plank/PlankError.d.ts.map +1 -0
  178. package/dist/types/src/{components → containers}/Plank/PlankHeading.d.ts +3 -3
  179. package/dist/types/src/containers/Plank/PlankHeading.d.ts.map +1 -0
  180. package/dist/types/src/{components → containers}/Plank/PlankLoading.d.ts.map +1 -1
  181. package/dist/types/src/containers/Plank/PlankRoot.d.ts +37 -0
  182. package/dist/types/src/containers/Plank/PlankRoot.d.ts.map +1 -0
  183. package/dist/types/src/containers/Plank/index.d.ts +4 -0
  184. package/dist/types/src/containers/Plank/index.d.ts.map +1 -0
  185. package/dist/types/src/containers/Sidebar/ComplementarySidebar.d.ts.map +1 -0
  186. package/dist/types/src/containers/Sidebar/Sidebar.d.ts.map +1 -0
  187. package/dist/types/src/containers/Sidebar/SidebarButton.d.ts.map +1 -0
  188. package/dist/types/src/{components → containers}/Sidebar/index.d.ts.map +1 -1
  189. package/dist/types/src/containers/index.d.ts +6 -0
  190. package/dist/types/src/containers/index.d.ts.map +1 -0
  191. package/dist/types/src/hooks/index.d.ts +2 -0
  192. package/dist/types/src/hooks/index.d.ts.map +1 -1
  193. package/dist/types/src/hooks/useDeckCompanions.d.ts +3 -4
  194. package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
  195. package/dist/types/src/hooks/useDeckState.d.ts +17 -0
  196. package/dist/types/src/hooks/useDeckState.d.ts.map +1 -0
  197. package/dist/types/src/hooks/useHoistStatusbar.d.ts +1 -1
  198. package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +1 -1
  199. package/dist/types/src/hooks/useMainSize.d.ts +2 -2
  200. package/dist/types/src/hooks/useNodeActionExpander.d.ts +1 -1
  201. package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
  202. package/dist/types/src/hooks/useSelectedCompanion.d.ts +13 -0
  203. package/dist/types/src/hooks/useSelectedCompanion.d.ts.map +1 -0
  204. package/dist/types/src/index.d.ts +1 -2
  205. package/dist/types/src/index.d.ts.map +1 -1
  206. package/dist/types/src/layout.d.ts +3 -9
  207. package/dist/types/src/layout.d.ts.map +1 -1
  208. package/dist/types/src/meta.d.ts +2 -3
  209. package/dist/types/src/meta.d.ts.map +1 -1
  210. package/dist/types/src/operations/add-toast.d.ts +5 -0
  211. package/dist/types/src/operations/add-toast.d.ts.map +1 -0
  212. package/dist/types/src/operations/adjust.d.ts +5 -0
  213. package/dist/types/src/operations/adjust.d.ts.map +1 -0
  214. package/dist/types/src/operations/change-companion.d.ts +5 -0
  215. package/dist/types/src/operations/change-companion.d.ts.map +1 -0
  216. package/dist/types/src/operations/close.d.ts +5 -0
  217. package/dist/types/src/operations/close.d.ts.map +1 -0
  218. package/dist/types/src/operations/definitions.d.ts +18 -0
  219. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  220. package/dist/types/src/operations/helpers.d.ts +3 -0
  221. package/dist/types/src/operations/helpers.d.ts.map +1 -0
  222. package/dist/types/src/operations/index.d.ts +4 -0
  223. package/dist/types/src/operations/index.d.ts.map +1 -0
  224. package/dist/types/src/operations/open.d.ts +5 -0
  225. package/dist/types/src/operations/open.d.ts.map +1 -0
  226. package/dist/types/src/operations/revert-workspace.d.ts +5 -0
  227. package/dist/types/src/operations/revert-workspace.d.ts.map +1 -0
  228. package/dist/types/src/operations/scroll-into-view.d.ts +5 -0
  229. package/dist/types/src/operations/scroll-into-view.d.ts.map +1 -0
  230. package/dist/types/src/operations/set-layout-mode.d.ts +9 -0
  231. package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -0
  232. package/dist/types/src/operations/set.d.ts +5 -0
  233. package/dist/types/src/operations/set.d.ts.map +1 -0
  234. package/dist/types/src/operations/show-undo.d.ts +5 -0
  235. package/dist/types/src/operations/show-undo.d.ts.map +1 -0
  236. package/dist/types/src/operations/switch-workspace.d.ts +5 -0
  237. package/dist/types/src/operations/switch-workspace.d.ts.map +1 -0
  238. package/dist/types/src/operations/update-complementary.d.ts +5 -0
  239. package/dist/types/src/operations/update-complementary.d.ts.map +1 -0
  240. package/dist/types/src/operations/update-dialog.d.ts +5 -0
  241. package/dist/types/src/operations/update-dialog.d.ts.map +1 -0
  242. package/dist/types/src/operations/update-plank-size.d.ts +5 -0
  243. package/dist/types/src/operations/update-plank-size.d.ts.map +1 -0
  244. package/dist/types/src/operations/update-popover.d.ts +5 -0
  245. package/dist/types/src/operations/update-popover.d.ts.map +1 -0
  246. package/dist/types/src/operations/update-sidebar.d.ts +5 -0
  247. package/dist/types/src/operations/update-sidebar.d.ts.map +1 -0
  248. package/dist/types/src/testing/DeckLayoutStoryNavigation.d.ts +10 -0
  249. package/dist/types/src/testing/DeckLayoutStoryNavigation.d.ts.map +1 -0
  250. package/dist/types/src/testing/index.d.ts +2 -0
  251. package/dist/types/src/testing/index.d.ts.map +1 -0
  252. package/dist/types/src/translations.d.ts +66 -52
  253. package/dist/types/src/translations.d.ts.map +1 -1
  254. package/dist/types/src/types/Settings.d.ts +16 -0
  255. package/dist/types/src/types/Settings.d.ts.map +1 -0
  256. package/dist/types/src/{capabilities → types}/capabilities.d.ts +96 -90
  257. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  258. package/dist/types/src/types/events.d.ts +7 -0
  259. package/dist/types/src/types/events.d.ts.map +1 -0
  260. package/dist/types/src/types/index.d.ts +3 -0
  261. package/dist/types/src/types/index.d.ts.map +1 -1
  262. package/dist/types/src/types/schema.d.ts +58 -54
  263. package/dist/types/src/types/schema.d.ts.map +1 -1
  264. package/dist/types/src/util/index.d.ts +1 -0
  265. package/dist/types/src/util/index.d.ts.map +1 -1
  266. package/dist/types/src/util/layoutAppliesTopbar.d.ts +1 -1
  267. package/dist/types/src/util/layoutAppliesTopbar.d.ts.map +1 -1
  268. package/dist/types/src/util/sanitize-persisted-state.d.ts +19 -0
  269. package/dist/types/src/util/sanitize-persisted-state.d.ts.map +1 -0
  270. package/dist/types/src/util/sanitize-persisted-state.test.d.ts +2 -0
  271. package/dist/types/src/util/sanitize-persisted-state.test.d.ts.map +1 -0
  272. package/dist/types/src/util/set-active.d.ts +19 -4
  273. package/dist/types/src/util/set-active.d.ts.map +1 -1
  274. package/dist/types/src/util/set-active.test.d.ts +2 -0
  275. package/dist/types/src/util/set-active.test.d.ts.map +1 -0
  276. package/dist/types/tsconfig.tsbuildinfo +1 -1
  277. package/package.json +90 -47
  278. package/src/DeckPlugin.ts +44 -64
  279. package/src/capabilities/app-graph-builder.ts +113 -127
  280. package/src/capabilities/check-app-scheme.ts +123 -24
  281. package/src/capabilities/index.ts +13 -13
  282. package/src/capabilities/operation-handler.ts +16 -0
  283. package/src/capabilities/react-root.tsx +37 -28
  284. package/src/capabilities/react-surface.tsx +30 -22
  285. package/src/capabilities/settings.ts +32 -19
  286. package/src/capabilities/state.ts +74 -88
  287. package/src/capabilities/tools.ts +64 -54
  288. package/src/capabilities/url-handler.ts +199 -49
  289. package/src/components/DeckSettings/DeckSettings.stories.tsx +40 -0
  290. package/src/components/DeckSettings/DeckSettings.tsx +104 -69
  291. package/src/components/DeckSettings/index.ts +4 -2
  292. package/src/components/Matrix/Matrix.stories.tsx +213 -0
  293. package/src/components/Matrix/Matrix.tsx +205 -0
  294. package/src/components/Matrix/SPEC.md +219 -0
  295. package/src/components/Matrix/index.ts +6 -0
  296. package/src/components/index.ts +6 -3
  297. package/src/containers/Deck/Banner.tsx +40 -0
  298. package/src/containers/Deck/Deck.stories.tsx +85 -0
  299. package/src/containers/Deck/Deck.tsx +21 -0
  300. package/src/containers/Deck/DeckContent.tsx +104 -0
  301. package/src/containers/Deck/DeckRoot.tsx +49 -0
  302. package/src/containers/Deck/DeckViewport.tsx +397 -0
  303. package/src/{components/DeckLayout → containers/Deck}/StatusBar.tsx +4 -4
  304. package/src/containers/Deck/index.ts +5 -0
  305. package/src/{components → containers}/DeckLayout/ActiveNode.tsx +4 -3
  306. package/src/containers/DeckLayout/DeckLayout.stories.tsx +174 -0
  307. package/src/containers/DeckLayout/DeckLayout.tsx +62 -0
  308. package/src/{components → containers}/DeckLayout/Dialog.tsx +22 -13
  309. package/src/containers/DeckLayout/Fallback.tsx +24 -0
  310. package/src/containers/DeckLayout/Popover.tsx +156 -0
  311. package/src/{components → containers}/DeckLayout/Toast.tsx +30 -5
  312. package/src/{components → containers}/DeckLayout/constants.ts +1 -0
  313. package/src/{components → containers}/DeckLayout/index.ts +3 -2
  314. package/src/containers/Plank/Plank.stories.tsx +105 -0
  315. package/src/containers/Plank/Plank.tsx +22 -0
  316. package/src/containers/Plank/PlankComponent.tsx +179 -0
  317. package/src/containers/Plank/PlankContent.tsx +45 -0
  318. package/src/{components → containers}/Plank/PlankControls.tsx +44 -37
  319. package/src/containers/Plank/PlankError.tsx +79 -0
  320. package/src/{components → containers}/Plank/PlankHeading.tsx +50 -63
  321. package/src/{components → containers}/Plank/PlankLoading.tsx +1 -1
  322. package/src/containers/Plank/PlankRoot.tsx +49 -0
  323. package/src/{components → containers}/Plank/index.ts +0 -2
  324. package/src/containers/Sidebar/ComplementarySidebar.tsx +209 -0
  325. package/src/{components → containers}/Sidebar/Sidebar.tsx +10 -10
  326. package/src/containers/Sidebar/SidebarButton.tsx +94 -0
  327. package/src/containers/index.ts +11 -0
  328. package/src/hooks/index.ts +2 -0
  329. package/src/hooks/useCompanions.ts +3 -3
  330. package/src/hooks/useDeckCompanions.ts +8 -11
  331. package/src/hooks/useDeckState.ts +73 -0
  332. package/src/hooks/useHoistStatusbar.ts +4 -5
  333. package/src/hooks/useMainSize.ts +2 -2
  334. package/src/hooks/useNodeActionExpander.ts +4 -4
  335. package/src/hooks/useSelectedCompanion.ts +32 -0
  336. package/src/index.ts +1 -2
  337. package/src/layout.ts +3 -16
  338. package/src/meta.ts +8 -5
  339. package/src/operations/add-toast.ts +24 -0
  340. package/src/operations/adjust.ts +83 -0
  341. package/src/operations/change-companion.ts +35 -0
  342. package/src/operations/close.ts +35 -0
  343. package/src/operations/definitions.ts +61 -0
  344. package/src/operations/helpers.ts +22 -0
  345. package/src/operations/index.ts +26 -0
  346. package/src/operations/open.ts +117 -0
  347. package/src/operations/revert-workspace.ts +22 -0
  348. package/src/operations/scroll-into-view.ts +24 -0
  349. package/src/operations/set-layout-mode.ts +84 -0
  350. package/src/operations/set.ts +36 -0
  351. package/src/operations/show-undo.ts +46 -0
  352. package/src/operations/switch-workspace.ts +60 -0
  353. package/src/operations/update-complementary.ts +33 -0
  354. package/src/operations/update-dialog.ts +34 -0
  355. package/src/operations/update-plank-size.ts +29 -0
  356. package/src/operations/update-popover.ts +36 -0
  357. package/src/operations/update-sidebar.ts +28 -0
  358. package/src/testing/DeckLayoutStoryNavigation.tsx +57 -0
  359. package/src/testing/index.ts +5 -0
  360. package/src/translations.ts +67 -52
  361. package/src/types/Settings.ts +26 -0
  362. package/src/types/capabilities.ts +34 -0
  363. package/src/types/events.ts +21 -0
  364. package/src/types/index.ts +3 -0
  365. package/src/types/schema.ts +45 -48
  366. package/src/util/index.ts +1 -0
  367. package/src/util/layoutAppliesTopbar.ts +2 -2
  368. package/src/util/overscroll.ts +3 -3
  369. package/src/util/sanitize-persisted-state.test.ts +79 -0
  370. package/src/util/sanitize-persisted-state.ts +52 -0
  371. package/src/util/set-active.test.ts +106 -0
  372. package/src/util/set-active.ts +50 -30
  373. package/src/vite-env.d.ts +5 -0
  374. package/dist/lib/browser/app-graph-builder-JTFSDT2I.mjs +0 -152
  375. package/dist/lib/browser/app-graph-builder-JTFSDT2I.mjs.map +0 -7
  376. package/dist/lib/browser/check-app-scheme-57U62A3A.mjs +0 -32
  377. package/dist/lib/browser/check-app-scheme-57U62A3A.mjs.map +0 -7
  378. package/dist/lib/browser/chunk-CNTGBCMK.mjs +0 -145
  379. package/dist/lib/browser/chunk-CNTGBCMK.mjs.map +0 -7
  380. package/dist/lib/browser/chunk-D7KTFCUV.mjs +0 -1494
  381. package/dist/lib/browser/chunk-D7KTFCUV.mjs.map +0 -7
  382. package/dist/lib/browser/chunk-F5BQOOEG.mjs +0 -160
  383. package/dist/lib/browser/chunk-F5BQOOEG.mjs.map +0 -7
  384. package/dist/lib/browser/chunk-JFTXENFN.mjs +0 -129
  385. package/dist/lib/browser/chunk-JFTXENFN.mjs.map +0 -7
  386. package/dist/lib/browser/chunk-M57WD3V6.mjs +0 -16
  387. package/dist/lib/browser/chunk-M57WD3V6.mjs.map +0 -7
  388. package/dist/lib/browser/chunk-QDZO4AJ4.mjs +0 -127
  389. package/dist/lib/browser/chunk-QDZO4AJ4.mjs.map +0 -7
  390. package/dist/lib/browser/chunk-Z5KITAZW.mjs +0 -13
  391. package/dist/lib/browser/chunk-Z5KITAZW.mjs.map +0 -7
  392. package/dist/lib/browser/intent-resolver-P2OBK5HK.mjs +0 -521
  393. package/dist/lib/browser/intent-resolver-P2OBK5HK.mjs.map +0 -7
  394. package/dist/lib/browser/react-root-PO64J7ML.mjs +0 -43
  395. package/dist/lib/browser/react-root-PO64J7ML.mjs.map +0 -7
  396. package/dist/lib/browser/react-surface-E45YOVF5.mjs +0 -40
  397. package/dist/lib/browser/react-surface-E45YOVF5.mjs.map +0 -7
  398. package/dist/lib/browser/settings-6AJZPZPM.mjs +0 -29
  399. package/dist/lib/browser/settings-6AJZPZPM.mjs.map +0 -7
  400. package/dist/lib/browser/state-MVDYX77Y.mjs +0 -12
  401. package/dist/lib/browser/tools-TKQDPCHJ.mjs +0 -88
  402. package/dist/lib/browser/tools-TKQDPCHJ.mjs.map +0 -7
  403. package/dist/lib/browser/url-handler-7L7M6IKH.mjs +0 -70
  404. package/dist/lib/browser/url-handler-7L7M6IKH.mjs.map +0 -7
  405. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  406. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  407. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  408. package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +0 -1
  409. package/dist/types/src/components/DeckLayout/Banner.d.ts.map +0 -1
  410. package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts +0 -3
  411. package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +0 -1
  412. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +0 -6
  413. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +0 -1
  414. package/dist/types/src/components/DeckLayout/Dialog.d.ts.map +0 -1
  415. package/dist/types/src/components/DeckLayout/Fallback.d.ts +0 -3
  416. package/dist/types/src/components/DeckLayout/Fallback.d.ts.map +0 -1
  417. package/dist/types/src/components/DeckLayout/Popover.d.ts +0 -5
  418. package/dist/types/src/components/DeckLayout/Popover.d.ts.map +0 -1
  419. package/dist/types/src/components/DeckLayout/StatusBar.d.ts.map +0 -1
  420. package/dist/types/src/components/DeckLayout/Toast.d.ts +0 -5
  421. package/dist/types/src/components/DeckLayout/Toast.d.ts.map +0 -1
  422. package/dist/types/src/components/DeckLayout/Topbar.d.ts +0 -3
  423. package/dist/types/src/components/DeckLayout/Topbar.d.ts.map +0 -1
  424. package/dist/types/src/components/DeckLayout/constants.d.ts.map +0 -1
  425. package/dist/types/src/components/DeckLayout/index.d.ts +0 -4
  426. package/dist/types/src/components/DeckLayout/index.d.ts.map +0 -1
  427. package/dist/types/src/components/Plank/Plank.d.ts +0 -27
  428. package/dist/types/src/components/Plank/Plank.d.ts.map +0 -1
  429. package/dist/types/src/components/Plank/Plank.stories.d.ts +0 -8
  430. package/dist/types/src/components/Plank/Plank.stories.d.ts.map +0 -1
  431. package/dist/types/src/components/Plank/PlankControls.d.ts.map +0 -1
  432. package/dist/types/src/components/Plank/PlankError.d.ts +0 -13
  433. package/dist/types/src/components/Plank/PlankError.d.ts.map +0 -1
  434. package/dist/types/src/components/Plank/PlankHeading.d.ts.map +0 -1
  435. package/dist/types/src/components/Plank/index.d.ts +0 -6
  436. package/dist/types/src/components/Plank/index.d.ts.map +0 -1
  437. package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +0 -1
  438. package/dist/types/src/components/Sidebar/Sidebar.d.ts.map +0 -1
  439. package/dist/types/src/components/Sidebar/SidebarButton.d.ts.map +0 -1
  440. package/dist/types/src/components/fragments.d.ts +0 -4
  441. package/dist/types/src/components/fragments.d.ts.map +0 -1
  442. package/dist/types/src/events.d.ts +0 -4
  443. package/dist/types/src/events.d.ts.map +0 -1
  444. package/src/capabilities/capabilities.ts +0 -14
  445. package/src/capabilities/intent-resolver.ts +0 -468
  446. package/src/components/DeckLayout/Banner.tsx +0 -39
  447. package/src/components/DeckLayout/ContentEmpty.tsx +0 -31
  448. package/src/components/DeckLayout/DeckLayout.tsx +0 -301
  449. package/src/components/DeckLayout/Fallback.tsx +0 -28
  450. package/src/components/DeckLayout/Popover.tsx +0 -104
  451. package/src/components/DeckLayout/Topbar.tsx +0 -11
  452. package/src/components/Plank/Plank.stories.tsx +0 -55
  453. package/src/components/Plank/Plank.tsx +0 -266
  454. package/src/components/Plank/PlankError.tsx +0 -48
  455. package/src/components/Sidebar/ComplementarySidebar.tsx +0 -193
  456. package/src/components/Sidebar/SidebarButton.tsx +0 -87
  457. package/src/components/fragments.ts +0 -14
  458. package/src/events.ts +0 -11
  459. /package/dist/lib/browser/{state-MVDYX77Y.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
  460. /package/dist/types/src/{components/DeckLayout → containers/Deck}/Banner.d.ts +0 -0
  461. /package/dist/types/src/{components/DeckLayout → containers/Deck}/StatusBar.d.ts +0 -0
  462. /package/dist/types/src/{components → containers}/DeckLayout/ActiveNode.d.ts +0 -0
  463. /package/dist/types/src/{components → containers}/DeckLayout/Dialog.d.ts +0 -0
  464. /package/dist/types/src/{components → containers}/DeckLayout/constants.d.ts +0 -0
  465. /package/dist/types/src/{components → containers}/Plank/PlankLoading.d.ts +0 -0
  466. /package/dist/types/src/{components → containers}/Sidebar/ComplementarySidebar.d.ts +0 -0
  467. /package/dist/types/src/{components → containers}/Sidebar/Sidebar.d.ts +0 -0
  468. /package/dist/types/src/{components → containers}/Sidebar/SidebarButton.d.ts +0 -0
  469. /package/dist/types/src/{components → containers}/Sidebar/index.d.ts +0 -0
  470. /package/src/{components → containers}/Sidebar/index.ts +0 -0
@@ -0,0 +1,117 @@
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 {
10
+ AppCapabilities,
11
+ LayoutOperation,
12
+ createEdgeExistenceChecker,
13
+ validateNavigationTarget,
14
+ } from '@dxos/app-toolkit';
15
+ import { Context } from '@dxos/context';
16
+ import { Obj } from '@dxos/echo';
17
+ import { Operation } from '@dxos/operation';
18
+ import { AttentionCapabilities } from '@dxos/plugin-attention/types';
19
+ import { ClientCapabilities } from '@dxos/plugin-client/types';
20
+ import { Graph } from '@dxos/plugin-graph';
21
+ import { ObservabilityOperation } from '@dxos/plugin-observability/operations';
22
+
23
+ import { updateActiveDeck } from './helpers';
24
+ import { openEntry } from '../layout';
25
+ import { DeckCapabilities } from '../types';
26
+ import { computeActiveUpdates } from '../util';
27
+
28
+ const handler: Operation.WithHandler<typeof LayoutOperation.Open> = LayoutOperation.Open.pipe(
29
+ Operation.withHandler(
30
+ Effect.fnUntraced(function* (input) {
31
+ const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
32
+ const attention = yield* Capability.get(AttentionCapabilities.Attention);
33
+ const settings = yield* Capabilities.getAtomValue(DeckCapabilities.Settings);
34
+
35
+ // Validate navigation targets, redirecting to 404 if not found.
36
+ const capabilities = yield* Capability.Service;
37
+ const pathResolvers = capabilities.getAll(AppCapabilities.NavigationPathResolver);
38
+ const checkRemoteExistence = yield* Capability.get(ClientCapabilities.Client).pipe(
39
+ Effect.map((client) =>
40
+ createEdgeExistenceChecker((spaceId, body) => client.edge.http.execQuery(new Context(), spaceId, body)),
41
+ ),
42
+ Effect.catchAll(() => Effect.succeed(undefined)),
43
+ );
44
+
45
+ const validatedSubjects = yield* Effect.all(
46
+ input.subject.map((subjectId) =>
47
+ input.navigation === 'immediate'
48
+ ? Effect.succeed(subjectId)
49
+ : validateNavigationTarget({ graph, subjectId, pathResolvers, checkRemoteExistence }),
50
+ ),
51
+ );
52
+ input = { ...input, subject: validatedSubjects };
53
+
54
+ {
55
+ const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);
56
+ if (input.workspace && state.activeDeck !== input.workspace) {
57
+ yield* Operation.invoke(LayoutOperation.SwitchWorkspace, { subject: input.workspace });
58
+ }
59
+ }
60
+
61
+ let previouslyOpenIds: Set<string>;
62
+ {
63
+ const deck = yield* DeckCapabilities.getDeck();
64
+ previouslyOpenIds = new Set<string>(deck.solo ? [deck.solo] : deck.active);
65
+ const next =
66
+ deck.solo || !deck.initialized
67
+ ? [...input.subject]
68
+ : input.subject.reduce(
69
+ (acc, entryId) =>
70
+ openEntry(acc, entryId, {
71
+ key: input.key,
72
+ positioning: input.positioning ?? settings?.newPlankPositioning,
73
+ pivotId: input.pivotId,
74
+ }),
75
+ deck.active,
76
+ );
77
+
78
+ const { deckUpdates, toAttend: _toAttend } = computeActiveUpdates({ next, deck, attention });
79
+ yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => updateActiveDeck(state, deckUpdates));
80
+ }
81
+
82
+ {
83
+ const deck = yield* DeckCapabilities.getDeck();
84
+ const ids = deck.solo ? [deck.solo] : deck.active;
85
+ const newlyOpen = ids.filter((i: string) => !previouslyOpenIds.has(i));
86
+
87
+ if (input.scrollIntoView !== false && (newlyOpen[0] ?? input.subject[0])) {
88
+ yield* Operation.schedule(LayoutOperation.ScrollIntoView, {
89
+ subject: newlyOpen[0] ?? input.subject[0],
90
+ });
91
+ }
92
+
93
+ if (newlyOpen[0] ?? input.subject[0]) {
94
+ yield* Operation.schedule(LayoutOperation.Expose, { subject: newlyOpen[0] ?? input.subject[0] });
95
+ }
96
+
97
+ for (const subjectId of newlyOpen) {
98
+ const typename = Option.match(Graph.getNode(graph, subjectId), {
99
+ onNone: () => undefined,
100
+ onSome: (node) => {
101
+ const active = node.data;
102
+ return Obj.isObject(active) ? Obj.getTypename(active) : undefined;
103
+ },
104
+ });
105
+ yield* Operation.schedule(ObservabilityOperation.SendEvent, {
106
+ name: 'navigation.activate',
107
+ properties: { subjectId, typename },
108
+ });
109
+ }
110
+ }
111
+
112
+ return validatedSubjects;
113
+ }),
114
+ ),
115
+ );
116
+
117
+ 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;
@@ -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.ScrollIntoView> = LayoutOperation.ScrollIntoView.pipe(
14
+ Operation.withHandler(
15
+ Effect.fnUntraced(function* (input) {
16
+ yield* Capabilities.updateAtomValue(DeckCapabilities.EphemeralState, (state) => ({
17
+ ...state,
18
+ scrollIntoView: input.subject,
19
+ }));
20
+ }),
21
+ ),
22
+ );
23
+
24
+ export default handler;
@@ -0,0 +1,84 @@
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 { log } from '@dxos/log';
10
+ import { Operation } from '@dxos/operation';
11
+ import { isNonNullable } from '@dxos/util';
12
+
13
+ import { updateActiveDeck } from './helpers';
14
+ import { DeckCapabilities, type DeckState, type LayoutMode, getMode, isLayoutMode } from '../types';
15
+
16
+ /**
17
+ * Transitions between layout modes (multi, solo, solo--fullscreen) or reverts to the previous mode.
18
+ * Computes which planks become active/inactive and persists the previous mode for revert support.
19
+ */
20
+ const handler: Operation.WithHandler<typeof LayoutOperation.SetLayoutMode> = LayoutOperation.SetLayoutMode.pipe(
21
+ Operation.withHandler(
22
+ Effect.fnUntraced(function* (input) {
23
+ if ('mode' in input && !isLayoutMode(input.mode)) {
24
+ return;
25
+ }
26
+
27
+ const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);
28
+ const deck = yield* DeckCapabilities.getDeck();
29
+
30
+ const computeModeUpdate = (mode: LayoutMode, subject?: string): Partial<DeckState> => {
31
+ const current = deck.solo ? [deck.solo] : deck.active;
32
+ const next = (mode !== 'multi' ? [subject ?? deck.solo ?? deck.active[0]] : [...deck.active, deck.solo]).filter(
33
+ isNonNullable,
34
+ );
35
+
36
+ const removed = current.filter((id: string) => !next.includes(id));
37
+ const closed = Array.from(new Set([...deck.inactive.filter((id: string) => !next.includes(id)), ...removed]));
38
+
39
+ const soloUpdate =
40
+ mode !== 'multi' && next[0]
41
+ ? { solo: next[0] }
42
+ : mode === 'multi' && deck.solo
43
+ ? { solo: undefined, initialized: true }
44
+ : {};
45
+
46
+ const fullscreenUpdate = mode === 'solo--fullscreen' ? { fullscreen: !deck.fullscreen } : {};
47
+
48
+ return {
49
+ inactive: closed,
50
+ ...soloUpdate,
51
+ ...fullscreenUpdate,
52
+ };
53
+ };
54
+
55
+ if ('mode' in input) {
56
+ const currentMode = getMode(deck);
57
+ const subject = 'subject' in input ? input.subject : undefined;
58
+ const deckUpdates = computeModeUpdate(input.mode as LayoutMode, subject);
59
+
60
+ yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => {
61
+ const newPreviousMode =
62
+ currentMode !== input.mode
63
+ ? { ...state.previousMode, [state.activeDeck]: currentMode }
64
+ : state.previousMode;
65
+ return {
66
+ ...updateActiveDeck(state, deckUpdates),
67
+ previousMode: newPreviousMode,
68
+ };
69
+ });
70
+
71
+ if (subject) {
72
+ yield* Operation.schedule(LayoutOperation.Expose, { subject });
73
+ }
74
+ } else if ('revert' in input) {
75
+ const deckUpdates = computeModeUpdate(state.previousMode[state.activeDeck]);
76
+ yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => updateActiveDeck(state, deckUpdates));
77
+ } else {
78
+ log.warn('Invalid layout mode', input);
79
+ }
80
+ }),
81
+ ),
82
+ );
83
+
84
+ export default handler;
@@ -0,0 +1,36 @@
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/types';
11
+
12
+ import { updateActiveDeck } from './helpers';
13
+ import { DeckCapabilities } from '../types';
14
+ import { computeActiveUpdates } from '../util';
15
+
16
+ const handler: Operation.WithHandler<typeof LayoutOperation.Set> = LayoutOperation.Set.pipe(
17
+ Operation.withHandler(
18
+ Effect.fnUntraced(function* (input) {
19
+ const deck = yield* DeckCapabilities.getDeck();
20
+ const attention = yield* Capability.get(AttentionCapabilities.Attention);
21
+
22
+ const { deckUpdates, toAttend } = computeActiveUpdates({
23
+ next: input.subject as string[],
24
+ deck,
25
+ attention,
26
+ });
27
+ yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => updateActiveDeck(state, deckUpdates));
28
+
29
+ if (toAttend) {
30
+ yield* Operation.schedule(LayoutOperation.ScrollIntoView, { subject: toAttend });
31
+ }
32
+ }),
33
+ ),
34
+ );
35
+
36
+ export default handler;
@@ -0,0 +1,46 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities, Capability, UndoOperation } from '@dxos/app-framework';
8
+ import { LayoutOperation } from '@dxos/app-toolkit';
9
+ import { Operation } from '@dxos/operation';
10
+
11
+ import { meta } from '#meta';
12
+ import { DeckCapabilities } from '../types';
13
+
14
+ const handler: Operation.WithHandler<typeof UndoOperation.ShowUndo> = UndoOperation.ShowUndo.pipe(
15
+ Operation.withHandler(
16
+ Effect.fnUntraced(function* (input) {
17
+ const historyTracker = yield* Capability.get(Capabilities.HistoryTracker);
18
+
19
+ const newUndoId = `show-undo-${Date.now()}`;
20
+ // TODO(wittjosiah): Support undoing further back than the last action.
21
+ yield* Capabilities.updateAtomValue(DeckCapabilities.EphemeralState, (state) => {
22
+ const filteredToasts = state.currentUndoId
23
+ ? state.toasts.filter((toast) => toast.id !== state.currentUndoId)
24
+ : state.toasts;
25
+
26
+ const toast: LayoutOperation.Toast = {
27
+ id: newUndoId,
28
+ title: input.message ?? ['undo-available.label', { ns: meta.id }],
29
+ duration: 10_000,
30
+ actionLabel: ['undo-action.label', { ns: meta.id }],
31
+ actionAlt: ['undo-action.alt', { ns: meta.id }],
32
+ closeLabel: ['undo-close.label', { ns: meta.id }],
33
+ onAction: () => historyTracker.undoPromise(),
34
+ };
35
+
36
+ return {
37
+ ...state,
38
+ currentUndoId: newUndoId,
39
+ toasts: [...filteredToasts, toast],
40
+ };
41
+ });
42
+ }),
43
+ ),
44
+ );
45
+
46
+ export default handler;
@@ -0,0 +1,60 @@
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 { AppCapabilities, isPinnedWorkspace, LayoutOperation } from '@dxos/app-toolkit';
9
+ import { invariant } from '@dxos/invariant';
10
+ import { Operation } from '@dxos/operation';
11
+ import { Graph, Node } from '@dxos/plugin-graph';
12
+
13
+ import { DeckCapabilities, defaultDeck } from '../types';
14
+
15
+ const handler: Operation.WithHandler<typeof LayoutOperation.SwitchWorkspace> = LayoutOperation.SwitchWorkspace.pipe(
16
+ Operation.withHandler(
17
+ Effect.fnUntraced(function* (input) {
18
+ const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
19
+
20
+ {
21
+ const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);
22
+ // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.
23
+ // Ideally this should be worked into the data model in a generic way.
24
+ const shouldUpdatePrevious = !isPinnedWorkspace(state.activeDeck);
25
+
26
+ yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => {
27
+ const newDecks = state.decks[input.subject]
28
+ ? state.decks
29
+ : { ...state.decks, [input.subject]: { ...defaultDeck } };
30
+ return {
31
+ ...state,
32
+ previousDeck: shouldUpdatePrevious ? state.activeDeck : state.previousDeck,
33
+ activeDeck: input.subject,
34
+ decks: newDecks,
35
+ };
36
+ });
37
+ }
38
+
39
+ {
40
+ const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);
41
+ const deck = state.decks[input.subject];
42
+ invariant(deck, `Deck not found: ${input.subject}`);
43
+
44
+ const first = deck.solo ? deck.solo : deck.active[0];
45
+ if (first) {
46
+ yield* Operation.schedule(LayoutOperation.ScrollIntoView, { subject: first });
47
+ } else {
48
+ const [item] = Graph.getConnections(graph, input.subject, 'child').filter(
49
+ (node) => !Node.isActionLike(node) && !node.properties.disposition,
50
+ );
51
+ if (item) {
52
+ yield* Operation.schedule(LayoutOperation.Open, { subject: [item.id] });
53
+ }
54
+ }
55
+ }
56
+ }),
57
+ ),
58
+ );
59
+
60
+ export default handler;
@@ -0,0 +1,33 @@
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.UpdateComplementary> =
14
+ LayoutOperation.UpdateComplementary.pipe(
15
+ Operation.withHandler(
16
+ Effect.fnUntraced(function* (input) {
17
+ const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);
18
+ const panelChanged = state.complementarySidebarPanel !== input.subject;
19
+ const next = input.subject ? 'expanded' : (input.state ?? state.complementarySidebarState);
20
+ const stateChanged = next !== state.complementarySidebarState;
21
+
22
+ if (panelChanged || stateChanged) {
23
+ yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => ({
24
+ ...state,
25
+ complementarySidebarPanel: panelChanged ? input.subject : state.complementarySidebarPanel,
26
+ complementarySidebarState: stateChanged ? next : state.complementarySidebarState,
27
+ }));
28
+ }
29
+ }),
30
+ ),
31
+ );
32
+
33
+ export default handler;
@@ -0,0 +1,34 @@
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.UpdateDialog> = LayoutOperation.UpdateDialog.pipe(
14
+ Operation.withHandler(
15
+ Effect.fnUntraced(function* (input) {
16
+ yield* Capabilities.updateAtomValue(DeckCapabilities.EphemeralState, (state) => ({
17
+ ...state,
18
+ dialogOpen: input.state ?? Boolean(input.subject),
19
+ dialogType: input.type ?? 'default',
20
+ dialogBlockAlign: input.blockAlign ?? 'center',
21
+ dialogOverlayClasses: input.overlayClasses,
22
+ dialogOverlayStyle: input.overlayStyle,
23
+ dialogContent: input.subject
24
+ ? {
25
+ component: input.subject,
26
+ props: input.props,
27
+ }
28
+ : null,
29
+ }));
30
+ }),
31
+ ),
32
+ );
33
+
34
+ export default handler;
@@ -0,0 +1,29 @@
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 { Operation } from '@dxos/operation';
9
+
10
+ import { UpdatePlankSize } from './definitions';
11
+ import { updateActiveDeck } from './helpers';
12
+ import { DeckCapabilities } from '../types';
13
+
14
+ const handler: Operation.WithHandler<typeof UpdatePlankSize> = UpdatePlankSize.pipe(
15
+ Operation.withHandler(
16
+ Effect.fnUntraced(function* (input) {
17
+ yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) =>
18
+ updateActiveDeck(state, {
19
+ plankSizing: {
20
+ ...state.decks[state.activeDeck]?.plankSizing,
21
+ [input.id]: input.size,
22
+ },
23
+ }),
24
+ );
25
+ }),
26
+ ),
27
+ );
28
+
29
+ export default handler;
@@ -0,0 +1,36 @@
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.UpdatePopover> = LayoutOperation.UpdatePopover.pipe(
14
+ Operation.withHandler(
15
+ Effect.fnUntraced(function* (input) {
16
+ yield* Capabilities.updateAtomValue(DeckCapabilities.EphemeralState, (state) => ({
17
+ ...state,
18
+ popoverOpen: input.state ?? Boolean(input.subject),
19
+ popoverKind: input.kind ?? 'base',
20
+ popoverTitle: input.kind === 'card' ? input.title : undefined,
21
+ popoverContentRef: input.subjectRef,
22
+ popoverContent:
23
+ typeof input.subject === 'string'
24
+ ? { component: input.subject, props: input.props }
25
+ : input.subject
26
+ ? { subject: input.subject }
27
+ : null,
28
+ popoverSide: input.side,
29
+ popoverAnchor: input.variant === 'virtual' ? input.anchor : state.popoverAnchor,
30
+ popoverAnchorId: input.variant !== 'virtual' ? input.anchorId : state.popoverAnchorId,
31
+ }));
32
+ }),
33
+ ),
34
+ );
35
+
36
+ export default handler;
@@ -0,0 +1,28 @@
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.UpdateSidebar> = LayoutOperation.UpdateSidebar.pipe(
14
+ Operation.withHandler(
15
+ Effect.fnUntraced(function* (input) {
16
+ const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);
17
+ const next = input.state ?? state.sidebarState;
18
+ if (next !== state.sidebarState) {
19
+ yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => ({
20
+ ...state,
21
+ sidebarState: next,
22
+ }));
23
+ }
24
+ }),
25
+ ),
26
+ );
27
+
28
+ export default handler;
@@ -0,0 +1,57 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import React, { forwardRef, useMemo } from 'react';
6
+
7
+ import { useOperationInvoker } from '@dxos/app-framework/ui';
8
+ import { LayoutOperation } from '@dxos/app-toolkit';
9
+ import { useAppGraph, useLayout } from '@dxos/app-toolkit/ui';
10
+ import { Graph, Node } from '@dxos/plugin-graph';
11
+ import { Icon, List, ListItem } from '@dxos/react-ui';
12
+
13
+ export type DeckLayoutStoryNavigationProps = {
14
+ current?: string;
15
+ };
16
+
17
+ /**
18
+ * Minimal test-only navigation list for DeckLayout stories.
19
+ * Renders root graph children and opens them via LayoutOperation.Open on click.
20
+ */
21
+ export const DeckLayoutStoryNavigation = forwardRef<HTMLDivElement, DeckLayoutStoryNavigationProps>(
22
+ (_props, forwardedRef) => {
23
+ const { graph } = useAppGraph();
24
+ const layout = useLayout();
25
+ const { invokePromise } = useOperationInvoker();
26
+
27
+ const items = useMemo(
28
+ () => Graph.getConnections(graph, Node.RootId, 'child').filter((node) => !Node.isActionLike(node)),
29
+ [graph],
30
+ );
31
+
32
+ const activeSet = useMemo(() => new Set(layout.active), [layout.active]);
33
+
34
+ return (
35
+ <div ref={forwardedRef} className='overflow-y-auto p-2'>
36
+ <List>
37
+ {items.map((node) => (
38
+ <ListItem.Root
39
+ key={node.id}
40
+ classNames={activeSet.has(node.id) ? 'bg-active-surface' : undefined}
41
+ onClick={() => void invokePromise(LayoutOperation.Open, { subject: [node.id] })}
42
+ >
43
+ {node.properties.icon && (
44
+ <ListItem.Endcap>
45
+ <Icon icon={node.properties.icon} size={4} />
46
+ </ListItem.Endcap>
47
+ )}
48
+ <ListItem.Heading>
49
+ {typeof node.properties.label === 'string' ? node.properties.label : node.id}
50
+ </ListItem.Heading>
51
+ </ListItem.Root>
52
+ ))}
53
+ </List>
54
+ </div>
55
+ );
56
+ },
57
+ );
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ export { DeckLayoutStoryNavigation } from './DeckLayoutStoryNavigation';