@dxos/plugin-deck 0.8.4-main.fffef41 → 0.9.0

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 (504) hide show
  1. package/LICENSE +102 -5
  2. package/PLUGIN.mdl +541 -0
  3. package/README.md +1 -1
  4. package/dist/lib/neutral/DeckLayout-DEURA3KR.mjs +291 -0
  5. package/dist/lib/neutral/DeckLayout-DEURA3KR.mjs.map +7 -0
  6. package/dist/lib/neutral/DeckPlugin.mjs +87 -0
  7. package/dist/lib/neutral/DeckPlugin.mjs.map +7 -0
  8. package/dist/lib/neutral/DeckPlugin.node.mjs +18 -0
  9. package/dist/lib/neutral/DeckPlugin.node.mjs.map +7 -0
  10. package/dist/lib/neutral/DeckPlugin.workerd.mjs +16 -0
  11. package/dist/lib/neutral/DeckPlugin.workerd.mjs.map +7 -0
  12. package/dist/lib/neutral/DeckSettings-W5I57OXM.mjs +27 -0
  13. package/dist/lib/neutral/DeckSettings-W5I57OXM.mjs.map +7 -0
  14. package/dist/lib/neutral/add-toast-TNB6DXWU.mjs +24 -0
  15. package/dist/lib/neutral/add-toast-TNB6DXWU.mjs.map +7 -0
  16. package/dist/lib/neutral/adjust-HNU5CCRO.mjs +93 -0
  17. package/dist/lib/neutral/adjust-HNU5CCRO.mjs.map +7 -0
  18. package/dist/lib/neutral/app-graph-builder-HMLT627T.mjs +129 -0
  19. package/dist/lib/neutral/app-graph-builder-HMLT627T.mjs.map +7 -0
  20. package/dist/lib/neutral/capabilities/index.mjs +25 -0
  21. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  22. package/dist/lib/neutral/check-app-scheme-INSOF72J.mjs +10 -0
  23. package/dist/lib/neutral/chunk-324PPIZB.mjs +101 -0
  24. package/dist/lib/neutral/chunk-324PPIZB.mjs.map +7 -0
  25. package/dist/lib/neutral/chunk-BS4EOYMK.mjs +282 -0
  26. package/dist/lib/neutral/chunk-BS4EOYMK.mjs.map +7 -0
  27. package/dist/lib/neutral/chunk-GBIGQKYW.mjs +112 -0
  28. package/dist/lib/neutral/chunk-GBIGQKYW.mjs.map +7 -0
  29. package/dist/lib/neutral/chunk-GLB73Q6U.mjs +22 -0
  30. package/dist/lib/neutral/chunk-GLB73Q6U.mjs.map +7 -0
  31. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  32. package/dist/lib/neutral/chunk-PYEY5SEC.mjs +37 -0
  33. package/dist/lib/neutral/chunk-PYEY5SEC.mjs.map +7 -0
  34. package/dist/lib/neutral/chunk-Q4W6B4IB.mjs +8 -0
  35. package/dist/lib/neutral/chunk-Q4W6B4IB.mjs.map +7 -0
  36. package/dist/lib/neutral/chunk-WAXJPQJI.mjs +1306 -0
  37. package/dist/lib/neutral/chunk-WAXJPQJI.mjs.map +7 -0
  38. package/dist/lib/neutral/chunk-ZYYOSX5I.mjs +69 -0
  39. package/dist/lib/neutral/chunk-ZYYOSX5I.mjs.map +7 -0
  40. package/dist/lib/neutral/close-ASKR22A6.mjs +44 -0
  41. package/dist/lib/neutral/close-ASKR22A6.mjs.map +7 -0
  42. package/dist/lib/neutral/components/index.mjs +126 -0
  43. package/dist/lib/neutral/components/index.mjs.map +7 -0
  44. package/dist/lib/neutral/containers/index.mjs +32 -0
  45. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  46. package/dist/lib/neutral/hooks/index.mjs +159 -0
  47. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  48. package/dist/lib/neutral/index.mjs +38 -0
  49. package/dist/lib/neutral/index.mjs.map +7 -0
  50. package/dist/lib/neutral/meta.json +1 -0
  51. package/dist/lib/neutral/meta.mjs +8 -0
  52. package/dist/lib/neutral/meta.mjs.map +7 -0
  53. package/dist/lib/neutral/notification-tracker-P36322BH.mjs +182 -0
  54. package/dist/lib/neutral/notification-tracker-P36322BH.mjs.map +7 -0
  55. package/dist/lib/neutral/open-5OYNO3RT.mjs +159 -0
  56. package/dist/lib/neutral/open-5OYNO3RT.mjs.map +7 -0
  57. package/dist/lib/neutral/operation-handler-266CVMTW.mjs +13 -0
  58. package/dist/lib/neutral/operation-handler-266CVMTW.mjs.map +7 -0
  59. package/dist/lib/neutral/operations/index.mjs +8 -0
  60. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  61. package/dist/lib/neutral/plugin.mjs +16 -0
  62. package/dist/lib/neutral/plugin.mjs.map +7 -0
  63. package/dist/lib/neutral/react-root-HH5DEUOG.mjs +44 -0
  64. package/dist/lib/neutral/react-root-HH5DEUOG.mjs.map +7 -0
  65. package/dist/lib/neutral/react-surface-3UVVCK3O.mjs +34 -0
  66. package/dist/lib/neutral/react-surface-3UVVCK3O.mjs.map +7 -0
  67. package/dist/lib/neutral/revert-workspace-B2QLT2C4.mjs +21 -0
  68. package/dist/lib/neutral/revert-workspace-B2QLT2C4.mjs.map +7 -0
  69. package/dist/lib/neutral/scroll-into-view-B52C3PJO.mjs +21 -0
  70. package/dist/lib/neutral/scroll-into-view-B52C3PJO.mjs.map +7 -0
  71. package/dist/lib/neutral/set-PA35ONXO.mjs +37 -0
  72. package/dist/lib/neutral/set-PA35ONXO.mjs.map +7 -0
  73. package/dist/lib/neutral/set-layout-mode-RPCCPQRB.mjs +85 -0
  74. package/dist/lib/neutral/set-layout-mode-RPCCPQRB.mjs.map +7 -0
  75. package/dist/lib/neutral/settings-EGNYUM4T.mjs +33 -0
  76. package/dist/lib/neutral/settings-EGNYUM4T.mjs.map +7 -0
  77. package/dist/lib/neutral/state-IIDXMQUO.mjs +86 -0
  78. package/dist/lib/neutral/state-IIDXMQUO.mjs.map +7 -0
  79. package/dist/lib/neutral/switch-workspace-LZF4KZXH.mjs +60 -0
  80. package/dist/lib/neutral/switch-workspace-LZF4KZXH.mjs.map +7 -0
  81. package/dist/lib/neutral/translations.mjs +63 -0
  82. package/dist/lib/neutral/translations.mjs.map +7 -0
  83. package/dist/lib/neutral/types/index.mjs +34 -0
  84. package/dist/lib/neutral/types/index.mjs.map +7 -0
  85. package/dist/lib/neutral/update-companion-YUCZZVGY.mjs +32 -0
  86. package/dist/lib/neutral/update-companion-YUCZZVGY.mjs.map +7 -0
  87. package/dist/lib/neutral/update-complementary-7FZNB55J.mjs +28 -0
  88. package/dist/lib/neutral/update-complementary-7FZNB55J.mjs.map +7 -0
  89. package/dist/lib/neutral/update-dialog-FNQTSSAP.mjs +29 -0
  90. package/dist/lib/neutral/update-dialog-FNQTSSAP.mjs.map +7 -0
  91. package/dist/lib/neutral/update-plank-size-3YW4NXEY.mjs +26 -0
  92. package/dist/lib/neutral/update-plank-size-3YW4NXEY.mjs.map +7 -0
  93. package/dist/lib/neutral/update-popover-G2VUD7E6.mjs +33 -0
  94. package/dist/lib/neutral/update-popover-G2VUD7E6.mjs.map +7 -0
  95. package/dist/lib/neutral/update-sidebar-KRHPUHUB.mjs +25 -0
  96. package/dist/lib/neutral/update-sidebar-KRHPUHUB.mjs.map +7 -0
  97. package/dist/lib/neutral/url-handler-A6HLW4RB.mjs +229 -0
  98. package/dist/lib/neutral/url-handler-A6HLW4RB.mjs.map +7 -0
  99. package/dist/types/src/DeckPlugin.d.ts +3 -1
  100. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  101. package/dist/types/src/DeckPlugin.node.d.ts +4 -0
  102. package/dist/types/src/DeckPlugin.node.d.ts.map +1 -0
  103. package/dist/types/src/DeckPlugin.test.d.ts +2 -0
  104. package/dist/types/src/DeckPlugin.test.d.ts.map +1 -0
  105. package/dist/types/src/DeckPlugin.workerd.d.ts +4 -0
  106. package/dist/types/src/DeckPlugin.workerd.d.ts.map +1 -0
  107. package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
  108. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  109. package/dist/types/src/capabilities/check-app-scheme.d.ts +17 -2
  110. package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -1
  111. package/dist/types/src/capabilities/index.d.ts +197 -12
  112. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  113. package/dist/types/src/capabilities/notification-tracker.d.ts +13 -0
  114. package/dist/types/src/capabilities/notification-tracker.d.ts.map +1 -0
  115. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  116. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  117. package/dist/types/src/capabilities/react-root.d.ts +4 -2
  118. package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
  119. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  120. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  121. package/dist/types/src/capabilities/settings.d.ts +5 -2
  122. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  123. package/dist/types/src/capabilities/state.d.ts +141 -54
  124. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  125. package/dist/types/src/capabilities/tools.d.ts +4 -3
  126. package/dist/types/src/capabilities/tools.d.ts.map +1 -1
  127. package/dist/types/src/capabilities/url-handler.d.ts +3 -2
  128. package/dist/types/src/capabilities/url-handler.d.ts.map +1 -1
  129. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts +4 -4
  130. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +1 -1
  131. package/dist/types/src/components/DeckSettings/DeckSettings.stories.d.ts +67 -0
  132. package/dist/types/src/components/DeckSettings/DeckSettings.stories.d.ts.map +1 -0
  133. package/dist/types/src/components/DeckSettings/index.d.ts +1 -1
  134. package/dist/types/src/components/DeckSettings/index.d.ts.map +1 -1
  135. package/dist/types/src/components/Matrix/Matrix.d.ts +41 -0
  136. package/dist/types/src/components/Matrix/Matrix.d.ts.map +1 -0
  137. package/dist/types/src/components/Matrix/Matrix.stories.d.ts +17 -0
  138. package/dist/types/src/components/Matrix/Matrix.stories.d.ts.map +1 -0
  139. package/dist/types/src/components/Matrix/index.d.ts +3 -0
  140. package/dist/types/src/components/Matrix/index.d.ts.map +1 -0
  141. package/dist/types/src/components/index.d.ts +3 -2
  142. package/dist/types/src/components/index.d.ts.map +1 -1
  143. package/dist/types/src/{components/DeckLayout → containers/Deck}/Banner.d.ts +1 -1
  144. package/dist/types/src/containers/Deck/Banner.d.ts.map +1 -0
  145. package/dist/types/src/containers/Deck/Deck.d.ts +25 -0
  146. package/dist/types/src/containers/Deck/Deck.d.ts.map +1 -0
  147. package/dist/types/src/containers/Deck/Deck.stories.d.ts +67 -0
  148. package/dist/types/src/containers/Deck/Deck.stories.d.ts.map +1 -0
  149. package/dist/types/src/containers/Deck/DeckContent.d.ts +7 -0
  150. package/dist/types/src/containers/Deck/DeckContent.d.ts.map +1 -0
  151. package/dist/types/src/containers/Deck/DeckRoot.d.ts +39 -0
  152. package/dist/types/src/containers/Deck/DeckRoot.d.ts.map +1 -0
  153. package/dist/types/src/containers/Deck/DeckViewport.d.ts +16 -0
  154. package/dist/types/src/containers/Deck/DeckViewport.d.ts.map +1 -0
  155. package/dist/types/src/containers/Deck/StatusBar.d.ts.map +1 -0
  156. package/dist/types/src/containers/Deck/index.d.ts +2 -0
  157. package/dist/types/src/containers/Deck/index.d.ts.map +1 -0
  158. package/dist/types/src/containers/DeckLayout/ActiveNode.d.ts.map +1 -0
  159. package/dist/types/src/containers/DeckLayout/DeckLayout.d.ts.map +1 -0
  160. package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts +69 -0
  161. package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts.map +1 -0
  162. package/dist/types/src/containers/DeckLayout/Dialog.d.ts.map +1 -0
  163. package/dist/types/src/containers/DeckLayout/Fallback.d.ts +2 -0
  164. package/dist/types/src/containers/DeckLayout/Fallback.d.ts.map +1 -0
  165. package/dist/types/src/containers/DeckLayout/Popover.d.ts +5 -0
  166. package/dist/types/src/containers/DeckLayout/Popover.d.ts.map +1 -0
  167. package/dist/types/src/{components → containers}/DeckLayout/Toast.d.ts +3 -3
  168. package/dist/types/src/containers/DeckLayout/Toast.d.ts.map +1 -0
  169. package/dist/types/src/containers/DeckLayout/constants.d.ts.map +1 -0
  170. package/dist/types/src/containers/DeckLayout/index.d.ts +4 -0
  171. package/dist/types/src/containers/DeckLayout/index.d.ts.map +1 -0
  172. package/dist/types/src/containers/Plank/Plank.d.ts +17 -0
  173. package/dist/types/src/containers/Plank/Plank.d.ts.map +1 -0
  174. package/dist/types/src/containers/Plank/Plank.stories.d.ts +67 -0
  175. package/dist/types/src/containers/Plank/Plank.stories.d.ts.map +1 -0
  176. package/dist/types/src/containers/Plank/PlankComponent.d.ts +17 -0
  177. package/dist/types/src/containers/Plank/PlankComponent.d.ts.map +1 -0
  178. package/dist/types/src/containers/Plank/PlankContent.d.ts +10 -0
  179. package/dist/types/src/containers/Plank/PlankContent.d.ts.map +1 -0
  180. package/dist/types/src/{components → containers}/Plank/PlankControls.d.ts +5 -6
  181. package/dist/types/src/containers/Plank/PlankControls.d.ts.map +1 -0
  182. package/dist/types/src/containers/Plank/PlankError.d.ts +15 -0
  183. package/dist/types/src/containers/Plank/PlankError.d.ts.map +1 -0
  184. package/dist/types/src/{components → containers}/Plank/PlankHeading.d.ts +5 -4
  185. package/dist/types/src/containers/Plank/PlankHeading.d.ts.map +1 -0
  186. package/dist/types/src/{components → containers}/Plank/PlankLoading.d.ts.map +1 -1
  187. package/dist/types/src/containers/Plank/PlankRoot.d.ts +37 -0
  188. package/dist/types/src/containers/Plank/PlankRoot.d.ts.map +1 -0
  189. package/dist/types/src/containers/Plank/index.d.ts +4 -0
  190. package/dist/types/src/containers/Plank/index.d.ts.map +1 -0
  191. package/dist/types/src/containers/Sidebar/ComplementarySidebar.d.ts.map +1 -0
  192. package/dist/types/src/containers/Sidebar/Sidebar.d.ts.map +1 -0
  193. package/dist/types/src/{components → containers}/Sidebar/SidebarButton.d.ts +1 -1
  194. package/dist/types/src/containers/Sidebar/SidebarButton.d.ts.map +1 -0
  195. package/dist/types/src/{components → containers}/Sidebar/index.d.ts.map +1 -1
  196. package/dist/types/src/containers/index.d.ts +6 -0
  197. package/dist/types/src/containers/index.d.ts.map +1 -0
  198. package/dist/types/src/hooks/index.d.ts +2 -1
  199. package/dist/types/src/hooks/index.d.ts.map +1 -1
  200. package/dist/types/src/hooks/useBreakpoints.d.ts +1 -1
  201. package/dist/types/src/hooks/useCompanions.d.ts.map +1 -1
  202. package/dist/types/src/hooks/useDeckCompanions.d.ts +4 -4
  203. package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
  204. package/dist/types/src/hooks/useDeckState.d.ts +17 -0
  205. package/dist/types/src/hooks/useDeckState.d.ts.map +1 -0
  206. package/dist/types/src/hooks/useMainSize.d.ts +2 -2
  207. package/dist/types/src/hooks/useMainSize.d.ts.map +1 -1
  208. package/dist/types/src/hooks/useNodeActionExpander.d.ts +1 -1
  209. package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
  210. package/dist/types/src/hooks/useSelectedCompanion.d.ts +13 -0
  211. package/dist/types/src/hooks/useSelectedCompanion.d.ts.map +1 -0
  212. package/dist/types/src/index.d.ts +1 -4
  213. package/dist/types/src/index.d.ts.map +1 -1
  214. package/dist/types/src/layout.d.ts +20 -9
  215. package/dist/types/src/layout.d.ts.map +1 -1
  216. package/dist/types/src/layout.test.d.ts +2 -0
  217. package/dist/types/src/layout.test.d.ts.map +1 -0
  218. package/dist/types/src/meta.d.ts +2 -2
  219. package/dist/types/src/meta.d.ts.map +1 -1
  220. package/dist/types/src/operations/add-toast.d.ts +5 -0
  221. package/dist/types/src/operations/add-toast.d.ts.map +1 -0
  222. package/dist/types/src/operations/adjust.d.ts +5 -0
  223. package/dist/types/src/operations/adjust.d.ts.map +1 -0
  224. package/dist/types/src/operations/close.d.ts +5 -0
  225. package/dist/types/src/operations/close.d.ts.map +1 -0
  226. package/dist/types/src/operations/helpers.d.ts +3 -0
  227. package/dist/types/src/operations/helpers.d.ts.map +1 -0
  228. package/dist/types/src/operations/index.d.ts +3 -0
  229. package/dist/types/src/operations/index.d.ts.map +1 -0
  230. package/dist/types/src/operations/open.d.ts +5 -0
  231. package/dist/types/src/operations/open.d.ts.map +1 -0
  232. package/dist/types/src/operations/revert-workspace.d.ts +5 -0
  233. package/dist/types/src/operations/revert-workspace.d.ts.map +1 -0
  234. package/dist/types/src/operations/scroll-into-view.d.ts +5 -0
  235. package/dist/types/src/operations/scroll-into-view.d.ts.map +1 -0
  236. package/dist/types/src/operations/set-layout-mode.d.ts +9 -0
  237. package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -0
  238. package/dist/types/src/operations/set.d.ts +5 -0
  239. package/dist/types/src/operations/set.d.ts.map +1 -0
  240. package/dist/types/src/operations/switch-workspace.d.ts +5 -0
  241. package/dist/types/src/operations/switch-workspace.d.ts.map +1 -0
  242. package/dist/types/src/operations/update-companion.d.ts +5 -0
  243. package/dist/types/src/operations/update-companion.d.ts.map +1 -0
  244. package/dist/types/src/operations/update-complementary.d.ts +5 -0
  245. package/dist/types/src/operations/update-complementary.d.ts.map +1 -0
  246. package/dist/types/src/operations/update-dialog.d.ts +5 -0
  247. package/dist/types/src/operations/update-dialog.d.ts.map +1 -0
  248. package/dist/types/src/operations/update-plank-size.d.ts +5 -0
  249. package/dist/types/src/operations/update-plank-size.d.ts.map +1 -0
  250. package/dist/types/src/operations/update-popover.d.ts +5 -0
  251. package/dist/types/src/operations/update-popover.d.ts.map +1 -0
  252. package/dist/types/src/operations/update-sidebar.d.ts +5 -0
  253. package/dist/types/src/operations/update-sidebar.d.ts.map +1 -0
  254. package/dist/types/src/plugin.d.ts +4 -0
  255. package/dist/types/src/plugin.d.ts.map +1 -0
  256. package/dist/types/src/translations.d.ts +48 -55
  257. package/dist/types/src/translations.d.ts.map +1 -1
  258. package/dist/types/src/types/DeckCapabilities.d.ts +188 -0
  259. package/dist/types/src/types/DeckCapabilities.d.ts.map +1 -0
  260. package/dist/types/src/types/DeckEvents.d.ts +5 -0
  261. package/dist/types/src/types/DeckEvents.d.ts.map +1 -0
  262. package/dist/types/src/types/DeckOperation.d.ts +15 -0
  263. package/dist/types/src/types/DeckOperation.d.ts.map +1 -0
  264. package/dist/types/src/types/Settings.d.ts +10 -0
  265. package/dist/types/src/types/Settings.d.ts.map +1 -0
  266. package/dist/types/src/types/index.d.ts +4 -0
  267. package/dist/types/src/types/index.d.ts.map +1 -1
  268. package/dist/types/src/types/schema.d.ts +69 -69
  269. package/dist/types/src/types/schema.d.ts.map +1 -1
  270. package/dist/types/src/util/index.d.ts +2 -1
  271. package/dist/types/src/util/index.d.ts.map +1 -1
  272. package/dist/types/src/util/layoutAppliesTopbar.d.ts +1 -1
  273. package/dist/types/src/util/layoutAppliesTopbar.d.ts.map +1 -1
  274. package/dist/types/src/util/plank-url-params.d.ts +14 -0
  275. package/dist/types/src/util/plank-url-params.d.ts.map +1 -0
  276. package/dist/types/src/util/plank-url-params.test.d.ts +2 -0
  277. package/dist/types/src/util/plank-url-params.test.d.ts.map +1 -0
  278. package/dist/types/src/util/sanitize-persisted-state.d.ts +19 -0
  279. package/dist/types/src/util/sanitize-persisted-state.d.ts.map +1 -0
  280. package/dist/types/src/util/sanitize-persisted-state.test.d.ts +2 -0
  281. package/dist/types/src/util/sanitize-persisted-state.test.d.ts.map +1 -0
  282. package/dist/types/src/util/set-active.d.ts +19 -4
  283. package/dist/types/src/util/set-active.d.ts.map +1 -1
  284. package/dist/types/src/util/set-active.test.d.ts +2 -0
  285. package/dist/types/src/util/set-active.test.d.ts.map +1 -0
  286. package/dist/types/tsconfig.tsbuildinfo +1 -1
  287. package/package.json +126 -62
  288. package/src/DeckPlugin.node.ts +17 -0
  289. package/src/DeckPlugin.test.ts +27 -0
  290. package/src/DeckPlugin.ts +43 -56
  291. package/src/DeckPlugin.workerd.ts +16 -0
  292. package/src/capabilities/app-graph-builder.ts +111 -127
  293. package/src/capabilities/check-app-scheme.ts +123 -24
  294. package/src/capabilities/index.ts +14 -14
  295. package/src/capabilities/notification-tracker.ts +170 -0
  296. package/src/capabilities/operation-handler.ts +16 -0
  297. package/src/capabilities/react-root.tsx +40 -28
  298. package/src/capabilities/react-surface.tsx +28 -22
  299. package/src/capabilities/settings.ts +29 -20
  300. package/src/capabilities/state.ts +74 -96
  301. package/src/capabilities/tools.ts +57 -50
  302. package/src/capabilities/url-handler.ts +290 -48
  303. package/src/components/DeckSettings/DeckSettings.stories.tsx +37 -0
  304. package/src/components/DeckSettings/DeckSettings.tsx +19 -88
  305. package/src/components/DeckSettings/index.ts +2 -2
  306. package/src/components/Matrix/Matrix.stories.tsx +220 -0
  307. package/src/components/Matrix/Matrix.tsx +205 -0
  308. package/src/components/Matrix/SPEC.md +219 -0
  309. package/src/components/Matrix/index.ts +6 -0
  310. package/src/components/index.ts +6 -3
  311. package/src/containers/Deck/Banner.tsx +41 -0
  312. package/src/containers/Deck/Deck.stories.tsx +81 -0
  313. package/src/containers/Deck/Deck.tsx +21 -0
  314. package/src/containers/Deck/DeckContent.tsx +102 -0
  315. package/src/containers/Deck/DeckRoot.tsx +50 -0
  316. package/src/containers/Deck/DeckViewport.tsx +450 -0
  317. package/src/{components/DeckLayout → containers/Deck}/StatusBar.tsx +4 -4
  318. package/src/containers/Deck/index.ts +5 -0
  319. package/src/{components → containers}/DeckLayout/ActiveNode.tsx +9 -4
  320. package/src/containers/DeckLayout/DeckLayout.stories.tsx +395 -0
  321. package/src/containers/DeckLayout/DeckLayout.tsx +62 -0
  322. package/src/containers/DeckLayout/Dialog.tsx +52 -0
  323. package/src/containers/DeckLayout/Fallback.tsx +24 -0
  324. package/src/containers/DeckLayout/Popover.tsx +166 -0
  325. package/src/containers/DeckLayout/Toast.tsx +76 -0
  326. package/src/{components → containers}/DeckLayout/constants.ts +1 -0
  327. package/src/{components → containers}/DeckLayout/index.ts +3 -2
  328. package/src/containers/Plank/Plank.stories.tsx +108 -0
  329. package/src/containers/Plank/Plank.tsx +22 -0
  330. package/src/containers/Plank/PlankComponent.tsx +223 -0
  331. package/src/containers/Plank/PlankContent.tsx +45 -0
  332. package/src/{components → containers}/Plank/PlankControls.tsx +43 -37
  333. package/src/containers/Plank/PlankError.tsx +82 -0
  334. package/src/{components → containers}/Plank/PlankHeading.tsx +67 -64
  335. package/src/{components → containers}/Plank/PlankLoading.tsx +1 -1
  336. package/src/containers/Plank/PlankRoot.tsx +49 -0
  337. package/src/{components → containers}/Plank/index.ts +0 -2
  338. package/src/containers/Sidebar/ComplementarySidebar.tsx +189 -0
  339. package/src/containers/Sidebar/Sidebar.tsx +39 -0
  340. package/src/containers/Sidebar/SidebarButton.tsx +100 -0
  341. package/src/containers/index.ts +11 -0
  342. package/src/hooks/index.ts +2 -1
  343. package/src/hooks/useCompanions.ts +3 -3
  344. package/src/hooks/useDeckCompanions.ts +8 -11
  345. package/src/hooks/useDeckState.ts +73 -0
  346. package/src/hooks/useMainSize.ts +2 -2
  347. package/src/hooks/useNodeActionExpander.ts +4 -4
  348. package/src/hooks/useSelectedCompanion.ts +32 -0
  349. package/src/index.ts +1 -4
  350. package/src/layout.test.ts +59 -0
  351. package/src/layout.ts +38 -40
  352. package/src/meta.ts +24 -6
  353. package/src/operations/add-toast.ts +24 -0
  354. package/src/operations/adjust.ts +82 -0
  355. package/src/operations/close.ts +35 -0
  356. package/src/operations/helpers.ts +22 -0
  357. package/src/operations/index.ts +23 -0
  358. package/src/operations/open.ts +201 -0
  359. package/src/operations/revert-workspace.ts +22 -0
  360. package/src/operations/scroll-into-view.ts +24 -0
  361. package/src/operations/set-layout-mode.ts +84 -0
  362. package/src/operations/set.ts +36 -0
  363. package/src/operations/switch-workspace.ts +66 -0
  364. package/src/operations/update-companion.ts +35 -0
  365. package/src/operations/update-complementary.ts +33 -0
  366. package/src/operations/update-dialog.ts +34 -0
  367. package/src/operations/update-plank-size.ts +28 -0
  368. package/src/operations/update-popover.ts +36 -0
  369. package/src/operations/update-sidebar.ts +28 -0
  370. package/src/plugin.ts +11 -0
  371. package/src/translations.ts +48 -54
  372. package/src/types/DeckCapabilities.ts +34 -0
  373. package/src/types/DeckEvents.ts +21 -0
  374. package/src/types/DeckOperation.ts +56 -0
  375. package/src/types/Settings.ts +36 -0
  376. package/src/types/index.ts +5 -0
  377. package/src/types/schema.ts +49 -58
  378. package/src/util/index.ts +2 -1
  379. package/src/util/layoutAppliesTopbar.ts +2 -2
  380. package/src/util/plank-url-params.test.ts +85 -0
  381. package/src/util/plank-url-params.ts +36 -0
  382. package/src/util/sanitize-persisted-state.test.ts +79 -0
  383. package/src/util/sanitize-persisted-state.ts +52 -0
  384. package/src/util/set-active.test.ts +106 -0
  385. package/src/util/set-active.ts +50 -30
  386. package/src/vite-env.d.ts +10 -0
  387. package/dist/lib/browser/app-graph-builder-D74NTOMK.mjs +0 -128
  388. package/dist/lib/browser/app-graph-builder-D74NTOMK.mjs.map +0 -7
  389. package/dist/lib/browser/check-app-scheme-HIEVFAAX.mjs +0 -32
  390. package/dist/lib/browser/check-app-scheme-HIEVFAAX.mjs.map +0 -7
  391. package/dist/lib/browser/chunk-5KMJPIQC.mjs +0 -16
  392. package/dist/lib/browser/chunk-5KMJPIQC.mjs.map +0 -7
  393. package/dist/lib/browser/chunk-CNTGBCMK.mjs +0 -145
  394. package/dist/lib/browser/chunk-CNTGBCMK.mjs.map +0 -7
  395. package/dist/lib/browser/chunk-F3VCCHVL.mjs +0 -162
  396. package/dist/lib/browser/chunk-F3VCCHVL.mjs.map +0 -7
  397. package/dist/lib/browser/chunk-QKCGZ45E.mjs +0 -128
  398. package/dist/lib/browser/chunk-QKCGZ45E.mjs.map +0 -7
  399. package/dist/lib/browser/chunk-UXLU6CMW.mjs +0 -16
  400. package/dist/lib/browser/chunk-UXLU6CMW.mjs.map +0 -7
  401. package/dist/lib/browser/chunk-VBYJ664A.mjs +0 -132
  402. package/dist/lib/browser/chunk-VBYJ664A.mjs.map +0 -7
  403. package/dist/lib/browser/chunk-VUJ6UNIJ.mjs +0 -1553
  404. package/dist/lib/browser/chunk-VUJ6UNIJ.mjs.map +0 -7
  405. package/dist/lib/browser/index.mjs +0 -174
  406. package/dist/lib/browser/index.mjs.map +0 -7
  407. package/dist/lib/browser/intent-resolver-UA4YQGAC.mjs +0 -524
  408. package/dist/lib/browser/intent-resolver-UA4YQGAC.mjs.map +0 -7
  409. package/dist/lib/browser/meta.json +0 -1
  410. package/dist/lib/browser/react-root-JAMHKYWN.mjs +0 -44
  411. package/dist/lib/browser/react-root-JAMHKYWN.mjs.map +0 -7
  412. package/dist/lib/browser/react-surface-6LW337ZT.mjs +0 -40
  413. package/dist/lib/browser/react-surface-6LW337ZT.mjs.map +0 -7
  414. package/dist/lib/browser/settings-SDPTOCCM.mjs +0 -30
  415. package/dist/lib/browser/settings-SDPTOCCM.mjs.map +0 -7
  416. package/dist/lib/browser/state-7IFAGZQO.mjs +0 -12
  417. package/dist/lib/browser/toolkit-L5CFXJCF.mjs +0 -52
  418. package/dist/lib/browser/toolkit-L5CFXJCF.mjs.map +0 -7
  419. package/dist/lib/browser/types/index.mjs +0 -32
  420. package/dist/lib/browser/url-handler-QEYGYE2H.mjs +0 -70
  421. package/dist/lib/browser/url-handler-QEYGYE2H.mjs.map +0 -7
  422. package/dist/types/src/capabilities/capabilities.d.ts +0 -184
  423. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  424. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  425. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  426. package/dist/types/src/capabilities/toolkit.d.ts +0 -25
  427. package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
  428. package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +0 -1
  429. package/dist/types/src/components/DeckLayout/Banner.d.ts.map +0 -1
  430. package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts +0 -3
  431. package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +0 -1
  432. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +0 -1
  433. package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts +0 -74
  434. package/dist/types/src/components/DeckLayout/DeckLayout.stories.d.ts.map +0 -1
  435. package/dist/types/src/components/DeckLayout/DeckMain.d.ts +0 -3
  436. package/dist/types/src/components/DeckLayout/DeckMain.d.ts.map +0 -1
  437. package/dist/types/src/components/DeckLayout/Dialog.d.ts.map +0 -1
  438. package/dist/types/src/components/DeckLayout/Fallback.d.ts +0 -3
  439. package/dist/types/src/components/DeckLayout/Fallback.d.ts.map +0 -1
  440. package/dist/types/src/components/DeckLayout/Popover.d.ts +0 -5
  441. package/dist/types/src/components/DeckLayout/Popover.d.ts.map +0 -1
  442. package/dist/types/src/components/DeckLayout/StatusBar.d.ts.map +0 -1
  443. package/dist/types/src/components/DeckLayout/Toast.d.ts.map +0 -1
  444. package/dist/types/src/components/DeckLayout/Topbar.d.ts +0 -3
  445. package/dist/types/src/components/DeckLayout/Topbar.d.ts.map +0 -1
  446. package/dist/types/src/components/DeckLayout/constants.d.ts.map +0 -1
  447. package/dist/types/src/components/DeckLayout/index.d.ts +0 -4
  448. package/dist/types/src/components/DeckLayout/index.d.ts.map +0 -1
  449. package/dist/types/src/components/Plank/Plank.d.ts +0 -27
  450. package/dist/types/src/components/Plank/Plank.d.ts.map +0 -1
  451. package/dist/types/src/components/Plank/Plank.stories.d.ts +0 -89
  452. package/dist/types/src/components/Plank/Plank.stories.d.ts.map +0 -1
  453. package/dist/types/src/components/Plank/PlankControls.d.ts.map +0 -1
  454. package/dist/types/src/components/Plank/PlankError.d.ts +0 -13
  455. package/dist/types/src/components/Plank/PlankError.d.ts.map +0 -1
  456. package/dist/types/src/components/Plank/PlankHeading.d.ts.map +0 -1
  457. package/dist/types/src/components/Plank/index.d.ts +0 -6
  458. package/dist/types/src/components/Plank/index.d.ts.map +0 -1
  459. package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +0 -1
  460. package/dist/types/src/components/Sidebar/Sidebar.d.ts.map +0 -1
  461. package/dist/types/src/components/Sidebar/SidebarButton.d.ts.map +0 -1
  462. package/dist/types/src/components/fragments.d.ts +0 -4
  463. package/dist/types/src/components/fragments.d.ts.map +0 -1
  464. package/dist/types/src/events.d.ts +0 -4
  465. package/dist/types/src/events.d.ts.map +0 -1
  466. package/dist/types/src/hooks/useHoistStatusbar.d.ts +0 -3
  467. package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +0 -1
  468. package/dist/types/src/util/overscroll.d.ts +0 -47
  469. package/dist/types/src/util/overscroll.d.ts.map +0 -1
  470. package/src/capabilities/capabilities.ts +0 -14
  471. package/src/capabilities/intent-resolver.ts +0 -471
  472. package/src/capabilities/toolkit.ts +0 -66
  473. package/src/components/DeckLayout/Banner.tsx +0 -39
  474. package/src/components/DeckLayout/ContentEmpty.tsx +0 -31
  475. package/src/components/DeckLayout/DeckLayout.stories.tsx +0 -63
  476. package/src/components/DeckLayout/DeckLayout.tsx +0 -32
  477. package/src/components/DeckLayout/DeckMain.tsx +0 -281
  478. package/src/components/DeckLayout/Dialog.tsx +0 -36
  479. package/src/components/DeckLayout/Fallback.tsx +0 -28
  480. package/src/components/DeckLayout/Popover.tsx +0 -95
  481. package/src/components/DeckLayout/Toast.tsx +0 -86
  482. package/src/components/DeckLayout/Topbar.tsx +0 -11
  483. package/src/components/Plank/Plank.stories.tsx +0 -54
  484. package/src/components/Plank/Plank.tsx +0 -299
  485. package/src/components/Plank/PlankError.tsx +0 -49
  486. package/src/components/Sidebar/ComplementarySidebar.tsx +0 -214
  487. package/src/components/Sidebar/Sidebar.tsx +0 -42
  488. package/src/components/Sidebar/SidebarButton.tsx +0 -88
  489. package/src/components/fragments.ts +0 -14
  490. package/src/events.ts +0 -11
  491. package/src/hooks/useHoistStatusbar.ts +0 -27
  492. package/src/util/overscroll.ts +0 -69
  493. /package/dist/lib/{browser/state-7IFAGZQO.mjs.map → neutral/check-app-scheme-INSOF72J.mjs.map} +0 -0
  494. /package/dist/lib/{browser/types/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  495. /package/dist/types/src/{components/DeckLayout → containers/Deck}/StatusBar.d.ts +0 -0
  496. /package/dist/types/src/{components → containers}/DeckLayout/ActiveNode.d.ts +0 -0
  497. /package/dist/types/src/{components → containers}/DeckLayout/DeckLayout.d.ts +0 -0
  498. /package/dist/types/src/{components → containers}/DeckLayout/Dialog.d.ts +0 -0
  499. /package/dist/types/src/{components → containers}/DeckLayout/constants.d.ts +0 -0
  500. /package/dist/types/src/{components → containers}/Plank/PlankLoading.d.ts +0 -0
  501. /package/dist/types/src/{components → containers}/Sidebar/ComplementarySidebar.d.ts +0 -0
  502. /package/dist/types/src/{components → containers}/Sidebar/Sidebar.d.ts +0 -0
  503. /package/dist/types/src/{components → containers}/Sidebar/index.d.ts +0 -0
  504. /package/src/{components → containers}/Sidebar/index.ts +0 -0
@@ -0,0 +1,8 @@
1
+ import {
2
+ meta
3
+ } from "./chunk-PYEY5SEC.mjs";
4
+ import "./chunk-J5LGTIGS.mjs";
5
+ export {
6
+ meta
7
+ };
8
+ //# sourceMappingURL=meta.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,182 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/capabilities/notification-tracker.ts
4
+ import * as Effect from "effect/Effect";
5
+ import * as Fiber from "effect/Fiber";
6
+ import * as Stream from "effect/Stream";
7
+ import { Capabilities, Capability } from "@dxos/app-framework";
8
+ import { SettingsOperation } from "@dxos/app-toolkit";
9
+ import { Process } from "@dxos/compute";
10
+ import { meta } from "#meta";
11
+ import { DeckCapabilities } from "#types";
12
+ var NOTIFY_TOAST_DURATION = 5e3;
13
+ var ERROR_TOAST_DURATION = 1e4;
14
+ var UNDO_TOAST_DURATION = 1e4;
15
+ var notification_tracker_default = Capability.makeModule(Effect.fnUntraced(function* () {
16
+ const capabilities = yield* Capability.Service;
17
+ const registry = yield* Capability.get(Capabilities.AtomRegistry);
18
+ const ephemeralAtom = yield* Capability.get(DeckCapabilities.EphemeralState);
19
+ const monitor = yield* Capability.get(Capabilities.ProcessMonitor);
20
+ const manager = yield* Capability.get(Capabilities.PluginManager);
21
+ const invoker = yield* Capability.get(Capabilities.OperationInvoker);
22
+ const addToast = (toast) => {
23
+ const state = registry.get(ephemeralAtom);
24
+ registry.set(ephemeralAtom, {
25
+ ...state,
26
+ toasts: [
27
+ ...state.toasts,
28
+ toast
29
+ ]
30
+ });
31
+ };
32
+ const lastState = /* @__PURE__ */ new Map();
33
+ const handleProcesses = (processes) => {
34
+ const seen = /* @__PURE__ */ new Set();
35
+ for (const process of processes) {
36
+ seen.add(process.pid);
37
+ const previous = lastState.get(process.pid);
38
+ lastState.set(process.pid, process.state);
39
+ if (previous === process.state) {
40
+ continue;
41
+ }
42
+ const notify = process.params.notify;
43
+ if (!notify) {
44
+ continue;
45
+ }
46
+ if (previous !== Process.State.RUNNING && process.state === Process.State.RUNNING && notify.start) {
47
+ addToast({
48
+ id: `notify-start-${process.pid}`,
49
+ title: notify.start,
50
+ duration: NOTIFY_TOAST_DURATION
51
+ });
52
+ } else if (process.state === Process.State.SUCCEEDED && notify.success) {
53
+ addToast({
54
+ id: `notify-success-${process.pid}`,
55
+ title: notify.success,
56
+ duration: NOTIFY_TOAST_DURATION
57
+ });
58
+ } else if (process.state === Process.State.FAILED && notify.error) {
59
+ addToast({
60
+ id: `notify-error-${process.pid}`,
61
+ title: notify.error,
62
+ ...process.error ? {
63
+ description: process.error
64
+ } : {},
65
+ icon: "ph--warning--regular",
66
+ duration: ERROR_TOAST_DURATION
67
+ });
68
+ }
69
+ }
70
+ for (const pid of lastState.keys()) {
71
+ if (!seen.has(pid)) {
72
+ lastState.delete(pid);
73
+ }
74
+ }
75
+ };
76
+ const unsubscribeMonitor = registry.subscribe(monitor.processTreeAtom, handleProcesses);
77
+ let hasShownFailureToast = false;
78
+ const handleFailures = (failures) => {
79
+ if (failures.length === 0) {
80
+ hasShownFailureToast = false;
81
+ return;
82
+ }
83
+ if (hasShownFailureToast) {
84
+ return;
85
+ }
86
+ hasShownFailureToast = true;
87
+ const toast = {
88
+ id: "plugin-failure",
89
+ title: [
90
+ "plugin-failure.title",
91
+ {
92
+ ns: meta.id
93
+ }
94
+ ],
95
+ description: [
96
+ "plugin-failure.description",
97
+ {
98
+ ns: meta.id
99
+ }
100
+ ],
101
+ icon: "ph--warning--regular",
102
+ duration: ERROR_TOAST_DURATION,
103
+ actionLabel: [
104
+ "plugin-failure-action.label",
105
+ {
106
+ ns: meta.id
107
+ }
108
+ ],
109
+ actionAlt: [
110
+ "plugin-failure-action.alt",
111
+ {
112
+ ns: meta.id
113
+ }
114
+ ],
115
+ onAction: () => void invoker.invokePromise(SettingsOperation.OpenPluginRegistry)
116
+ };
117
+ const state = registry.get(ephemeralAtom);
118
+ registry.set(ephemeralAtom, {
119
+ ...state,
120
+ toasts: [
121
+ ...state.toasts.filter((t) => t.id !== "plugin-failure"),
122
+ toast
123
+ ]
124
+ });
125
+ };
126
+ const unsubscribeFailures = registry.subscribe(manager.failed, handleFailures);
127
+ const showUndoToast = (message, onUndo) => {
128
+ const undoId = `notify-undo-${crypto.randomUUID()}`;
129
+ const state = registry.get(ephemeralAtom);
130
+ const toasts = state.currentUndoId ? state.toasts.filter((toast2) => toast2.id !== state.currentUndoId) : state.toasts;
131
+ const toast = {
132
+ id: undoId,
133
+ title: message ?? [
134
+ "undo-available.label",
135
+ {
136
+ ns: meta.id
137
+ }
138
+ ],
139
+ duration: UNDO_TOAST_DURATION,
140
+ actionLabel: [
141
+ "undo-action.label",
142
+ {
143
+ ns: meta.id
144
+ }
145
+ ],
146
+ actionAlt: [
147
+ "undo-action.alt",
148
+ {
149
+ ns: meta.id
150
+ }
151
+ ],
152
+ closeLabel: [
153
+ "undo-close.label",
154
+ {
155
+ ns: meta.id
156
+ }
157
+ ],
158
+ onAction: onUndo
159
+ };
160
+ registry.set(ephemeralAtom, {
161
+ ...state,
162
+ currentUndoId: undoId,
163
+ toasts: [
164
+ ...toasts,
165
+ toast
166
+ ]
167
+ });
168
+ };
169
+ const undoFiber = Effect.runFork(Effect.gen(function* () {
170
+ const historyTracker = yield* Capability.waitFor(Capabilities.HistoryTracker);
171
+ yield* Stream.fromPubSub(historyTracker.undoable).pipe(Stream.runForEach((event) => Effect.sync(() => showUndoToast(event.message, () => void historyTracker.undoPromise()))));
172
+ }).pipe(Effect.provideService(Capability.Service, capabilities)));
173
+ return Capability.contributes(Capabilities.Null, null, () => Effect.gen(function* () {
174
+ unsubscribeMonitor();
175
+ unsubscribeFailures();
176
+ yield* Fiber.interrupt(undoFiber);
177
+ }));
178
+ }));
179
+ export {
180
+ notification_tracker_default as default
181
+ };
182
+ //# sourceMappingURL=notification-tracker-P36322BH.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/notification-tracker.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Fiber from 'effect/Fiber';\nimport * as Stream from 'effect/Stream';\n\nimport { Capabilities, Capability, type PluginManager } from '@dxos/app-framework';\nimport { type LayoutOperation, SettingsOperation } from '@dxos/app-toolkit';\nimport { Process } from '@dxos/compute';\n\nimport { meta } from '#meta';\nimport { DeckCapabilities } from '#types';\n\nconst NOTIFY_TOAST_DURATION = 5_000;\nconst ERROR_TOAST_DURATION = 10_000;\nconst UNDO_TOAST_DURATION = 10_000;\n\n/**\n * The single producer of toasts driven by operation invocations:\n * - Per-invoke notifications ride the process monitor: each invocation spawns a process carrying the\n * caller's `notify` config on its params; this tracker watches process state transitions and toasts\n * on start / success / failure.\n * - Undo toasts come from the history tracker's `undoable` stream (it owns the undo registry lookup);\n * the toast action triggers `historyTracker.undoPromise()`.\n */\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const capabilities = yield* Capability.Service;\n const registry = yield* Capability.get(Capabilities.AtomRegistry);\n const ephemeralAtom = yield* Capability.get(DeckCapabilities.EphemeralState);\n const monitor = yield* Capability.get(Capabilities.ProcessMonitor);\n const manager = yield* Capability.get(Capabilities.PluginManager);\n const invoker = yield* Capability.get(Capabilities.OperationInvoker);\n\n const addToast = (toast: LayoutOperation.Toast) => {\n const state = registry.get(ephemeralAtom);\n registry.set(ephemeralAtom, { ...state, toasts: [...state.toasts, toast] });\n };\n\n //\n // Notifications — driven by the process monitor.\n //\n\n // Tracks the last-seen state per process so we only toast on transitions.\n const lastState = new Map<Process.ID, Process.State>();\n\n const handleProcesses = (processes: readonly Process.Info[]) => {\n const seen = new Set<Process.ID>();\n for (const process of processes) {\n seen.add(process.pid);\n const previous = lastState.get(process.pid);\n lastState.set(process.pid, process.state);\n if (previous === process.state) {\n continue;\n }\n\n const notify = process.params.notify;\n if (!notify) {\n continue;\n }\n\n // Transition into RUNNING (the first snapshot may be a pre-RUNNING state like IDLE/HYBERNATING).\n if (previous !== Process.State.RUNNING && process.state === Process.State.RUNNING && notify.start) {\n addToast({ id: `notify-start-${process.pid}`, title: notify.start, duration: NOTIFY_TOAST_DURATION });\n } else if (process.state === Process.State.SUCCEEDED && notify.success) {\n addToast({ id: `notify-success-${process.pid}`, title: notify.success, duration: NOTIFY_TOAST_DURATION });\n } else if (process.state === Process.State.FAILED && notify.error) {\n addToast({\n id: `notify-error-${process.pid}`,\n title: notify.error,\n ...(process.error ? { description: process.error } : {}),\n icon: 'ph--warning--regular',\n duration: ERROR_TOAST_DURATION,\n });\n }\n }\n\n // Drop bookkeeping for processes that have left the tree.\n for (const pid of lastState.keys()) {\n if (!seen.has(pid)) {\n lastState.delete(pid);\n }\n }\n };\n\n const unsubscribeMonitor = registry.subscribe(monitor.processTreeAtom, handleProcesses);\n\n //\n // Plugin failures — show one toast when any plugin fails to activate, with a link to the registry.\n //\n\n let hasShownFailureToast = false;\n\n const handleFailures = (failures: readonly PluginManager.PluginFailure[]) => {\n if (failures.length === 0) {\n hasShownFailureToast = false;\n return;\n }\n if (hasShownFailureToast) {\n return;\n }\n hasShownFailureToast = true;\n // Replace any stale plugin-failure toast so at most one is ever visible.\n const toast: LayoutOperation.Toast = {\n id: 'plugin-failure',\n title: ['plugin-failure.title', { ns: meta.id }],\n description: ['plugin-failure.description', { ns: meta.id }],\n icon: 'ph--warning--regular',\n duration: ERROR_TOAST_DURATION,\n actionLabel: ['plugin-failure-action.label', { ns: meta.id }],\n actionAlt: ['plugin-failure-action.alt', { ns: meta.id }],\n onAction: () => void invoker.invokePromise(SettingsOperation.OpenPluginRegistry),\n };\n const state = registry.get(ephemeralAtom);\n registry.set(ephemeralAtom, {\n ...state,\n toasts: [...state.toasts.filter((t) => t.id !== 'plugin-failure'), toast],\n });\n };\n\n const unsubscribeFailures = registry.subscribe(manager.failed, handleFailures);\n\n //\n // Undo — driven by the history tracker's `undoable` stream (it owns the registry lookup).\n //\n\n const showUndoToast = (message: LayoutOperation.Toast['title'], onUndo: () => void) => {\n const undoId = `notify-undo-${crypto.randomUUID()}`;\n const state = registry.get(ephemeralAtom);\n // Replace the previous undo toast (only the most recent action can be undone).\n const toasts = state.currentUndoId\n ? state.toasts.filter((toast) => toast.id !== state.currentUndoId)\n : state.toasts;\n const toast: LayoutOperation.Toast = {\n id: undoId,\n title: message ?? ['undo-available.label', { ns: meta.id }],\n duration: UNDO_TOAST_DURATION,\n actionLabel: ['undo-action.label', { ns: meta.id }],\n actionAlt: ['undo-action.alt', { ns: meta.id }],\n closeLabel: ['undo-close.label', { ns: meta.id }],\n onAction: onUndo,\n };\n registry.set(ephemeralAtom, { ...state, currentUndoId: undoId, toasts: [...toasts, toast] });\n };\n\n // The history tracker is contributed on ProcessManagerReady, possibly after this module activates;\n // `waitFor` resolves it once available, then we observe its undoable stream.\n const undoFiber = Effect.runFork(\n Effect.gen(function* () {\n const historyTracker = yield* Capability.waitFor(Capabilities.HistoryTracker);\n yield* Stream.fromPubSub(historyTracker.undoable).pipe(\n Stream.runForEach((event) =>\n Effect.sync(() => showUndoToast(event.message, () => void historyTracker.undoPromise())),\n ),\n );\n }).pipe(Effect.provideService(Capability.Service, capabilities)),\n );\n\n // Track all subscriptions so they are torn down when the module deactivates.\n return Capability.contributes(Capabilities.Null, null, () =>\n Effect.gen(function* () {\n unsubsc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BAAW,CAACC,UACVC,YAAK,MAAMnB,cAAckB,MAAMjB,SAAS,MAAM,KAAKU,eAAeS,YAAW,CAAA,CAAA,CAAA,CAAA;EAG1F,CAAA,EAAGJ,KAAYK,sBAAe7F,WAAWW,SAASD,YAAAA,CAAAA,CAAAA;AAIpD,SAAOV,WAAW8F,YAAY/F,aAAagG,MAAM,MAAM,MAC9Cb,WAAI,aAAA;AACT3B,uBAAAA;AACAe,wBAAAA;AACA,WAAa0B,gBAAUhB,SAAAA;EACzB,CAAA,CAAA;AAEJ,CAAA,CAAA;",
6
+ "names": ["Effect", "Fiber", "Stream", "Capabilities", "Capability", "SettingsOperation", "Process", "meta", "DeckCapabilities", "NOTIFY_TOAST_DURATION", "ERROR_TOAST_DURATION", "UNDO_TOAST_DURATION", "makeModule", "fnUntraced", "capabilities", "Service", "registry", "get", "AtomRegistry", "ephemeralAtom", "EphemeralState", "monitor", "ProcessMonitor", "manager", "PluginManager", "invoker", "OperationInvoker", "addToast", "toast", "state", "set", "toasts", "lastState", "Map", "handleProcesses", "processes", "seen", "Set", "process", "add", "pid", "previous", "notify", "params", "State", "RUNNING", "start", "id", "title", "duration", "SUCCEEDED", "success", "FAILED", "error", "description", "icon", "keys", "has", "delete", "unsubscribeMonitor", "subscribe", "processTreeAtom", "hasShownFailureToast", "handleFailures", "failures", "length", "ns", "actionLabel", "actionAlt", "onAction", "invokePromise", "OpenPluginRegistry", "filter", "t", "unsubscribeFailures", "failed", "showUndoToast", "message", "onUndo", "undoId", "crypto", "randomUUID", "currentUndoId", "closeLabel", "undoFiber", "runFork", "gen", "historyTracker", "waitFor", "HistoryTracker", "fromPubSub", "undoable", "pipe", "runForEach", "event", "sync", "undoPromise", "provideService", "contributes", "Null", "interrupt"]
7
+ }
@@ -0,0 +1,159 @@
1
+ import {
2
+ openSubjectsOnActiveDeck
3
+ } from "./chunk-ZYYOSX5I.mjs";
4
+ import {
5
+ updateActiveDeck
6
+ } from "./chunk-GLB73Q6U.mjs";
7
+ import {
8
+ DeckCapabilities_exports
9
+ } from "./chunk-BS4EOYMK.mjs";
10
+ import {
11
+ computeActiveUpdates
12
+ } from "./chunk-GBIGQKYW.mjs";
13
+ import "./chunk-J5LGTIGS.mjs";
14
+
15
+ // src/operations/open.ts
16
+ import * as Effect from "effect/Effect";
17
+ import * as Option from "effect/Option";
18
+ import { Capabilities, Capability } from "@dxos/app-framework";
19
+ import { AppCapabilities, LayoutOperation, createEdgeExistenceChecker, expandPath, validateNavigationTarget } from "@dxos/app-toolkit";
20
+ import { Operation } from "@dxos/compute";
21
+ import { Context } from "@dxos/context";
22
+ import { Database, EID, Obj } from "@dxos/echo";
23
+ import { log } from "@dxos/log";
24
+ import { AttentionCapabilities } from "@dxos/plugin-attention";
25
+ import { ClientCapabilities } from "@dxos/plugin-client";
26
+ import { Graph } from "@dxos/plugin-graph";
27
+ import { ObservabilityOperation } from "@dxos/plugin-observability";
28
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-deck/src/operations/open.ts";
29
+ var handler = LayoutOperation.Open.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
30
+ log("LayoutOperation.Open handler start", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 21, S: this });
31
+ const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
32
+ const attention = yield* Capability.get(AttentionCapabilities.Attention);
33
+ const capabilities = yield* Capability.Service;
34
+ const pathResolvers = capabilities.getAll(AppCapabilities.NavigationPathResolver);
35
+ const client = yield* Capability.get(ClientCapabilities.Client).pipe(Effect.catchAll(() => Effect.succeed(void 0)));
36
+ const checkLocalExistence = client ? (id) => {
37
+ const spaceId = EID.getSpaceId(id);
38
+ const space = spaceId ? client.spaces.get(spaceId) : void 0;
39
+ if (!space) {
40
+ return Effect.succeed(false);
41
+ }
42
+ return Database.load(space.db.makeRef(id)).pipe(Effect.as(true), Effect.catchTag("EntityNotFoundError", () => Effect.succeed(false)), Effect.catchAll(() => Effect.succeed(false)));
43
+ } : void 0;
44
+ const checkRemoteExistence = client ? createEdgeExistenceChecker((spaceId, body) => client.edge.http.execQuery(new Context(void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 37 }), spaceId, body)) : void 0;
45
+ if (input.navigation === "immediate") {
46
+ for (const subjectId of input.subject) {
47
+ expandPath(graph, subjectId);
48
+ }
49
+ }
50
+ const validatedSubjects = yield* Effect.all(input.subject.map((subjectId) => input.navigation === "immediate" ? Effect.succeed(subjectId) : validateNavigationTarget({
51
+ graph,
52
+ subjectId,
53
+ pathResolvers,
54
+ checkLocalExistence,
55
+ checkRemoteExistence
56
+ })));
57
+ input = {
58
+ ...input,
59
+ subject: validatedSubjects
60
+ };
61
+ {
62
+ const state = yield* Capabilities.getAtomValue(DeckCapabilities_exports.State);
63
+ if (input.workspace && state.activeDeck !== input.workspace) {
64
+ yield* Operation.invoke(LayoutOperation.SwitchWorkspace, {
65
+ subject: input.workspace
66
+ });
67
+ }
68
+ }
69
+ {
70
+ const deck = yield* DeckCapabilities_exports.getDeck();
71
+ const active = !deck.solo && deck.initialized ? deck.active : [];
72
+ if (active.length > 0 && input.subject.length > 0) {
73
+ const resolveDXN = (qualifiedPath) => Effect.reduce(pathResolvers, Option.none(), (acc, resolver) => Option.isSome(acc) ? Effect.succeed(acc) : resolver(qualifiedPath).pipe(Effect.map((opt) => Option.map(opt, (dxn) => dxn.toString())), Effect.catchAll(() => Effect.succeed(Option.none()))));
74
+ const deckDxnMap = /* @__PURE__ */ new Map();
75
+ yield* Effect.all(active.map((deckId) => resolveDXN(deckId).pipe(Effect.map((opt) => {
76
+ if (Option.isSome(opt)) {
77
+ deckDxnMap.set(opt.value, deckId);
78
+ }
79
+ }))), {
80
+ concurrency: "unbounded"
81
+ });
82
+ if (deckDxnMap.size > 0) {
83
+ const remapped = yield* Effect.all(input.subject.map((subjectId) => resolveDXN(subjectId).pipe(Effect.map((opt) => {
84
+ if (Option.isSome(opt)) {
85
+ const existing = deckDxnMap.get(opt.value);
86
+ if (existing && existing !== subjectId) {
87
+ return existing;
88
+ }
89
+ }
90
+ return subjectId;
91
+ }))), {
92
+ concurrency: "unbounded"
93
+ });
94
+ input = {
95
+ ...input,
96
+ subject: remapped
97
+ };
98
+ }
99
+ }
100
+ }
101
+ let previouslyOpenIds;
102
+ {
103
+ const deck = yield* DeckCapabilities_exports.getDeck();
104
+ previouslyOpenIds = new Set(deck.solo ? [
105
+ deck.solo
106
+ ] : deck.active);
107
+ const next = deck.solo || !deck.initialized ? [
108
+ ...input.subject
109
+ ] : openSubjectsOnActiveDeck(deck.active, input.subject, {
110
+ pivotId: input.pivotId,
111
+ key: input.key
112
+ });
113
+ const { deckUpdates, toAttend: _toAttend } = computeActiveUpdates({
114
+ next,
115
+ deck,
116
+ attention
117
+ });
118
+ yield* Capabilities.updateAtomValue(DeckCapabilities_exports.State, (state) => updateActiveDeck(state, deckUpdates));
119
+ }
120
+ {
121
+ const deck = yield* DeckCapabilities_exports.getDeck();
122
+ const ids = deck.solo ? [
123
+ deck.solo
124
+ ] : deck.active;
125
+ const newlyOpen = ids.filter((i) => !previouslyOpenIds.has(i));
126
+ if (input.scrollIntoView !== false && (newlyOpen[0] ?? input.subject[0])) {
127
+ yield* Operation.schedule(LayoutOperation.ScrollIntoView, {
128
+ subject: newlyOpen[0] ?? input.subject[0]
129
+ });
130
+ }
131
+ if (newlyOpen[0] ?? input.subject[0]) {
132
+ yield* Operation.schedule(LayoutOperation.Expose, {
133
+ subject: newlyOpen[0] ?? input.subject[0]
134
+ });
135
+ }
136
+ for (const subjectId of newlyOpen) {
137
+ const typename = Option.match(Graph.getNode(graph, subjectId), {
138
+ onNone: () => void 0,
139
+ onSome: (node) => {
140
+ const active = node.data;
141
+ return Obj.isObject(active) ? Obj.getTypename(active) : void 0;
142
+ }
143
+ });
144
+ yield* Operation.schedule(ObservabilityOperation.SendEvent, {
145
+ name: "navigation.activate",
146
+ properties: {
147
+ subjectId,
148
+ typename
149
+ }
150
+ });
151
+ }
152
+ }
153
+ return validatedSubjects;
154
+ })));
155
+ var open_default = handler;
156
+ export {
157
+ open_default as default
158
+ };
159
+ //# sourceMappingURL=open-5OYNO3RT.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/operations/open.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport {\n AppCapabilities,\n LayoutOperation,\n createEdgeExistenceChecker,\n expandPath,\n validateNavigationTarget,\n} from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { Context } from '@dxos/context';\nimport { Database, EID, Obj } from '@dxos/echo';\nimport { log } from '@dxos/log';\nimport { AttentionCapabilities } from '@dxos/plugin-attention';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { Graph } from '@dxos/plugin-graph';\nimport { ObservabilityOperation } from '@dxos/plugin-observability';\n\nimport { openSubjectsOnActiveDeck } from '../layout';\nimport { DeckCapabilities } from '../types';\nimport { computeActiveUpdates } from '../util';\nimport { updateActiveDeck } from './helpers';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.Open> = LayoutOperation.Open.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n log('LayoutOperation.Open handler start');\n const { graph } = yield* Capability.get(AppCapabilities.AppGraph);\n const attention = yield* Capability.get(AttentionCapabilities.Attention);\n\n // Validate navigation targets, redirecting to 404 if not found.\n const capabilities = yield* Capability.Service;\n const pathResolvers = capabilities.getAll(AppCapabilities.NavigationPathResolver);\n const client = yield* Capability.get(ClientCapabilities.Client).pipe(\n Effect.catchAll(() => Effect.succeed(undefined)),\n );\n // Existence checkers for the resolved EID: local (load + catchTag) first, then remote (edge).\n const checkLocalExistence = client\n ? (id: EID.EID) => {\n const spaceId = EID.getSpaceId(id);\n const space = spaceId ? client.spaces.get(spaceId) : undefined;\n if (!space) {\n return Effect.succeed(false);\n }\n return Database.load(space.db.makeRef(id)).pipe(\n Effect.as(true),\n Effect.catchTag('EntityNotFoundError', () => Effect.succeed(false)),\n Effect.catchAll(() => Effect.succeed(false)),\n );\n }\n : undefined;\n const checkRemoteExistence = client\n ? createEdgeExistenceChecker((spaceId, body) => client.edge.http.execQuery(new Context(), spaceId, body))\n : undefined;\n\n // Immediate: skip 404 / resolver checks but still expand the path (same as validate’s first step).\n if (input.navigation === 'immediate') {\n for (const subjectId of input.subject) {\n expandPath(graph, subjectId);\n }\n }\n\n const validatedSubjects = yield* Effect.all(\n input.subject.map((subjectId) =>\n input.navigation === 'immediate'\n ? Effect.succeed(subjectId)\n : validateNavigationTarget({ graph, subjectId, pathResolvers, checkLocalExistence, checkRemoteExistence }),\n ),\n );\n input = { ...input, subject: validatedSubjects };\n\n {\n const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);\n if (input.workspace && state.activeDeck !== input.workspace) {\n yield* Operation.invoke(LayoutOperation.SwitchWorkspace, { subject: input.workspace });\n }\n }\n\n // Dedup subjects against the active deck using DXN identity.\n // The same object can appear under different graph paths (e.g., via collections vs types).\n // Resolve each subject's DXN and, if it matches an already-open deck item, remap the\n // subject to the existing deck entry so that openEntry's exact-match check succeeds.\n // Only needed in multi (deck) mode; solo mode replaces the single visible item anyway.\n {\n const deck = yield* DeckCapabilities.getDeck();\n const active = !deck.solo && deck.initialized ? deck.active : [];\n if (active.length > 0 && input.subject.length > 0) {\n const resolveDXN = (qualifiedPath: string) =>\n Effect.reduce(pathResolvers, Option.none<string>(), (acc, resolver) =>\n Option.isSome(acc)\n ? Effect.succeed(acc)\n : resolver(qualifiedPath).pipe(\n Effect.map((opt) => Option.map(opt, (dxn) => dxn.toString())),\n Effect.catchAll(() => Effect.succeed(Option.none<string>())),\n ),\n );\n\n // Build DXN → deck item ID map for active items.\n const deckDxnMap = new Map<string, string>();\n yield* Effect.all(\n active.map((deckId) =>\n resolveDXN(deckId).pipe(\n Effect.map((opt) => {\n if (Option.isSome(opt)) {\n deckDxnMap.set(opt.value, deckId);\n }\n }),\n ),\n ),\n { concurrency: 'unbounded' },\n );\n\n // Remap subjects whose DXN matches an existing deck item.\n if (deckDxnMap.size > 0) {\n const remapped = yield* Effect.all(\n input.subject.map((subjectId) =>\n resolveDXN(subjectId).pipe(\n Effect.map((opt) => {\n if (Option.isSome(opt)) {\n const existing = deckDxnMap.get(opt.value);\n if (existing && existing !== subjectId) {\n return existing;\n }\n }\n return subjectId;\n }),\n ),\n ),\n { concurrency: 'unbounded' },\n );\n input = { ...input, subject: remapped };\n }\n }\n }\n\n // Compute the next active deck state and apply it.\n // In solo or uninitialized mode the subject list replaces the deck entirely.\n // In multi (deck) mode, subjects are merged via openSubjectsOnActiveDeck which\n // uses stack semantics (truncate after pivot, then push new entries).\n let previouslyOpenIds: Set<string>;\n {\n const deck = yield* DeckCapabilities.getDeck();\n previouslyOpenIds = new Set<string>(deck.solo ? [deck.solo] : deck.active);\n const next =\n deck.solo || !deck.initialized\n ? [...input.subject]\n : openSubjectsOnActiveDeck(deck.active, input.subject, {\n pivotId: input.pivotId,\n key: input.key,\n });\n\n const { deckUpdates, toAttend: _toAttend } = computeActiveUpdates({ next, deck, attention });\n yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => updateActiveDeck(state, deckUpdates));\n }\n\n // Schedule side-effects for the newly opened items: scroll into view, expose in\n // the navigation sidebar, and emit observability events.\n // When nothing is newly opened (subject was already visible), the fallback\n // `input.subject[0]` still triggers scroll and expose so the user is taken there.\n {\n const deck = yield* DeckCapabilities.getDeck();\n const ids = deck.solo ? [deck.solo] : deck.active;\n const newlyOpen = ids.filter((i: string) => !previouslyOpenIds.has(i));\n\n if (input.scrollIntoView !== false && (newlyOpen[0] ?? input.subject[0])) {\n yield* Operation.schedule(LayoutOperation.ScrollIntoView, {\n subject: newlyOpen[0] ?? input.subject[0],\n });\n }\n\n if (newlyOpen[0] ?? input.subject[0]) {\n yield* Operation.schedule(LayoutOperation.Expose, { subject: newlyOpen[0] ?? input.subject[0] });\n }\n\n for (const subjectId of newlyOpen) {\n const typename = Option.match(Graph.getNode(graph, subjectId), {\n onNone: () => undefined,\n onSome: (node) => {\n const active = node.data;\n return Obj.isObject(active) ? Obj.getTypename(active) : undefined;\n },\n });\n yield* Operation.schedule(ObservabilityOperation.SendEvent, {\n name: 'navigation.activate',\n properties: { subjectId, typename },\n });\n }\n }\n\n return validatedSubjects;\n }),\n ),\n);\n\nexport default handler;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SACEC,iBACAC,iBACAC,4BACAC,YACAC,gCACK;AACP,SAASC,iBAAiB;AAC1B,SAASC,eAAe;AACxB,SAASC,UAAUC,KAAKC,WAAW;AACnC,SAASC,WAAW;AACpB,SAASC,6BAA6B;AACtC,SAASC,0BAA0B;AACnC,SAASC,aAAa;AACtB,SAASC,8BAA8B;AAOvC,IAAA,eAAoEC;IAI9D,UAAQC,gBAAiBC,KAAAA,KAAWC,UAAIC,YAAwB,kBAAA,WAAA,OAAA;AAChE,MAAA,sCAAwCC,QAAAA,EAAAA,YAAAA,YAA+B,GAAA,cAAA,GAAA,IAAA,GAAA,KAAA,CAAA;AAEvE,QAAA,EAAA,MAAA,IAAA,OAAA,WAAA,IAAA,gBAAA,QAAgE;AAChE,QAAMC,YAAAA,OAAe,WAAOJ,IAAWK,sBAAO,SAAA;AAE9C,QAAMC,eAAS,OAAON,WAAeO;AAGrC,QAAA,gBAAA,aAAA,OAAA,gBAAA,sBAAA;AACA,QAAMC,SAAAA,OAAAA,WAAsBF,IACxB,mBAACG,MAAAA,EAAAA,KAAAA,gBAAAA,MAAAA,eAAAA,MAAAA,CAAAA,CAAAA;QAEC,sBAAwBH,SAAOI,CAAAA,OAAOT;AACtC,UAAKU,UAAO,IAAA,WAAA,EAAA;UACV,QAAOC,UAAOC,OAAQ,OAAA,IAAA,OAAA,IAAA;AACxB,QAA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MsB;IAEN,IAAI/B,KAAAA;UACF,YAAOK,IAAU2B,OAAQ,CAACxD,MAAAA,CAAAA,kBAAgByD,IAAAA,CAAAA,CAAAA;cACxC7B,mBAAqB,UAAUA,UAAU,CAAA,KAAA,MAAA,QAAA,CAAA,IAAA;AAC3C,aAAA,UAAA,SAAA,gBAAA,gBAAA;QACF,SAAA,UAAA,CAAA,KAAA,MAAA,QAAA,CAAA;MAEI2B,CAAAA;;kBACkD3B,CAAAA,KAAS2B,MAAS,QAAO/B,CAAAA,GAAAA;AAAiB,aAAA,UAAA,SAAA,gBAAA,QAAA;QAChG,SAAA,UAAA,CAAA,KAAA,MAAA,QAAA,CAAA;MAEA,CAAK;;eAEDkC,aAAcxC,WAAAA;YACdyC,WAASC,aAAAA,MAAAA,QAAAA,OAAAA,SAAAA,GAAAA;gBACP,MAAM3B;gBACN,CAAA,SAAW4B;AACb,gBAAA,SAAA,KAAA;AACF,iBAAA,IAAA,SAAA,MAAA,IAAA,IAAA,YAAA,MAAA,IAAA;QACA;;aAEEC,UAAY,SAAA,uBAAA,WAAA;cAAEpC;oBAAWqC;UAAS;UACpC;QACF;MACF,CAAA;IAEA;EACF;AAIJ,SAAA;;;",
6
+ "names": ["Effect", "Option", "Capabilities", "Capability", "AppCapabilities", "LayoutOperation", "createEdgeExistenceChecker", "expandPath", "validateNavigationTarget", "Operation", "Context", "Database", "EID", "Obj", "log", "AttentionCapabilities", "ClientCapabilities", "Graph", "ObservabilityOperation", "LayoutOperation", "graph", "Capability", "get", "AppCapabilities", "AttentionCapabilities", "capabilities", "Service", "client", "ClientCapabilities", "checkLocalExistence", "id", "spaces", "space", "Effect", "succeed", "load", "makeRef", "undefined", "checkRemoteExistence", "createEdgeExistenceChecker", "spaceId", "body", "Context", "input", "expandPath", "subjectId", "pathResolvers", "subject", "Operation", "invoke", "SwitchWorkspace", "workspace", "active", "length", "resolveDXN", "qualifiedPath", "reduce", "deckDxnMap", "Map", "isSome", "opt", "set", "deckId", "concurrency", "Option", "value", "existing", "deck", "next", "openSubjectsOnActiveDeck", "pivotId", "key", "deckUpdates", "attention", "newlyOpen", "schedule", "ScrollIntoView", "onNone", "onSome", "node", "isObject", "properties", "typename"]
7
+ }
@@ -0,0 +1,13 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/capabilities/operation-handler.ts
4
+ import * as Effect from "effect/Effect";
5
+ import { Capabilities, Capability } from "@dxos/app-framework";
6
+ import { DeckOperationHandlerSet } from "#operations";
7
+ var operation_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
8
+ return Capability.contributes(Capabilities.OperationHandler, DeckOperationHandlerSet);
9
+ }));
10
+ export {
11
+ operation_handler_default as default
12
+ };
13
+ //# sourceMappingURL=operation-handler-266CVMTW.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/operation-handler.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport type { OperationHandlerSet } from '@dxos/compute';\n\nimport { DeckOperationHandlerSet } from '#operations';\n\nexport default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(\n Effect.fnUntraced(function* () {\n return Capability.contributes(Capabilities.OperationHandler, DeckOperationHandlerSet);\n }),\n);\n"],
5
+ "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AAGzC,SAASC,+BAA+B;AAExC,IAAA,4BAAeD,WAAWE,WACjBC,kBAAW,aAAA;AAChB,SAAOH,WAAWI,YAAYL,aAAaM,kBAAkBJ,uBAAAA;AAC/D,CAAA,CAAA;",
6
+ "names": ["Effect", "Capabilities", "Capability", "DeckOperationHandlerSet", "makeModule", "fnUntraced", "contributes", "OperationHandler"]
7
+ }
@@ -0,0 +1,8 @@
1
+ import {
2
+ DeckOperationHandlerSet
3
+ } from "../chunk-Q4W6B4IB.mjs";
4
+ import "../chunk-J5LGTIGS.mjs";
5
+ export {
6
+ DeckOperationHandlerSet
7
+ };
8
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,16 @@
1
+ import {
2
+ DeckOperationHandlerSet
3
+ } from "./chunk-Q4W6B4IB.mjs";
4
+ import {
5
+ meta
6
+ } from "./chunk-PYEY5SEC.mjs";
7
+ import "./chunk-J5LGTIGS.mjs";
8
+
9
+ // src/plugin.ts
10
+ import { Plugin } from "@dxos/app-framework";
11
+ var DeckPlugin = Plugin.lazy(meta, () => import("#plugin"));
12
+ export {
13
+ DeckOperationHandlerSet,
14
+ DeckPlugin
15
+ };
16
+ //# sourceMappingURL=plugin.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/plugin.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport const DeckPlugin = Plugin.lazy(meta, () => import('#plugin'));\n\nexport { DeckOperationHandlerSet } from './operations';\n"],
5
+ "mappings": ";;;;;;;;;AAIA,SAASA,cAAc;AAIhB,IAAMC,aAAaC,OAAOC,KAAKC,MAAM,MAAM,OAAO,SAAA,CAAA;",
6
+ "names": ["Plugin", "DeckPlugin", "Plugin", "lazy", "meta"]
7
+ }
@@ -0,0 +1,44 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/capabilities/react-root.tsx
4
+ import * as Effect from "effect/Effect";
5
+ import React, { useCallback } from "react";
6
+ import { Capabilities, Capability } from "@dxos/app-framework";
7
+ import { DeckLayout } from "#containers";
8
+ import { useDeckState } from "#hooks";
9
+ import { meta } from "#meta";
10
+ var react_root_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Capabilities.ReactRoot, {
11
+ id: meta.id,
12
+ root: () => {
13
+ const { state, updateEphemeral } = useDeckState();
14
+ const handleDismissToast = useCallback((id) => {
15
+ if (!state.toasts.some((toast) => toast.id === id)) {
16
+ return;
17
+ }
18
+ setTimeout(() => {
19
+ updateEphemeral((s) => {
20
+ const toastToRemove = s.toasts.find((toast) => toast.id === id);
21
+ if (!toastToRemove) {
22
+ return s;
23
+ }
24
+ const newCurrentUndoId = toastToRemove.id === s.currentUndoId ? void 0 : s.currentUndoId;
25
+ return {
26
+ ...s,
27
+ currentUndoId: newCurrentUndoId,
28
+ toasts: s.toasts.filter((toast) => toast.id !== id)
29
+ };
30
+ });
31
+ }, 150);
32
+ }, [
33
+ state.toasts,
34
+ updateEphemeral
35
+ ]);
36
+ return /* @__PURE__ */ React.createElement(DeckLayout, {
37
+ onDismissToast: handleDismissToast
38
+ });
39
+ }
40
+ })));
41
+ export {
42
+ react_root_default as default
43
+ };
44
+ //# sourceMappingURL=react-root-HH5DEUOG.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/react-root.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React, { useCallback } from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\n\nimport { DeckLayout } from '#containers';\nimport { useDeckState } from '#hooks';\nimport { meta } from '#meta';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Capabilities.ReactRoot, {\n id: meta.id,\n root: () => {\n const { state, updateEphemeral } = useDeckState();\n\n const handleDismissToast = useCallback(\n (id: string) => {\n if (!state.toasts.some((toast) => toast.id === id)) {\n return;\n }\n // Allow time for the toast exit animation (animate-toast-hide, 100ms) before unmounting.\n // TODO(burdon): Factor out and unregister timeout.\n setTimeout(() => {\n // Re-resolve the toast by id inside the update: the toast list may have changed during\n // the delay, so a captured index would point at the wrong (or a missing) entry.\n updateEphemeral((s) => {\n const toastToRemove = s.toasts.find((toast) => toast.id === id);\n if (!toastToRemove) {\n return s;\n }\n const newCurrentUndoId = toastToRemove.id === s.currentUndoId ? undefined : s.currentUndoId;\n return {\n ...s,\n currentUndoId: newCurrentUndoId,\n toasts: s.toasts.filter((toast) => toast.id !== id),\n };\n });\n }, 150);\n },\n [state.toasts, updateEphemeral],\n );\n\n return <DeckLayout onDismissToast={handleDismissToast} />;\n },\n }),\n ),\n);\n"],
5
+ "mappings": ";;;AAIA,YAAYA,YAAY;AACxB,OAAOC,SAASC,mBAAmB;AAEnC,SAASC,cAAcC,kBAAkB;AAEzC,SAASC,kBAAkB;AAC3B,SAASC,oBAAoB;AAC7B,SAASC,YAAY;AAErB,IAAA,qBAAeH,WAAWI,WAAW,MAC5BC,eACLL,WAAWM,YAAYP,aAAaQ,WAAW;EAC7CC,IAAIL,KAAKK;EACTC,MAAM,MAAA;AACJ,UAAM,EAAEC,OAAOC,gBAAe,IAAKT,aAAAA;AAEnC,UAAMU,qBAAqBd,YACzB,CAACU,OAAAA;AACC,UAAI,CAACE,MAAMG,OAAOC,KAAK,CAACC,UAAUA,MAAMP,OAAOA,EAAAA,GAAK;AAClD;MACF;AAGAQ,iBAAW,MAAA;AAGTL,wBAAgB,CAACM,MAAAA;AACf,gBAAMC,gBAAgBD,EAAEJ,OAAOM,KAAK,CAACJ,UAAUA,MAAMP,OAAOA,EAAAA;AAC5D,cAAI,CAACU,eAAe;AAClB,mBAAOD;UACT;AACA,gBAAMG,mBAAmBF,cAAcV,OAAOS,EAAEI,gBAAgBC,SAAYL,EAAEI;AAC9E,iBAAO;YACL,GAAGJ;YACHI,eAAeD;YACfP,QAAQI,EAAEJ,OAAOU,OAAO,CAACR,UAAUA,MAAMP,OAAOA,EAAAA;UAClD;QACF,CAAA;MACF,GAAG,GAAA;IACL,GACA;MAACE,MAAMG;MAAQF;KAAgB;AAGjC,WAAO,sBAAA,cAACV,YAAAA;MAAWuB,gBAAgBZ;;EACrC;AACF,CAAA,CAAA,CAAA;",
6
+ "names": ["Effect", "React", "useCallback", "Capabilities", "Capability", "DeckLayout", "useDeckState", "meta", "makeModule", "succeed", "contributes", "ReactRoot", "id", "root", "state", "updateEphemeral", "handleDismissToast", "toasts", "some", "toast", "setTimeout", "s", "toastToRemove", "find", "newCurrentUndoId", "currentUndoId", "undefined", "filter", "onDismissToast"]
7
+ }
@@ -0,0 +1,34 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/capabilities/react-surface.tsx
4
+ import * as Effect from "effect/Effect";
5
+ import React from "react";
6
+ import { Capabilities, Capability } from "@dxos/app-framework";
7
+ import { Surface, useSettingsState } from "@dxos/app-framework/ui";
8
+ import { NOT_FOUND_PATH } from "@dxos/app-toolkit";
9
+ import { AppSurface, NotFoundArticle } from "@dxos/app-toolkit/ui";
10
+ import { DeckSettings } from "#components";
11
+ import { meta } from "#meta";
12
+ var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Capabilities.ReactSurface, [
13
+ Surface.create({
14
+ id: "pluginSettings",
15
+ filter: AppSurface.settings(AppSurface.Article, meta.id),
16
+ component: ({ data: { subject } }) => {
17
+ const { settings, updateSettings } = useSettingsState(subject.atom);
18
+ return /* @__PURE__ */ React.createElement(DeckSettings, {
19
+ settings,
20
+ onSettingsChange: updateSettings
21
+ });
22
+ }
23
+ }),
24
+ Surface.create({
25
+ id: "notFound",
26
+ role: "article",
27
+ filter: (data) => data.attendableId === NOT_FOUND_PATH,
28
+ component: () => /* @__PURE__ */ React.createElement(NotFoundArticle, null)
29
+ })
30
+ ])));
31
+ export {
32
+ react_surface_default as default
33
+ };
34
+ //# sourceMappingURL=react-surface-3UVVCK3O.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/react-surface.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface, useSettingsState } from '@dxos/app-framework/ui';\nimport { NOT_FOUND_PATH } from '@dxos/app-toolkit';\nimport { AppSurface, NotFoundArticle } from '@dxos/app-toolkit/ui';\n\nimport { DeckSettings } from '#components';\nimport { meta } from '#meta';\nimport { type Settings } from '#types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Capabilities.ReactSurface, [\n Surface.create({\n id: 'pluginSettings',\n filter: AppSurface.settings(AppSurface.Article, meta.id),\n component: ({ data: { subject } }) => {\n const { settings, updateSettings } = useSettingsState<Settings.Settings>(subject.atom);\n return <DeckSettings settings={settings} onSettingsChange={updateSettings} />;\n },\n }),\n Surface.create({\n id: 'notFound',\n role: 'article',\n filter: (data): data is { attendableId: string } => data.attendableId === NOT_FOUND_PATH,\n component: () => <NotFoundArticle />,\n }),\n ]),\n ),\n);\n"],
5
+ "mappings": ";;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,SAASC,wBAAwB;AAC1C,SAASC,sBAAsB;AAC/B,SAASC,YAAYC,uBAAuB;AAE5C,SAASC,oBAAoB;AAC7B,SAASC,YAAY;AAGrB,IAAA,wBAAeP,WAAWQ,WAAW,MAC5BC,eACLT,WAAWU,YAAYX,aAAaY,cAAc;EAChDV,QAAQW,OAAO;IACbC,IAAI;IACJC,QAAQV,WAAWW,SAASX,WAAWY,SAAST,KAAKM,EAAE;IACvDI,WAAW,CAAC,EAAEC,MAAM,EAAEC,QAAO,EAAE,MAAE;AAC/B,YAAM,EAAEJ,UAAUK,eAAc,IAAKlB,iBAAoCiB,QAAQE,IAAI;AACrF,aAAO,sBAAA,cAACf,cAAAA;QAAaS;QAAoBO,kBAAkBF;;IAC7D;EACF,CAAA;EACAnB,QAAQW,OAAO;IACbC,IAAI;IACJU,MAAM;IACNT,QAAQ,CAACI,SAA2CA,KAAKM,iBAAiBrB;IAC1Ec,WAAW,MAAM,sBAAA,cAACZ,iBAAAA,IAAAA;EACpB,CAAA;CACD,CAAA,CAAA;",
6
+ "names": ["Effect", "React", "Capabilities", "Capability", "Surface", "useSettingsState", "NOT_FOUND_PATH", "AppSurface", "NotFoundArticle", "DeckSettings", "meta", "makeModule", "succeed", "contributes", "ReactSurface", "create", "id", "filter", "settings", "Article", "component", "data", "subject", "updateSettings", "atom", "onSettingsChange", "role", "attendableId"]
7
+ }
@@ -0,0 +1,21 @@
1
+ import {
2
+ DeckCapabilities_exports
3
+ } from "./chunk-BS4EOYMK.mjs";
4
+ import "./chunk-J5LGTIGS.mjs";
5
+
6
+ // src/operations/revert-workspace.ts
7
+ import * as Effect from "effect/Effect";
8
+ import { Capabilities } from "@dxos/app-framework";
9
+ import { LayoutOperation } from "@dxos/app-toolkit";
10
+ import { Operation } from "@dxos/compute";
11
+ var handler = LayoutOperation.RevertWorkspace.pipe(Operation.withHandler(Effect.fnUntraced(function* () {
12
+ const state = yield* Capabilities.getAtomValue(DeckCapabilities_exports.State);
13
+ yield* Operation.invoke(LayoutOperation.SwitchWorkspace, {
14
+ subject: state.previousDeck
15
+ });
16
+ })));
17
+ var revert_workspace_default = handler;
18
+ export {
19
+ revert_workspace_default as default
20
+ };
21
+ //# sourceMappingURL=revert-workspace-B2QLT2C4.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/operations/revert-workspace.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities } from '@dxos/app-framework';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\n\nimport { DeckCapabilities } from '../types';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.RevertWorkspace> = LayoutOperation.RevertWorkspace.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* () {\n const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);\n yield* Operation.invoke(LayoutOperation.SwitchWorkspace, { subject: state.previousDeck });\n }),\n ),\n);\n\nexport default handler;\n"],
5
+ "mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,oBAAoB;AAC7B,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAI1B,IAAMC,UAAyEC,gBAAgBC,gBAAgBC,KAC7GC,UAAUC,YACDC,kBAAW,aAAA;AAChB,QAAMC,QAAQ,OAAOC,aAAaC,aAAaC,yBAAiBC,KAAK;AACrE,SAAOP,UAAUQ,OAAOX,gBAAgBY,iBAAiB;IAAEC,SAASP,MAAMQ;EAAa,CAAA;AACzF,CAAA,CAAA,CAAA;AAIJ,IAAA,2BAAef;",
6
+ "names": ["Effect", "Capabilities", "LayoutOperation", "Operation", "handler", "LayoutOperation", "RevertWorkspace", "pipe", "Operation", "withHandler", "fnUntraced", "state", "Capabilities", "getAtomValue", "DeckCapabilities", "State", "invoke", "SwitchWorkspace", "subject", "previousDeck"]
7
+ }