@dxos/plugin-deck 0.8.4-main.406dc2a → 0.8.4-main.4a85c3132b

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 (327) hide show
  1. package/dist/lib/browser/Banner-DR6B7XTO.mjs +15 -0
  2. package/dist/lib/browser/Banner-DR6B7XTO.mjs.map +7 -0
  3. package/dist/lib/browser/DeckSettings-HB5TKG2F.mjs +96 -0
  4. package/dist/lib/browser/DeckSettings-HB5TKG2F.mjs.map +7 -0
  5. package/dist/lib/browser/app-graph-builder-22XAL7YE.mjs +123 -0
  6. package/dist/lib/browser/app-graph-builder-22XAL7YE.mjs.map +7 -0
  7. package/dist/lib/browser/check-app-scheme-ZV3QWNNZ.mjs +33 -0
  8. package/dist/lib/browser/check-app-scheme-ZV3QWNNZ.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-BJDEG7YZ.mjs +74 -0
  10. package/dist/lib/browser/chunk-BJDEG7YZ.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-FBL4WVYZ.mjs +16 -0
  12. package/dist/lib/browser/chunk-FBL4WVYZ.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-7I6H3N4Q.mjs → chunk-OAPMV5ZR.mjs} +145 -27
  14. package/dist/lib/browser/chunk-OAPMV5ZR.mjs.map +7 -0
  15. package/dist/lib/browser/chunk-Q4GUCIRE.mjs +200 -0
  16. package/dist/lib/browser/chunk-Q4GUCIRE.mjs.map +7 -0
  17. package/dist/lib/browser/chunk-SKBPLX5T.mjs +81 -0
  18. package/dist/lib/browser/chunk-SKBPLX5T.mjs.map +7 -0
  19. package/dist/lib/browser/chunk-YGOOWRJE.mjs +1390 -0
  20. package/dist/lib/browser/chunk-YGOOWRJE.mjs.map +7 -0
  21. package/dist/lib/browser/index.mjs +84 -73
  22. package/dist/lib/browser/index.mjs.map +4 -4
  23. package/dist/lib/browser/meta.json +1 -1
  24. package/dist/lib/browser/operation-resolver-BLZGJWLO.mjs +580 -0
  25. package/dist/lib/browser/operation-resolver-BLZGJWLO.mjs.map +7 -0
  26. package/dist/lib/browser/react-root-4ESZAM6D.mjs +49 -0
  27. package/dist/lib/browser/react-root-4ESZAM6D.mjs.map +7 -0
  28. package/dist/lib/browser/react-surface-KYQGCALN.mjs +44 -0
  29. package/dist/lib/browser/react-surface-KYQGCALN.mjs.map +7 -0
  30. package/dist/lib/browser/settings-RY2TBSGP.mjs +40 -0
  31. package/dist/lib/browser/settings-RY2TBSGP.mjs.map +7 -0
  32. package/dist/lib/browser/state-CSTTMJ43.mjs +106 -0
  33. package/dist/lib/browser/state-CSTTMJ43.mjs.map +7 -0
  34. package/dist/lib/browser/toolkit-EONRPYA5.mjs +55 -0
  35. package/dist/lib/browser/toolkit-EONRPYA5.mjs.map +7 -0
  36. package/dist/lib/browser/types/index.mjs +14 -6
  37. package/dist/lib/browser/url-handler-EM3SYHHX.mjs +95 -0
  38. package/dist/lib/browser/url-handler-EM3SYHHX.mjs.map +7 -0
  39. package/dist/lib/node-esm/Banner-HR7DPUZU.mjs +16 -0
  40. package/dist/lib/node-esm/Banner-HR7DPUZU.mjs.map +7 -0
  41. package/dist/lib/node-esm/DeckSettings-MWTR7HU2.mjs +97 -0
  42. package/dist/lib/node-esm/DeckSettings-MWTR7HU2.mjs.map +7 -0
  43. package/dist/lib/node-esm/app-graph-builder-GNNNCWGN.mjs +124 -0
  44. package/dist/lib/node-esm/app-graph-builder-GNNNCWGN.mjs.map +7 -0
  45. package/dist/lib/node-esm/check-app-scheme-ZNISVRFH.mjs +34 -0
  46. package/dist/lib/node-esm/check-app-scheme-ZNISVRFH.mjs.map +7 -0
  47. package/dist/lib/node-esm/chunk-DGTRKKWZ.mjs +76 -0
  48. package/dist/lib/node-esm/chunk-DGTRKKWZ.mjs.map +7 -0
  49. package/dist/lib/node-esm/chunk-EGFOT3DE.mjs +18 -0
  50. package/dist/lib/node-esm/chunk-EGFOT3DE.mjs.map +7 -0
  51. package/dist/lib/node-esm/chunk-IR6ODCNC.mjs +83 -0
  52. package/dist/lib/node-esm/chunk-IR6ODCNC.mjs.map +7 -0
  53. package/dist/lib/node-esm/chunk-L2NPJPGL.mjs +281 -0
  54. package/dist/lib/node-esm/chunk-L2NPJPGL.mjs.map +7 -0
  55. package/dist/lib/node-esm/chunk-O4IOJICP.mjs +201 -0
  56. package/dist/lib/node-esm/chunk-O4IOJICP.mjs.map +7 -0
  57. package/dist/lib/node-esm/chunk-Z43MBISY.mjs +1391 -0
  58. package/dist/lib/node-esm/chunk-Z43MBISY.mjs.map +7 -0
  59. package/dist/lib/node-esm/index.mjs +186 -0
  60. package/dist/lib/node-esm/index.mjs.map +7 -0
  61. package/dist/lib/node-esm/meta.json +1 -0
  62. package/dist/lib/node-esm/operation-resolver-5BYDNQND.mjs +581 -0
  63. package/dist/lib/node-esm/operation-resolver-5BYDNQND.mjs.map +7 -0
  64. package/dist/lib/node-esm/react-root-YO7IIC75.mjs +50 -0
  65. package/dist/lib/node-esm/react-root-YO7IIC75.mjs.map +7 -0
  66. package/dist/lib/node-esm/react-surface-G7VRKT4U.mjs +45 -0
  67. package/dist/lib/node-esm/react-surface-G7VRKT4U.mjs.map +7 -0
  68. package/dist/lib/node-esm/settings-GYLWWOBK.mjs +41 -0
  69. package/dist/lib/node-esm/settings-GYLWWOBK.mjs.map +7 -0
  70. package/dist/lib/node-esm/state-RQXTBWUX.mjs +107 -0
  71. package/dist/lib/node-esm/state-RQXTBWUX.mjs.map +7 -0
  72. package/dist/lib/node-esm/toolkit-EU3Z2R4H.mjs +56 -0
  73. package/dist/lib/node-esm/toolkit-EU3Z2R4H.mjs.map +7 -0
  74. package/dist/lib/node-esm/types/index.mjs +41 -0
  75. package/dist/lib/node-esm/url-handler-VUK2LBJV.mjs +96 -0
  76. package/dist/lib/node-esm/url-handler-VUK2LBJV.mjs.map +7 -0
  77. package/dist/types/src/DeckPlugin.d.ts +2 -1
  78. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  79. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  80. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  81. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  82. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  83. package/dist/types/src/capabilities/check-app-scheme/check-app-scheme.d.ts +5 -0
  84. package/dist/types/src/capabilities/check-app-scheme/check-app-scheme.d.ts.map +1 -0
  85. package/dist/types/src/capabilities/check-app-scheme/index.d.ts +3 -0
  86. package/dist/types/src/capabilities/check-app-scheme/index.d.ts.map +1 -0
  87. package/dist/types/src/capabilities/index.d.ts +8 -13
  88. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  89. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  90. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  92. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  93. package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
  94. package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
  95. package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
  96. package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
  97. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  98. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  99. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  100. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  101. package/dist/types/src/capabilities/settings/index.d.ts +19 -0
  102. package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
  103. package/dist/types/src/capabilities/settings/settings.d.ts +22 -0
  104. package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
  105. package/dist/types/src/capabilities/state/index.d.ts +172 -0
  106. package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
  107. package/dist/types/src/capabilities/state/state.d.ts +175 -0
  108. package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
  109. package/dist/types/src/capabilities/toolkit/index.d.ts +3 -0
  110. package/dist/types/src/capabilities/toolkit/index.d.ts.map +1 -0
  111. package/dist/types/src/capabilities/toolkit/toolkit.d.ts +27 -0
  112. package/dist/types/src/capabilities/toolkit/toolkit.d.ts.map +1 -0
  113. package/dist/types/src/capabilities/tools/index.d.ts +3 -0
  114. package/dist/types/src/capabilities/tools/index.d.ts.map +1 -0
  115. package/dist/types/src/capabilities/tools/tools.d.ts +12 -0
  116. package/dist/types/src/capabilities/tools/tools.d.ts.map +1 -0
  117. package/dist/types/src/capabilities/url-handler/index.d.ts +3 -0
  118. package/dist/types/src/capabilities/url-handler/index.d.ts.map +1 -0
  119. package/dist/types/src/capabilities/url-handler/url-handler.d.ts +5 -0
  120. package/dist/types/src/capabilities/url-handler/url-handler.d.ts.map +1 -0
  121. package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +1 -1
  122. package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +1 -1
  123. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
  124. package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts +2 -1
  125. package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts.map +1 -1
  126. package/dist/types/src/components/DeckLayout/DeckMain.d.ts.map +1 -1
  127. package/dist/types/src/components/DeckLayout/Dialog.d.ts.map +1 -1
  128. package/dist/types/src/components/DeckLayout/Fallback.d.ts.map +1 -1
  129. package/dist/types/src/components/DeckLayout/Popover.d.ts.map +1 -1
  130. package/dist/types/src/components/DeckLayout/Toast.d.ts +3 -3
  131. package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
  132. package/dist/types/src/components/Plank/Plank.d.ts +5 -5
  133. package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
  134. package/dist/types/src/components/Plank/Plank.stories.d.ts +26 -7
  135. package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -1
  136. package/dist/types/src/components/Plank/PlankControls.d.ts +1 -1
  137. package/dist/types/src/components/Plank/PlankControls.d.ts.map +1 -1
  138. package/dist/types/src/components/Plank/PlankError.d.ts +6 -4
  139. package/dist/types/src/components/Plank/PlankError.d.ts.map +1 -1
  140. package/dist/types/src/components/Plank/PlankHeading.d.ts +2 -2
  141. package/dist/types/src/components/Plank/PlankHeading.d.ts.map +1 -1
  142. package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +1 -1
  143. package/dist/types/src/components/Sidebar/Sidebar.d.ts.map +1 -1
  144. package/dist/types/src/components/Sidebar/SidebarButton.d.ts.map +1 -1
  145. package/dist/types/src/components/fragments.d.ts +4 -1
  146. package/dist/types/src/components/fragments.d.ts.map +1 -1
  147. package/dist/types/src/components/index.d.ts +0 -1
  148. package/dist/types/src/components/index.d.ts.map +1 -1
  149. package/dist/types/src/containers/Banner/Banner.d.ts +2 -0
  150. package/dist/types/src/containers/Banner/Banner.d.ts.map +1 -0
  151. package/dist/types/src/containers/Banner/index.d.ts +3 -0
  152. package/dist/types/src/containers/Banner/index.d.ts.map +1 -0
  153. package/dist/types/src/containers/DeckSettings/DeckSettings.d.ts +8 -0
  154. package/dist/types/src/containers/DeckSettings/DeckSettings.d.ts.map +1 -0
  155. package/dist/types/src/containers/DeckSettings/index.d.ts +3 -0
  156. package/dist/types/src/containers/DeckSettings/index.d.ts.map +1 -0
  157. package/dist/types/src/containers/index.d.ts +4 -0
  158. package/dist/types/src/containers/index.d.ts.map +1 -0
  159. package/dist/types/src/hooks/index.d.ts +2 -0
  160. package/dist/types/src/hooks/index.d.ts.map +1 -1
  161. package/dist/types/src/hooks/useDeckCompanions.d.ts +3 -3
  162. package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
  163. package/dist/types/src/hooks/useDeckState.d.ts +17 -0
  164. package/dist/types/src/hooks/useDeckState.d.ts.map +1 -0
  165. package/dist/types/src/hooks/useHoistStatusbar.d.ts +1 -1
  166. package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +1 -1
  167. package/dist/types/src/hooks/useMainSize.d.ts +2 -2
  168. package/dist/types/src/hooks/useNodeActionExpander.d.ts +1 -1
  169. package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
  170. package/dist/types/src/hooks/useSelectedCompanion.d.ts +13 -0
  171. package/dist/types/src/hooks/useSelectedCompanion.d.ts.map +1 -0
  172. package/dist/types/src/index.d.ts +1 -2
  173. package/dist/types/src/index.d.ts.map +1 -1
  174. package/dist/types/src/meta.d.ts +2 -2
  175. package/dist/types/src/meta.d.ts.map +1 -1
  176. package/dist/types/src/translations.d.ts +2 -1
  177. package/dist/types/src/translations.d.ts.map +1 -1
  178. package/dist/types/src/{capabilities → types}/capabilities.d.ts +96 -90
  179. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  180. package/dist/types/src/types/events.d.ts +7 -0
  181. package/dist/types/src/types/events.d.ts.map +1 -0
  182. package/dist/types/src/types/index.d.ts +2 -0
  183. package/dist/types/src/types/index.d.ts.map +1 -1
  184. package/dist/types/src/types/schema.d.ts +92 -31
  185. package/dist/types/src/types/schema.d.ts.map +1 -1
  186. package/dist/types/src/util/set-active.d.ts +18 -3
  187. package/dist/types/src/util/set-active.d.ts.map +1 -1
  188. package/dist/types/tsconfig.tsbuildinfo +1 -1
  189. package/package.json +56 -48
  190. package/src/DeckPlugin.ts +28 -48
  191. package/src/capabilities/app-graph-builder/app-graph-builder.ts +119 -0
  192. package/src/capabilities/app-graph-builder/index.ts +7 -0
  193. package/src/capabilities/check-app-scheme/check-app-scheme.ts +45 -0
  194. package/src/capabilities/check-app-scheme/index.ts +7 -0
  195. package/src/capabilities/index.ts +9 -14
  196. package/src/capabilities/operation-resolver/index.ts +10 -0
  197. package/src/capabilities/operation-resolver/operation-resolver.ts +560 -0
  198. package/src/capabilities/react-root/index.ts +7 -0
  199. package/src/capabilities/react-root/react-root.tsx +47 -0
  200. package/src/capabilities/react-surface/index.ts +7 -0
  201. package/src/capabilities/react-surface/react-surface.tsx +38 -0
  202. package/src/capabilities/settings/index.ts +7 -0
  203. package/src/capabilities/settings/settings.ts +39 -0
  204. package/src/capabilities/state/index.ts +7 -0
  205. package/src/capabilities/state/state.ts +105 -0
  206. package/src/capabilities/toolkit/index.ts +7 -0
  207. package/src/capabilities/toolkit/toolkit.ts +64 -0
  208. package/src/capabilities/tools/index.ts +7 -0
  209. package/src/capabilities/tools/tools.ts +91 -0
  210. package/src/capabilities/url-handler/index.ts +7 -0
  211. package/src/capabilities/url-handler/url-handler.ts +96 -0
  212. package/src/components/DeckLayout/ActiveNode.tsx +3 -2
  213. package/src/components/DeckLayout/Banner.tsx +9 -9
  214. package/src/components/DeckLayout/ContentEmpty.tsx +5 -6
  215. package/src/components/DeckLayout/DeckLayout.stories.tsx +23 -34
  216. package/src/components/DeckLayout/DeckLayout.tsx +13 -11
  217. package/src/components/DeckLayout/DeckMain.tsx +67 -65
  218. package/src/components/DeckLayout/Dialog.tsx +22 -13
  219. package/src/components/DeckLayout/Fallback.tsx +2 -6
  220. package/src/components/DeckLayout/Popover.tsx +70 -32
  221. package/src/components/DeckLayout/StatusBar.tsx +4 -4
  222. package/src/components/DeckLayout/Toast.tsx +5 -5
  223. package/src/components/Plank/Plank.stories.tsx +19 -9
  224. package/src/components/Plank/Plank.tsx +85 -66
  225. package/src/components/Plank/PlankControls.tsx +9 -11
  226. package/src/components/Plank/PlankError.tsx +31 -17
  227. package/src/components/Plank/PlankHeading.tsx +35 -42
  228. package/src/components/Plank/PlankLoading.tsx +1 -1
  229. package/src/components/Sidebar/ComplementarySidebar.tsx +71 -40
  230. package/src/components/Sidebar/Sidebar.tsx +7 -7
  231. package/src/components/Sidebar/SidebarButton.tsx +36 -29
  232. package/src/components/fragments.ts +10 -5
  233. package/src/components/index.ts +0 -1
  234. package/src/containers/Banner/Banner.tsx +5 -0
  235. package/src/containers/Banner/index.ts +7 -0
  236. package/src/{components → containers}/DeckSettings/DeckSettings.tsx +41 -31
  237. package/src/containers/DeckSettings/index.ts +7 -0
  238. package/src/containers/index.ts +8 -0
  239. package/src/hooks/index.ts +2 -0
  240. package/src/hooks/useCompanions.ts +2 -2
  241. package/src/hooks/useDeckCompanions.ts +6 -4
  242. package/src/hooks/useDeckState.ts +82 -0
  243. package/src/hooks/useHoistStatusbar.ts +3 -5
  244. package/src/hooks/useMainSize.ts +2 -2
  245. package/src/hooks/useNodeActionExpander.ts +4 -4
  246. package/src/hooks/useSelectedCompanion.ts +38 -0
  247. package/src/index.ts +1 -2
  248. package/src/meta.ts +7 -2
  249. package/src/translations.ts +2 -1
  250. package/src/types/capabilities.ts +33 -0
  251. package/src/types/events.ts +21 -0
  252. package/src/types/index.ts +2 -0
  253. package/src/types/schema.ts +91 -18
  254. package/src/util/layoutAppliesTopbar.ts +1 -1
  255. package/src/util/overscroll.ts +3 -3
  256. package/src/util/set-active.ts +49 -29
  257. package/dist/lib/browser/app-graph-builder-YYP67JHW.mjs +0 -153
  258. package/dist/lib/browser/app-graph-builder-YYP67JHW.mjs.map +0 -7
  259. package/dist/lib/browser/check-app-scheme-GCOL6YDT.mjs +0 -32
  260. package/dist/lib/browser/check-app-scheme-GCOL6YDT.mjs.map +0 -7
  261. package/dist/lib/browser/chunk-7I6H3N4Q.mjs.map +0 -7
  262. package/dist/lib/browser/chunk-CNTGBCMK.mjs +0 -145
  263. package/dist/lib/browser/chunk-CNTGBCMK.mjs.map +0 -7
  264. package/dist/lib/browser/chunk-HUWUYTOI.mjs +0 -16
  265. package/dist/lib/browser/chunk-HUWUYTOI.mjs.map +0 -7
  266. package/dist/lib/browser/chunk-JQKOS2HB.mjs +0 -1531
  267. package/dist/lib/browser/chunk-JQKOS2HB.mjs.map +0 -7
  268. package/dist/lib/browser/chunk-MHP4GPX5.mjs +0 -11
  269. package/dist/lib/browser/chunk-MHP4GPX5.mjs.map +0 -7
  270. package/dist/lib/browser/chunk-RJP5R7PY.mjs +0 -127
  271. package/dist/lib/browser/chunk-RJP5R7PY.mjs.map +0 -7
  272. package/dist/lib/browser/chunk-VX7MMQOW.mjs +0 -129
  273. package/dist/lib/browser/chunk-VX7MMQOW.mjs.map +0 -7
  274. package/dist/lib/browser/intent-resolver-7XNOEPVN.mjs +0 -524
  275. package/dist/lib/browser/intent-resolver-7XNOEPVN.mjs.map +0 -7
  276. package/dist/lib/browser/react-root-OJEF7YCH.mjs +0 -43
  277. package/dist/lib/browser/react-root-OJEF7YCH.mjs.map +0 -7
  278. package/dist/lib/browser/react-surface-XN2NJYHO.mjs +0 -40
  279. package/dist/lib/browser/react-surface-XN2NJYHO.mjs.map +0 -7
  280. package/dist/lib/browser/settings-M3KSKRAP.mjs +0 -30
  281. package/dist/lib/browser/settings-M3KSKRAP.mjs.map +0 -7
  282. package/dist/lib/browser/state-6ZSDTF6Q.mjs +0 -12
  283. package/dist/lib/browser/toolkit-L7C3UAEU.mjs +0 -63
  284. package/dist/lib/browser/toolkit-L7C3UAEU.mjs.map +0 -7
  285. package/dist/lib/browser/url-handler-EHTLXZRR.mjs +0 -70
  286. package/dist/lib/browser/url-handler-EHTLXZRR.mjs.map +0 -7
  287. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  288. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  289. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  290. package/dist/types/src/capabilities/check-app-scheme.d.ts +0 -4
  291. package/dist/types/src/capabilities/check-app-scheme.d.ts.map +0 -1
  292. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  293. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  294. package/dist/types/src/capabilities/react-root.d.ts +0 -7
  295. package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
  296. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  297. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  298. package/dist/types/src/capabilities/settings.d.ts +0 -4
  299. package/dist/types/src/capabilities/settings.d.ts.map +0 -1
  300. package/dist/types/src/capabilities/state.d.ts +0 -104
  301. package/dist/types/src/capabilities/state.d.ts.map +0 -1
  302. package/dist/types/src/capabilities/toolkit.d.ts +0 -6
  303. package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
  304. package/dist/types/src/capabilities/tools.d.ts +0 -11
  305. package/dist/types/src/capabilities/tools.d.ts.map +0 -1
  306. package/dist/types/src/capabilities/url-handler.d.ts +0 -4
  307. package/dist/types/src/capabilities/url-handler.d.ts.map +0 -1
  308. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts +0 -6
  309. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +0 -1
  310. package/dist/types/src/components/DeckSettings/index.d.ts +0 -2
  311. package/dist/types/src/components/DeckSettings/index.d.ts.map +0 -1
  312. package/dist/types/src/events.d.ts +0 -4
  313. package/dist/types/src/events.d.ts.map +0 -1
  314. package/src/capabilities/app-graph-builder.ts +0 -143
  315. package/src/capabilities/capabilities.ts +0 -14
  316. package/src/capabilities/check-app-scheme.ts +0 -40
  317. package/src/capabilities/intent-resolver.ts +0 -472
  318. package/src/capabilities/react-root.tsx +0 -39
  319. package/src/capabilities/react-surface.tsx +0 -30
  320. package/src/capabilities/settings.ts +0 -27
  321. package/src/capabilities/state.ts +0 -108
  322. package/src/capabilities/toolkit.ts +0 -57
  323. package/src/capabilities/tools.ts +0 -84
  324. package/src/capabilities/url-handler.ts +0 -60
  325. package/src/components/DeckSettings/index.ts +0 -5
  326. package/src/events.ts +0 -11
  327. /package/dist/lib/{browser/state-6ZSDTF6Q.mjs.map → node-esm/types/index.mjs.map} +0 -0
