@dxos/plugin-deck 0.8.4-main.72ec0f3 → 0.8.4-main.8360d9e660

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 (324) hide show
  1. package/dist/lib/browser/Banner-AJW6225V.mjs +14 -0
  2. package/dist/lib/browser/Banner-AJW6225V.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-UXLU6CMW.mjs → chunk-L3RYMAV7.mjs} +2 -2
  14. package/dist/lib/browser/chunk-L3RYMAV7.mjs.map +7 -0
  15. package/dist/lib/browser/chunk-TAHLKBDO.mjs +187 -0
  16. package/dist/lib/browser/chunk-TAHLKBDO.mjs.map +7 -0
  17. package/dist/lib/browser/chunk-WTNYSXY5.mjs +1388 -0
  18. package/dist/lib/browser/chunk-WTNYSXY5.mjs.map +7 -0
  19. package/dist/lib/browser/index.mjs +83 -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-XBFHPSCP.mjs +48 -0
  25. package/dist/lib/browser/react-root-XBFHPSCP.mjs.map +7 -0
  26. package/dist/lib/browser/react-surface-4J3BZNT2.mjs +44 -0
  27. package/dist/lib/browser/react-surface-4J3BZNT2.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-XBH2IIDR.mjs +15 -0
  38. package/dist/lib/node-esm/Banner-XBH2IIDR.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-CQ3XYTNJ.mjs +1389 -0
  46. package/dist/lib/node-esm/chunk-CQ3XYTNJ.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-EMU4VIPH.mjs +188 -0
  50. package/dist/lib/node-esm/chunk-EMU4VIPH.mjs.map +7 -0
  51. package/dist/lib/node-esm/chunk-GZJAQ5IP.mjs +279 -0
  52. package/dist/lib/node-esm/chunk-GZJAQ5IP.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-32LZ6APH.mjs +49 -0
  61. package/dist/lib/node-esm/react-root-32LZ6APH.mjs.map +7 -0
  62. package/dist/lib/node-esm/react-surface-CO4ZDZKM.mjs +45 -0
  63. package/dist/lib/node-esm/react-surface-CO4ZDZKM.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.d.ts → toolkit/toolkit.d.ts} +6 -4
  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.map +1 -1
  120. package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts +2 -1
  121. package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts.map +1 -1
  122. package/dist/types/src/components/DeckLayout/DeckMain.d.ts.map +1 -1
  123. package/dist/types/src/components/DeckLayout/Dialog.d.ts.map +1 -1
  124. package/dist/types/src/components/DeckLayout/Fallback.d.ts.map +1 -1
  125. package/dist/types/src/components/DeckLayout/Popover.d.ts.map +1 -1
  126. package/dist/types/src/components/DeckLayout/Toast.d.ts +3 -3
  127. package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
  128. package/dist/types/src/components/Plank/Plank.d.ts +5 -5
  129. package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
  130. package/dist/types/src/components/Plank/Plank.stories.d.ts +26 -7
  131. package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -1
  132. package/dist/types/src/components/Plank/PlankControls.d.ts +1 -1
  133. package/dist/types/src/components/Plank/PlankControls.d.ts.map +1 -1
  134. package/dist/types/src/components/Plank/PlankError.d.ts +6 -4
  135. package/dist/types/src/components/Plank/PlankError.d.ts.map +1 -1
  136. package/dist/types/src/components/Plank/PlankHeading.d.ts +2 -2
  137. package/dist/types/src/components/Plank/PlankHeading.d.ts.map +1 -1
  138. package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +1 -1
  139. package/dist/types/src/components/Sidebar/Sidebar.d.ts.map +1 -1
  140. package/dist/types/src/components/Sidebar/SidebarButton.d.ts.map +1 -1
  141. package/dist/types/src/components/fragments.d.ts +4 -1
  142. package/dist/types/src/components/fragments.d.ts.map +1 -1
  143. package/dist/types/src/components/index.d.ts +0 -1
  144. package/dist/types/src/components/index.d.ts.map +1 -1
  145. package/dist/types/src/containers/Banner/Banner.d.ts +2 -0
  146. package/dist/types/src/containers/Banner/Banner.d.ts.map +1 -0
  147. package/dist/types/src/containers/Banner/index.d.ts +3 -0
  148. package/dist/types/src/containers/Banner/index.d.ts.map +1 -0
  149. package/dist/types/src/containers/DeckSettings/DeckSettings.d.ts +8 -0
  150. package/dist/types/src/containers/DeckSettings/DeckSettings.d.ts.map +1 -0
  151. package/dist/types/src/containers/DeckSettings/index.d.ts +3 -0
  152. package/dist/types/src/containers/DeckSettings/index.d.ts.map +1 -0
  153. package/dist/types/src/containers/index.d.ts +4 -0
  154. package/dist/types/src/containers/index.d.ts.map +1 -0
  155. package/dist/types/src/hooks/index.d.ts +2 -0
  156. package/dist/types/src/hooks/index.d.ts.map +1 -1
  157. package/dist/types/src/hooks/useDeckCompanions.d.ts +3 -4
  158. package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
  159. package/dist/types/src/hooks/useDeckState.d.ts +17 -0
  160. package/dist/types/src/hooks/useDeckState.d.ts.map +1 -0
  161. package/dist/types/src/hooks/useHoistStatusbar.d.ts +1 -1
  162. package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +1 -1
  163. package/dist/types/src/hooks/useMainSize.d.ts +2 -2
  164. package/dist/types/src/hooks/useNodeActionExpander.d.ts +1 -1
  165. package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
  166. package/dist/types/src/hooks/useSelectedCompanion.d.ts +13 -0
  167. package/dist/types/src/hooks/useSelectedCompanion.d.ts.map +1 -0
  168. package/dist/types/src/index.d.ts +1 -2
  169. package/dist/types/src/index.d.ts.map +1 -1
  170. package/dist/types/src/layout.d.ts +1 -7
  171. package/dist/types/src/layout.d.ts.map +1 -1
  172. package/dist/types/src/meta.d.ts +2 -2
  173. package/dist/types/src/meta.d.ts.map +1 -1
  174. package/dist/types/src/translations.d.ts +2 -1
  175. package/dist/types/src/translations.d.ts.map +1 -1
  176. package/dist/types/src/{capabilities → types}/capabilities.d.ts +96 -90
  177. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  178. package/dist/types/src/types/events.d.ts +7 -0
  179. package/dist/types/src/types/events.d.ts.map +1 -0
  180. package/dist/types/src/types/index.d.ts +2 -0
  181. package/dist/types/src/types/index.d.ts.map +1 -1
  182. package/dist/types/src/types/schema.d.ts +99 -38
  183. package/dist/types/src/types/schema.d.ts.map +1 -1
  184. package/dist/types/src/util/set-active.d.ts +18 -3
  185. package/dist/types/src/util/set-active.d.ts.map +1 -1
  186. package/dist/types/tsconfig.tsbuildinfo +1 -1
  187. package/package.json +59 -49
  188. package/src/DeckPlugin.ts +28 -48
  189. package/src/capabilities/app-graph-builder/app-graph-builder.ts +119 -0
  190. package/src/capabilities/app-graph-builder/index.ts +7 -0
  191. package/src/capabilities/check-app-scheme/check-app-scheme.ts +45 -0
  192. package/src/capabilities/check-app-scheme/index.ts +7 -0
  193. package/src/capabilities/index.ts +9 -14
  194. package/src/capabilities/operation-resolver/index.ts +10 -0
  195. package/src/capabilities/operation-resolver/operation-resolver.ts +558 -0
  196. package/src/capabilities/react-root/index.ts +7 -0
  197. package/src/capabilities/react-root/react-root.tsx +47 -0
  198. package/src/capabilities/react-surface/index.ts +7 -0
  199. package/src/capabilities/react-surface/react-surface.tsx +38 -0
  200. package/src/capabilities/settings/index.ts +7 -0
  201. package/src/capabilities/settings/settings.ts +39 -0
  202. package/src/capabilities/state/index.ts +7 -0
  203. package/src/capabilities/state/state.ts +105 -0
  204. package/src/capabilities/toolkit/index.ts +7 -0
  205. package/src/capabilities/{toolkit.ts → toolkit/toolkit.ts} +20 -22
  206. package/src/capabilities/tools/index.ts +7 -0
  207. package/src/capabilities/tools/tools.ts +91 -0
  208. package/src/capabilities/url-handler/index.ts +7 -0
  209. package/src/capabilities/url-handler/url-handler.ts +98 -0
  210. package/src/components/DeckLayout/ActiveNode.tsx +3 -2
  211. package/src/components/DeckLayout/Banner.tsx +9 -9
  212. package/src/components/DeckLayout/ContentEmpty.tsx +5 -6
  213. package/src/components/DeckLayout/DeckLayout.stories.tsx +21 -31
  214. package/src/components/DeckLayout/DeckLayout.tsx +13 -11
  215. package/src/components/DeckLayout/DeckMain.tsx +64 -58
  216. package/src/components/DeckLayout/Dialog.tsx +22 -13
  217. package/src/components/DeckLayout/Fallback.tsx +2 -6
  218. package/src/components/DeckLayout/Popover.tsx +75 -22
  219. package/src/components/DeckLayout/StatusBar.tsx +4 -4
  220. package/src/components/DeckLayout/Toast.tsx +4 -4
  221. package/src/components/Plank/Plank.stories.tsx +19 -9
  222. package/src/components/Plank/Plank.tsx +46 -38
  223. package/src/components/Plank/PlankControls.tsx +8 -11
  224. package/src/components/Plank/PlankError.tsx +31 -17
  225. package/src/components/Plank/PlankHeading.tsx +39 -47
  226. package/src/components/Plank/PlankLoading.tsx +1 -1
  227. package/src/components/Sidebar/ComplementarySidebar.tsx +57 -51
  228. package/src/components/Sidebar/Sidebar.tsx +7 -7
  229. package/src/components/Sidebar/SidebarButton.tsx +31 -25
  230. package/src/components/fragments.ts +10 -5
  231. package/src/components/index.ts +0 -1
  232. package/src/containers/Banner/Banner.tsx +5 -0
  233. package/src/containers/Banner/index.ts +7 -0
  234. package/src/{components → containers}/DeckSettings/DeckSettings.tsx +41 -31
  235. package/src/containers/DeckSettings/index.ts +7 -0
  236. package/src/containers/index.ts +8 -0
  237. package/src/hooks/index.ts +2 -0
  238. package/src/hooks/useCompanions.ts +2 -2
  239. package/src/hooks/useDeckCompanions.ts +7 -11
  240. package/src/hooks/useDeckState.ts +82 -0
  241. package/src/hooks/useHoistStatusbar.ts +3 -6
  242. package/src/hooks/useMainSize.ts +2 -2
  243. package/src/hooks/useNodeActionExpander.ts +4 -4
  244. package/src/hooks/useSelectedCompanion.ts +32 -0
  245. package/src/index.ts +1 -2
  246. package/src/layout.ts +1 -14
  247. package/src/meta.ts +3 -3
  248. package/src/translations.ts +2 -1
  249. package/src/types/capabilities.ts +33 -0
  250. package/src/types/events.ts +21 -0
  251. package/src/types/index.ts +2 -0
  252. package/src/types/schema.ts +96 -25
  253. package/src/util/layoutAppliesTopbar.ts +1 -1
  254. package/src/util/overscroll.ts +3 -3
  255. package/src/util/set-active.ts +49 -29
  256. package/dist/lib/browser/app-graph-builder-D74NTOMK.mjs +0 -128
  257. package/dist/lib/browser/app-graph-builder-D74NTOMK.mjs.map +0 -7
  258. package/dist/lib/browser/check-app-scheme-HIEVFAAX.mjs +0 -32
  259. package/dist/lib/browser/check-app-scheme-HIEVFAAX.mjs.map +0 -7
  260. package/dist/lib/browser/chunk-5KMJPIQC.mjs +0 -16
  261. package/dist/lib/browser/chunk-5KMJPIQC.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-F3VCCHVL.mjs +0 -162
  265. package/dist/lib/browser/chunk-F3VCCHVL.mjs.map +0 -7
  266. package/dist/lib/browser/chunk-OLDBLCAX.mjs +0 -128
  267. package/dist/lib/browser/chunk-OLDBLCAX.mjs.map +0 -7
  268. package/dist/lib/browser/chunk-SDIYDK47.mjs +0 -1553
  269. package/dist/lib/browser/chunk-SDIYDK47.mjs.map +0 -7
  270. package/dist/lib/browser/chunk-UXLU6CMW.mjs.map +0 -7
  271. package/dist/lib/browser/chunk-VBYJ664A.mjs +0 -132
  272. package/dist/lib/browser/chunk-VBYJ664A.mjs.map +0 -7
  273. package/dist/lib/browser/intent-resolver-UA4YQGAC.mjs +0 -524
  274. package/dist/lib/browser/intent-resolver-UA4YQGAC.mjs.map +0 -7
  275. package/dist/lib/browser/react-root-76RSDA6R.mjs +0 -44
  276. package/dist/lib/browser/react-root-76RSDA6R.mjs.map +0 -7
  277. package/dist/lib/browser/react-surface-2CSKDN7K.mjs +0 -40
  278. package/dist/lib/browser/react-surface-2CSKDN7K.mjs.map +0 -7
  279. package/dist/lib/browser/settings-SDPTOCCM.mjs +0 -30
  280. package/dist/lib/browser/settings-SDPTOCCM.mjs.map +0 -7
  281. package/dist/lib/browser/state-7IFAGZQO.mjs +0 -12
  282. package/dist/lib/browser/toolkit-L5CFXJCF.mjs +0 -52
  283. package/dist/lib/browser/toolkit-L5CFXJCF.mjs.map +0 -7
  284. package/dist/lib/browser/url-handler-QEYGYE2H.mjs +0 -70
  285. package/dist/lib/browser/url-handler-QEYGYE2H.mjs.map +0 -7
  286. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  287. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  288. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  289. package/dist/types/src/capabilities/check-app-scheme.d.ts +0 -4
  290. package/dist/types/src/capabilities/check-app-scheme.d.ts.map +0 -1
  291. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  292. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  293. package/dist/types/src/capabilities/react-root.d.ts +0 -7
  294. package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
  295. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  296. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  297. package/dist/types/src/capabilities/settings.d.ts +0 -4
  298. package/dist/types/src/capabilities/settings.d.ts.map +0 -1
  299. package/dist/types/src/capabilities/state.d.ts +0 -104
  300. package/dist/types/src/capabilities/state.d.ts.map +0 -1
  301. package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
  302. package/dist/types/src/capabilities/tools.d.ts +0 -11
  303. package/dist/types/src/capabilities/tools.d.ts.map +0 -1
  304. package/dist/types/src/capabilities/url-handler.d.ts +0 -4
  305. package/dist/types/src/capabilities/url-handler.d.ts.map +0 -1
  306. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts +0 -6
  307. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +0 -1
  308. package/dist/types/src/components/DeckSettings/index.d.ts +0 -2
  309. package/dist/types/src/components/DeckSettings/index.d.ts.map +0 -1
  310. package/dist/types/src/events.d.ts +0 -4
  311. package/dist/types/src/events.d.ts.map +0 -1
  312. package/src/capabilities/app-graph-builder.ts +0 -143
  313. package/src/capabilities/capabilities.ts +0 -14
  314. package/src/capabilities/check-app-scheme.ts +0 -40
  315. package/src/capabilities/intent-resolver.ts +0 -471
  316. package/src/capabilities/react-root.tsx +0 -40
  317. package/src/capabilities/react-surface.tsx +0 -30
  318. package/src/capabilities/settings.ts +0 -27
  319. package/src/capabilities/state.ts +0 -113
  320. package/src/capabilities/tools.ts +0 -84
  321. package/src/capabilities/url-handler.ts +0 -60
  322. package/src/components/DeckSettings/index.ts +0 -5
  323. package/src/events.ts +0 -11
  324. /package/dist/lib/{browser/state-7IFAGZQO.mjs.map → node-esm/types/index.mjs.map} +0 -0
