@dxos/plugin-deck 0.9.0 → 0.9.1-staging.ee54ba693a

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 (314) hide show
  1. package/PLUGIN.mdl +3 -1
  2. package/dist/lib/neutral/{DeckLayout-DEURA3KR.mjs → DeckLayout-B3RUUV5P.mjs} +36 -22
  3. package/dist/lib/neutral/DeckLayout-B3RUUV5P.mjs.map +7 -0
  4. package/dist/lib/neutral/DeckPlugin.mjs +4 -8
  5. package/dist/lib/neutral/DeckPlugin.mjs.map +4 -4
  6. package/dist/lib/neutral/DeckSettings-Z7GMB7XJ.mjs +32 -0
  7. package/dist/lib/neutral/DeckSettings-Z7GMB7XJ.mjs.map +7 -0
  8. package/dist/lib/neutral/{add-toast-TNB6DXWU.mjs → add-toast-BHNEH5UY.mjs} +2 -2
  9. package/dist/lib/neutral/{adjust-HNU5CCRO.mjs → adjust-MJB6UMRQ.mjs} +16 -10
  10. package/dist/lib/neutral/adjust-MJB6UMRQ.mjs.map +7 -0
  11. package/dist/lib/neutral/{app-graph-builder-HMLT627T.mjs → app-graph-builder-2F7P4IFQ.mjs} +8 -7
  12. package/dist/lib/neutral/app-graph-builder-2F7P4IFQ.mjs.map +7 -0
  13. package/dist/lib/neutral/capabilities/index.mjs +8 -8
  14. package/dist/lib/neutral/{check-app-scheme-INSOF72J.mjs → check-app-scheme-HSAORHHX.mjs} +2 -2
  15. package/dist/lib/neutral/chunk-FKGYHBUB.mjs +8 -0
  16. package/dist/lib/neutral/{chunk-BS4EOYMK.mjs → chunk-ICOJ4GMB.mjs} +37 -19
  17. package/dist/lib/neutral/chunk-ICOJ4GMB.mjs.map +7 -0
  18. package/dist/lib/neutral/chunk-KY7LMF4D.mjs +46 -0
  19. package/dist/lib/neutral/chunk-KY7LMF4D.mjs.map +7 -0
  20. package/dist/lib/neutral/{chunk-324PPIZB.mjs → chunk-KZFJ4PBT.mjs} +4 -4
  21. package/dist/lib/neutral/chunk-KZFJ4PBT.mjs.map +7 -0
  22. package/dist/lib/neutral/{chunk-GBIGQKYW.mjs → chunk-PP32NEVY.mjs} +4 -4
  23. package/dist/lib/neutral/chunk-PP32NEVY.mjs.map +7 -0
  24. package/dist/lib/neutral/chunk-SONATB35.mjs +20 -0
  25. package/dist/lib/neutral/chunk-SONATB35.mjs.map +7 -0
  26. package/dist/lib/neutral/chunk-Z2B5RSVI.mjs +1096 -0
  27. package/dist/lib/neutral/chunk-Z2B5RSVI.mjs.map +7 -0
  28. package/dist/lib/neutral/{close-ASKR22A6.mjs → close-2YGB5IIP.mjs} +4 -3
  29. package/dist/lib/neutral/{close-ASKR22A6.mjs.map → close-2YGB5IIP.mjs.map} +1 -1
  30. package/dist/lib/neutral/components/index.mjs +201 -16
  31. package/dist/lib/neutral/components/index.mjs.map +4 -4
  32. package/dist/lib/neutral/containers/index.mjs +6 -11
  33. package/dist/lib/neutral/containers/index.mjs.map +3 -3
  34. package/dist/lib/neutral/hooks/index.mjs +101 -17
  35. package/dist/lib/neutral/hooks/index.mjs.map +4 -4
  36. package/dist/lib/neutral/index.mjs +18 -2
  37. package/dist/lib/neutral/meta.json +1 -1
  38. package/dist/lib/neutral/meta.mjs +1 -1
  39. package/dist/lib/neutral/{notification-tracker-P36322BH.mjs → notification-tracker-Y5CRTWJM.mjs} +12 -10
  40. package/dist/lib/neutral/notification-tracker-Y5CRTWJM.mjs.map +7 -0
  41. package/dist/lib/neutral/{open-5OYNO3RT.mjs → open-P6XQ56M7.mjs} +8 -7
  42. package/dist/lib/neutral/open-P6XQ56M7.mjs.map +7 -0
  43. package/dist/lib/neutral/operations/index.mjs +1 -1
  44. package/dist/lib/neutral/plugin.mjs +2 -2
  45. package/dist/lib/neutral/{react-root-HH5DEUOG.mjs → react-root-E6TAFHX6.mjs} +2 -2
  46. package/dist/lib/neutral/react-root-E6TAFHX6.mjs.map +7 -0
  47. package/dist/lib/neutral/{react-surface-3UVVCK3O.mjs → react-surface-H63FXUK3.mjs} +5 -6
  48. package/dist/lib/neutral/react-surface-H63FXUK3.mjs.map +7 -0
  49. package/dist/lib/neutral/{revert-workspace-B2QLT2C4.mjs → revert-workspace-RXWP2TEE.mjs} +2 -2
  50. package/dist/lib/neutral/{scroll-into-view-B52C3PJO.mjs → scroll-into-view-HFV5EGYZ.mjs} +2 -2
  51. package/dist/lib/neutral/{set-PA35ONXO.mjs → set-HOOVB7E4.mjs} +4 -3
  52. package/dist/lib/neutral/{set-PA35ONXO.mjs.map → set-HOOVB7E4.mjs.map} +1 -1
  53. package/dist/lib/neutral/{set-layout-mode-RPCCPQRB.mjs → set-layout-mode-XAGSZZGB.mjs} +2 -2
  54. package/dist/lib/neutral/{settings-EGNYUM4T.mjs → settings-6CDQEB6B.mjs} +3 -3
  55. package/dist/lib/neutral/settings-6CDQEB6B.mjs.map +7 -0
  56. package/dist/lib/neutral/{state-IIDXMQUO.mjs → state-F4X5GPGZ.mjs} +4 -3
  57. package/dist/lib/neutral/state-F4X5GPGZ.mjs.map +7 -0
  58. package/dist/lib/neutral/{switch-workspace-LZF4KZXH.mjs → switch-workspace-PA7N6EUX.mjs} +4 -4
  59. package/dist/lib/neutral/switch-workspace-PA7N6EUX.mjs.map +7 -0
  60. package/dist/lib/neutral/translations.mjs +3 -3
  61. package/dist/lib/neutral/translations.mjs.map +3 -3
  62. package/dist/lib/neutral/types/index.mjs +11 -1
  63. package/dist/lib/neutral/{update-companion-YUCZZVGY.mjs → update-companion-6A2SKQAI.mjs} +14 -6
  64. package/dist/lib/neutral/update-companion-6A2SKQAI.mjs.map +7 -0
  65. package/dist/lib/neutral/{update-complementary-7FZNB55J.mjs → update-complementary-K55I5EV5.mjs} +2 -2
  66. package/dist/lib/neutral/{update-dialog-FNQTSSAP.mjs → update-dialog-Z3GEXMVV.mjs} +2 -2
  67. package/dist/lib/neutral/{update-plank-size-3YW4NXEY.mjs → update-plank-size-BTESVV7N.mjs} +2 -2
  68. package/dist/lib/neutral/{update-popover-G2VUD7E6.mjs → update-popover-QEVDSZSH.mjs} +2 -2
  69. package/dist/lib/neutral/{update-sidebar-KRHPUHUB.mjs → update-sidebar-VSRCN47U.mjs} +2 -2
  70. package/dist/lib/neutral/{url-handler-A6HLW4RB.mjs → url-handler-ERZXXEYR.mjs} +11 -10
  71. package/dist/lib/neutral/url-handler-ERZXXEYR.mjs.map +7 -0
  72. package/dist/types/dx.config.d.ts +28 -0
  73. package/dist/types/dx.config.d.ts.map +1 -0
  74. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  75. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -2
  76. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  77. package/dist/types/src/capabilities/index.d.ts +8 -196
  78. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  79. package/dist/types/src/capabilities/notification-tracker.d.ts +1 -1
  80. package/dist/types/src/capabilities/notification-tracker.d.ts.map +1 -1
  81. package/dist/types/src/capabilities/react-root.d.ts +1 -5
  82. package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
  83. package/dist/types/src/capabilities/react-surface.d.ts +2 -2
  84. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  85. package/dist/types/src/capabilities/settings.d.ts +1 -3
  86. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  87. package/dist/types/src/capabilities/state.d.ts +1 -187
  88. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  89. package/dist/types/src/capabilities/tools.d.ts +1 -1
  90. package/dist/types/src/capabilities/url-handler.d.ts +1 -1
  91. package/dist/types/src/components/Companion/Companion.d.ts +17 -0
  92. package/dist/types/src/components/Companion/Companion.d.ts.map +1 -0
  93. package/dist/types/src/components/Companion/index.d.ts +2 -0
  94. package/dist/types/src/components/Companion/index.d.ts.map +1 -0
  95. package/dist/types/src/components/Matrix/Matrix.d.ts +1 -1
  96. package/dist/types/src/components/Matrix/Matrix.d.ts.map +1 -1
  97. package/dist/types/src/components/Matrix/Matrix.stories.d.ts +2 -2
  98. package/dist/types/src/components/Matrix/Matrix.stories.d.ts.map +1 -1
  99. package/dist/types/src/components/Matrix/index.d.ts +1 -1
  100. package/dist/types/src/components/Matrix/index.d.ts.map +1 -1
  101. package/dist/types/src/components/Pane/Pane.d.ts +45 -0
  102. package/dist/types/src/components/Pane/Pane.d.ts.map +1 -0
  103. package/dist/types/src/components/Pane/Pane.stories.d.ts +7 -0
  104. package/dist/types/src/components/Pane/Pane.stories.d.ts.map +1 -0
  105. package/dist/types/src/components/Pane/index.d.ts +2 -0
  106. package/dist/types/src/components/Pane/index.d.ts.map +1 -0
  107. package/dist/types/src/components/Plank/Plank.d.ts +74 -0
  108. package/dist/types/src/components/Plank/Plank.d.ts.map +1 -0
  109. package/dist/types/src/components/Plank/Plank.stories.d.ts +6 -0
  110. package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -0
  111. package/dist/types/src/components/Plank/index.d.ts +2 -0
  112. package/dist/types/src/components/Plank/index.d.ts.map +1 -0
  113. package/dist/types/src/components/index.d.ts +3 -2
  114. package/dist/types/src/components/index.d.ts.map +1 -1
  115. package/dist/types/src/containers/Deck/Banner.d.ts.map +1 -1
  116. package/dist/types/src/containers/Deck/Deck.d.ts +1 -1
  117. package/dist/types/src/containers/Deck/Deck.d.ts.map +1 -1
  118. package/dist/types/src/containers/Deck/Deck.stories.d.ts +2 -2
  119. package/dist/types/src/containers/Deck/DeckPlank.d.ts +21 -0
  120. package/dist/types/src/containers/Deck/DeckPlank.d.ts.map +1 -0
  121. package/dist/types/src/containers/Deck/DeckViewport.d.ts +3 -1
  122. package/dist/types/src/containers/Deck/DeckViewport.d.ts.map +1 -1
  123. package/dist/types/src/containers/{Plank → Deck}/PlankControls.d.ts +3 -10
  124. package/dist/types/src/containers/Deck/PlankControls.d.ts.map +1 -0
  125. package/dist/types/src/containers/Deck/PlankFallback.d.ts +6 -0
  126. package/dist/types/src/containers/Deck/PlankFallback.d.ts.map +1 -0
  127. package/dist/types/src/containers/Deck/StatusBar.d.ts.map +1 -1
  128. package/dist/types/src/containers/Deck/useDeckPlank.d.ts +49 -0
  129. package/dist/types/src/containers/Deck/useDeckPlank.d.ts.map +1 -0
  130. package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts +2 -2
  131. package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts.map +1 -1
  132. package/dist/types/src/containers/DeckLayout/Popover.d.ts.map +1 -1
  133. package/dist/types/src/{components → containers}/DeckSettings/DeckSettings.d.ts +1 -1
  134. package/dist/types/src/containers/DeckSettings/DeckSettings.d.ts.map +1 -0
  135. package/dist/types/src/{components → containers}/DeckSettings/DeckSettings.stories.d.ts +2 -2
  136. package/dist/types/src/{components → containers}/DeckSettings/DeckSettings.stories.d.ts.map +1 -1
  137. package/dist/types/src/containers/DeckSettings/index.d.ts.map +1 -0
  138. package/dist/types/src/containers/Sidebar/ComplementarySidebar.d.ts.map +1 -1
  139. package/dist/types/src/containers/index.d.ts +1 -1
  140. package/dist/types/src/containers/index.d.ts.map +1 -1
  141. package/dist/types/src/hooks/index.d.ts +2 -0
  142. package/dist/types/src/hooks/index.d.ts.map +1 -1
  143. package/dist/types/src/hooks/useCompanionSplit.d.ts +28 -0
  144. package/dist/types/src/hooks/useCompanionSplit.d.ts.map +1 -0
  145. package/dist/types/src/hooks/useCompanions.d.ts +11 -7
  146. package/dist/types/src/hooks/useCompanions.d.ts.map +1 -1
  147. package/dist/types/src/hooks/useDeckCompanions.d.ts +2 -2
  148. package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
  149. package/dist/types/src/hooks/useDeckState.d.ts +1 -1
  150. package/dist/types/src/hooks/useDeckState.d.ts.map +1 -1
  151. package/dist/types/src/hooks/useSelectedCompanionVariant.d.ts +6 -0
  152. package/dist/types/src/hooks/useSelectedCompanionVariant.d.ts.map +1 -0
  153. package/dist/types/src/index.d.ts +1 -0
  154. package/dist/types/src/index.d.ts.map +1 -1
  155. package/dist/types/src/meta.d.ts +32 -2
  156. package/dist/types/src/meta.d.ts.map +1 -1
  157. package/dist/types/src/operations/adjust.d.ts.map +1 -1
  158. package/dist/types/src/operations/open.d.ts.map +1 -1
  159. package/dist/types/src/operations/switch-workspace.d.ts.map +1 -1
  160. package/dist/types/src/operations/update-companion.d.ts.map +1 -1
  161. package/dist/types/src/translations.d.ts +2 -2
  162. package/dist/types/src/translations.d.ts.map +1 -1
  163. package/dist/types/src/types/DeckCapabilities.d.ts +4 -4
  164. package/dist/types/src/types/DeckCapabilities.d.ts.map +1 -1
  165. package/dist/types/src/types/DeckOperation.d.ts +2 -2
  166. package/dist/types/src/types/DeckOperation.d.ts.map +1 -1
  167. package/dist/types/src/types/index.d.ts +1 -0
  168. package/dist/types/src/types/index.d.ts.map +1 -1
  169. package/dist/types/src/types/schema.d.ts +11 -9
  170. package/dist/types/src/types/schema.d.ts.map +1 -1
  171. package/dist/types/src/types/surface.d.ts +12 -0
  172. package/dist/types/src/types/surface.d.ts.map +1 -0
  173. package/dist/types/src/util/companion-view-state.d.ts +16 -0
  174. package/dist/types/src/util/companion-view-state.d.ts.map +1 -0
  175. package/dist/types/src/util/index.d.ts +1 -0
  176. package/dist/types/src/util/index.d.ts.map +1 -1
  177. package/dist/types/src/util/plank-url-params.d.ts +2 -0
  178. package/dist/types/src/util/plank-url-params.d.ts.map +1 -1
  179. package/dist/types/tsconfig.tsbuildinfo +1 -1
  180. package/dx.config.ts +35 -0
  181. package/package.json +50 -48
  182. package/src/DeckPlugin.test.ts +1 -1
  183. package/src/DeckPlugin.ts +2 -3
  184. package/src/capabilities/app-graph-builder.ts +7 -6
  185. package/src/capabilities/check-app-scheme.ts +3 -3
  186. package/src/capabilities/notification-tracker.ts +11 -9
  187. package/src/capabilities/react-root.tsx +1 -1
  188. package/src/capabilities/react-surface.tsx +4 -5
  189. package/src/capabilities/settings.ts +2 -2
  190. package/src/capabilities/state.ts +1 -1
  191. package/src/capabilities/url-handler.ts +7 -15
  192. package/src/components/Companion/Companion.tsx +91 -0
  193. package/src/components/Companion/index.ts +5 -0
  194. package/src/components/Matrix/Matrix.stories.tsx +15 -27
  195. package/src/components/Matrix/Matrix.tsx +3 -3
  196. package/src/components/Matrix/SPEC.md +1 -1
  197. package/src/components/Matrix/index.ts +1 -1
  198. package/src/components/Pane/Pane.stories.tsx +92 -0
  199. package/src/components/Pane/Pane.tsx +178 -0
  200. package/src/components/Pane/index.ts +5 -0
  201. package/src/components/Plank/Plank.stories.tsx +103 -0
  202. package/src/components/Plank/Plank.tsx +149 -0
  203. package/src/components/Plank/index.ts +5 -0
  204. package/src/components/index.ts +3 -4
  205. package/src/containers/Deck/Banner.tsx +5 -4
  206. package/src/containers/Deck/Deck.tsx +3 -3
  207. package/src/containers/Deck/DeckPlank.tsx +187 -0
  208. package/src/containers/Deck/DeckViewport.tsx +118 -246
  209. package/src/containers/{Plank → Deck}/PlankControls.tsx +21 -19
  210. package/src/containers/Deck/PlankFallback.tsx +42 -0
  211. package/src/containers/Deck/StatusBar.tsx +4 -2
  212. package/src/containers/Deck/useDeckPlank.ts +219 -0
  213. package/src/containers/DeckLayout/DeckLayout.stories.tsx +44 -60
  214. package/src/containers/DeckLayout/Dialog.tsx +1 -1
  215. package/src/containers/DeckLayout/Fallback.tsx +1 -1
  216. package/src/containers/DeckLayout/Popover.tsx +37 -20
  217. package/src/containers/DeckLayout/Toast.tsx +1 -1
  218. package/src/{components → containers}/DeckSettings/DeckSettings.stories.tsx +1 -1
  219. package/src/containers/DeckSettings/DeckSettings.tsx +42 -0
  220. package/src/containers/Sidebar/ComplementarySidebar.tsx +8 -7
  221. package/src/containers/Sidebar/Sidebar.tsx +1 -1
  222. package/src/containers/Sidebar/SidebarButton.tsx +3 -3
  223. package/src/containers/index.ts +1 -1
  224. package/src/hooks/index.ts +2 -0
  225. package/src/hooks/useCompanionSplit.ts +78 -0
  226. package/src/hooks/useCompanions.ts +39 -7
  227. package/src/hooks/useDeckCompanions.ts +3 -3
  228. package/src/hooks/useDeckState.ts +1 -1
  229. package/src/hooks/useSelectedCompanionVariant.ts +14 -0
  230. package/src/index.ts +7 -0
  231. package/src/meta.ts +2 -27
  232. package/src/operations/adjust.ts +23 -12
  233. package/src/operations/open.ts +12 -10
  234. package/src/operations/switch-workspace.ts +2 -2
  235. package/src/operations/update-companion.ts +10 -6
  236. package/src/translations.ts +3 -3
  237. package/src/types/DeckCapabilities.ts +6 -4
  238. package/src/types/DeckEvents.ts +1 -1
  239. package/src/types/DeckOperation.ts +3 -2
  240. package/src/types/index.ts +1 -0
  241. package/src/types/schema.ts +21 -16
  242. package/src/types/surface.ts +28 -0
  243. package/src/util/companion-view-state.ts +28 -0
  244. package/src/util/index.ts +1 -0
  245. package/src/util/plank-url-params.test.ts +5 -0
  246. package/src/util/plank-url-params.ts +5 -3
  247. package/src/util/sanitize-persisted-state.test.ts +1 -1
  248. package/src/util/set-active.test.ts +1 -1
  249. package/dist/lib/neutral/DeckLayout-DEURA3KR.mjs.map +0 -7
  250. package/dist/lib/neutral/DeckSettings-W5I57OXM.mjs +0 -27
  251. package/dist/lib/neutral/DeckSettings-W5I57OXM.mjs.map +0 -7
  252. package/dist/lib/neutral/adjust-HNU5CCRO.mjs.map +0 -7
  253. package/dist/lib/neutral/app-graph-builder-HMLT627T.mjs.map +0 -7
  254. package/dist/lib/neutral/chunk-324PPIZB.mjs.map +0 -7
  255. package/dist/lib/neutral/chunk-BS4EOYMK.mjs.map +0 -7
  256. package/dist/lib/neutral/chunk-GBIGQKYW.mjs.map +0 -7
  257. package/dist/lib/neutral/chunk-PYEY5SEC.mjs +0 -37
  258. package/dist/lib/neutral/chunk-PYEY5SEC.mjs.map +0 -7
  259. package/dist/lib/neutral/chunk-Q4W6B4IB.mjs +0 -8
  260. package/dist/lib/neutral/chunk-WAXJPQJI.mjs +0 -1306
  261. package/dist/lib/neutral/chunk-WAXJPQJI.mjs.map +0 -7
  262. package/dist/lib/neutral/notification-tracker-P36322BH.mjs.map +0 -7
  263. package/dist/lib/neutral/open-5OYNO3RT.mjs.map +0 -7
  264. package/dist/lib/neutral/react-root-HH5DEUOG.mjs.map +0 -7
  265. package/dist/lib/neutral/react-surface-3UVVCK3O.mjs.map +0 -7
  266. package/dist/lib/neutral/settings-EGNYUM4T.mjs.map +0 -7
  267. package/dist/lib/neutral/state-IIDXMQUO.mjs.map +0 -7
  268. package/dist/lib/neutral/switch-workspace-LZF4KZXH.mjs.map +0 -7
  269. package/dist/lib/neutral/update-companion-YUCZZVGY.mjs.map +0 -7
  270. package/dist/lib/neutral/url-handler-A6HLW4RB.mjs.map +0 -7
  271. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +0 -1
  272. package/dist/types/src/components/DeckSettings/index.d.ts.map +0 -1
  273. package/dist/types/src/containers/Plank/Plank.d.ts +0 -17
  274. package/dist/types/src/containers/Plank/Plank.d.ts.map +0 -1
  275. package/dist/types/src/containers/Plank/Plank.stories.d.ts +0 -67
  276. package/dist/types/src/containers/Plank/Plank.stories.d.ts.map +0 -1
  277. package/dist/types/src/containers/Plank/PlankComponent.d.ts +0 -17
  278. package/dist/types/src/containers/Plank/PlankComponent.d.ts.map +0 -1
  279. package/dist/types/src/containers/Plank/PlankContent.d.ts +0 -10
  280. package/dist/types/src/containers/Plank/PlankContent.d.ts.map +0 -1
  281. package/dist/types/src/containers/Plank/PlankControls.d.ts.map +0 -1
  282. package/dist/types/src/containers/Plank/PlankError.d.ts +0 -15
  283. package/dist/types/src/containers/Plank/PlankError.d.ts.map +0 -1
  284. package/dist/types/src/containers/Plank/PlankHeading.d.ts +0 -22
  285. package/dist/types/src/containers/Plank/PlankHeading.d.ts.map +0 -1
  286. package/dist/types/src/containers/Plank/PlankLoading.d.ts +0 -3
  287. package/dist/types/src/containers/Plank/PlankLoading.d.ts.map +0 -1
  288. package/dist/types/src/containers/Plank/PlankRoot.d.ts +0 -37
  289. package/dist/types/src/containers/Plank/PlankRoot.d.ts.map +0 -1
  290. package/dist/types/src/containers/Plank/index.d.ts +0 -4
  291. package/dist/types/src/containers/Plank/index.d.ts.map +0 -1
  292. package/src/components/DeckSettings/DeckSettings.tsx +0 -34
  293. package/src/containers/Plank/Plank.stories.tsx +0 -108
  294. package/src/containers/Plank/Plank.tsx +0 -22
  295. package/src/containers/Plank/PlankComponent.tsx +0 -223
  296. package/src/containers/Plank/PlankContent.tsx +0 -45
  297. package/src/containers/Plank/PlankError.tsx +0 -82
  298. package/src/containers/Plank/PlankHeading.tsx +0 -237
  299. package/src/containers/Plank/PlankLoading.tsx +0 -10
  300. package/src/containers/Plank/PlankRoot.tsx +0 -49
  301. package/src/containers/Plank/index.ts +0 -7
  302. /package/dist/lib/neutral/{add-toast-TNB6DXWU.mjs.map → add-toast-BHNEH5UY.mjs.map} +0 -0
  303. /package/dist/lib/neutral/{check-app-scheme-INSOF72J.mjs.map → check-app-scheme-HSAORHHX.mjs.map} +0 -0
  304. /package/dist/lib/neutral/{chunk-Q4W6B4IB.mjs.map → chunk-FKGYHBUB.mjs.map} +0 -0
  305. /package/dist/lib/neutral/{revert-workspace-B2QLT2C4.mjs.map → revert-workspace-RXWP2TEE.mjs.map} +0 -0
  306. /package/dist/lib/neutral/{scroll-into-view-B52C3PJO.mjs.map → scroll-into-view-HFV5EGYZ.mjs.map} +0 -0
  307. /package/dist/lib/neutral/{set-layout-mode-RPCCPQRB.mjs.map → set-layout-mode-XAGSZZGB.mjs.map} +0 -0
  308. /package/dist/lib/neutral/{update-complementary-7FZNB55J.mjs.map → update-complementary-K55I5EV5.mjs.map} +0 -0
  309. /package/dist/lib/neutral/{update-dialog-FNQTSSAP.mjs.map → update-dialog-Z3GEXMVV.mjs.map} +0 -0
  310. /package/dist/lib/neutral/{update-plank-size-3YW4NXEY.mjs.map → update-plank-size-BTESVV7N.mjs.map} +0 -0
  311. /package/dist/lib/neutral/{update-popover-G2VUD7E6.mjs.map → update-popover-QEVDSZSH.mjs.map} +0 -0
  312. /package/dist/lib/neutral/{update-sidebar-KRHPUHUB.mjs.map → update-sidebar-VSRCN47U.mjs.map} +0 -0
  313. /package/dist/types/src/{components → containers}/DeckSettings/index.d.ts +0 -0
  314. /package/src/{components → containers}/DeckSettings/index.ts +0 -0
