@dxos/plugin-deck 0.8.4-main.c4373fc → 0.8.4-main.d05673bc65

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 (330) hide show
  1. package/dist/lib/browser/Banner-HXRXEUOZ.mjs +14 -0
  2. package/dist/lib/browser/Banner-HXRXEUOZ.mjs.map +7 -0
  3. package/dist/lib/browser/DeckSettings-HSSQKFNE.mjs +96 -0
  4. package/dist/lib/browser/DeckSettings-HSSQKFNE.mjs.map +7 -0
  5. package/dist/lib/browser/app-graph-builder-MP6INIM2.mjs +123 -0
  6. package/dist/lib/browser/app-graph-builder-MP6INIM2.mjs.map +7 -0
  7. package/dist/lib/browser/check-app-scheme-AUNCD2Y6.mjs +33 -0
  8. package/dist/lib/browser/check-app-scheme-AUNCD2Y6.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-3P2FJVXC.mjs +278 -0
  10. package/dist/lib/browser/chunk-3P2FJVXC.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-BJDEG7YZ.mjs +74 -0
  12. package/dist/lib/browser/chunk-BJDEG7YZ.mjs.map +7 -0
  13. package/dist/lib/browser/chunk-ITNJS5QX.mjs +1386 -0
  14. package/dist/lib/browser/chunk-ITNJS5QX.mjs.map +7 -0
  15. package/dist/lib/browser/chunk-L3RYMAV7.mjs +16 -0
  16. package/dist/lib/browser/chunk-L3RYMAV7.mjs.map +7 -0
  17. package/dist/lib/browser/chunk-TAHLKBDO.mjs +187 -0
  18. package/dist/lib/browser/chunk-TAHLKBDO.mjs.map +7 -0
  19. package/dist/lib/browser/index.mjs +84 -73
  20. package/dist/lib/browser/index.mjs.map +4 -4
  21. package/dist/lib/browser/meta.json +1 -1
  22. package/dist/lib/browser/operation-resolver-2TEGT4PG.mjs +639 -0
  23. package/dist/lib/browser/operation-resolver-2TEGT4PG.mjs.map +7 -0
  24. package/dist/lib/browser/react-root-AS4IOYDG.mjs +48 -0
  25. package/dist/lib/browser/react-root-AS4IOYDG.mjs.map +7 -0
  26. package/dist/lib/browser/react-surface-FH7TC6WW.mjs +44 -0
  27. package/dist/lib/browser/react-surface-FH7TC6WW.mjs.map +7 -0
  28. package/dist/lib/browser/settings-PTMGCSJH.mjs +40 -0
  29. package/dist/lib/browser/settings-PTMGCSJH.mjs.map +7 -0
  30. package/dist/lib/browser/state-MA4SQ7BE.mjs +106 -0
  31. package/dist/lib/browser/state-MA4SQ7BE.mjs.map +7 -0
  32. package/dist/lib/browser/toolkit-6B34QFU3.mjs +55 -0
  33. package/dist/lib/browser/toolkit-6B34QFU3.mjs.map +7 -0
  34. package/dist/lib/browser/types/index.mjs +14 -8
  35. package/dist/lib/browser/url-handler-FEUFPQIP.mjs +98 -0
  36. package/dist/lib/browser/url-handler-FEUFPQIP.mjs.map +7 -0
  37. package/dist/lib/node-esm/Banner-RN7XXOXY.mjs +15 -0
  38. package/dist/lib/node-esm/Banner-RN7XXOXY.mjs.map +7 -0
  39. package/dist/lib/node-esm/DeckSettings-DJRFLKQS.mjs +97 -0
  40. package/dist/lib/node-esm/DeckSettings-DJRFLKQS.mjs.map +7 -0
  41. package/dist/lib/node-esm/app-graph-builder-ACHG5HY7.mjs +124 -0
  42. package/dist/lib/node-esm/app-graph-builder-ACHG5HY7.mjs.map +7 -0
  43. package/dist/lib/node-esm/check-app-scheme-WN76GWVC.mjs +34 -0
  44. package/dist/lib/node-esm/check-app-scheme-WN76GWVC.mjs.map +7 -0
  45. package/dist/lib/node-esm/chunk-DGTRKKWZ.mjs +76 -0
  46. package/dist/lib/node-esm/chunk-DGTRKKWZ.mjs.map +7 -0
  47. package/dist/lib/node-esm/chunk-EMU4VIPH.mjs +188 -0
  48. package/dist/lib/node-esm/chunk-EMU4VIPH.mjs.map +7 -0
  49. package/dist/lib/node-esm/chunk-GZJAQ5IP.mjs +279 -0
  50. package/dist/lib/node-esm/chunk-GZJAQ5IP.mjs.map +7 -0
  51. package/dist/lib/node-esm/chunk-MBCCNIWY.mjs +1387 -0
  52. package/dist/lib/node-esm/chunk-MBCCNIWY.mjs.map +7 -0
  53. package/dist/lib/node-esm/chunk-XCNF4COU.mjs +18 -0
  54. package/dist/lib/node-esm/chunk-XCNF4COU.mjs.map +7 -0
  55. package/dist/lib/node-esm/index.mjs +185 -0
  56. package/dist/lib/node-esm/index.mjs.map +7 -0
  57. package/dist/lib/node-esm/meta.json +1 -0
  58. package/dist/lib/node-esm/operation-resolver-GCMCCI7A.mjs +640 -0
  59. package/dist/lib/node-esm/operation-resolver-GCMCCI7A.mjs.map +7 -0
  60. package/dist/lib/node-esm/react-root-7DTDLAF4.mjs +49 -0
  61. package/dist/lib/node-esm/react-root-7DTDLAF4.mjs.map +7 -0
  62. package/dist/lib/node-esm/react-surface-U6Z2K324.mjs +45 -0
  63. package/dist/lib/node-esm/react-surface-U6Z2K324.mjs.map +7 -0
  64. package/dist/lib/node-esm/settings-LPPFLXNJ.mjs +41 -0
  65. package/dist/lib/node-esm/settings-LPPFLXNJ.mjs.map +7 -0
  66. package/dist/lib/node-esm/state-KNRU3GDC.mjs +107 -0
  67. package/dist/lib/node-esm/state-KNRU3GDC.mjs.map +7 -0
  68. package/dist/lib/node-esm/toolkit-SOWYKJY3.mjs +56 -0
  69. package/dist/lib/node-esm/toolkit-SOWYKJY3.mjs.map +7 -0
  70. package/dist/lib/node-esm/types/index.mjs +39 -0
  71. package/dist/lib/node-esm/url-handler-4LEB7UWF.mjs +99 -0
  72. package/dist/lib/node-esm/url-handler-4LEB7UWF.mjs.map +7 -0
  73. package/dist/types/src/DeckPlugin.d.ts +2 -1
  74. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  75. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  76. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  77. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  78. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  79. package/dist/types/src/capabilities/check-app-scheme/check-app-scheme.d.ts +5 -0
  80. package/dist/types/src/capabilities/check-app-scheme/check-app-scheme.d.ts.map +1 -0
  81. package/dist/types/src/capabilities/check-app-scheme/index.d.ts +3 -0
  82. package/dist/types/src/capabilities/check-app-scheme/index.d.ts.map +1 -0
  83. package/dist/types/src/capabilities/index.d.ts +8 -13
  84. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  85. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  86. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  87. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  88. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  89. package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
  90. package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
  92. package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
  93. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  94. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  95. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  96. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  97. package/dist/types/src/capabilities/settings/index.d.ts +19 -0
  98. package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
  99. package/dist/types/src/capabilities/settings/settings.d.ts +22 -0
  100. package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
  101. package/dist/types/src/capabilities/state/index.d.ts +172 -0
  102. package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
  103. package/dist/types/src/capabilities/state/state.d.ts +175 -0
  104. package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
  105. package/dist/types/src/capabilities/toolkit/index.d.ts +3 -0
  106. package/dist/types/src/capabilities/toolkit/index.d.ts.map +1 -0
  107. package/dist/types/src/capabilities/toolkit/toolkit.d.ts +27 -0
  108. package/dist/types/src/capabilities/toolkit/toolkit.d.ts.map +1 -0
  109. package/dist/types/src/capabilities/tools/index.d.ts +3 -0
  110. package/dist/types/src/capabilities/tools/index.d.ts.map +1 -0
  111. package/dist/types/src/capabilities/tools/tools.d.ts +12 -0
  112. package/dist/types/src/capabilities/tools/tools.d.ts.map +1 -0
  113. package/dist/types/src/capabilities/url-handler/index.d.ts +3 -0
  114. package/dist/types/src/capabilities/url-handler/index.d.ts.map +1 -0
  115. package/dist/types/src/capabilities/url-handler/url-handler.d.ts +5 -0
  116. package/dist/types/src/capabilities/url-handler/url-handler.d.ts.map +1 -0
  117. package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +1 -1
  118. package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +1 -1
  119. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +2 -3
  120. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
  121. package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts +75 -0
  122. package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts.map +1 -0
  123. package/dist/types/src/components/DeckLayout/DeckMain.d.ts +3 -0
  124. package/dist/types/src/components/DeckLayout/DeckMain.d.ts.map +1 -0
  125. package/dist/types/src/components/DeckLayout/Dialog.d.ts.map +1 -1
  126. package/dist/types/src/components/DeckLayout/Fallback.d.ts.map +1 -1
  127. package/dist/types/src/components/DeckLayout/Popover.d.ts.map +1 -1
  128. package/dist/types/src/components/DeckLayout/Toast.d.ts +7 -2
  129. package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
  130. package/dist/types/src/components/Plank/Plank.d.ts +5 -5
  131. package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
  132. package/dist/types/src/components/Plank/Plank.stories.d.ts +27 -7
  133. package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -1
  134. package/dist/types/src/components/Plank/PlankControls.d.ts +1 -1
  135. package/dist/types/src/components/Plank/PlankControls.d.ts.map +1 -1
  136. package/dist/types/src/components/Plank/PlankError.d.ts +6 -4
  137. package/dist/types/src/components/Plank/PlankError.d.ts.map +1 -1
  138. package/dist/types/src/components/Plank/PlankHeading.d.ts +2 -2
  139. package/dist/types/src/components/Plank/PlankHeading.d.ts.map +1 -1
  140. package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +1 -1
  141. package/dist/types/src/components/Sidebar/Sidebar.d.ts.map +1 -1
  142. package/dist/types/src/components/Sidebar/SidebarButton.d.ts.map +1 -1
  143. package/dist/types/src/components/fragments.d.ts +4 -1
  144. package/dist/types/src/components/fragments.d.ts.map +1 -1
  145. package/dist/types/src/components/index.d.ts +0 -1
  146. package/dist/types/src/components/index.d.ts.map +1 -1
  147. package/dist/types/src/containers/Banner/Banner.d.ts +2 -0
  148. package/dist/types/src/containers/Banner/Banner.d.ts.map +1 -0
  149. package/dist/types/src/containers/Banner/index.d.ts +3 -0
  150. package/dist/types/src/containers/Banner/index.d.ts.map +1 -0
  151. package/dist/types/src/containers/DeckSettings/DeckSettings.d.ts +8 -0
  152. package/dist/types/src/containers/DeckSettings/DeckSettings.d.ts.map +1 -0
  153. package/dist/types/src/containers/DeckSettings/index.d.ts +3 -0
  154. package/dist/types/src/containers/DeckSettings/index.d.ts.map +1 -0
  155. package/dist/types/src/containers/index.d.ts +4 -0
  156. package/dist/types/src/containers/index.d.ts.map +1 -0
  157. package/dist/types/src/hooks/index.d.ts +2 -0
  158. package/dist/types/src/hooks/index.d.ts.map +1 -1
  159. package/dist/types/src/hooks/useDeckCompanions.d.ts +3 -4
  160. package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
  161. package/dist/types/src/hooks/useDeckState.d.ts +17 -0
  162. package/dist/types/src/hooks/useDeckState.d.ts.map +1 -0
  163. package/dist/types/src/hooks/useHoistStatusbar.d.ts +1 -1
  164. package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +1 -1
  165. package/dist/types/src/hooks/useMainSize.d.ts +2 -2
  166. package/dist/types/src/hooks/useNodeActionExpander.d.ts +1 -1
  167. package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
  168. package/dist/types/src/hooks/useSelectedCompanion.d.ts +13 -0
  169. package/dist/types/src/hooks/useSelectedCompanion.d.ts.map +1 -0
  170. package/dist/types/src/index.d.ts +1 -2
  171. package/dist/types/src/index.d.ts.map +1 -1
  172. package/dist/types/src/layout.d.ts +1 -7
  173. package/dist/types/src/layout.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 +3 -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 +100 -38
  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 +558 -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 +98 -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 +53 -0
  216. package/src/components/DeckLayout/DeckLayout.tsx +17 -285
  217. package/src/components/DeckLayout/DeckMain.tsx +287 -0
  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 +28 -3
  223. package/src/components/Plank/Plank.stories.tsx +19 -9
  224. package/src/components/Plank/Plank.tsx +105 -63
  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 +37 -45
  228. package/src/components/Plank/PlankLoading.tsx +1 -1
  229. package/src/components/Sidebar/ComplementarySidebar.tsx +72 -48
  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/containers/DeckSettings/DeckSettings.tsx +113 -0
  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 +7 -10
  242. package/src/hooks/useDeckState.ts +82 -0
  243. package/src/hooks/useHoistStatusbar.ts +4 -5
  244. package/src/hooks/useMainSize.ts +2 -2
  245. package/src/hooks/useNodeActionExpander.ts +4 -4
  246. package/src/hooks/useSelectedCompanion.ts +32 -0
  247. package/src/index.ts +1 -2
  248. package/src/layout.ts +1 -14
  249. package/src/meta.ts +8 -3
  250. package/src/translations.ts +3 -1
  251. package/src/types/capabilities.ts +33 -0
  252. package/src/types/events.ts +21 -0
  253. package/src/types/index.ts +2 -0
  254. package/src/types/schema.ts +98 -25
  255. package/src/util/layoutAppliesTopbar.ts +1 -1
  256. package/src/util/overscroll.ts +3 -3
  257. package/src/util/set-active.ts +49 -29
  258. package/dist/lib/browser/app-graph-builder-YYP67JHW.mjs +0 -153
  259. package/dist/lib/browser/app-graph-builder-YYP67JHW.mjs.map +0 -7
  260. package/dist/lib/browser/check-app-scheme-GCOL6YDT.mjs +0 -32
  261. package/dist/lib/browser/check-app-scheme-GCOL6YDT.mjs.map +0 -7
  262. package/dist/lib/browser/chunk-3SV2V3AN.mjs +0 -1495
  263. package/dist/lib/browser/chunk-3SV2V3AN.mjs.map +0 -7
  264. package/dist/lib/browser/chunk-A4SRCSJX.mjs +0 -160
  265. package/dist/lib/browser/chunk-A4SRCSJX.mjs.map +0 -7
  266. package/dist/lib/browser/chunk-CNTGBCMK.mjs +0 -145
  267. package/dist/lib/browser/chunk-CNTGBCMK.mjs.map +0 -7
  268. package/dist/lib/browser/chunk-HUWUYTOI.mjs +0 -16
  269. package/dist/lib/browser/chunk-HUWUYTOI.mjs.map +0 -7
  270. package/dist/lib/browser/chunk-JH4ZCG5I.mjs +0 -129
  271. package/dist/lib/browser/chunk-JH4ZCG5I.mjs.map +0 -7
  272. package/dist/lib/browser/chunk-MHP4GPX5.mjs +0 -11
  273. package/dist/lib/browser/chunk-MHP4GPX5.mjs.map +0 -7
  274. package/dist/lib/browser/chunk-YRDCQS7E.mjs +0 -127
  275. package/dist/lib/browser/chunk-YRDCQS7E.mjs.map +0 -7
  276. package/dist/lib/browser/intent-resolver-2NFDKRFG.mjs +0 -524
  277. package/dist/lib/browser/intent-resolver-2NFDKRFG.mjs.map +0 -7
  278. package/dist/lib/browser/react-root-JTWYCDJT.mjs +0 -43
  279. package/dist/lib/browser/react-root-JTWYCDJT.mjs.map +0 -7
  280. package/dist/lib/browser/react-surface-PZKJ73JS.mjs +0 -40
  281. package/dist/lib/browser/react-surface-PZKJ73JS.mjs.map +0 -7
  282. package/dist/lib/browser/settings-JK7UIZSB.mjs +0 -29
  283. package/dist/lib/browser/settings-JK7UIZSB.mjs.map +0 -7
  284. package/dist/lib/browser/state-IFKFOBBX.mjs +0 -12
  285. package/dist/lib/browser/toolkit-L7C3UAEU.mjs +0 -63
  286. package/dist/lib/browser/toolkit-L7C3UAEU.mjs.map +0 -7
  287. package/dist/lib/browser/url-handler-MRYBE3HF.mjs +0 -70
  288. package/dist/lib/browser/url-handler-MRYBE3HF.mjs.map +0 -7
  289. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  290. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  291. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  292. package/dist/types/src/capabilities/check-app-scheme.d.ts +0 -4
  293. package/dist/types/src/capabilities/check-app-scheme.d.ts.map +0 -1
  294. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  295. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  296. package/dist/types/src/capabilities/react-root.d.ts +0 -7
  297. package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
  298. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  299. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  300. package/dist/types/src/capabilities/settings.d.ts +0 -4
  301. package/dist/types/src/capabilities/settings.d.ts.map +0 -1
  302. package/dist/types/src/capabilities/state.d.ts +0 -101
  303. package/dist/types/src/capabilities/state.d.ts.map +0 -1
  304. package/dist/types/src/capabilities/toolkit.d.ts +0 -6
  305. package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
  306. package/dist/types/src/capabilities/tools.d.ts +0 -11
  307. package/dist/types/src/capabilities/tools.d.ts.map +0 -1
  308. package/dist/types/src/capabilities/url-handler.d.ts +0 -4
  309. package/dist/types/src/capabilities/url-handler.d.ts.map +0 -1
  310. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts +0 -6
  311. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +0 -1
  312. package/dist/types/src/components/DeckSettings/index.d.ts +0 -2
  313. package/dist/types/src/components/DeckSettings/index.d.ts.map +0 -1
  314. package/dist/types/src/events.d.ts +0 -4
  315. package/dist/types/src/events.d.ts.map +0 -1
  316. package/src/capabilities/app-graph-builder.ts +0 -143
  317. package/src/capabilities/capabilities.ts +0 -14
  318. package/src/capabilities/check-app-scheme.ts +0 -40
  319. package/src/capabilities/intent-resolver.ts +0 -472
  320. package/src/capabilities/react-root.tsx +0 -39
  321. package/src/capabilities/react-surface.tsx +0 -30
  322. package/src/capabilities/settings.ts +0 -26
  323. package/src/capabilities/state.ts +0 -105
  324. package/src/capabilities/toolkit.ts +0 -57
  325. package/src/capabilities/tools.ts +0 -84
  326. package/src/capabilities/url-handler.ts +0 -60
  327. package/src/components/DeckSettings/DeckSettings.tsx +0 -97
  328. package/src/components/DeckSettings/index.ts +0 -5
  329. package/src/events.ts +0 -11
  330. /package/dist/lib/{browser/state-IFKFOBBX.mjs.map → node-esm/types/index.mjs.map} +0 -0