@@ -2,6 +2,7 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ import { useFocusFinders } from '@fluentui/react-tabster';
5
6
  import React, {
6
7
  type KeyboardEvent,
7
8
  type PropsWithChildren,
@@ -12,34 +13,32 @@ import React, {
12
13
  useRef,
13
14
  } from 'react';
14
15
 
15
- import {
16
- LayoutAction,
17
- Surface,
18
- createIntent,
19
- useAppGraph,
20
- useCapability,
21
- useIntentDispatcher,
22
- } from '@dxos/app-framework';
16
+ import { Surface, useOperationInvoker } from '@dxos/app-framework/ui';
17
+ import { LayoutOperation } from '@dxos/app-toolkit';
18
+ import { useAppGraph } from '@dxos/app-toolkit/ui';
23
19
  import { debounce } from '@dxos/async';
24
20
  import { type Node, useNode } from '@dxos/plugin-graph';
25
21
  import { ATTENDABLE_PATH_SEPARATOR, useAttentionAttributes } from '@dxos/react-ui-attention';
26
22
  import { StackItem, railGridHorizontal } from '@dxos/react-ui-stack';
27
- import { mainIntrinsicSize, mx } from '@dxos/react-ui-theme';
23
+ import { mainIntrinsicSize, mx } from '@dxos/ui-theme';
28
24
 
29
- import { DeckCapabilities } from '../../capabilities';
30
- import { useCompanions, useMainSize } from '../../hooks';
25
+ import { useCompanions, useDeckState, useMainSize, useSelectedCompanion } from '../../hooks';
31
26
  import { parseEntryId } from '../../layout';
32
- import { DeckAction, type DeckSettingsProps, type LayoutMode, type ResolvedPart } from '../../types';
27
+ import { DeckOperation, type DeckSettingsProps, type LayoutMode, type ResolvedPart } from '../../types';
33
28
 
34
- import { PlankContentError, PlankError } from './PlankError';
29
+ import { PlankError, PlankErrorFallback } from './PlankError';
35
30
  import { PlankHeading } from './PlankHeading';
36
31
  import { PlankLoading } from './PlankLoading';
37
32
 
38
33
  const UNKNOWN_ID = 'unknown_id';
39
34
 
35
+ //
36
+ // Plank
37
+ //
38
+
40
39
  export type PlankProps = Pick<PlankComponentProps, 'layoutMode' | 'part' | 'path' | 'order' | 'active' | 'settings'> & {
41
40
  id?: string;
42
- companionId?: string;
41
+ companionVariant?: string;
43
42
  };
44
43
 
45
44
  // TODO(burdon): Factor out conditional rendering.
@@ -50,22 +49,24 @@ export type PlankProps = Pick<PlankComponentProps, 'layoutMode' | 'part' | 'path
50
49
  // benefits. I think where we anticipate users will definitely want to quickly switch between showing and hiding entire
51
50
  // articles, over the (again probably large) performance benefit that unmounting them would confer, we can mount and
52
51
  // hide them, but I think that scenario in its most unambiguous form is probably rare. You could extrapolate
53
- // the scenario to include all potential planks such as companions, which we could keep mounted and hidden, but I
54
- // dont think the resulting performance would be acceptable. I think the real issue is perceived performance which
52
+ // the scenario to include all "potential" planks such as companions, which we could keep mounted and hidden, but I
53
+ // don't think the resulting performance would be acceptable. I think the real issue is "perceived performance" which
55
54
  // has mitigations that are in between mounting and un-mounting since both of those have tradeoffs; we may need one or more
56
- // partially-mounted experiences, like loading skeletons at the simple end, or screenshots of sleeping planks at
55
+ // "partially-mounted" experiences, like loading skeletons at the simple end, or screenshots of "sleeping" planks at
57
56
  // the advanced end.
58
57
 
59
58
  /**
60
59
  * A Plank is the main container for surfaces within a Deck.
61
60
  * It may be paired with a companion plank that enables the user to select one of multiple companion surfaces.
62
61
  */
63
- export const Plank = memo(({ id = UNKNOWN_ID, companionId, ...props }: PlankProps) => {
62
+ export const Plank = memo(({ id = UNKNOWN_ID, companionVariant, ...props }: PlankProps) => {
64
63
  const { graph } = useAppGraph();
65
64
  const node = useNode(graph, id);
66
65
  const companions = useCompanions(id);
67
- const currentCompanion = companions.find(({ id }) => id === companionId);
68
- const hasCompanion = !!(companionId && currentCompanion);
66
+ const { companionId } = useSelectedCompanion(companions, companionVariant);
67
+ const resolvedCompanionId = companionVariant ? companionId : undefined;
68
+ const currentCompanion = companions.find(({ id }) => id === resolvedCompanionId);
69
+ const hasCompanion = !!(resolvedCompanionId && currentCompanion);
69
70
 
70
71
  return (
71
72
  <PlankContainer
@@ -83,7 +84,7 @@ export const Plank = memo(({ id = UNKNOWN_ID, companionId, ...props }: PlankProp
83
84
  />
84
85
  {hasCompanion && (
85
86
  <PlankComponent
86
- id={companionId}
87
+ id={resolvedCompanionId}
87
88
  node={currentCompanion}
88
89
  primary={node}
89
90
  companions={companions}
@@ -96,12 +97,13 @@ export const Plank = memo(({ id = UNKNOWN_ID, companionId, ...props }: PlankProp
96
97
  );
97
98
  });
98
99
 
99
- const PlankContainer = ({
100
- children,
101
- solo,
102
- companion,
103
- encapsulate,
104
- }: PropsWithChildren<{ solo: boolean; companion: boolean; encapsulate: boolean }>) => {
100
+ //
101
+ // PlankContainer
102
+ //
103
+
104
+ type PlankContainerProps = PropsWithChildren<{ solo: boolean; companion: boolean; encapsulate: boolean }>;
105
+
106
+ const PlankContainer = ({ children, solo, companion, encapsulate }: PlankContainerProps) => {
105
107
  const sizeAttrs = useMainSize();
106
108
  if (!solo) {
107
109
  return children;
@@ -111,10 +113,11 @@ const PlankContainer = ({
111
113
  return (
112
114
  <div
113
115
  role='none'
116
+ data-popover-collision-boundary={true}
114
117
  className={mx(
115
- 'absolute inset-[--main-spacing] grid',
116
- encapsulate && 'border border-separator rounded overflow-hidden',
117
- companion && 'grid-cols-[6fr_4fr]',
118
+ 'absolute inset-(--main-spacing) grid',
119
+ encapsulate && 'border border-separator rounded-sm overflow-hidden',
120
+ companion && 'grid-cols-[6fr_4fr]', // TODO(burdon): Resize.
118
121
  railGridHorizontal,
119
122
  mainIntrinsicSize,
120
123
  )}
@@ -125,6 +128,10 @@ const PlankContainer = ({
125
128
  );
126
129
  };
127
130
 
131
+ //
132
+ // PlankComponent
133
+ //
134
+
128
135
  type PlankComponentProps = {
129
136
  layoutMode: LayoutMode;
130
137
  id: string;
@@ -132,11 +139,10 @@ type PlankComponentProps = {
132
139
  path?: string[];
133
140
  order?: number;
134
141
  active?: string[];
135
- // TODO(burdon): Change to role?
136
142
  companioned?: 'primary' | 'companion';
137
- node?: Node;
138
- primary?: Node;
139
- companions?: Node[];
143
+ node?: Node.Node;
144
+ primary?: Node.Node;
145
+ companions?: Node.Node[];
140
146
  settings?: DeckSettingsProps;
141
147
  };
142
148
 
@@ -154,8 +160,10 @@ const PlankComponent = memo(
154
160
  companions,
155
161
  settings,
156
162
  }: PlankComponentProps) => {
157
- const { dispatchPromise: dispatch } = useIntentDispatcher();
158
- const { deck, popoverAnchorId, scrollIntoView } = useCapability(DeckCapabilities.DeckState);
163
+ const { invokePromise } = useOperationInvoker();
164
+ const { state, deck } = useDeckState();
165
+ const { popoverAnchorId, scrollIntoView } = state;
166
+ const { findFirstFocusable } = useFocusFinders();
159
167
  const canResize = layoutMode === 'deck';
160
168
 
161
169
  const attentionAttrs = useAttentionAttributes(primary?.id ?? id);
@@ -172,15 +180,22 @@ const PlankComponent = memo(
172
180
 
173
181
  const handleSizeChange = useCallback(
174
182
  debounce((nextSize: number) => {
175
- return dispatch(createIntent(DeckAction.UpdatePlankSize, { id: sizeKey, size: nextSize }));
183
+ return invokePromise(DeckOperation.UpdatePlankSize, { id: sizeKey, size: nextSize });
176
184
  }, 200),
177
- [dispatch, sizeKey],
185
+ [invokePromise, sizeKey],
178
186
  );
179
187
 
180
- // TODO(thure): Tabsters focus group should handle moving focus to Main, but something is blocking it.
188
+ // TODO(thure): Tabster's focus group should handle moving focus to Main, but something is blocking it.
181
189
  const handleKeyDown = useCallback((event: KeyboardEvent) => {
182
- if (event.target === event.currentTarget && event.key === 'Escape') {
183
- rootElement.current?.closest('main')?.focus();
190
+ if (event.target === event.currentTarget) {
191
+ switch (event.key) {
192
+ case 'Escape':
193
+ rootElement.current?.closest('main')?.focus();
194
+ break;
195
+ case 'Enter':
196
+ rootElement.current && findFirstFocusable(rootElement.current)?.focus();
197
+ break;
198
+ }
184
199
  }
185
200
  }, []);
186
201
 
@@ -188,9 +203,9 @@ const PlankComponent = memo(
188
203
  if (scrollIntoView === id) {
189
204
  layoutMode === 'deck' && rootElement.current?.scrollIntoView({ behavior: 'smooth', inline: 'center' });
190
205
  // Clear the scroll into view state once it has been actioned.
191
- void dispatch(createIntent(LayoutAction.ScrollIntoView, { part: 'current', subject: undefined }));
206
+ void invokePromise(LayoutOperation.ScrollIntoView, { subject: undefined });
192
207
  }
193
- }, [id, scrollIntoView, layoutMode]);
208
+ }, [id, scrollIntoView, layoutMode, invokePromise]);
194
209
 
195
210
  const isSolo = layoutMode.startsWith('solo') && part === 'solo';
196
211
  const isAttendable =
@@ -216,24 +231,27 @@ const PlankComponent = memo(
216
231
  const placeholder = useMemo(() => <PlankLoading />, []);
217
232
 
218
233
  const Root = part.startsWith('solo') ? 'article' : StackItem.Root;
234
+ const fullscreen = layoutMode === 'solo--fullscreen';
219
235
  const className = mx(
220
- 'attention-surface relative dx-focus-ring-inset-over-all density-coarse',
221
- isSolo && mainIntrinsicSize,
222
- isSolo && railGridHorizontal,
236
+ 'dx-attention-surface relative dx-focus-ring-inset-over-all dx-density-coarse',
223
237
  isSolo && 'absolute inset-0',
238
+ isSolo && mainIntrinsicSize,
239
+ railGridHorizontal,
224
240
  part.startsWith('solo') && 'grid',
225
- part === 'deck' && (companioned === 'companion' ? '!border-separator border-ie' : '!border-separator border-li'),
226
- part.startsWith('solo-') && 'row-span-2 grid-rows-subgrid min-is-0',
227
- part === 'solo-companion' && '!border-separator border-is',
241
+ part.startsWith('solo-') && 'grid-rows-subgrid row-span-2 min-w-0',
242
+ fullscreen && 'grid-rows-1',
243
+ part === 'deck' && (companioned === 'companion' ? 'border-separator! border-e' : 'border-separator! border-x'),
244
+ part === 'solo-companion' && 'border-separator! border-s',
228
245
  settings?.encapsulatedPlanks &&
229
246
  !part.startsWith('solo') &&
230
- 'mli-[--main-spacing] !border-separator border rounded overflow-hidden',
247
+ 'mx-(--main-spacing) border-separator! border rounded-sm overflow-hidden',
231
248
  );
232
249
 
233
250
  return (
234
251
  <Root
235
252
  ref={rootElement}
236
253
  data-testid='deck.plank'
254
+ data-popover-collision-boundary={true}
237
255
  tabIndex={0}
238
256
  {...(part.startsWith('solo')
239
257
  ? ({ ...sizeAttrs, className } as any)
@@ -250,32 +268,33 @@ const PlankComponent = memo(
250
268
  >
251
269
  {node ? (
252
270
  <>
253
- <PlankHeading
254
- id={id}
255
- part={part.startsWith('solo-') ? 'solo' : part}
256
- node={node}
257
- layoutMode={layoutMode}
258
- deckEnabled={settings?.enableDeck}
259
- canIncrementStart={canIncrementStart}
260
- canIncrementEnd={canIncrementEnd}
261
- popoverAnchorId={popoverAnchorId}
262
- primaryId={primary?.id}
263
- companioned={companioned}
264
- companions={companions}
265
- />
266
- <Surface
271
+ {!fullscreen && (
272
+ <PlankHeading
273
+ id={id}
274
+ part={part.startsWith('solo-') ? 'solo' : part}
275
+ node={node}
276
+ layoutMode={layoutMode}
277
+ deckEnabled={settings?.enableDeck}
278
+ canIncrementStart={canIncrementStart}
279
+ canIncrementEnd={canIncrementEnd}
280
+ popoverAnchorId={popoverAnchorId}
281
+ primaryId={primary?.id}
282
+ companioned={companioned}
283
+ companions={companions}
284
+ />
285
+ )}
286
+ <Surface.Surface
267
287
  key={node.id}
268
288
  role='article'
269
289
  data={data}
270
290
  limit={1}
271
- fallback={PlankContentError}
291
+ fallback={PlankErrorFallback}
272
292
  placeholder={placeholder}
273
293
  />
274
294
  </>
275
295
  ) : (
276
296
  <PlankError id={id} part={part} />
277
297
  )}
278
-
279
298
  {canResize && <StackItem.ResizeHandle />}
280
299
  </Root>
281
300
  );
@@ -4,12 +4,11 @@
4
4
 
5
5
  import React, { forwardRef, useCallback } from 'react';
6
6
 
7
- import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
8
- import { invariant } from '@dxos/invariant';
7
+ import { useOperationInvoker } from '@dxos/app-framework/ui';
9
8
  import { ButtonGroup, type ButtonGroupProps, type ButtonProps, IconButton, useTranslation } from '@dxos/react-ui';
10
9
 
11
10
  import { meta } from '../../meta';
12
- import { DeckAction, type LayoutMode } from '../../types';
11
+ import { type DeckAction, DeckOperation, type LayoutMode } from '../../types';
13
12
 
14
13
  export type PlankControlHandler = (event: DeckAction.PartAdjustment) => void;
15
14
 
@@ -32,10 +31,10 @@ export type PlankControlsProps = Omit<ButtonGroupProps, 'onClick'> & {
32
31
  };
33
32
 
34
33
  const PlankControl = ({ icon, label, ...props }: Omit<ButtonProps, 'children'> & { label: string; icon: string }) => {
35
- return <IconButton iconOnly label={label} icon={icon} size={5} variant='ghost' tooltipSide='bottom' {...props} />;
34
+ return <IconButton label={label} icon={icon} iconOnly variant='ghost' tooltipSide='bottom' {...props} />;
36
35
  };
37
36
 
38
- const plankControlSpacing = 'pli-2';
37
+ const plankControlSpacing = 'px-2';
39
38
 
40
39
  type PlankComplimentControlsProps = {
41
40
  primary?: string;
@@ -44,13 +43,12 @@ type PlankComplimentControlsProps = {
44
43
  export const PlankCompanionControls = forwardRef<HTMLDivElement, PlankComplimentControlsProps>(
45
44
  ({ primary }, forwardedRef) => {
46
45
  const { t } = useTranslation(meta.id);
47
- const { dispatchPromise: dispatch } = useIntentDispatcher();
46
+ const { invokePromise } = useOperationInvoker();
48
47
  const handleCloseCompanion = useCallback(() => {
49
- invariant(primary);
50
- return dispatch(createIntent(DeckAction.ChangeCompanion, { primary, companion: null }));
51
- }, []);
48
+ return invokePromise(DeckOperation.ChangeCompanion, { companion: null });
49
+ }, [invokePromise]);
52
50
  return (
53
- <div ref={forwardedRef} className='contents app-no-drag'>
51
+ <div ref={forwardedRef} className='contents dx-app-no-drag'>
54
52
  <PlankControl
55
53
  label={t('close companion label')}
56
54
  variant='ghost'
@@ -78,7 +76,7 @@ export const PlankControls = forwardRef<HTMLDivElement, PlankControlsProps>(
78
76
  const layoutIsAnySolo = !!layoutMode?.startsWith('solo');
79
77
 
80
78
  return (
81
- <ButtonGroup {...props} classNames={['app-no-drag !opacity-100', classNames]} ref={forwardedRef}>
79
+ <ButtonGroup {...props} classNames={['dx-app-no-drag opacity-100!', classNames]} ref={forwardedRef}>
82
80
  {capabilities.deck ? (
83
81
  <>
84
82
  {capabilities.solo && (
@@ -5,26 +5,14 @@
5
5
  import React, { useEffect, useState } from 'react';
6
6
 
7
7
  import { type Node } from '@dxos/plugin-graph';
8
- import { useTranslation } from '@dxos/react-ui';
9
- import { descriptionMessage, mx } from '@dxos/react-ui-theme';
8
+ import { ErrorFallback, type ErrorFallbackProps, useTranslation } from '@dxos/react-ui';
9
+ import { descriptionMessage, mx } from '@dxos/ui-theme';
10
10
 
11
11
  import { meta } from '../../meta';
12
12
 
13
13
  import { PlankHeading, type PlankHeadingProps } from './PlankHeading';
14
14
  import { PlankLoading } from './PlankLoading';
15
15
 
16
- export const PlankContentError = ({ error }: { error?: Error }) => {
17
- const { t } = useTranslation(meta.id);
18
- const errorString = error?.toString() ?? '';
19
- return (
20
- <div role='none' className='overflow-y-auto p-8 attention-surface grid place-items-center'>
21
- <p role='alert' className={mx(descriptionMessage, 'break-all rounded-md p-4')}>
22
- {error ? errorString : t('error fallback message')}
23
- </p>
24
- </div>
25
- );
26
- };
27
-
28
16
  export const PlankError = ({
29
17
  id,
30
18
  part,
@@ -33,17 +21,43 @@ export const PlankError = ({
33
21
  }: {
34
22
  id: string;
35
23
  part: PlankHeadingProps['part'];
36
- node?: Node;
24
+ node?: Node.Node;
37
25
  error?: Error;
38
26
  }) => {
39
27
  const [timedOut, setTimedOut] = useState(false);
40
28
  useEffect(() => {
41
- setTimeout(() => setTimedOut(true), 5e3);
29
+ const timer = setTimeout(() => setTimedOut(true), 5_000);
30
+ return () => clearTimeout(timer);
42
31
  }, []);
32
+
43
33
  return (
44
34
  <>
45
35
  <PlankHeading id={id} part={part} node={node} pending={!timedOut} />
46
- {timedOut ? <PlankContentError error={error} /> : <PlankLoading />}
36
+ {timedOut ? <PlankErrorFallback error={error} /> : <PlankLoading />}
47
37
  </>
48
38
  );
49
39
  };
40
+
41
+ /**
42
+ * User facing error fallback.
43
+ */
44
+ export const PlankErrorFallback = ({ error }: ErrorFallbackProps) => {
45
+ const { t } = useTranslation(meta.id);
46
+
47
+ if (process.env.NODE_ENV === 'development') {
48
+ return <ErrorFallback title='Plank Error' error={error} />;
49
+ } else {
50
+ const errorString = error?.toString() ?? '';
51
+ return (
52
+ <div
53
+ role='alert'
54
+ data-testid='plank-content-error'
55
+ className='dx-attention-surface overflow-y-auto p-8 grid place-items-center'
56
+ >
57
+ <p className={mx(descriptionMessage, 'break-all rounded-md p-4')}>
58
+ {error ? errorString : t('error fallback message')}
59
+ </p>
60
+ </div>
61
+ );
62
+ }
63
+ };
@@ -4,17 +4,19 @@
4
4
 
5
5
  import React, { Fragment, type MouseEvent, memo, useCallback, useEffect, useMemo } from 'react';
6
6
 
7
- import { LayoutAction, Surface, createIntent, useAppGraph, useIntentDispatcher } from '@dxos/app-framework';
8
- import { type Node } from '@dxos/plugin-graph';
7
+ import { Surface, useOperationInvoker } from '@dxos/app-framework/ui';
8
+ import { LayoutOperation } from '@dxos/app-toolkit';
9
+ import { useAppGraph } from '@dxos/app-toolkit/ui';
10
+ import { Graph, type Node, useActionRunner } from '@dxos/plugin-graph';
9
11
  import { Icon, IconButton, Popover, toLocalizedString, useTranslation } from '@dxos/react-ui';
10
12
  import { StackItem, type StackItemSigilAction } from '@dxos/react-ui-stack';
11
13
  import { TextTooltip } from '@dxos/react-ui-text-tooltip';
12
- import { hoverableControls, hoverableFocusedWithinControls } from '@dxos/react-ui-theme';
14
+ import { hoverableControls, hoverableFocusedWithinControls } from '@dxos/ui-theme';
13
15
 
14
16
  import { useBreakpoints } from '../../hooks';
15
17
  import { parseEntryId } from '../../layout';
16
18
  import { meta } from '../../meta';
17
- import { DeckAction, type LayoutMode, PLANK_COMPANION_TYPE, type ResolvedPart } from '../../types';
19
+ import { DeckOperation, type LayoutMode, PLANK_COMPANION_TYPE, type ResolvedPart } from '../../types';
18
20
  import { soloInlinePadding } from '../fragments';
19
21
 
20
22
  import { PlankCompanionControls, PlankControls } from './PlankControls';
@@ -25,7 +27,7 @@ export type PlankHeadingProps = {
25
27
  id: string;
26
28
  part: ResolvedPart;
27
29
  layoutMode?: LayoutMode;
28
- node?: Node;
30
+ node?: Node.Node;
29
31
  deckEnabled?: boolean;
30
32
  canIncrementStart?: boolean;
31
33
  canIncrementEnd?: boolean;
@@ -33,7 +35,7 @@ export type PlankHeadingProps = {
33
35
  primaryId?: string;
34
36
  pending?: boolean;
35
37
  companioned?: 'primary' | 'companion';
36
- companions?: Node[];
38
+ companions?: Node.Node[];
37
39
  actions?: StackItemSigilAction[];
38
40
  };
39
41
 
@@ -54,7 +56,8 @@ export const PlankHeading = memo(
54
56
  actions = [],
55
57
  }: PlankHeadingProps) => {
56
58
  const { t } = useTranslation(meta.id);
57
- const { dispatchPromise: dispatch } = useIntentDispatcher();
59
+ const { invokePromise, invokeSync } = useOperationInvoker();
60
+ const runAction = useActionRunner();
58
61
  const { graph } = useAppGraph();
59
62
  const breakpoint = useBreakpoints();
60
63
  const icon = node?.properties?.icon ?? 'ph--placeholder--regular';
@@ -68,7 +71,7 @@ export const PlankHeading = memo(
68
71
  const frame = requestAnimationFrame(() => {
69
72
  // Load actions for the node.
70
73
  if (node) {
71
- void graph.expand(node.id);
74
+ void Graph.expand(graph, node.id, 'child');
72
75
  }
73
76
  });
74
77
 
@@ -97,42 +100,37 @@ export const PlankHeading = memo(
97
100
  } else {
98
101
  return [
99
102
  actions,
100
- graph
101
- .getActions(node.id)
102
- .filter((a) => ['list-item', 'list-item-primary', 'heading-list-item'].includes(a.properties.disposition)),
103
+ Graph.getActions(graph, node.id).filter((a) =>
104
+ ['list-item', 'list-item-primary', 'heading-list-item'].includes(a.properties.disposition),
105
+ ),
103
106
  ].filter((a) => a.length > 0);
104
107
  }
105
108
  }, [actions, node, variant, graph]);
106
109
 
107
110
  const handleAction = useCallback(
108
111
  (action: StackItemSigilAction) => {
109
- typeof action.data === 'function' && void action.data?.({ parent: node, caller: meta.id });
112
+ if (typeof action.data === 'function') {
113
+ void runAction(action as Node.Action, { parent: node, caller: meta.id });
114
+ }
110
115
  },
111
- [node],
116
+ [node, runAction],
112
117
  );
113
118
 
114
119
  const handlePlankAction = useCallback(
115
- (eventType: DeckAction.PartAdjustment) => {
120
+ (eventType: DeckOperation.PartAdjustment) => {
116
121
  if (eventType.startsWith('solo')) {
117
- return dispatch(createIntent(DeckAction.Adjust, { type: eventType, id }));
122
+ return invokePromise(DeckOperation.Adjust, { type: eventType, id });
118
123
  } else if (eventType === 'close') {
119
124
  if (part === 'complementary') {
120
- return dispatch(
121
- createIntent(LayoutAction.UpdateComplementary, {
122
- part: 'complementary',
123
- options: { state: 'collapsed' },
124
- }),
125
- );
125
+ return invokeSync(LayoutOperation.UpdateComplementary, { state: 'collapsed' });
126
126
  } else {
127
- return dispatch(
128
- createIntent(LayoutAction.Close, { part: 'main', subject: [id], options: { state: false } }),
129
- );
127
+ return invokeSync(LayoutOperation.Close, { subject: [id] });
130
128
  }
131
129
  } else {
132
- return dispatch(createIntent(DeckAction.Adjust, { type: eventType, id }));
130
+ return invokePromise(DeckOperation.Adjust, { type: eventType, id });
133
131
  }
134
132
  },
135
- [dispatch, id, part],
133
+ [invokePromise, invokeSync, id, part],
136
134
  );
137
135
 
138
136
  const ActionRoot = node && popoverAnchorId === `dxos.org/ui/${meta.id}/${node.id}` ? Popover.Anchor : Fragment;
@@ -141,28 +139,24 @@ export const PlankHeading = memo(
141
139
  (event: MouseEvent) => {
142
140
  const target = (event.target as HTMLElement).closest('[data-id]') as HTMLElement | null;
143
141
  const tabId = target?.dataset?.id;
144
- if (primaryId && tabId) {
145
- void dispatch(
146
- createIntent(DeckAction.ChangeCompanion, {
147
- primary: primaryId,
148
- companion: tabId,
149
- }),
150
- );
142
+ if (tabId) {
143
+ void invokePromise(DeckOperation.ChangeCompanion, { companion: tabId });
151
144
  }
152
145
  },
153
- [primaryId],
146
+ [invokePromise],
154
147
  );
155
148
 
156
149
  return (
157
150
  <StackItem.Heading
158
151
  classNames={[
159
- 'plb-1 items-stretch gap-1 sticky inline-start-12 app-drag min-is-0 contain-layout density-coarse',
160
- part === 'solo' ? soloInlinePadding : 'pli-1',
152
+ 'py-1 items-stretch gap-1 sticky left-12 dx-app-drag min-w-0 dx-contain-layout dx-density-coarse',
153
+ part === 'solo' ? soloInlinePadding : 'px-1',
161
154
  ...(layoutMode === 'solo--fullscreen'
162
155
  ? [
163
156
  hoverableControls,
164
157
  hoverableFocusedWithinControls,
165
- '*:transition-opacity *:opacity-[--controls-opacity] bg-transparent border-transparent transition-[background-color,border-color] hover-hover:hover:bg-headerSurface focus-within:bg-headerSurface hover-hover:hover:border-subduedSeparator focus-within:border-subduedSeparator',
158
+ '*:transition-opacity *:opacity-(--controls-opacity) bg-transparent border-transparent transition-[background-color,border-color]',
159
+ 'hover-hover:hover:bg-header-surface focus-within:bg-header-surface hover-hover:hover:border-subdued-separator focus-within:border-subdued-separator',
166
160
  ]
167
161
  : []),
168
162
  ]}
@@ -170,7 +164,7 @@ export const PlankHeading = memo(
170
164
  >
171
165
  {companions && isCompanionNode ? (
172
166
  /* TODO(thure): IMPORTANT: This is a tablist; it should be implemented as such. */
173
- <div role='none' className='flex-1 min-is-0 overflow-x-auto scrollbar-none flex gap-1'>
167
+ <div role='none' className='flex-1 min-w-0 overflow-x-auto scrollbar-none flex gap-1'>
174
168
  {companions.map(({ id, properties: { icon, label } }) => (
175
169
  <IconButton
176
170
  key={id}
@@ -178,7 +172,6 @@ export const PlankHeading = memo(
178
172
  icon={icon}
179
173
  iconOnly={companions.length > MAX_COMPANIONS && node?.id !== id}
180
174
  label={toLocalizedString(label, t)}
181
- size={5}
182
175
  variant={node?.id === id ? 'primary' : 'ghost'}
183
176
  onClick={handleTabClick}
184
177
  />
@@ -196,12 +189,12 @@ export const PlankHeading = memo(
196
189
  actions={sigilActions}
197
190
  onAction={handleAction}
198
191
  >
199
- <Surface role='menu-footer' data={{ subject: node.data }} />
192
+ <Surface.Surface role='menu-footer' data={{ subject: node.data }} />
200
193
  </StackItem.Sigil>
201
194
  ) : (
202
195
  <StackItem.SigilButton>
203
196
  <span className='sr-only'>{label}</span>
204
- <Icon icon={icon} size={5} />
197
+ <Icon icon={icon} />
205
198
  </StackItem.SigilButton>
206
199
  )}
207
200
  </ActionRoot>
@@ -216,7 +209,7 @@ export const PlankHeading = memo(
216
209
  </TextTooltip>
217
210
  </>
218
211
  )}
219
- {node && part !== 'complementary' && <Surface role='navbar-end' data={{ subject: node.data }} />}
212
+ {node && part !== 'complementary' && <Surface.Surface role='navbar-end' data={{ subject: node.data }} />}
220
213
  {companioned === 'companion' ? (
221
214
  <PlankCompanionControls primary={primaryId} />
222
215
  ) : (
@@ -6,5 +6,5 @@ import React from 'react';
6
6
 
7
7
  // TODO(burdon): Show skeleton: https://github.com/dxos/dxos/issues/8259
8
8
  export const PlankLoading = () => {
9
- return <div role='none' className='grid place-items-center attention-surface' />;
9
+ return <div role='none' className='grid place-items-center dx-attention-surface' />;
10
10
  };