@@ -1,14 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { defineCapability } from '@dxos/app-framework';
6
- import { type DeepReadonly } from '@dxos/util';
7
-
8
- import { meta } from '../meta';
9
- import { type DeckPluginState } from '../types';
10
-
11
- export namespace DeckCapabilities {
12
- export const DeckState = defineCapability<DeepReadonly<DeckPluginState>>(`${meta.id}/capability/state`);
13
- export const MutableDeckState = defineCapability<DeckPluginState>(`${meta.id}/capability/state`);
14
- }
@@ -1,40 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
6
-
7
- import { meta } from '../meta';
8
- import { type DeckSettingsProps } from '../types';
9
-
10
- const isSocket = !!(globalThis as any).__args;
11
-
12
- // TODO(mjamesderocher): Can we get this directly from Socket?
13
- const appScheme = 'composer://';
14
-
15
- // TODO(mjamesderocher): Factor out as part of NavigationPlugin.
16
- const checkAppScheme = (url: string) => {
17
- const iframe = document.createElement('iframe');
18
- iframe.style.display = 'none';
19
- document.body.appendChild(iframe);
20
-
21
- iframe.src = url + window.location.pathname.replace(/^\/+/, '') + window.location.search;
22
-
23
- const timer = setTimeout(() => {
24
- document.body.removeChild(iframe);
25
- }, 3000);
26
-
27
- window.addEventListener('pagehide', (event) => {
28
- clearTimeout(timer);
29
- document.body.removeChild(iframe);
30
- });
31
- };
32
-
33
- export default async (context: PluginContext) => {
34
- const settings = context.getCapability(Capabilities.SettingsStore).getStore<DeckSettingsProps>(meta.id)?.value;
35
- if (!isSocket && settings?.enableNativeRedirect) {
36
- checkAppScheme(appScheme);
37
- }
38
-
39
- return contributes(Capabilities.Null, null);
40
- };
@@ -1,471 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { batch } from '@preact/signals-core';
6
- import * as Effect from 'effect/Effect';
7
- import * as Function from 'effect/Function';
8
- import * as Option from 'effect/Option';
9
- import * as Schema from 'effect/Schema';
10
-
11
- import {
12
- Capabilities,
13
- IntentAction,
14
- LayoutAction,
15
- type PluginContext,
16
- chain,
17
- contributes,
18
- createIntent,
19
- createResolver,
20
- } from '@dxos/app-framework';
21
- import { Obj } from '@dxos/echo';
22
- import { invariant } from '@dxos/invariant';
23
- import { isLiveObject } from '@dxos/live-object';
24
- import { log } from '@dxos/log';
25
- import { AttentionCapabilities } from '@dxos/plugin-attention';
26
- import { isActionLike } from '@dxos/plugin-graph';
27
- import { ObservabilityAction } from '@dxos/plugin-observability/types';
28
- import { byPosition, isNonNullable } from '@dxos/util';
29
-
30
- import { closeEntry, createEntryId, incrementPlank, openEntry } from '../layout';
31
- import { meta } from '../meta';
32
- import {
33
- DeckAction,
34
- type DeckSettingsProps,
35
- type LayoutMode,
36
- PLANK_COMPANION_TYPE,
37
- defaultDeck,
38
- getMode,
39
- isLayoutMode,
40
- } from '../types';
41
- import { setActive } from '../util';
42
-
43
- import { DeckCapabilities } from './capabilities';
44
-
45
- export default (context: PluginContext) =>
46
- contributes(Capabilities.IntentResolver, [
47
- createResolver({
48
- intent: IntentAction.ShowUndo,
49
- resolve: (data) => {
50
- const layout = context.getCapability(DeckCapabilities.MutableDeckState);
51
- const { undoPromise: undo } = context.getCapability(Capabilities.IntentDispatcher);
52
-
53
- // TODO(wittjosiah): Support undoing further back than the last action.
54
- if (layout.currentUndoId) {
55
- layout.toasts = layout.toasts.filter((toast) => toast.id !== layout.currentUndoId);
56
- }
57
- layout.currentUndoId = `${IntentAction.ShowUndo._tag}-${Date.now()}`;
58
- layout.toasts = [
59
- ...layout.toasts,
60
- {
61
- id: layout.currentUndoId,
62
- title: data.message ?? ['undo available label', { ns: meta.id }],
63
- duration: 10_000,
64
- actionLabel: ['undo action label', { ns: meta.id }],
65
- actionAlt: ['undo action alt', { ns: meta.id }],
66
- closeLabel: ['undo close label', { ns: meta.id }],
67
- onAction: () => undo(),
68
- },
69
- ];
70
- },
71
- }),
72
- createResolver({
73
- intent: LayoutAction.UpdateLayout,
74
- // TODO(wittjosiah): This should be able to just be `Schema.is(LayoutAction.UpdateSidebar.fields.input)`
75
- // but the filter is not being applied correctly.
76
- filter: (data): data is Schema.Schema.Type<typeof LayoutAction.UpdateSidebar.fields.input> =>
77
- Schema.is(LayoutAction.UpdateSidebar.fields.input)(data),
78
- resolve: ({ options }) => {
79
- const layout = context.getCapability(DeckCapabilities.MutableDeckState);
80
- const next = options?.state ?? layout.sidebarState;
81
- if (next !== layout.sidebarState) {
82
- layout.sidebarState = next;
83
- }
84
- },
85
- }),
86
- createResolver({
87
- intent: LayoutAction.UpdateLayout,
88
- // TODO(wittjosiah): This should be able to just be `Schema.is(LayoutAction.UpdateComplementary.fields.input)`
89
- // but the filter is not being applied correctly.
90
- filter: (data): data is Schema.Schema.Type<typeof LayoutAction.UpdateComplementary.fields.input> =>
91
- Schema.is(LayoutAction.UpdateComplementary.fields.input)(data),
92
- resolve: ({ subject, options }) => {
93
- const layout = context.getCapability(DeckCapabilities.MutableDeckState);
94
- if (layout.complementarySidebarPanel !== subject) {
95
- layout.complementarySidebarPanel = subject;
96
- }
97
-
98
- const next = subject ? 'expanded' : (options?.state ?? layout.complementarySidebarState);
99
- if (next !== layout.complementarySidebarState) {
100
- layout.complementarySidebarState = next;
101
- }
102
- },
103
- }),
104
- createResolver({
105
- intent: LayoutAction.UpdateLayout,
106
- // TODO(wittjosiah): This should be able to just be `Schema.is(LayoutAction.UpdateDialog.fields.input)`
107
- // but the filter is not being applied correctly.
108
- filter: (data): data is Schema.Schema.Type<typeof LayoutAction.UpdateDialog.fields.input> =>
109
- Schema.is(LayoutAction.UpdateDialog.fields.input)(data),
110
- resolve: ({ subject, options }) => {
111
- const layout = context.getCapability(DeckCapabilities.MutableDeckState);
112
- layout.dialogOpen = options.state ?? Boolean(subject);
113
- layout.dialogType = options.type ?? 'default';
114
- layout.dialogBlockAlign = options.blockAlign ?? 'center';
115
- layout.dialogOverlayClasses = options.overlayClasses;
116
- layout.dialogOverlayStyle = options.overlayStyle;
117
- layout.dialogContent = subject ? { component: subject, props: options.props } : null;
118
- },
119
- }),
120
- createResolver({
121
- intent: LayoutAction.UpdateLayout,
122
- // TODO(wittjosiah): This should be able to just be `Schema.is(LayoutAction.UpdatePopover.fields.input)`
123
- // but the filter is not being applied correctly.
124
- filter: (data): data is Schema.Schema.Type<typeof LayoutAction.UpdatePopover.fields.input> =>
125
- Schema.is(LayoutAction.UpdatePopover.fields.input)(data),
126
- resolve: ({ subject, options }) => {
127
- const layout = context.getCapability(DeckCapabilities.MutableDeckState);
128
- layout.popoverOpen = options.state ?? Boolean(subject);
129
- layout.popoverContent =
130
- typeof subject === 'string' ? { component: subject, props: options.props } : subject ? { subject } : null;
131
- layout.popoverSide = options.side;
132
- if (options.variant === 'virtual') {
133
- layout.popoverAnchor = options.anchor;
134
- } else {
135
- layout.popoverAnchorId = options.anchorId;
136
- }
137
- },
138
- }),
139
- createResolver({
140
- intent: LayoutAction.UpdateLayout,
141
- // TODO(wittjosiah): This should be able to just be `Schema.is(LayoutAction.AddToast.fields.input)`
142
- // but the filter is not being applied correctly.
143
- filter: (data): data is Schema.Schema.Type<typeof LayoutAction.AddToast.fields.input> =>
144
- Schema.is(LayoutAction.AddToast.fields.input)(data),
145
- resolve: ({ subject }) => {
146
- const layout = context.getCapability(DeckCapabilities.MutableDeckState);
147
- layout.toasts.push(subject);
148
- },
149
- }),
150
- createResolver({
151
- intent: LayoutAction.UpdateLayout,
152
- // TODO(wittjosiah): This should be able to just be `Schema.is(LayoutAction.SetLayoutMode.fields.input)`
153
- // but the filter is not being applied correctly.
154
- filter: (data): data is Schema.Schema.Type<typeof LayoutAction.SetLayoutMode.fields.input> => {
155
- if (!Schema.is(LayoutAction.SetLayoutMode.fields.input)(data)) {
156
- return false;
157
- }
158
-
159
- if ('mode' in data.options) {
160
- return isLayoutMode(data.options.mode);
161
- }
162
-
163
- return true;
164
- },
165
- resolve: ({ subject, options }) => {
166
- const state = context.getCapability(DeckCapabilities.MutableDeckState);
167
-
168
- const setMode = (mode: LayoutMode) => {
169
- const deck = state.deck;
170
- const current = deck.solo ? [deck.solo] : deck.active;
171
- // When un-soloing, the solo entry is added to the deck.
172
- const next = (
173
- mode !== 'deck' ? [subject ?? deck.solo ?? deck.active[0]] : [...deck.active, deck.solo]
174
- ).filter(isNonNullable);
175
-
176
- const removed = current.filter((id) => !next.includes(id));
177
- const closed = Array.from(new Set([...deck.inactive.filter((id) => !next.includes(id)), ...removed]));
178
- deck.inactive = closed;
179
-
180
- if (mode !== 'deck' && next[0]) {
181
- deck.solo = next[0];
182
- } else if (mode === 'deck' && deck.solo) {
183
- deck.solo = undefined;
184
- deck.initialized = true;
185
- }
186
-
187
- if (mode === 'solo--fullscreen') {
188
- deck.fullscreen = !deck.fullscreen;
189
- }
190
- };
191
-
192
- return batch(() => {
193
- if ('mode' in options) {
194
- const current = getMode(state.deck);
195
- if (current !== options.mode) {
196
- state.previousMode[state.activeDeck] = current;
197
- }
198
- setMode(options.mode as LayoutMode);
199
- } else if ('revert' in options) {
200
- const last = state.previousMode[state.activeDeck];
201
- setMode(last ?? 'solo');
202
- } else {
203
- log.warn('Invalid layout mode', options);
204
- }
205
- });
206
- },
207
- }),
208
- createResolver({
209
- intent: LayoutAction.UpdateLayout,
210
- filter: (data): data is Schema.Schema.Type<typeof LayoutAction.SwitchWorkspace.fields.input> =>
211
- Schema.is(LayoutAction.SwitchWorkspace.fields.input)(data),
212
- resolve: ({ subject }) => {
213
- const { graph } = context.getCapability(Capabilities.AppGraph);
214
- const state = context.getCapability(DeckCapabilities.MutableDeckState);
215
- batch(() => {
216
- // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.
217
- // Ideally this should be worked into the data model in a generic way.
218
- if (!state.activeDeck.startsWith('!')) {
219
- state.previousDeck = state.activeDeck;
220
- }
221
- state.activeDeck = subject;
222
- if (!state.decks[subject]) {
223
- state.decks[subject] = { ...defaultDeck };
224
- }
225
- });
226
-
227
- const first = state.deck.solo ? state.deck.solo : state.deck.active[0];
228
- if (first) {
229
- return {
230
- intents: [createIntent(LayoutAction.ScrollIntoView, { part: 'current', subject: first })],
231
- };
232
- } else {
233
- const [item] = graph
234
- .getConnections(subject)
235
- .filter((node) => !isActionLike(node) && !node.properties.disposition);
236
- if (item) {
237
- return {
238
- intents: [createIntent(LayoutAction.Open, { part: 'main', subject: [item.id] })],
239
- };
240
- }
241
- }
242
- },
243
- }),
244
- createResolver({
245
- intent: LayoutAction.UpdateLayout,
246
- filter: (data): data is Schema.Schema.Type<typeof LayoutAction.RevertWorkspace.fields.input> =>
247
- Schema.is(LayoutAction.RevertWorkspace.fields.input)(data),
248
- resolve: () => {
249
- const state = context.getCapability(DeckCapabilities.MutableDeckState);
250
- return {
251
- intents: [createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: state.previousDeck })],
252
- };
253
- },
254
- }),
255
- createResolver({
256
- intent: LayoutAction.UpdateLayout,
257
- filter: (data): data is Schema.Schema.Type<typeof LayoutAction.Open.fields.input> =>
258
- Schema.is(LayoutAction.Open.fields.input)(data),
259
- resolve: ({ subject, options }) =>
260
- Effect.gen(function* () {
261
- const { graph } = context.getCapability(Capabilities.AppGraph);
262
- const state = context.getCapability(DeckCapabilities.MutableDeckState);
263
- const attention = context.getCapability(AttentionCapabilities.Attention);
264
- const settings = context
265
- .getCapabilities(Capabilities.SettingsStore)[0]
266
- ?.getStore<DeckSettingsProps>(meta.id)?.value;
267
-
268
- if (options?.workspace && state.activeDeck !== options?.workspace) {
269
- const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
270
- yield* dispatch(
271
- createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: options.workspace }),
272
- );
273
- }
274
-
275
- const previouslyOpenIds = new Set<string>(state.deck.solo ? [state.deck.solo] : state.deck.active);
276
- batch(() => {
277
- const next = state.deck.solo
278
- ? (subject as string[]).map((id) => createEntryId(id, options?.variant))
279
- : subject.reduce(
280
- (acc, entryId) =>
281
- openEntry(acc, entryId, {
282
- key: options?.key,
283
- positioning: options?.positioning ?? settings?.newPlankPositioning,
284
- pivotId: options?.pivotId,
285
- variant: options?.variant,
286
- }),
287
- state.deck.active,
288
- );
289
-
290
- return setActive({ next, state, attention });
291
- });
292
-
293
- const ids = state.deck.solo ? [state.deck.solo] : state.deck.active;
294
- const newlyOpen = ids.filter((i) => !previouslyOpenIds.has(i));
295
-
296
- return {
297
- intents: [
298
- ...(options?.scrollIntoView !== false
299
- ? [createIntent(LayoutAction.ScrollIntoView, { part: 'current', subject: newlyOpen[0] ?? subject[0] })]
300
- : []),
301
- createIntent(LayoutAction.Expose, { part: 'navigation', subject: newlyOpen[0] ?? subject[0] }),
302
- ...newlyOpen.map((subjectId) => {
303
- const typename = Option.match(graph.getNode(subjectId), {
304
- onNone: () => undefined,
305
- onSome: (node) => {
306
- const active = node.data;
307
- return isLiveObject(active) ? Obj.getTypename(active) : undefined;
308
- },
309
- });
310
- return createIntent(ObservabilityAction.SendEvent, {
311
- name: 'navigation.activate',
312
- properties: {
313
- subjectId,
314
- typename,
315
- },
316
- });
317
- }),
318
- ],
319
- };
320
- }),
321
- }),
322
- createResolver({
323
- intent: LayoutAction.UpdateLayout,
324
- filter: (data): data is Schema.Schema.Type<typeof LayoutAction.Close.fields.input> =>
325
- Schema.is(LayoutAction.Close.fields.input)(data),
326
- resolve: ({ subject }) => {
327
- const state = context.getCapability(DeckCapabilities.MutableDeckState);
328
- const attention = context.getCapability(AttentionCapabilities.Attention);
329
- const active = state.deck.solo ? [state.deck.solo] : state.deck.active;
330
- const next = subject.reduce((acc, id) => closeEntry(acc, id), active);
331
- const toAttend = setActive({ next, state, attention });
332
-
333
- const clearCompanionIntents = subject
334
- .filter((id) => state.deck.activeCompanions && id in state.deck.activeCompanions)
335
- .map((primary) => createIntent(DeckAction.ChangeCompanion, { primary, companion: null }));
336
-
337
- return {
338
- intents: [
339
- ...clearCompanionIntents,
340
- ...(toAttend ? [createIntent(LayoutAction.ScrollIntoView, { part: 'current', subject: toAttend })] : []),
341
- ],
342
- };
343
- },
344
- }),
345
- createResolver({
346
- intent: LayoutAction.UpdateLayout,
347
- filter: (data): data is Schema.Schema.Type<typeof LayoutAction.Set.fields.input> =>
348
- Schema.is(LayoutAction.Set.fields.input)(data),
349
- resolve: ({ subject }) => {
350
- const state = context.getCapability(DeckCapabilities.MutableDeckState);
351
- const attention = context.getCapability(AttentionCapabilities.Attention);
352
- const toAttend = setActive({ next: subject as string[], state, attention });
353
- return {
354
- intents: toAttend ? [createIntent(LayoutAction.ScrollIntoView, { part: 'current', subject: toAttend })] : [],
355
- };
356
- },
357
- }),
358
- createResolver({
359
- intent: LayoutAction.UpdateLayout,
360
- filter: (data): data is Schema.Schema.Type<typeof LayoutAction.ScrollIntoView.fields.input> =>
361
- Schema.is(LayoutAction.ScrollIntoView.fields.input)(data),
362
- resolve: ({ subject }) => {
363
- const layout = context.getCapability(DeckCapabilities.MutableDeckState);
364
- layout.scrollIntoView = subject;
365
- },
366
- }),
367
- createResolver({
368
- intent: DeckAction.UpdatePlankSize,
369
- resolve: (data) => {
370
- const state = context.getCapability(DeckCapabilities.MutableDeckState);
371
- state.deck.plankSizing[data.id] = data.size;
372
- },
373
- }),
374
- createResolver({
375
- intent: DeckAction.ChangeCompanion,
376
- resolve: (data) => {
377
- const state = context.getCapability(DeckCapabilities.MutableDeckState);
378
- // TODO(thure): Reactivity only works when creating a lexically new `activeCompanions`… Are these not proxy objects?
379
- if (data.companion === null) {
380
- const { [data.primary]: _, ...nextActiveCompanions } = state.deck.activeCompanions ?? {};
381
- state.deck.activeCompanions = nextActiveCompanions;
382
- } else {
383
- invariant(data.companion !== data.primary);
384
- state.deck.activeCompanions = {
385
- ...state.deck.activeCompanions,
386
- [data.primary]: data.companion,
387
- };
388
- }
389
- },
390
- }),
391
- createResolver({
392
- intent: DeckAction.Adjust,
393
- resolve: (adjustment) => {
394
- const state = context.getCapability(DeckCapabilities.MutableDeckState);
395
- const attention = context.getCapability(AttentionCapabilities.Attention);
396
- const { graph } = context.getCapability(Capabilities.AppGraph);
397
-
398
- return batch(() => {
399
- if (adjustment.type === 'increment-end' || adjustment.type === 'increment-start') {
400
- setActive({
401
- next: incrementPlank(state.deck.active, adjustment),
402
- state,
403
- attention,
404
- });
405
- }
406
-
407
- if (adjustment.type === 'companion') {
408
- return Function.pipe(
409
- graph.getNode(adjustment.id),
410
- Option.map((node) =>
411
- graph
412
- .getConnections(node.id)
413
- .filter((n) => n.type === PLANK_COMPANION_TYPE)
414
- .toSorted((a, b) => byPosition(a.properties, b.properties)),
415
- ),
416
- Option.flatMap((companions) => (companions.length > 0 ? Option.some(companions[0]) : Option.none())),
417
- Option.match({
418
- onNone: () => ({}),
419
- onSome: (companion) => ({
420
- intents: [
421
- // TODO(wittjosiah): This should remember the previously selected companion.
422
- createIntent(DeckAction.ChangeCompanion, { primary: adjustment.id, companion: companion.id }),
423
- ],
424
- }),
425
- }),
426
- );
427
- }
428
-
429
- if (adjustment.type.startsWith('solo')) {
430
- const entryId = adjustment.id;
431
- if (!state.deck.solo) {
432
- // Solo the entry.
433
- return {
434
- intents: [
435
- createIntent(LayoutAction.SetLayoutMode, {
436
- part: 'mode',
437
- subject: entryId,
438
- options: { mode: adjustment.type },
439
- }),
440
- ],
441
- };
442
- } else {
443
- if (adjustment.type === 'solo--fullscreen') {
444
- // Toggle fullscreen on the current entry.
445
- return {
446
- intents: [
447
- createIntent(LayoutAction.SetLayoutMode, {
448
- part: 'mode',
449
- subject: entryId,
450
- options: { mode: 'solo--fullscreen' },
451
- }),
452
- ],
453
- };
454
- } else if (adjustment.type === 'solo') {
455
- // Un-solo the current entry.
456
- return {
457
- intents: [
458
- // NOTE: The order of these is important.
459
- Function.pipe(
460
- createIntent(LayoutAction.SetLayoutMode, { part: 'mode', options: { mode: 'deck' } }),
461
- chain(LayoutAction.Open, { part: 'main', subject: [entryId] }),
462
- ),
463
- ],
464
- };
465
- }
466
- }
467
- }
468
- });
469
- },
470
- }),
471
- ]);
@@ -1,40 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import React, { useCallback } from 'react';
6
-
7
- import { Capabilities, contributes } from '@dxos/app-framework';
8
- import { useCapability } from '@dxos/app-framework/react';
9
-
10
- import { DeckLayout } from '../components';
11
- import { meta } from '../meta';
12
-
13
- import { DeckCapabilities } from './capabilities';
14
-
15
- export default () =>
16
- contributes(Capabilities.ReactRoot, {
17
- id: meta.id,
18
- root: () => {
19
- const layout = useCapability(DeckCapabilities.MutableDeckState);
20
-
21
- const handleDismissToast = useCallback(
22
- (id: string) => {
23
- const index = layout.toasts.findIndex((toast) => toast.id === id);
24
- if (index !== -1) {
25
- // Allow time for the toast to animate out.
26
- // TODO(burdon): Factor out and unregister timeout.
27
- setTimeout(() => {
28
- if (layout.toasts[index].id === layout.currentUndoId) {
29
- layout.currentUndoId = undefined;
30
- }
31
- layout.toasts.splice(index, 1);
32
- }, 1_000);
33
- }
34
- },
35
- [layout.toasts],
36
- );
37
-
38
- return <DeckLayout onDismissToast={handleDismissToast} />;
39
- },
40
- });
@@ -1,30 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import React from 'react';
6
-
7
- import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
8
- import { SettingsStore } from '@dxos/local-storage';
9
-
10
- import { Banner, DeckSettings } from '../components';
11
- import { meta } from '../meta';
12
- import { type DeckSettingsProps } from '../types';
13
-
14
- export default () =>
15
- contributes(Capabilities.ReactSurface, [
16
- createSurface({
17
- id: `${meta.id}/plugin-settings`,
18
- role: 'article',
19
- filter: (data): data is { subject: SettingsStore<DeckSettingsProps> } =>
20
- data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
21
- component: ({ data: { subject } }) => <DeckSettings settings={subject.value} />,
22
- }),
23
- createSurface({
24
- id: `${meta.id}/banner`,
25
- role: 'banner',
26
- component: ({ data }) => {
27
- return <Banner variant={data.variant} />;
28
- },
29
- }),
30
- ]);
@@ -1,27 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { Capabilities, contributes } from '@dxos/app-framework';
6
- import { live } from '@dxos/live-object';
7
-
8
- import { meta } from '../meta';
9
- import { type DeckSettingsProps, DeckSettingsSchema } from '../types';
10
-
11
- export default () => {
12
- const settings = live<DeckSettingsProps>({
13
- showHints: false,
14
- enableDeck: false,
15
- enableStatusbar: false,
16
- enableNativeRedirect: false,
17
- newPlankPositioning: 'start',
18
- overscroll: 'none',
19
- encapsulatedPlanks: false,
20
- });
21
-
22
- return contributes(Capabilities.Settings, {
23
- prefix: meta.id,
24
- schema: DeckSettingsSchema,
25
- value: settings,
26
- });
27
- };