@@ -17,7 +17,7 @@ export const ToggleSidebarButton = ({
17
17
  variant = 'ghost',
18
18
  }: ThemedClassName<Pick<IconButtonProps, 'variant'>>) => {
19
19
  const { updateState } = useDeckState();
20
- const { t } = useTranslation(meta.id);
20
+ const { t } = useTranslation(meta.profile.key);
21
21
 
22
22
  const handleClick = useCallback(() => {
23
23
  updateState((state) => ({
@@ -41,7 +41,7 @@ export const ToggleSidebarButton = ({
41
41
 
42
42
  export const CloseSidebarButton = () => {
43
43
  const { updateState } = useDeckState();
44
- const { t } = useTranslation(meta.id);
44
+ const { t } = useTranslation(meta.profile.key);
45
45
 
46
46
  const handleClick = useCallback(() => {
47
47
  updateState((state) => ({ ...state, sidebarState: 'collapsed' }));
@@ -67,7 +67,7 @@ export const ToggleComplementarySidebarButton = ({
67
67
  }: ThemedClassName<{ inR0?: boolean; current?: string }>) => {
68
68
  const { invokePromise } = useOperationInvoker();
69
69
  const { state, updateState } = useDeckState();
70
- const { t } = useTranslation(meta.id);
70
+ const { t } = useTranslation(meta.profile.key);
71
71
 
72
72
  const companions = useDeckCompanions();
73
73
  const handleClick = useCallback(() => {
@@ -5,7 +5,7 @@
5
5
  import { type ComponentType, lazy } from 'react';
6
6
 
7
7
  export * from './Deck';
8
- export * from './Plank';
9
8
  export * from './Sidebar';
10
9
 
11
10
  export const DeckLayout: ComponentType<any> = lazy(() => import('./DeckLayout'));
11
+ export const DeckSettings: ComponentType<any> = lazy(() => import('./DeckSettings'));
@@ -4,8 +4,10 @@
4
4
 
5
5
  export * from './useBreakpoints';
6
6
  export * from './useCompanions';
7
+ export * from './useCompanionSplit';
7
8
  export * from './useDeckCompanions';
8
9
  export * from './useDeckState';
9
10
  export * from './useMainSize';
10
11
  export * from './useNodeActionExpander';
11
12
  export * from './useSelectedCompanion';
13
+ export * from './useSelectedCompanionVariant';
@@ -0,0 +1,78 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import * as Schema from 'effect/Schema';
6
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
7
+
8
+ import { type SplitterOrientation } from '@dxos/react-ui';
9
+ import { type AspectDef, defineViewState, useViewState, useViewStateActions } from '@dxos/react-ui-attention';
10
+
11
+ import { COMPANION_VIEW_STATE_CONTEXT } from '../util';
12
+
13
+ /** Companion split point (rem) used until the user resizes a given orientation. */
14
+ export const DEFAULT_COMPANION_SIZE = 30;
15
+
16
+ /** Trailing delay before a resize is committed to storage (drags fire continuously). */
17
+ const PERSIST_DELAY = 250;
18
+
19
+ const CompanionSplitSchema = Schema.Struct({
20
+ horizontal: Schema.optional(Schema.Number),
21
+ vertical: Schema.optional(Schema.Number),
22
+ }).pipe(Schema.mutable);
23
+
24
+ export type CompanionSplit = Schema.Schema.Type<typeof CompanionSplitSchema>;
25
+
26
+ /**
27
+ * Companion splitter sizes (rem), memoized separately for each orientation so toggling the companion
28
+ * between side-by-side and stacked restores that orientation's last split point. Stored in the `local`
29
+ * backend (localStorage, persisted across reloads) via react-ui-attention view state.
30
+ */
31
+ export const companionSplitAspect: AspectDef<CompanionSplit> = defineViewState<CompanionSplit>({
32
+ key: 'deck-companion-split',
33
+ backend: 'local',
34
+ schema: CompanionSplitSchema,
35
+ defaultValue: () => ({}),
36
+ });
37
+
38
+ export type UseCompanionSplit = {
39
+ /** The remembered split point for the current orientation (or the default). */
40
+ size: number;
41
+ onSizeChange: (size: number) => void;
42
+ };
43
+
44
+ /**
45
+ * Reads and writes the global companion splitter size keyed by `orientation`. A live size keeps dragging
46
+ * smooth while the persisted write is debounced (and flushed on unmount) to avoid per-frame storage writes.
47
+ */
48
+ export const useCompanionSplit = (orientation: SplitterOrientation): UseCompanionSplit => {
49
+ const split = useViewState(companionSplitAspect, COMPANION_VIEW_STATE_CONTEXT);
50
+ const { update } = useViewStateActions(companionSplitAspect, COMPANION_VIEW_STATE_CONTEXT);
51
+ const storedSize = split[orientation] ?? DEFAULT_COMPANION_SIZE;
52
+
53
+ // Drive the controlled Splitter from local state so a drag tracks the pointer without a storage
54
+ // round-trip per frame; reseed when the orientation switches (recall) or storage changes externally.
55
+ const [liveSize, setLiveSize] = useState(storedSize);
56
+ useEffect(() => setLiveSize(storedSize), [storedSize, orientation]);
57
+
58
+ // Flush the trailing write on unmount so the final size is not dropped inside the debounce window.
59
+ const pending = useRef<{ timer: ReturnType<typeof setTimeout>; flush: () => void } | undefined>(undefined);
60
+ useEffect(() => () => pending.current?.flush(), []);
61
+
62
+ const onSizeChange = useCallback(
63
+ (next: number) => {
64
+ setLiveSize(next);
65
+ if (pending.current) {
66
+ clearTimeout(pending.current.timer);
67
+ }
68
+ const flush = () => {
69
+ pending.current = undefined;
70
+ update((prev) => ({ ...prev, [orientation]: next }));
71
+ };
72
+ pending.current = { timer: setTimeout(flush, PERSIST_DELAY), flush };
73
+ },
74
+ [update, orientation],
75
+ );
76
+
77
+ return useMemo(() => ({ size: liveSize, onSizeChange }), [liveSize, onSizeChange]);
78
+ };
@@ -2,17 +2,49 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { useMemo } from 'react';
5
+ import { RegistryContext } from '@effect-atom/atom-react';
6
+ import { useContext, useEffect, useState } from 'react';
6
7
 
7
8
  import { useAppGraph } from '@dxos/app-toolkit/ui';
8
- import { useConnections } from '@dxos/plugin-graph';
9
- import { byPosition } from '@dxos/util';
9
+ import { type Node } from '@dxos/plugin-graph';
10
+ import { Position } from '@dxos/util';
10
11
 
11
12
  import { PLANK_COMPANION_TYPE } from '#types';
12
13
 
13
- export const useCompanions = (id?: string) => {
14
+ /**
15
+ * Companion (child) nodes for a plank.
16
+ *
17
+ * The node's child-connections atom is read in a commit-phase effect rather than during render.
18
+ * Subscribing to it during render (via `useConnections`/`useAtomValue`) recomputes the shared atom and
19
+ * synchronously notifies its other subscribers — notably navtree items rendering the same node — which
20
+ * surfaces as a React "cannot update a component while rendering a different component" warning. Reading
21
+ * it from an effect defers that notification to the commit phase where cross-component updates are allowed.
22
+ */
23
+ export const useCompanions = (id?: string): Node.Node[] => {
14
24
  const { graph } = useAppGraph();
15
- const nodes = useConnections(graph, id, 'child');
16
- const companions = nodes.filter((node) => node.type === PLANK_COMPANION_TYPE);
17
- return useMemo(() => companions.toSorted((a, b) => byPosition(a.properties, b.properties)), [companions]);
25
+ const registry = useContext(RegistryContext);
26
+ const [companions, setCompanions] = useState<Node.Node[]>([]);
27
+
28
+ useEffect(() => {
29
+ if (!id) {
30
+ setCompanions([]);
31
+ return;
32
+ }
33
+
34
+ const atom = graph.connections(id, 'child');
35
+ const update = () => {
36
+ const next = registry
37
+ .get(atom)
38
+ .filter((node) => node.type === PLANK_COMPANION_TYPE)
39
+ .toSorted((a, b) => Position.compare(a.properties, b.properties));
40
+ setCompanions((prev) =>
41
+ prev.length === next.length && prev.every((node, index) => node === next[index]) ? prev : next,
42
+ );
43
+ };
44
+
45
+ update();
46
+ return registry.subscribe(atom, update);
47
+ }, [graph, registry, id]);
48
+
49
+ return companions;
18
50
  };
@@ -6,7 +6,7 @@ import { useAppGraph } from '@dxos/app-toolkit/ui';
6
6
  import { Node, type Node as NodeType } from '@dxos/plugin-graph';
7
7
  import { useConnections } from '@dxos/plugin-graph';
8
8
  import { type Label } from '@dxos/ui-types/translations';
9
- import { type Position, byPosition } from '@dxos/util';
9
+ import { Position } from '@dxos/util';
10
10
 
11
11
  import { DECK_COMPANION_TYPE } from '#types';
12
12
 
@@ -18,7 +18,7 @@ export type DeckCompanion = NodeType.Node<
18
18
  // TODO(burdon): Scroll area should be controlled by surface.
19
19
  /** If true, the panel will not be wrapped in a scroll area. */
20
20
  fixed?: boolean;
21
- position?: Position;
21
+ position?: Position.Position;
22
22
  joyride?: string;
23
23
  }
24
24
  >;
@@ -27,5 +27,5 @@ export const useDeckCompanions = (): DeckCompanion[] => {
27
27
  const { graph } = useAppGraph();
28
28
  const connections = useConnections(graph, Node.RootId, 'child');
29
29
  const companions = connections.filter((node) => node.type === DECK_COMPANION_TYPE) as DeckCompanion[];
30
- return companions.toSorted((a, b) => byPosition(a.properties, b.properties));
30
+ return companions.toSorted((a, b) => Position.compare(a.properties, b.properties));
31
31
  };
@@ -11,9 +11,9 @@ import { invariant } from '@dxos/invariant';
11
11
 
12
12
  import {
13
13
  DeckCapabilities,
14
- type EphemeralDeckState,
15
14
  type DeckPluginState,
16
15
  type DeckState,
16
+ type EphemeralDeckState,
17
17
  type StoredDeckState,
18
18
  } from '#types';
19
19
 
@@ -0,0 +1,14 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { useViewState } from '@dxos/react-ui-attention';
6
+
7
+ import { COMPANION_VIEW_STATE_CONTEXT, companionVariantAspect } from '../util';
8
+
9
+ /**
10
+ * Reads the globally-selected companion variant (persisted via view state) so reopening the companion
11
+ * restores the last-selected tab rather than resetting to the first.
12
+ */
13
+ export const useSelectedCompanionVariant = (): string | undefined =>
14
+ useViewState(companionVariantAspect, COMPANION_VIEW_STATE_CONTEXT).variant;
package/src/index.ts CHANGED
@@ -4,3 +4,10 @@
4
4
 
5
5
  export * from './meta';
6
6
  export * from './types';
7
+ // Companion selection view-state aspect — public so consumers (e.g. plugin-assistant) can read the
8
+ // globally-selected companion variant that used to live on `DeckState.companionVariant`.
9
+ export {
10
+ COMPANION_VIEW_STATE_CONTEXT,
11
+ type CompanionSelection,
12
+ companionVariantAspect,
13
+ } from './util/companion-view-state';
package/src/meta.ts CHANGED
@@ -3,32 +3,7 @@
3
3
  //
4
4
 
5
5
  import { Plugin } from '@dxos/app-framework';
6
- import { DXN } from '@dxos/keys';
7
- import { trim } from '@dxos/util';
8
6
 
9
- export const meta = Plugin.makeMeta({
10
- key: DXN.make('org.dxos.plugin.deck'),
11
- name: 'Layout',
12
- author: 'DXOS',
13
- spec: 'PLUGIN.mdl',
14
- description: trim`
15
- The Deck plugin is the core layout engine for DXOS Composer. It manages the multi-plank
16
- workspace (the "deck"), sidebar panels, dialogs, popovers, and toast notifications, giving
17
- users a flexible, persistent workspace they can arrange to match their workflow.
7
+ import config from '../dx.config';
18
8
 
19
- In multi mode, subjects are opened as resizable "planks" arranged side by side. Users can
20
- navigate with stack semantics — opening from a pivot truncates planks to the right and
21
- appends the new one — or switch to solo or fullscreen mode for focused, distraction-free
22
- viewing.
23
-
24
- Layout state (active planks, sidebar visibility, plank sizes, companion pane) is persisted
25
- across sessions via KVS/localStorage. URL routing is handled by the plugin so that any
26
- workspace configuration can be bookmarked or shared as a deep link.
27
-
28
- All layout changes are expressed through typed LayoutOperations (Open, Close, SetLayoutMode,
29
- UpdateSidebar, UpdateDialog, UpdatePopover, etc.) that any plugin in the system can dispatch,
30
- keeping the layout logic centralised and easy to extend.
31
- `,
32
- icon: 'ph--layout--regular',
33
- tags: ['system'],
34
- });
9
+ export const meta = Plugin.getMetaFromConfig(config);
@@ -11,7 +11,6 @@ import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
11
11
  import { Operation } from '@dxos/compute';
12
12
  import { AttentionCapabilities } from '@dxos/plugin-attention';
13
13
  import { Graph } from '@dxos/plugin-graph';
14
- import { byPosition } from '@dxos/util';
15
14
 
16
15
  import { incrementPlank } from '../layout';
17
16
  import { DeckCapabilities, DeckOperation, PLANK_COMPANION_TYPE } from '../types';
@@ -60,19 +59,31 @@ const handler: Operation.WithHandler<typeof DeckOperation.Adjust> = DeckOperatio
60
59
  yield* Operation.invoke(LayoutOperation.Open, { subject: [soloOperation.entryId] });
61
60
  }
62
61
 
63
- if (input.type === 'companion') {
64
- const companion = Function.pipe(
65
- Graph.getNode(graph, input.id),
66
- Option.map((node) =>
67
- Graph.getConnections(graph, node.id, 'child')
68
- .filter((n) => n.type === PLANK_COMPANION_TYPE)
69
- .toSorted((a, b) => byPosition(a.properties, b.properties)),
70
- ),
71
- Option.flatMap((companions) => (companions.length > 0 ? Option.some(companions[0]) : Option.none())),
62
+ if (input.type === 'companion' || input.type === 'companion-vertical') {
63
+ const orientation = input.type === 'companion-vertical' ? 'vertical' : 'horizontal';
64
+
65
+ // Set the orientation first so an already-open companion re-orients in place (the Splitter stays
66
+ // mounted and only its `orientation` prop changes — panels are never unmounted).
67
+ yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) =>
68
+ updateActiveDeck(state, { companionOrientation: orientation }),
72
69
  );
73
70
 
74
- if (Option.isSome(companion)) {
75
- yield* Operation.invoke(LayoutOperation.UpdateCompanion, { subject: companion.value.id });
71
+ // Open the companion when one is available; the selected variant lives in global view state and is
72
+ // resolved at render time, so opening restores the last-selected tab rather than forcing the first.
73
+ if (!deck.companionOpen) {
74
+ const hasCompanion = Function.pipe(
75
+ Graph.getNode(graph, input.id),
76
+ Option.map((node) =>
77
+ Graph.getConnections(graph, node.id, 'child').some((n) => n.type === PLANK_COMPANION_TYPE),
78
+ ),
79
+ Option.getOrElse(() => false),
80
+ );
81
+
82
+ if (hasCompanion) {
83
+ yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) =>
84
+ updateActiveDeck(state, { companionOpen: true }),
85
+ );
86
+ }
76
87
  }
77
88
  }
78
89
  }),
@@ -6,13 +6,7 @@ import * as Effect from 'effect/Effect';
6
6
  import * as Option from 'effect/Option';
7
7
 
8
8
  import { Capabilities, Capability } from '@dxos/app-framework';
9
- import {
10
- AppCapabilities,
11
- LayoutOperation,
12
- createEdgeExistenceChecker,
13
- expandPath,
14
- validateNavigationTarget,
15
- } from '@dxos/app-toolkit';
9
+ import { AppCapabilities, LayoutOperation, NotFound } from '@dxos/app-toolkit';
16
10
  import { Operation } from '@dxos/compute';
17
11
  import { Context } from '@dxos/context';
18
12
  import { Database, EID, Obj } from '@dxos/echo';
@@ -56,13 +50,15 @@ const handler: Operation.WithHandler<typeof LayoutOperation.Open> = LayoutOperat
56
50
  }
57
51
  : undefined;
58
52
  const checkRemoteExistence = client
59
- ? createEdgeExistenceChecker((spaceId, body) => client.edge.http.execQuery(new Context(), spaceId, body))
53
+ ? NotFound.createEdgeExistenceChecker((spaceId, body) =>
54
+ client.edge.http.execQuery(new Context(), spaceId, body),
55
+ )
60
56
  : undefined;
61
57
 
62
58
  // Immediate: skip 404 / resolver checks but still expand the path (same as validate’s first step).
63
59
  if (input.navigation === 'immediate') {
64
60
  for (const subjectId of input.subject) {
65
- expandPath(graph, subjectId);
61
+ NotFound.expandPath(graph, subjectId);
66
62
  }
67
63
  }
68
64
 
@@ -70,7 +66,13 @@ const handler: Operation.WithHandler<typeof LayoutOperation.Open> = LayoutOperat
70
66
  input.subject.map((subjectId) =>
71
67
  input.navigation === 'immediate'
72
68
  ? Effect.succeed(subjectId)
73
- : validateNavigationTarget({ graph, subjectId, pathResolvers, checkLocalExistence, checkRemoteExistence }),
69
+ : NotFound.validateNavigationTarget({
70
+ graph,
71
+ subjectId,
72
+ pathResolvers,
73
+ checkLocalExistence,
74
+ checkRemoteExistence,
75
+ }),
74
76
  ),
75
77
  );
76
78
  input = { ...input, subject: validatedSubjects };
@@ -5,7 +5,7 @@
5
5
  import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capabilities, Capability } from '@dxos/app-framework';
8
- import { AppCapabilities, isPinnedWorkspace, LayoutOperation } from '@dxos/app-toolkit';
8
+ import { AppCapabilities, LayoutOperation, Paths } from '@dxos/app-toolkit';
9
9
  import { Operation } from '@dxos/compute';
10
10
  import { invariant } from '@dxos/invariant';
11
11
  import { Graph, Node } from '@dxos/plugin-graph';
@@ -21,7 +21,7 @@ const handler: Operation.WithHandler<typeof LayoutOperation.SwitchWorkspace> = L
21
21
  const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);
22
22
  // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.
23
23
  // Ideally this should be worked into the data model in a generic way.
24
- const shouldUpdatePrevious = !isPinnedWorkspace(state.activeDeck);
24
+ const shouldUpdatePrevious = !Paths.isPinnedWorkspace(state.activeDeck);
25
25
 
26
26
  yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => {
27
27
  const newDecks = state.decks[input.subject]
@@ -4,28 +4,32 @@
4
4
 
5
5
  import * as Effect from 'effect/Effect';
6
6
 
7
- import { Capabilities } from '@dxos/app-framework';
7
+ import { Capabilities, Capability } from '@dxos/app-framework';
8
8
  import { LayoutOperation } from '@dxos/app-toolkit';
9
9
  import { Operation } from '@dxos/compute';
10
+ import { AttentionCapabilities } from '@dxos/plugin-attention';
10
11
  import { getLinkedVariant } from '@dxos/react-ui-attention';
11
12
 
12
13
  import { DeckCapabilities } from '../types';
14
+ import { COMPANION_VIEW_STATE_CONTEXT, companionVariantAspect } from '../util';
13
15
  import { updateActiveDeck } from './helpers';
14
16
 
15
17
  const handler: Operation.WithHandler<typeof LayoutOperation.UpdateCompanion> = LayoutOperation.UpdateCompanion.pipe(
16
18
  Operation.withHandler(
17
19
  Effect.fnUntraced(function* (input) {
18
20
  if (input.subject === null) {
21
+ // Leave the selected variant intact so reopening the companion restores the last tab.
19
22
  yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) =>
20
23
  updateActiveDeck(state, { companionOpen: false }),
21
24
  );
22
25
  } else {
23
- const variant = getLinkedVariant(input.subject);
26
+ // The selected variant is global view state (shared with the split point), not deck state.
27
+ const viewState = yield* Capability.get(AttentionCapabilities.ViewState);
28
+ viewState.set(companionVariantAspect, COMPANION_VIEW_STATE_CONTEXT, {
29
+ variant: getLinkedVariant(input.subject),
30
+ });
24
31
  yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) =>
25
- updateActiveDeck(state, {
26
- companionOpen: true,
27
- companionVariant: variant,
28
- }),
32
+ updateActiveDeck(state, { companionOpen: true }),
29
33
  );
30
34
  }
31
35
  }),
@@ -9,9 +9,8 @@ import { meta } from '#meta';
9
9
  export const translations = [
10
10
  {
11
11
  'en-US': {
12
- [meta.id]: {
12
+ [meta.profile.key]: {
13
13
  'plugin.name': 'Deck',
14
- 'settings.title': 'Deck settings',
15
14
  'main-header.label': 'Main header',
16
15
  'open-navigation-sidebar.label': 'Open sidebar',
17
16
  'collapse-navigation-sidebar.label': 'Close sidebar',
@@ -46,7 +45,8 @@ export const translations = [
46
45
  'show-fullscreen-plank.label': 'Fullscreen',
47
46
  'close.label': 'Close',
48
47
  'minify.label': 'Minify',
49
- 'open-companion.label': 'Open companion',
48
+ 'open-companion.label': 'Open companion side-by-side',
49
+ 'open-companion-vertical.label': 'Open companion stacked',
50
50
  'close-companion.label': 'Close companion',
51
51
  'close-current.label': 'Close current plank',
52
52
  'close-others.label': 'Close other planks',
@@ -12,16 +12,18 @@ import { invariant } from '@dxos/invariant';
12
12
 
13
13
  import { meta } from '#meta';
14
14
 
15
- import { type EphemeralDeckState, type DeckState, type StoredDeckState } from './schema';
15
+ import { type DeckState, type EphemeralDeckState, type StoredDeckState } from './schema';
16
16
 
17
- export const Settings = Capability.make<Atom.Writable<import('./Settings').Settings>>(`${meta.id}.capability.settings`);
17
+ export const Settings = Capability.make<Atom.Writable<import('./Settings').Settings>>(
18
+ `${meta.profile.key}.capability.settings`,
19
+ );
18
20
 
19
21
  /** Persisted state (stored in KVS/localStorage). */
20
- export const State = Capability.make<Atom.Writable<StoredDeckState>>(`${meta.id}.capability.state`);
22
+ export const State = Capability.make<Atom.Writable<StoredDeckState>>(`${meta.profile.key}.capability.state`);
21
23
 
22
24
  /** Transient/ephemeral state (not persisted). */
23
25
  export const EphemeralState = Capability.make<Atom.Writable<EphemeralDeckState>>(
24
- `${meta.id}.capability.ephemeral-state`,
26
+ `${meta.profile.key}.capability.ephemeral-state`,
25
27
  );
26
28
 
27
29
  /** Get the current active deck from state. */
@@ -12,7 +12,7 @@ import { meta } from '#meta';
12
12
  import * as DeckCapabilities from './DeckCapabilities';
13
13
 
14
14
  export const StateReady: ActivationEvent.ActivationEvent = AppActivationEvents.createStateEvent(
15
- `${meta.id}.state-ready`,
15
+ `${meta.profile.key}.state-ready`,
16
16
  );
17
17
 
18
18
  /** Fired when DeckSettings capability is ready. */
@@ -12,11 +12,12 @@ import { DXN } from '@dxos/keys';
12
12
 
13
13
  import { meta } from '#meta';
14
14
 
15
- const makeKey = (name: string) => DXN.make(`${meta.id}.operation.${name}`);
15
+ const makeKey = (name: string) => DXN.make(`${meta.profile.key}.operation.${name}`);
16
16
 
17
17
  const PartAdjustmentSchema = Schema.Union(
18
18
  Schema.Literal('close').annotations({ description: 'Close the plank.' }),
19
- Schema.Literal('companion').annotations({ description: 'Open the companion plank.' }),
19
+ Schema.Literal('companion').annotations({ description: 'Open the companion plank side-by-side.' }),
20
+ Schema.Literal('companion-vertical').annotations({ description: 'Open the companion plank stacked vertically.' }),
20
21
  Schema.Literal('solo').annotations({ description: 'Solo the plank.' }),
21
22
  Schema.Literal('solo--fullscreen').annotations({ description: 'Fullscreen the plank.' }),
22
23
  Schema.Literal('increment-start').annotations({ description: 'Move the plank towards the start of the deck.' }),
@@ -3,6 +3,7 @@
3
3
  //
4
4
 
5
5
  export * from './schema';
6
+ export * from './surface';
6
7
 
7
8
  export * as DeckCapabilities from './DeckCapabilities';
8
9
  export * as DeckEvents from './DeckEvents';
@@ -4,12 +4,13 @@
4
4
 
5
5
  import * as Schema from 'effect/Schema';
6
6
 
7
- import { Label, LayoutOperation } from '@dxos/app-toolkit';
7
+ import { AppNode, LayoutOperation, Translations } from '@dxos/app-toolkit';
8
8
  import { type DeepReadonly } from '@dxos/util';
9
9
 
10
10
  import { meta } from '#meta';
11
11
 
12
- export { PLANK_COMPANION_TYPE, DECK_COMPANION_TYPE } from '@dxos/app-toolkit';
12
+ export const PLANK_COMPANION_TYPE = AppNode.PLANK_COMPANION_TYPE;
13
+ export const DECK_COMPANION_TYPE = AppNode.DECK_COMPANION_TYPE;
13
14
 
14
15
  export type Part = 'solo' | 'multi' | 'complementary';
15
16
  export type ResolvedPart = Part | 'solo-primary' | 'solo-companion';
@@ -32,8 +33,8 @@ export const DeckState = Schema.Struct({
32
33
  plankSizing: Schema.mutable(PlankSizing),
33
34
  /** Whether the companion pane is visible alongside the active plank(s). */
34
35
  companionOpen: Schema.Boolean,
35
- /** Which companion variant to display when the companion pane is open. */
36
- companionVariant: Schema.optional(Schema.String),
36
+ /** Orientation of the companion splitter: `horizontal` (side-by-side) or `vertical` (stacked). */
37
+ companionOrientation: Schema.optional(Schema.Literal('horizontal', 'vertical')),
37
38
  /** Persisted companion frame widths in rem, keyed by frame ID. */
38
39
  companionFrameSizing: Schema.mutable(PlankSizing),
39
40
  });
@@ -47,7 +48,7 @@ export const defaultDeck: DeckState = {
47
48
  fullscreen: false,
48
49
  plankSizing: {},
49
50
  companionOpen: false,
50
- companionVariant: undefined,
51
+ companionOrientation: 'horizontal',
51
52
  companionFrameSizing: {},
52
53
  };
53
54
 
@@ -91,8 +92,8 @@ export const EphemeralDeckState = Schema.Struct({
91
92
  popoverSide: Schema.optional(Schema.Literal('top', 'right', 'bottom', 'left')),
92
93
  popoverAnchor: Schema.optional(Schema.Any),
93
94
  popoverAnchorId: Schema.optional(Schema.String),
94
- popoverKind: Schema.optional(Schema.Literal('base', 'card')),
95
- popoverTitle: Schema.optional(Label.annotations({ description: 'The title of the popover.' })),
95
+ popoverKind: Schema.optional(Schema.Literal('base', 'card', 'rename')),
96
+ popoverTitle: Schema.optional(Translations.Label.annotations({ description: 'The title of the popover.' })),
96
97
  /** Ref of the subject to be passed to the popover Surface. */
97
98
  popoverContentRef: Schema.optional(Schema.String),
98
99
  /** Data to be passed to the popover Surface. */
@@ -115,7 +116,8 @@ export type DeckPluginState = StoredDeckState & EphemeralDeckState;
115
116
  export namespace DeckAction {
116
117
  const PartAdjustmentSchema = Schema.Union(
117
118
  Schema.Literal('close').annotations({ description: 'Close the plank.' }),
118
- Schema.Literal('companion').annotations({ description: 'Open the companion plank.' }),
119
+ Schema.Literal('companion').annotations({ description: 'Open the companion plank side-by-side.' }),
120
+ Schema.Literal('companion-vertical').annotations({ description: 'Open the companion plank stacked vertically.' }),
119
121
  Schema.Literal('solo').annotations({ description: 'Solo the plank.' }),
120
122
  Schema.Literal('solo--fullscreen').annotations({ description: 'Fullscreen the plank.' }),
121
123
  Schema.Literal('increment-start').annotations({ description: 'Move the plank towards the start of the deck.' }),
@@ -126,16 +128,19 @@ export namespace DeckAction {
126
128
  export type Adjustment = Schema.Schema.Type<typeof Adjustment>;
127
129
 
128
130
  // An atomic transaction to apply to the deck, describing which element to move to which location.
129
- export class Adjust extends Schema.TaggedClass<Adjust>()(`${meta.id}.action.adjust`, {
131
+ export class Adjust extends Schema.TaggedClass<Adjust>()(`${meta.profile.key}.action.adjust`, {
130
132
  input: Adjustment,
131
133
  output: Schema.Void,
132
134
  }) {}
133
135
 
134
- export class UpdatePlankSize extends Schema.TaggedClass<UpdatePlankSize>()(`${meta.id}.action.update-plank-size`, {
135
- input: Schema.Struct({
136
- id: Schema.String,
137
- size: Schema.Number,
138
- }),
139
- output: Schema.Void,
140
- }) {}
136
+ export class UpdatePlankSize extends Schema.TaggedClass<UpdatePlankSize>()(
137
+ `${meta.profile.key}.action.update-plank-size`,
138
+ {
139
+ input: Schema.Struct({
140
+ id: Schema.String,
141
+ size: Schema.Number,
142
+ }),
143
+ output: Schema.Void,
144
+ },
145
+ ) {}
141
146
  }
@@ -0,0 +1,28 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Surface } from '@dxos/app-framework/ui';
6
+
7
+ /** Slot for the main status-bar container. */
8
+ export const StatusBar: Surface.RoleToken<Record<string, unknown>> = Surface.makeType(
9
+ 'org.dxos.plugin.statusBar.role.statusBar',
10
+ );
11
+
12
+ /** Slot for the status-bar footer region. */
13
+ export const StatusBarFooter: Surface.RoleToken<Record<string, unknown>> = Surface.makeType(
14
+ 'org.dxos.plugin.statusBar.role.footer',
15
+ );
16
+
17
+ /** Slot for the version-info widget in the banner. */
18
+ export const VersionInfo: Surface.RoleToken<Record<string, unknown>> = Surface.makeType(
19
+ 'org.dxos.plugin.statusBar.role.versionInfo',
20
+ );
21
+
22
+ /** Slot for the keyboard-shortcuts hints overlay. */
23
+ export const Hints: Surface.RoleToken<Record<string, unknown>> = Surface.makeType('org.dxos.plugin.support.role.hints');
24
+
25
+ /** Slot for the full keyboard-shortcuts list. */
26
+ export const Keyshortcuts: Surface.RoleToken<Record<string, unknown>> = Surface.makeType(
27
+ 'org.dxos.plugin.support.role.keyshortcuts',
28
+ );