@@ -3,12 +3,16 @@
3
3
  //
4
4
 
5
5
  import { createContext } from '@radix-ui/react-context';
6
- import React, { type PropsWithChildren, useCallback, useEffect, useMemo, useRef, useState } from 'react';
6
+ import React, { type PropsWithChildren, useCallback, useEffect, useRef, useState } from 'react';
7
7
 
8
- import { Surface, useCapability } from '@dxos/app-framework';
9
- import { Popover, type PopoverContentInteractOutsideEvent } from '@dxos/react-ui';
8
+ import { Surface, useOperationInvoker } from '@dxos/app-framework/ui';
9
+ import { LayoutOperation } from '@dxos/app-toolkit';
10
+ import { useObjectNavigate } from '@dxos/app-toolkit/ui';
11
+ import { Popover, type PopoverContentInteractOutsideEvent, toLocalizedString, useTranslation } from '@dxos/react-ui';
12
+ import { Card } from '@dxos/react-ui';
10
13
 
11
- import { DeckCapabilities } from '../../capabilities';
14
+ import { useDeckState } from '../../hooks';
15
+ import { meta } from '../../meta';
12
16
 
13
17
  export type DeckPopoverRootProps = PropsWithChildren<{}>;
14
18
 
@@ -21,43 +25,61 @@ type DeckPopoverContextValue = {
21
25
  const [DeckPopoverProvider, useDeckPopoverContext] = createContext<DeckPopoverContextValue>('DeckPopover');
22
26
 
23
27
  export const PopoverRoot = ({ children }: DeckPopoverRootProps) => {
24
- const layout = useCapability(DeckCapabilities.MutableDeckState);
28
+ const { state } = useDeckState();
25
29
  const virtualRef = useRef<HTMLButtonElement | null>(null);
26
30
  const [virtualIter, setVirtualIter] = useState(0);
27
31
  const [open, setOpen] = useState(false);
28
32
  const debounceRef = useRef<NodeJS.Timeout | null>(null);
29
33
 
30
34
  // TODO(thure): This is a workaround for the race condition between displaying a Popover and either rendering
31
- // the anchor further down the tree or measuring the virtual triggers client rect.
35
+ // the anchor further down the tree or measuring the virtual trigger's client rect.
32
36
  useEffect(() => {
33
37
  setOpen(false);
34
- if (layout.popoverOpen) {
38
+ if (state.popoverOpen) {
35
39
  if (debounceRef.current) {
36
40
  clearTimeout(debounceRef.current);
37
41
  }
38
- if (layout.popoverAnchor && virtualRef.current !== layout.popoverAnchor) {
39
- virtualRef.current = layout.popoverAnchor ?? null;
42
+ if (state.popoverAnchor && virtualRef.current !== state.popoverAnchor) {
43
+ virtualRef.current = state.popoverAnchor ?? null;
40
44
  setVirtualIter((iter) => iter + 1);
41
45
  }
42
46
  debounceRef.current = setTimeout(() => setOpen(true), DEBOUNCE_DELAY);
43
47
  }
44
- }, [layout.popoverOpen, layout.popoverAnchorId, layout.popoverAnchor, layout.popoverContent]);
48
+ }, [state.popoverOpen, state.popoverAnchorId, state.popoverAnchor, state.popoverContent]);
45
49
 
46
50
  return (
47
51
  <DeckPopoverProvider setOpen={setOpen}>
48
52
  <Popover.Root modal={false} open={open}>
49
- {layout.popoverAnchor && <Popover.VirtualTrigger key={virtualIter} virtualRef={virtualRef} />}
53
+ {state.popoverAnchor && <Popover.VirtualTrigger key={virtualIter} virtualRef={virtualRef} />}
50
54
  {children}
51
55
  </Popover.Root>
52
56
  </DeckPopoverProvider>
53
57
  );
54
58
  };
55
59
 
60
+ // Extracts the subject from popover content if it has one, otherwise returns the content as-is.
61
+ const getPopoverSubject = (content: unknown): unknown =>
62
+ content && typeof content === 'object' && 'subject' in content ? (content as { subject: unknown }).subject : content;
63
+
56
64
  export const PopoverContent = () => {
57
- const layout = useCapability(DeckCapabilities.MutableDeckState);
65
+ const { t } = useTranslation(meta.id);
66
+ const { state, updateEphemeral } = useDeckState();
58
67
  const { setOpen } = useDeckPopoverContext('PopoverContent');
68
+ const { invokeSync } = useOperationInvoker();
69
+ const handleNavigate = useObjectNavigate(getPopoverSubject(state.popoverContent));
70
+
71
+ const handleClose = useCallback(() => {
72
+ setOpen(false);
73
+ updateEphemeral((state) => ({
74
+ ...state,
75
+ popoverOpen: false,
76
+ popoverAnchor: undefined,
77
+ popoverAnchorId: undefined,
78
+ popoverSide: undefined,
79
+ }));
80
+ }, [updateEphemeral]);
59
81
 
60
- const handleClose = useCallback(
82
+ const handleInteractOutside = useCallback(
61
83
  (event: KeyboardEvent | PopoverContentInteractOutsideEvent) => {
62
84
  if (
63
85
  // TODO(thure): CodeMirror should not focus itself when it updates.
@@ -66,36 +88,52 @@ export const PopoverContent = () => {
66
88
  ) {
67
89
  event.preventDefault();
68
90
  } else {
69
- setOpen(false);
70
- layout.popoverOpen = false;
71
- layout.popoverAnchor = undefined;
72
- layout.popoverAnchorId = undefined;
73
- layout.popoverSide = undefined;
91
+ handleClose();
74
92
  }
75
93
  },
76
- [setOpen],
94
+ [handleClose],
77
95
  );
78
96
 
79
- const collisionBoundaries: HTMLElement[] = useMemo(() => {
80
- const closest = layout.popoverAnchor?.closest('[data-popover-collision-boundary]') as
81
- | HTMLElement
82
- | null
83
- | undefined;
84
- return closest ? [closest] : [];
85
- }, [layout.popoverAnchor]);
86
-
87
97
  return (
88
98
  <Popover.Portal>
89
99
  <Popover.Content
90
- side={layout.popoverSide}
91
- onInteractOutside={handleClose}
92
- onEscapeKeyDown={handleClose}
93
- collisionBoundary={collisionBoundaries}
100
+ side={state.popoverSide}
94
101
  sticky='always'
95
102
  hideWhenDetached
103
+ onInteractOutside={handleInteractOutside}
104
+ onEscapeKeyDown={handleInteractOutside}
96
105
  >
97
106
  <Popover.Viewport>
98
- <Surface role='card--popover' data={layout.popoverContent} limit={1} />
107
+ {/* TODO(burdon): Set/disable column context. */}
108
+ {state.popoverKind === 'base' && <Surface.Surface role='popover' data={state.popoverContent} limit={1} />}
109
+ {state.popoverKind === 'card' && (
110
+ <Card.Root border={false} classNames='dx-card-popover'>
111
+ <Card.Toolbar>
112
+ {/* TODO(wittjosiah): Cleaner way to handle no drag handle in toolbar? */}
113
+ {state.popoverContentRef ? (
114
+ <Card.ToolbarIconButton
115
+ icon='ph--arrow-square-out--regular'
116
+ iconOnly
117
+ label={t('open item label')}
118
+ onClick={() => {
119
+ invokeSync(LayoutOperation.Open, {
120
+ subject: [state.popoverContentRef!],
121
+ });
122
+ }}
123
+ />
124
+ ) : (
125
+ <div />
126
+ )}
127
+ {state.popoverTitle ? (
128
+ <Card.Title onClick={handleNavigate}>{toLocalizedString(state.popoverTitle, t)}</Card.Title>
129
+ ) : (
130
+ <span />
131
+ )}
132
+ <Card.CloseIconButton onClick={handleClose} />
133
+ </Card.Toolbar>
134
+ <Surface.Surface role='card--content' data={state.popoverContent} limit={1} />
135
+ </Card.Root>
136
+ )}
99
137
  </Popover.Viewport>
100
138
  <Popover.Arrow />
101
139
  </Popover.Content>
@@ -4,7 +4,7 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { Surface } from '@dxos/app-framework';
7
+ import { Surface } from '@dxos/app-framework/ui';
8
8
  import { useLandmarkMover } from '@dxos/react-ui';
9
9
 
10
10
  export const StatusBar = ({ showHints }: { showHints?: boolean }) => {
@@ -12,11 +12,11 @@ export const StatusBar = ({ showHints }: { showHints?: boolean }) => {
12
12
  return (
13
13
  <div
14
14
  role='contentinfo'
15
- className='fixed block-end-0 inset-inline-0 bs-[--statusbar-size] border-bs border-separator z-[2] flex text-description'
15
+ className='fixed bottom-0 inset-x-0 h-(--dx-statusbar-size) border-y border-separator z-[2] flex text-description'
16
16
  {...mover}
17
17
  >
18
- {showHints && <Surface role='hints' limit={1} />}
19
- <Surface role='status-bar' limit={1} />
18
+ {showHints && <Surface.Surface role='hints' limit={1} />}
19
+ <Surface.Surface role='status-bar' limit={1} />
20
20
  </div>
21
21
  );
22
22
  };
@@ -4,7 +4,7 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { type LayoutAction } from '@dxos/app-framework';
7
+ import { type LayoutOperation } from '@dxos/app-toolkit';
8
8
  import {
9
9
  Button,
10
10
  Icon,
@@ -28,14 +28,14 @@ export const Toast = ({
28
28
  closeLabel,
29
29
  onAction,
30
30
  onOpenChange,
31
- }: LayoutAction.Toast & Pick<ToastRootProps, 'onOpenChange'>) => {
31
+ }: LayoutOperation.Toast & Pick<ToastRootProps, 'onOpenChange'>) => {
32
32
  const { t } = useTranslation(meta.id);
33
33
 
34
34
  return (
35
35
  <NaturalToast.Root data-testid={id} defaultOpen duration={duration} onOpenChange={onOpenChange}>
36
36
  <NaturalToast.Body>
37
37
  <NaturalToast.Title classNames='items-center'>
38
- {icon && <Icon icon={icon} size={5} classNames='inline mr-1' />}
38
+ {icon && <Icon icon={icon} classNames='inline mr-1' />}
39
39
  {title && <span>{toLocalizedString(title, t)}</span>}
40
40
  </NaturalToast.Title>
41
41
  {description && (
@@ -59,3 +59,28 @@ export const Toast = ({
59
59
  </NaturalToast.Root>
60
60
  );
61
61
  };
62
+
63
+ export type ToasterProps = {
64
+ toasts?: LayoutOperation.Toast[];
65
+ onDismissToast?: (id: string) => void;
66
+ };
67
+
68
+ export const Toaster = ({ toasts, onDismissToast }: ToasterProps) => {
69
+ return (
70
+ <>
71
+ {toasts?.map((toast) => (
72
+ <Toast
73
+ {...toast}
74
+ key={toast.id}
75
+ onOpenChange={(open: boolean) => {
76
+ if (!open) {
77
+ onDismissToast?.(toast.id);
78
+ }
79
+
80
+ return open;
81
+ }}
82
+ />
83
+ ))}
84
+ </>
85
+ );
86
+ };
@@ -5,20 +5,30 @@
5
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
  import React from 'react';
7
7
 
8
- import { IntentPlugin, SettingsPlugin } from '@dxos/app-framework';
8
+ import { Capability, Plugin } from '@dxos/app-framework';
9
9
  import { withPluginManager } from '@dxos/app-framework/testing';
10
- import { AttentionPlugin } from '@dxos/plugin-attention';
11
- import { GraphPlugin } from '@dxos/plugin-graph';
12
- import { withTheme } from '@dxos/react-ui/testing';
10
+ import { AppActivationEvents } from '@dxos/app-toolkit';
11
+ import { corePlugins } from '@dxos/plugin-testing';
12
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
13
13
  import { Stack } from '@dxos/react-ui-stack';
14
14
 
15
- import { DeckStateFactory } from '../../capabilities';
15
+ import { DeckState } from '../../capabilities';
16
+ import { meta as pluginMeta } from '../../meta';
16
17
  import { translations } from '../../translations';
17
18
 
18
19
  import { Plank } from './Plank';
19
20
 
21
+ const TestPlugin = Plugin.define(pluginMeta).pipe(
22
+ Plugin.addModule({
23
+ id: Capability.getModuleTag(DeckState),
24
+ activatesOn: AppActivationEvents.AppGraphReady,
25
+ activate: () => DeckState(),
26
+ }),
27
+ Plugin.make,
28
+ );
29
+
20
30
  const meta = {
21
- title: 'plugins/plugin-deck/Plank',
31
+ title: 'plugins/plugin-deck/components/Plank',
22
32
  component: Plank,
23
33
  render: (args) => {
24
34
  return (
@@ -28,10 +38,10 @@ const meta = {
28
38
  );
29
39
  },
30
40
  decorators: [
31
- withTheme,
41
+ withTheme(),
42
+ withLayout({ layout: 'fullscreen' }),
32
43
  withPluginManager({
33
- plugins: [AttentionPlugin(), SettingsPlugin(), IntentPlugin(), GraphPlugin()],
34
- capabilities: () => DeckStateFactory(),
44
+ plugins: [...corePlugins(), TestPlugin()],
35
45
  }),
36
46
  ],
37
47
  parameters: {
@@ -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,37 @@ 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, getCompanionVariant } 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
- import { ATTENDABLE_PATH_SEPARATOR, useAttentionAttributes } from '@dxos/react-ui-attention';
21
+ import { 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';
31
- import { parseEntryId } from '../../layout';
32
- import { DeckAction, type DeckSettingsProps, type LayoutMode, type ResolvedPart } from '../../types';
25
+ import { useCompanions, useDeckState, useMainSize, useSelectedCompanion } from '../../hooks';
26
+ import {
27
+ DeckOperation,
28
+ type DeckSettingsProps,
29
+ type LayoutMode,
30
+ PLANK_COMPANION_TYPE,
31
+ type ResolvedPart,
32
+ } from '../../types';
33
33
 
34
- import { PlankContentError, PlankError } from './PlankError';
34
+ import { PlankError, PlankErrorFallback } from './PlankError';
35
35
  import { PlankHeading } from './PlankHeading';
36
36
  import { PlankLoading } from './PlankLoading';
37
37
 
38
38
  const UNKNOWN_ID = 'unknown_id';
39
39
 
40
+ //
41
+ // Plank
42
+ //
43
+
40
44
  export type PlankProps = Pick<PlankComponentProps, 'layoutMode' | 'part' | 'path' | 'order' | 'active' | 'settings'> & {
41
45
  id?: string;
42
- companionId?: string;
46
+ companionVariant?: string;
43
47
  };
44
48
 
45
49
  // TODO(burdon): Factor out conditional rendering.
@@ -50,25 +54,31 @@ export type PlankProps = Pick<PlankComponentProps, 'layoutMode' | 'part' | 'path
50
54
  // benefits. I think where we anticipate users will definitely want to quickly switch between showing and hiding entire
51
55
  // articles, over the (again probably large) performance benefit that unmounting them would confer, we can mount and
52
56
  // 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
57
+ // the scenario to include all "potential" planks such as companions, which we could keep mounted and hidden, but I
58
+ // don't think the resulting performance would be acceptable. I think the real issue is "perceived performance" which
55
59
  // 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
60
+ // "partially-mounted" experiences, like loading skeletons at the simple end, or screenshots of "sleeping" planks at
57
61
  // the advanced end.
58
62
 
59
63
  /**
60
64
  * A Plank is the main container for surfaces within a Deck.
61
65
  * It may be paired with a companion plank that enables the user to select one of multiple companion surfaces.
62
66
  */
63
- export const Plank = memo(({ id = UNKNOWN_ID, companionId, ...props }: PlankProps) => {
67
+ export const Plank = memo(({ id = UNKNOWN_ID, companionVariant, ...props }: PlankProps) => {
64
68
  const { graph } = useAppGraph();
65
69
  const node = useNode(graph, id);
66
70
  const companions = useCompanions(id);
67
- const currentCompanion = companions.find(({ id }) => id === companionId);
68
- const hasCompanion = !!(companionId && currentCompanion);
71
+ const { companionId } = useSelectedCompanion(companions, companionVariant);
72
+ const resolvedCompanionId = companionVariant ? companionId : undefined;
73
+ const currentCompanion = companions.find(({ id }) => id === resolvedCompanionId);
74
+ const hasCompanion = !!(resolvedCompanionId && currentCompanion);
69
75
 
70
76
  return (
71
- <PlankContainer solo={props.part === 'solo'} companion={hasCompanion}>
77
+ <PlankContainer
78
+ solo={props.part === 'solo'}
79
+ companion={hasCompanion}
80
+ encapsulate={!!props.settings?.encapsulatedPlanks}
81
+ >
72
82
  <PlankComponent
73
83
  id={id}
74
84
  node={node}
@@ -79,7 +89,7 @@ export const Plank = memo(({ id = UNKNOWN_ID, companionId, ...props }: PlankProp
79
89
  />
80
90
  {hasCompanion && (
81
91
  <PlankComponent
82
- id={companionId}
92
+ id={resolvedCompanionId}
83
93
  node={currentCompanion}
84
94
  primary={node}
85
95
  companions={companions}
@@ -92,7 +102,13 @@ export const Plank = memo(({ id = UNKNOWN_ID, companionId, ...props }: PlankProp
92
102
  );
93
103
  });
94
104
 
95
- const PlankContainer = ({ children, solo, companion }: PropsWithChildren<{ solo: boolean; companion: boolean }>) => {
105
+ //
106
+ // PlankContainer
107
+ //
108
+
109
+ type PlankContainerProps = PropsWithChildren<{ solo: boolean; companion: boolean; encapsulate: boolean }>;
110
+
111
+ const PlankContainer = ({ children, solo, companion, encapsulate }: PlankContainerProps) => {
96
112
  const sizeAttrs = useMainSize();
97
113
  if (!solo) {
98
114
  return children;
@@ -102,7 +118,14 @@ const PlankContainer = ({ children, solo, companion }: PropsWithChildren<{ solo:
102
118
  return (
103
119
  <div
104
120
  role='none'
105
- className={mx('absolute inset-0 grid', companion && 'grid-cols-[6fr_4fr]', railGridHorizontal, mainIntrinsicSize)}
121
+ data-popover-collision-boundary={true}
122
+ className={mx(
123
+ 'absolute inset-(--main-spacing) grid',
124
+ encapsulate && 'border border-separator rounded-sm overflow-hidden',
125
+ companion && 'grid-cols-[6fr_4fr]', // TODO(burdon): Resize.
126
+ railGridHorizontal,
127
+ mainIntrinsicSize,
128
+ )}
106
129
  {...sizeAttrs}
107
130
  >
108
131
  {children}
@@ -110,6 +133,10 @@ const PlankContainer = ({ children, solo, companion }: PropsWithChildren<{ solo:
110
133
  );
111
134
  };
112
135
 
136
+ //
137
+ // PlankComponent
138
+ //
139
+
113
140
  type PlankComponentProps = {
114
141
  layoutMode: LayoutMode;
115
142
  id: string;
@@ -117,11 +144,10 @@ type PlankComponentProps = {
117
144
  path?: string[];
118
145
  order?: number;
119
146
  active?: string[];
120
- // TODO(burdon): Change to role?
121
147
  companioned?: 'primary' | 'companion';
122
- node?: Node;
123
- primary?: Node;
124
- companions?: Node[];
148
+ node?: Node.Node;
149
+ primary?: Node.Node;
150
+ companions?: Node.Node[];
125
151
  settings?: DeckSettingsProps;
126
152
  };
127
153
 
@@ -139,8 +165,10 @@ const PlankComponent = memo(
139
165
  companions,
140
166
  settings,
141
167
  }: PlankComponentProps) => {
142
- const { dispatchPromise: dispatch } = useIntentDispatcher();
143
- const { deck, popoverAnchorId, scrollIntoView } = useCapability(DeckCapabilities.DeckState);
168
+ const { invokePromise } = useOperationInvoker();
169
+ const { state, deck } = useDeckState();
170
+ const { popoverAnchorId, scrollIntoView } = state;
171
+ const { findFirstFocusable } = useFocusFinders();
144
172
  const canResize = layoutMode === 'deck';
145
173
 
146
174
  const attentionAttrs = useAttentionAttributes(primary?.id ?? id);
@@ -151,21 +179,28 @@ const PlankComponent = memo(
151
179
 
152
180
  const rootElement = useRef<HTMLDivElement | null>(null);
153
181
 
154
- const { variant } = parseEntryId(id);
155
- const sizeKey = `${id.split('+')[0]}${variant ? `${ATTENDABLE_PATH_SEPARATOR}${variant}` : ''}`;
182
+ const variant = node?.type === PLANK_COMPANION_TYPE ? getCompanionVariant(id) : undefined;
183
+ const sizeKey = id.split('+')[0];
156
184
  const size = deck.plankSizing[sizeKey] as number | undefined;
157
185
 
158
186
  const handleSizeChange = useCallback(
159
187
  debounce((nextSize: number) => {
160
- return dispatch(createIntent(DeckAction.UpdatePlankSize, { id: sizeKey, size: nextSize }));
188
+ return invokePromise(DeckOperation.UpdatePlankSize, { id: sizeKey, size: nextSize });
161
189
  }, 200),
162
- [dispatch, sizeKey],
190
+ [invokePromise, sizeKey],
163
191
  );
164
192
 
165
- // TODO(thure): Tabsters focus group should handle moving focus to Main, but something is blocking it.
193
+ // TODO(thure): Tabster's focus group should handle moving focus to Main, but something is blocking it.
166
194
  const handleKeyDown = useCallback((event: KeyboardEvent) => {
167
- if (event.target === event.currentTarget && event.key === 'Escape') {
168
- rootElement.current?.closest('main')?.focus();
195
+ if (event.target === event.currentTarget) {
196
+ switch (event.key) {
197
+ case 'Escape':
198
+ rootElement.current?.closest('main')?.focus();
199
+ break;
200
+ case 'Enter':
201
+ rootElement.current && findFirstFocusable(rootElement.current)?.focus();
202
+ break;
203
+ }
169
204
  }
170
205
  }, []);
171
206
 
@@ -173,9 +208,9 @@ const PlankComponent = memo(
173
208
  if (scrollIntoView === id) {
174
209
  layoutMode === 'deck' && rootElement.current?.scrollIntoView({ behavior: 'smooth', inline: 'center' });
175
210
  // Clear the scroll into view state once it has been actioned.
176
- void dispatch(createIntent(LayoutAction.ScrollIntoView, { part: 'current', subject: undefined }));
211
+ void invokePromise(LayoutOperation.ScrollIntoView, { subject: undefined });
177
212
  }
178
- }, [id, scrollIntoView, layoutMode]);
213
+ }, [id, scrollIntoView, layoutMode, invokePromise]);
179
214
 
180
215
  const isSolo = layoutMode.startsWith('solo') && part === 'solo';
181
216
  const isAttendable =
@@ -201,21 +236,27 @@ const PlankComponent = memo(
201
236
  const placeholder = useMemo(() => <PlankLoading />, []);
202
237
 
203
238
  const Root = part.startsWith('solo') ? 'article' : StackItem.Root;
239
+ const fullscreen = layoutMode === 'solo--fullscreen';
204
240
  const className = mx(
205
- 'attention-surface relative dx-focus-ring-inset-over-all density-coarse',
206
- isSolo && mainIntrinsicSize,
207
- isSolo && railGridHorizontal,
241
+ 'dx-attention-surface relative dx-focus-ring-inset-over-all dx-density-coarse',
208
242
  isSolo && 'absolute inset-0',
243
+ isSolo && mainIntrinsicSize,
244
+ railGridHorizontal,
209
245
  part.startsWith('solo') && 'grid',
210
- part === 'deck' && (companioned === 'companion' ? '!border-separator border-ie' : '!border-separator border-li'),
211
- part.startsWith('solo-') && 'row-span-2 grid-rows-subgrid min-is-0',
212
- part === 'solo-companion' && '!border-separator border-is',
246
+ part.startsWith('solo-') && 'grid-rows-subgrid row-span-2 min-w-0',
247
+ fullscreen && 'grid-rows-1',
248
+ part === 'deck' && (companioned === 'companion' ? 'border-separator! border-e' : 'border-separator! border-x'),
249
+ part === 'solo-companion' && 'border-separator! border-s',
250
+ settings?.encapsulatedPlanks &&
251
+ !part.startsWith('solo') &&
252
+ 'mx-(--main-spacing) border-separator! border rounded-sm overflow-hidden',
213
253
  );
214
254
 
215
255
  return (
216
256
  <Root
217
257
  ref={rootElement}
218
258
  data-testid='deck.plank'
259
+ data-popover-collision-boundary={true}
219
260
  tabIndex={0}
220
261
  {...(part.startsWith('solo')
221
262
  ? ({ ...sizeAttrs, className } as any)
@@ -232,32 +273,33 @@ const PlankComponent = memo(
232
273
  >
233
274
  {node ? (
234
275
  <>
235
- <PlankHeading
236
- id={id}
237
- part={part.startsWith('solo-') ? 'solo' : part}
238
- node={node}
239
- layoutMode={layoutMode}
240
- deckEnabled={settings?.enableDeck}
241
- canIncrementStart={canIncrementStart}
242
- canIncrementEnd={canIncrementEnd}
243
- popoverAnchorId={popoverAnchorId}
244
- primaryId={primary?.id}
245
- companioned={companioned}
246
- companions={companions}
247
- />
248
- <Surface
276
+ {!fullscreen && (
277
+ <PlankHeading
278
+ id={id}
279
+ part={part.startsWith('solo-') ? 'solo' : part}
280
+ node={node}
281
+ layoutMode={layoutMode}
282
+ deckEnabled={settings?.enableDeck}
283
+ canIncrementStart={canIncrementStart}
284
+ canIncrementEnd={canIncrementEnd}
285
+ popoverAnchorId={popoverAnchorId}
286
+ primaryId={primary?.id}
287
+ companioned={companioned}
288
+ companions={companions}
289
+ />
290
+ )}
291
+ <Surface.Surface
249
292
  key={node.id}
250
293
  role='article'
251
294
  data={data}
252
295
  limit={1}
253
- fallback={PlankContentError}
296
+ fallback={PlankErrorFallback}
254
297
  placeholder={placeholder}
255
298
  />
256
299
  </>
257
300
  ) : (
258
301
  <PlankError id={id} part={part} />
259
302
  )}
260
-
261
303
  {canResize && <StackItem.ResizeHandle />}
262
304
  </Root>
263
305
  );
@@ -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 && (