@dxos/plugin-deck 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef

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 (297) hide show
  1. package/dist/lib/browser/DeckPlugin-YAAL6CBD.mjs +70 -0
  2. package/dist/lib/browser/DeckPlugin-YAAL6CBD.mjs.map +7 -0
  3. package/dist/lib/browser/{add-toast-HW74YZHJ.mjs → add-toast-JWJOQNVL.mjs} +3 -3
  4. package/dist/lib/browser/{add-toast-HW74YZHJ.mjs.map → add-toast-JWJOQNVL.mjs.map} +1 -1
  5. package/dist/lib/browser/{adjust-OXVHZTBE.mjs → adjust-RG6LIQLX.mjs} +10 -11
  6. package/dist/lib/browser/adjust-RG6LIQLX.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-KUTDCWZF.mjs → chunk-GLB73Q6U.mjs} +2 -10
  8. package/dist/lib/{node-esm/chunk-MLVJ2ODW.mjs.map → browser/chunk-GLB73Q6U.mjs.map} +2 -2
  9. package/dist/lib/browser/{chunk-BRZAVPMC.mjs → chunk-LSZ47AY3.mjs} +1 -1
  10. package/dist/lib/browser/{chunk-GFOCQS7S.mjs → chunk-MARE7ZFK.mjs} +22 -23
  11. package/dist/lib/browser/{chunk-GFOCQS7S.mjs.map → chunk-MARE7ZFK.mjs.map} +3 -3
  12. package/dist/lib/browser/{chunk-2YNVGCOQ.mjs → chunk-XM263CQU.mjs} +4 -20
  13. package/dist/lib/browser/chunk-XM263CQU.mjs.map +7 -0
  14. package/dist/lib/browser/{chunk-DF2VZ6W3.mjs → chunk-ZYYOSX5I.mjs} +1 -1
  15. package/dist/lib/browser/{chunk-DF2VZ6W3.mjs.map → chunk-ZYYOSX5I.mjs.map} +2 -2
  16. package/dist/lib/browser/{close-N5FCDT7Y.mjs → close-URA766JO.mjs} +6 -6
  17. package/dist/lib/browser/{close-N5FCDT7Y.mjs.map → close-URA766JO.mjs.map} +1 -1
  18. package/dist/lib/browser/index.mjs +8 -128
  19. package/dist/lib/browser/index.mjs.map +4 -4
  20. package/dist/lib/browser/meta.json +1 -1
  21. package/dist/lib/browser/{open-J5HV42UN.mjs → open-OPFOOHCQ.mjs} +7 -10
  22. package/dist/lib/browser/open-OPFOOHCQ.mjs.map +7 -0
  23. package/dist/lib/browser/operations/index.mjs +3 -3
  24. package/dist/lib/browser/operations/index.mjs.map +3 -3
  25. package/dist/lib/browser/{revert-workspace-VWNN7RYF.mjs → revert-workspace-KP2Y4QLG.mjs} +3 -3
  26. package/dist/lib/browser/{revert-workspace-VWNN7RYF.mjs.map → revert-workspace-KP2Y4QLG.mjs.map} +1 -1
  27. package/dist/lib/browser/{scroll-into-view-CA7E3PSO.mjs → scroll-into-view-S5H2FGSQ.mjs} +3 -3
  28. package/dist/lib/browser/{scroll-into-view-CA7E3PSO.mjs.map → scroll-into-view-S5H2FGSQ.mjs.map} +1 -1
  29. package/dist/lib/browser/{set-YVWQQZLE.mjs → set-AEKFFSIX.mjs} +5 -5
  30. package/dist/lib/browser/{set-YVWQQZLE.mjs.map → set-AEKFFSIX.mjs.map} +1 -1
  31. package/dist/lib/browser/{set-layout-mode-DRNBZHE7.mjs → set-layout-mode-CWIGQDFZ.mjs} +5 -10
  32. package/dist/lib/browser/set-layout-mode-CWIGQDFZ.mjs.map +7 -0
  33. package/dist/lib/browser/{show-undo-KA2XHQ6E.mjs → show-undo-XFVEDKYC.mjs} +3 -3
  34. package/dist/lib/browser/{show-undo-KA2XHQ6E.mjs.map → show-undo-XFVEDKYC.mjs.map} +1 -1
  35. package/dist/lib/browser/{switch-workspace-U7SPENHU.mjs → switch-workspace-DSAAXZSI.mjs} +4 -12
  36. package/dist/lib/browser/switch-workspace-DSAAXZSI.mjs.map +7 -0
  37. package/dist/lib/browser/translations.mjs +57 -0
  38. package/dist/lib/browser/translations.mjs.map +7 -0
  39. package/dist/lib/browser/types/index.mjs +1 -1
  40. package/dist/lib/browser/{change-companion-Z3Q2UPX4.mjs → update-companion-IDBBBHT3.mjs} +11 -13
  41. package/dist/lib/browser/update-companion-IDBBBHT3.mjs.map +7 -0
  42. package/dist/lib/browser/{update-complementary-W6UVLWLI.mjs → update-complementary-55PNO5MD.mjs} +3 -3
  43. package/dist/lib/browser/{update-complementary-W6UVLWLI.mjs.map → update-complementary-55PNO5MD.mjs.map} +1 -1
  44. package/dist/lib/browser/{update-dialog-VCTI7WKS.mjs → update-dialog-VNARIANC.mjs} +3 -3
  45. package/dist/lib/browser/{update-dialog-VCTI7WKS.mjs.map → update-dialog-VNARIANC.mjs.map} +1 -1
  46. package/dist/lib/browser/{update-plank-size-6TPVOYLT.mjs → update-plank-size-H63PRRXS.mjs} +5 -5
  47. package/dist/lib/browser/{update-plank-size-6TPVOYLT.mjs.map → update-plank-size-H63PRRXS.mjs.map} +1 -1
  48. package/dist/lib/browser/{update-popover-4EVVZSB6.mjs → update-popover-ODTPZ3JL.mjs} +3 -3
  49. package/dist/lib/browser/{update-popover-4EVVZSB6.mjs.map → update-popover-ODTPZ3JL.mjs.map} +1 -1
  50. package/dist/lib/browser/{update-sidebar-PAZARC4Q.mjs → update-sidebar-JDVQ36WK.mjs} +3 -3
  51. package/dist/lib/browser/{update-sidebar-PAZARC4Q.mjs.map → update-sidebar-JDVQ36WK.mjs.map} +1 -1
  52. package/dist/lib/node-esm/DeckPlugin-ZILU7U44.mjs +71 -0
  53. package/dist/lib/node-esm/DeckPlugin-ZILU7U44.mjs.map +7 -0
  54. package/dist/lib/node-esm/{add-toast-FA7NTWKA.mjs → add-toast-JUTN4GTI.mjs} +3 -3
  55. package/dist/lib/node-esm/{add-toast-FA7NTWKA.mjs.map → add-toast-JUTN4GTI.mjs.map} +1 -1
  56. package/dist/lib/node-esm/{adjust-G6FGZW6H.mjs → adjust-P5QK33P4.mjs} +10 -11
  57. package/dist/lib/node-esm/adjust-P5QK33P4.mjs.map +7 -0
  58. package/dist/lib/node-esm/{chunk-6BWQJDNT.mjs → chunk-FO7YDJZ3.mjs} +22 -23
  59. package/dist/lib/node-esm/{chunk-6BWQJDNT.mjs.map → chunk-FO7YDJZ3.mjs.map} +3 -3
  60. package/dist/lib/node-esm/{chunk-MB4SDDVY.mjs → chunk-KY7ZCANM.mjs} +1 -1
  61. package/dist/lib/node-esm/{chunk-GI5JXNBT.mjs → chunk-L7OVX7CV.mjs} +4 -20
  62. package/dist/lib/node-esm/chunk-L7OVX7CV.mjs.map +7 -0
  63. package/dist/lib/node-esm/{chunk-MLVJ2ODW.mjs → chunk-SHSR2CYO.mjs} +2 -10
  64. package/dist/lib/{browser/chunk-KUTDCWZF.mjs.map → node-esm/chunk-SHSR2CYO.mjs.map} +2 -2
  65. package/dist/lib/node-esm/{chunk-IRWCUYJY.mjs → chunk-WGBUTT5K.mjs} +1 -1
  66. package/dist/lib/node-esm/{chunk-IRWCUYJY.mjs.map → chunk-WGBUTT5K.mjs.map} +2 -2
  67. package/dist/lib/node-esm/{close-AMA63RJN.mjs → close-U5VC7ERP.mjs} +6 -6
  68. package/dist/lib/node-esm/{close-AMA63RJN.mjs.map → close-U5VC7ERP.mjs.map} +1 -1
  69. package/dist/lib/node-esm/index.mjs +8 -128
  70. package/dist/lib/node-esm/index.mjs.map +4 -4
  71. package/dist/lib/node-esm/meta.json +1 -1
  72. package/dist/lib/node-esm/{open-KRCARMEB.mjs → open-4B3P5XGS.mjs} +7 -10
  73. package/dist/lib/node-esm/open-4B3P5XGS.mjs.map +7 -0
  74. package/dist/lib/node-esm/operations/index.mjs +3 -3
  75. package/dist/lib/node-esm/operations/index.mjs.map +3 -3
  76. package/dist/lib/node-esm/{revert-workspace-A2K3JQFS.mjs → revert-workspace-QD63M2U7.mjs} +3 -3
  77. package/dist/lib/node-esm/{revert-workspace-A2K3JQFS.mjs.map → revert-workspace-QD63M2U7.mjs.map} +1 -1
  78. package/dist/lib/node-esm/{scroll-into-view-B2U4RQK7.mjs → scroll-into-view-G5M2EWK7.mjs} +3 -3
  79. package/dist/lib/node-esm/{scroll-into-view-B2U4RQK7.mjs.map → scroll-into-view-G5M2EWK7.mjs.map} +1 -1
  80. package/dist/lib/node-esm/{set-HCWNW76S.mjs → set-ERJCXZBY.mjs} +5 -5
  81. package/dist/lib/node-esm/{set-HCWNW76S.mjs.map → set-ERJCXZBY.mjs.map} +1 -1
  82. package/dist/lib/node-esm/{set-layout-mode-E27AI5KE.mjs → set-layout-mode-BOZD7744.mjs} +5 -10
  83. package/dist/lib/node-esm/set-layout-mode-BOZD7744.mjs.map +7 -0
  84. package/dist/lib/node-esm/{show-undo-YTZXH422.mjs → show-undo-H5BRBYDC.mjs} +3 -3
  85. package/dist/lib/node-esm/{show-undo-YTZXH422.mjs.map → show-undo-H5BRBYDC.mjs.map} +1 -1
  86. package/dist/lib/node-esm/{switch-workspace-AQCNGS4Y.mjs → switch-workspace-F54PXE5N.mjs} +4 -12
  87. package/dist/lib/node-esm/switch-workspace-F54PXE5N.mjs.map +7 -0
  88. package/dist/lib/node-esm/translations.mjs +58 -0
  89. package/dist/lib/node-esm/translations.mjs.map +7 -0
  90. package/dist/lib/node-esm/types/index.mjs +1 -1
  91. package/dist/lib/node-esm/{change-companion-V6343HMY.mjs → update-companion-47LMKL5R.mjs} +11 -13
  92. package/dist/lib/node-esm/update-companion-47LMKL5R.mjs.map +7 -0
  93. package/dist/lib/node-esm/{update-complementary-7HIRM7OT.mjs → update-complementary-7VYYG7L2.mjs} +3 -3
  94. package/dist/lib/node-esm/{update-complementary-7HIRM7OT.mjs.map → update-complementary-7VYYG7L2.mjs.map} +1 -1
  95. package/dist/lib/node-esm/{update-dialog-F3JF7MBZ.mjs → update-dialog-CABL7OWW.mjs} +3 -3
  96. package/dist/lib/node-esm/{update-dialog-F3JF7MBZ.mjs.map → update-dialog-CABL7OWW.mjs.map} +1 -1
  97. package/dist/lib/node-esm/{update-plank-size-IIZKU7YR.mjs → update-plank-size-WYTSMZF2.mjs} +5 -5
  98. package/dist/lib/node-esm/{update-plank-size-IIZKU7YR.mjs.map → update-plank-size-WYTSMZF2.mjs.map} +1 -1
  99. package/dist/lib/node-esm/{update-popover-RO5QEH4C.mjs → update-popover-YZDYGL7G.mjs} +3 -3
  100. package/dist/lib/node-esm/{update-popover-RO5QEH4C.mjs.map → update-popover-YZDYGL7G.mjs.map} +1 -1
  101. package/dist/lib/node-esm/{update-sidebar-2RX6VLEK.mjs → update-sidebar-HV736LUN.mjs} +3 -3
  102. package/dist/lib/node-esm/{update-sidebar-2RX6VLEK.mjs.map → update-sidebar-HV736LUN.mjs.map} +1 -1
  103. package/dist/types/src/DeckPlugin.d.ts +1 -0
  104. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  105. package/dist/types/src/DeckPlugin.node.d.ts +4 -0
  106. package/dist/types/src/DeckPlugin.node.d.ts.map +1 -0
  107. package/dist/types/src/DeckPlugin.test.d.ts +2 -0
  108. package/dist/types/src/DeckPlugin.test.d.ts.map +1 -0
  109. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  110. package/dist/types/src/capabilities/check-app-scheme.d.ts +1 -1
  111. package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -1
  112. package/dist/types/src/capabilities/index.d.ts +18 -30
  113. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  114. package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
  115. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
  116. package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
  117. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  118. package/dist/types/src/capabilities/settings.d.ts +2 -13
  119. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  120. package/dist/types/src/capabilities/state.d.ts +16 -16
  121. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  122. package/dist/types/src/capabilities/tools.d.ts.map +1 -1
  123. package/dist/types/src/capabilities/url-handler.d.ts +1 -1
  124. package/dist/types/src/capabilities/url-handler.d.ts.map +1 -1
  125. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +1 -1
  126. package/dist/types/src/components/DeckSettings/DeckSettings.stories.d.ts +42 -52
  127. package/dist/types/src/components/DeckSettings/DeckSettings.stories.d.ts.map +1 -1
  128. package/dist/types/src/components/Matrix/Matrix.d.ts +2 -2
  129. package/dist/types/src/components/Matrix/Matrix.d.ts.map +1 -1
  130. package/dist/types/src/components/Matrix/Matrix.stories.d.ts.map +1 -1
  131. package/dist/types/src/containers/Deck/Banner.d.ts +1 -1
  132. package/dist/types/src/containers/Deck/Banner.d.ts.map +1 -1
  133. package/dist/types/src/containers/Deck/Deck.d.ts.map +1 -1
  134. package/dist/types/src/containers/Deck/Deck.stories.d.ts +42 -52
  135. package/dist/types/src/containers/Deck/Deck.stories.d.ts.map +1 -1
  136. package/dist/types/src/containers/Deck/DeckContent.d.ts +4 -4
  137. package/dist/types/src/containers/Deck/DeckContent.d.ts.map +1 -1
  138. package/dist/types/src/containers/Deck/DeckRoot.d.ts +5 -8
  139. package/dist/types/src/containers/Deck/DeckRoot.d.ts.map +1 -1
  140. package/dist/types/src/containers/Deck/DeckViewport.d.ts +4 -7
  141. package/dist/types/src/containers/Deck/DeckViewport.d.ts.map +1 -1
  142. package/dist/types/src/containers/Deck/StatusBar.d.ts.map +1 -1
  143. package/dist/types/src/containers/DeckLayout/DeckLayout.d.ts.map +1 -1
  144. package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts +42 -52
  145. package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts.map +1 -1
  146. package/dist/types/src/containers/DeckLayout/Dialog.d.ts.map +1 -1
  147. package/dist/types/src/containers/DeckLayout/Popover.d.ts.map +1 -1
  148. package/dist/types/src/containers/DeckLayout/Toast.d.ts +1 -1
  149. package/dist/types/src/containers/DeckLayout/Toast.d.ts.map +1 -1
  150. package/dist/types/src/containers/DeckLayout/index.d.ts.map +1 -1
  151. package/dist/types/src/containers/Plank/Plank.d.ts +2 -2
  152. package/dist/types/src/containers/Plank/Plank.d.ts.map +1 -1
  153. package/dist/types/src/containers/Plank/Plank.stories.d.ts +42 -52
  154. package/dist/types/src/containers/Plank/Plank.stories.d.ts.map +1 -1
  155. package/dist/types/src/containers/Plank/PlankComponent.d.ts +2 -0
  156. package/dist/types/src/containers/Plank/PlankComponent.d.ts.map +1 -1
  157. package/dist/types/src/containers/Plank/PlankContent.d.ts +1 -1
  158. package/dist/types/src/containers/Plank/PlankControls.d.ts.map +1 -1
  159. package/dist/types/src/containers/Plank/PlankError.d.ts +1 -1
  160. package/dist/types/src/containers/Plank/PlankError.d.ts.map +1 -1
  161. package/dist/types/src/containers/Plank/PlankHeading.d.ts +2 -1
  162. package/dist/types/src/containers/Plank/PlankHeading.d.ts.map +1 -1
  163. package/dist/types/src/containers/Plank/PlankRoot.d.ts +2 -2
  164. package/dist/types/src/containers/Plank/PlankRoot.d.ts.map +1 -1
  165. package/dist/types/src/containers/Sidebar/ComplementarySidebar.d.ts.map +1 -1
  166. package/dist/types/src/containers/Sidebar/SidebarButton.d.ts +1 -1
  167. package/dist/types/src/containers/Sidebar/SidebarButton.d.ts.map +1 -1
  168. package/dist/types/src/hooks/useBreakpoints.d.ts +1 -1
  169. package/dist/types/src/hooks/useCompanions.d.ts.map +1 -1
  170. package/dist/types/src/hooks/useDeckCompanions.d.ts +2 -1
  171. package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
  172. package/dist/types/src/hooks/useHoistStatusbar.d.ts.map +1 -1
  173. package/dist/types/src/hooks/useMainSize.d.ts.map +1 -1
  174. package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
  175. package/dist/types/src/hooks/useSelectedCompanion.d.ts.map +1 -1
  176. package/dist/types/src/index.d.ts +3 -2
  177. package/dist/types/src/index.d.ts.map +1 -1
  178. package/dist/types/src/layout.d.ts.map +1 -1
  179. package/dist/types/src/operations/add-toast.d.ts +1 -1
  180. package/dist/types/src/operations/add-toast.d.ts.map +1 -1
  181. package/dist/types/src/operations/adjust.d.ts +1 -1
  182. package/dist/types/src/operations/adjust.d.ts.map +1 -1
  183. package/dist/types/src/operations/close.d.ts +1 -1
  184. package/dist/types/src/operations/close.d.ts.map +1 -1
  185. package/dist/types/src/operations/definitions.d.ts +4 -7
  186. package/dist/types/src/operations/definitions.d.ts.map +1 -1
  187. package/dist/types/src/operations/helpers.d.ts.map +1 -1
  188. package/dist/types/src/operations/index.d.ts +1 -1
  189. package/dist/types/src/operations/index.d.ts.map +1 -1
  190. package/dist/types/src/operations/open.d.ts +1 -1
  191. package/dist/types/src/operations/open.d.ts.map +1 -1
  192. package/dist/types/src/operations/revert-workspace.d.ts +1 -1
  193. package/dist/types/src/operations/revert-workspace.d.ts.map +1 -1
  194. package/dist/types/src/operations/scroll-into-view.d.ts +1 -1
  195. package/dist/types/src/operations/scroll-into-view.d.ts.map +1 -1
  196. package/dist/types/src/operations/set-layout-mode.d.ts +1 -1
  197. package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -1
  198. package/dist/types/src/operations/set.d.ts +1 -1
  199. package/dist/types/src/operations/set.d.ts.map +1 -1
  200. package/dist/types/src/operations/show-undo.d.ts +1 -1
  201. package/dist/types/src/operations/show-undo.d.ts.map +1 -1
  202. package/dist/types/src/operations/switch-workspace.d.ts +1 -1
  203. package/dist/types/src/operations/switch-workspace.d.ts.map +1 -1
  204. package/dist/types/src/operations/update-companion.d.ts +5 -0
  205. package/dist/types/src/operations/update-companion.d.ts.map +1 -0
  206. package/dist/types/src/operations/update-complementary.d.ts +1 -1
  207. package/dist/types/src/operations/update-complementary.d.ts.map +1 -1
  208. package/dist/types/src/operations/update-dialog.d.ts +1 -1
  209. package/dist/types/src/operations/update-dialog.d.ts.map +1 -1
  210. package/dist/types/src/operations/update-plank-size.d.ts +1 -1
  211. package/dist/types/src/operations/update-plank-size.d.ts.map +1 -1
  212. package/dist/types/src/operations/update-popover.d.ts +1 -1
  213. package/dist/types/src/operations/update-popover.d.ts.map +1 -1
  214. package/dist/types/src/operations/update-sidebar.d.ts +1 -1
  215. package/dist/types/src/operations/update-sidebar.d.ts.map +1 -1
  216. package/dist/types/src/translations.d.ts +42 -53
  217. package/dist/types/src/translations.d.ts.map +1 -1
  218. package/dist/types/src/types/Settings.d.ts +7 -6
  219. package/dist/types/src/types/Settings.d.ts.map +1 -1
  220. package/dist/types/src/types/capabilities.d.ts +18 -29
  221. package/dist/types/src/types/capabilities.d.ts.map +1 -1
  222. package/dist/types/src/types/events.d.ts.map +1 -1
  223. package/dist/types/src/types/schema.d.ts +0 -10
  224. package/dist/types/src/types/schema.d.ts.map +1 -1
  225. package/dist/types/src/util/layoutAppliesTopbar.d.ts.map +1 -1
  226. package/dist/types/src/util/plank-url-params.d.ts.map +1 -1
  227. package/dist/types/src/util/sanitize-persisted-state.d.ts.map +1 -1
  228. package/dist/types/src/util/set-active.d.ts.map +1 -1
  229. package/dist/types/tsconfig.tsbuildinfo +1 -1
  230. package/package.json +56 -55
  231. package/src/DeckPlugin.node.ts +17 -0
  232. package/src/DeckPlugin.test.ts +27 -0
  233. package/src/DeckPlugin.ts +6 -5
  234. package/src/capabilities/app-graph-builder.ts +2 -2
  235. package/src/capabilities/index.ts +1 -1
  236. package/src/capabilities/operation-handler.ts +1 -1
  237. package/src/capabilities/react-surface.tsx +1 -2
  238. package/src/capabilities/settings.ts +1 -1
  239. package/src/capabilities/tools.ts +3 -3
  240. package/src/capabilities/url-handler.ts +6 -1
  241. package/src/components/DeckSettings/DeckSettings.stories.tsx +2 -1
  242. package/src/components/DeckSettings/DeckSettings.tsx +8 -47
  243. package/src/components/Matrix/Matrix.stories.tsx +16 -12
  244. package/src/containers/Deck/Deck.stories.tsx +1 -1
  245. package/src/containers/Deck/DeckViewport.tsx +10 -10
  246. package/src/containers/DeckLayout/ActiveNode.tsx +2 -2
  247. package/src/containers/DeckLayout/DeckLayout.stories.tsx +17 -13
  248. package/src/containers/DeckLayout/Dialog.tsx +8 -2
  249. package/src/containers/DeckLayout/Popover.tsx +6 -4
  250. package/src/containers/Plank/Plank.stories.tsx +9 -7
  251. package/src/containers/Plank/PlankComponent.tsx +58 -21
  252. package/src/containers/Plank/PlankControls.tsx +2 -2
  253. package/src/containers/Plank/PlankError.tsx +1 -1
  254. package/src/containers/Plank/PlankHeading.tsx +16 -6
  255. package/src/containers/Plank/PlankRoot.tsx +2 -2
  256. package/src/containers/Sidebar/ComplementarySidebar.tsx +2 -1
  257. package/src/containers/Sidebar/Sidebar.tsx +2 -2
  258. package/src/containers/Sidebar/SidebarButton.tsx +7 -1
  259. package/src/hooks/useDeckCompanions.ts +2 -1
  260. package/src/index.ts +10 -2
  261. package/src/operations/add-toast.ts +1 -1
  262. package/src/operations/adjust.ts +3 -3
  263. package/src/operations/close.ts +1 -1
  264. package/src/operations/definitions.ts +5 -17
  265. package/src/operations/index.ts +2 -2
  266. package/src/operations/open.ts +1 -1
  267. package/src/operations/revert-workspace.ts +1 -1
  268. package/src/operations/scroll-into-view.ts +1 -1
  269. package/src/operations/set-layout-mode.ts +1 -1
  270. package/src/operations/set.ts +1 -1
  271. package/src/operations/show-undo.ts +1 -1
  272. package/src/operations/switch-workspace.ts +1 -1
  273. package/src/operations/{change-companion.ts → update-companion.ts} +5 -5
  274. package/src/operations/update-complementary.ts +1 -1
  275. package/src/operations/update-dialog.ts +1 -1
  276. package/src/operations/update-plank-size.ts +1 -1
  277. package/src/operations/update-popover.ts +1 -1
  278. package/src/operations/update-sidebar.ts +1 -1
  279. package/src/translations.ts +2 -12
  280. package/src/types/Settings.ts +31 -6
  281. package/src/types/schema.ts +0 -7
  282. package/dist/lib/browser/adjust-OXVHZTBE.mjs.map +0 -7
  283. package/dist/lib/browser/change-companion-Z3Q2UPX4.mjs.map +0 -7
  284. package/dist/lib/browser/chunk-2YNVGCOQ.mjs.map +0 -7
  285. package/dist/lib/browser/open-J5HV42UN.mjs.map +0 -7
  286. package/dist/lib/browser/set-layout-mode-DRNBZHE7.mjs.map +0 -7
  287. package/dist/lib/browser/switch-workspace-U7SPENHU.mjs.map +0 -7
  288. package/dist/lib/node-esm/adjust-G6FGZW6H.mjs.map +0 -7
  289. package/dist/lib/node-esm/change-companion-V6343HMY.mjs.map +0 -7
  290. package/dist/lib/node-esm/chunk-GI5JXNBT.mjs.map +0 -7
  291. package/dist/lib/node-esm/open-KRCARMEB.mjs.map +0 -7
  292. package/dist/lib/node-esm/set-layout-mode-E27AI5KE.mjs.map +0 -7
  293. package/dist/lib/node-esm/switch-workspace-AQCNGS4Y.mjs.map +0 -7
  294. package/dist/types/src/operations/change-companion.d.ts +0 -5
  295. package/dist/types/src/operations/change-companion.d.ts.map +0 -1
  296. /package/dist/lib/browser/{chunk-BRZAVPMC.mjs.map → chunk-LSZ47AY3.mjs.map} +0 -0
  297. /package/dist/lib/node-esm/{chunk-MB4SDDVY.mjs.map → chunk-KY7ZCANM.mjs.map} +0 -0
@@ -13,9 +13,9 @@ import {
13
13
  expandPath,
14
14
  validateNavigationTarget,
15
15
  } from '@dxos/app-toolkit';
16
+ import { Operation } from '@dxos/compute';
16
17
  import { Context } from '@dxos/context';
17
18
  import { Obj } from '@dxos/echo';
18
- import { Operation } from '@dxos/operation';
19
19
  import { AttentionCapabilities } from '@dxos/plugin-attention/types';
20
20
  import { ClientCapabilities } from '@dxos/plugin-client/types';
21
21
  import { Graph } from '@dxos/plugin-graph';
@@ -6,7 +6,7 @@ import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capabilities } from '@dxos/app-framework';
8
8
  import { LayoutOperation } from '@dxos/app-toolkit';
9
- import { Operation } from '@dxos/operation';
9
+ import { Operation } from '@dxos/compute';
10
10
 
11
11
  import { DeckCapabilities } from '../types';
12
12
 
@@ -6,7 +6,7 @@ import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capabilities } from '@dxos/app-framework';
8
8
  import { LayoutOperation } from '@dxos/app-toolkit';
9
- import { Operation } from '@dxos/operation';
9
+ import { Operation } from '@dxos/compute';
10
10
 
11
11
  import { DeckCapabilities } from '../types';
12
12
 
@@ -6,8 +6,8 @@ import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capabilities } from '@dxos/app-framework';
8
8
  import { LayoutOperation } from '@dxos/app-toolkit';
9
+ import { Operation } from '@dxos/compute';
9
10
  import { log } from '@dxos/log';
10
- import { Operation } from '@dxos/operation';
11
11
  import { isNonNullable } from '@dxos/util';
12
12
 
13
13
  import { DeckCapabilities, type DeckState, type LayoutMode, getMode, isLayoutMode } from '../types';
@@ -6,7 +6,7 @@ import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capabilities, Capability } from '@dxos/app-framework';
8
8
  import { LayoutOperation } from '@dxos/app-toolkit';
9
- import { Operation } from '@dxos/operation';
9
+ import { Operation } from '@dxos/compute';
10
10
  import { AttentionCapabilities } from '@dxos/plugin-attention/types';
11
11
 
12
12
  import { DeckCapabilities } from '../types';
@@ -6,7 +6,7 @@ import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capabilities, Capability, UndoOperation } from '@dxos/app-framework';
8
8
  import { LayoutOperation } from '@dxos/app-toolkit';
9
- import { Operation } from '@dxos/operation';
9
+ import { Operation } from '@dxos/compute';
10
10
 
11
11
  import { meta } from '#meta';
12
12
 
@@ -6,8 +6,8 @@ import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capabilities, Capability } from '@dxos/app-framework';
8
8
  import { AppCapabilities, isPinnedWorkspace, LayoutOperation } from '@dxos/app-toolkit';
9
+ import { Operation } from '@dxos/compute';
9
10
  import { invariant } from '@dxos/invariant';
10
- import { Operation } from '@dxos/operation';
11
11
  import { Graph, Node } from '@dxos/plugin-graph';
12
12
 
13
13
  import { DeckCapabilities, defaultDeck } from '../types';
@@ -5,22 +5,22 @@
5
5
  import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capabilities } from '@dxos/app-framework';
8
- import { Operation } from '@dxos/operation';
8
+ import { LayoutOperation } from '@dxos/app-toolkit';
9
+ import { Operation } from '@dxos/compute';
9
10
  import { getLinkedVariant } from '@dxos/react-ui-attention';
10
11
 
11
12
  import { DeckCapabilities } from '../types';
12
- import { ChangeCompanion } from './definitions';
13
13
  import { updateActiveDeck } from './helpers';
14
14
 
15
- const handler: Operation.WithHandler<typeof ChangeCompanion> = ChangeCompanion.pipe(
15
+ const handler: Operation.WithHandler<typeof LayoutOperation.UpdateCompanion> = LayoutOperation.UpdateCompanion.pipe(
16
16
  Operation.withHandler(
17
17
  Effect.fnUntraced(function* (input) {
18
- if (input.companion === null) {
18
+ if (input.subject === null) {
19
19
  yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) =>
20
20
  updateActiveDeck(state, { companionOpen: false }),
21
21
  );
22
22
  } else {
23
- const variant = getLinkedVariant(input.companion);
23
+ const variant = getLinkedVariant(input.subject);
24
24
  yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) =>
25
25
  updateActiveDeck(state, {
26
26
  companionOpen: true,
@@ -6,7 +6,7 @@ import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capabilities } from '@dxos/app-framework';
8
8
  import { LayoutOperation } from '@dxos/app-toolkit';
9
- import { Operation } from '@dxos/operation';
9
+ import { Operation } from '@dxos/compute';
10
10
 
11
11
  import { DeckCapabilities } from '../types';
12
12
 
@@ -6,7 +6,7 @@ import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capabilities } from '@dxos/app-framework';
8
8
  import { LayoutOperation } from '@dxos/app-toolkit';
9
- import { Operation } from '@dxos/operation';
9
+ import { Operation } from '@dxos/compute';
10
10
 
11
11
  import { DeckCapabilities } from '../types';
12
12
 
@@ -5,7 +5,7 @@
5
5
  import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capabilities } from '@dxos/app-framework';
8
- import { Operation } from '@dxos/operation';
8
+ import { Operation } from '@dxos/compute';
9
9
 
10
10
  import { DeckCapabilities } from '../types';
11
11
  import { UpdatePlankSize } from './definitions';
@@ -6,7 +6,7 @@ import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capabilities } from '@dxos/app-framework';
8
8
  import { LayoutOperation } from '@dxos/app-toolkit';
9
- import { Operation } from '@dxos/operation';
9
+ import { Operation } from '@dxos/compute';
10
10
 
11
11
  import { DeckCapabilities } from '../types';
12
12
 
@@ -6,7 +6,7 @@ import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capabilities } from '@dxos/app-framework';
8
8
  import { LayoutOperation } from '@dxos/app-toolkit';
9
- import { Operation } from '@dxos/operation';
9
+ import { Operation } from '@dxos/compute';
10
10
 
11
11
  import { DeckCapabilities } from '../types';
12
12
 
@@ -14,9 +14,9 @@ export const translations = [
14
14
  'settings.title': 'Deck settings',
15
15
  'main-header.label': 'Main header',
16
16
  'open-navigation-sidebar.label': 'Open sidebar',
17
- 'collapse-navigation-sidebar.label': 'Minimize sidebar',
17
+ 'collapse-navigation-sidebar.label': 'Close sidebar',
18
18
  'open-complementary-sidebar.label': 'Open context sidebar',
19
- 'close-complementary-sidebar.label': 'Minimize context sidebar',
19
+ 'close-complementary-sidebar.label': 'Close context sidebar',
20
20
  'sidebar.title': 'Navigation sidebar',
21
21
  'complementary-sidebar.title': 'Context sidebar',
22
22
  'plugin-error.message': 'Content failed to render.',
@@ -24,10 +24,6 @@ export const translations = [
24
24
  'content-fallback.description':
25
25
  'No plugin had a response for the address you navigated to. Double-check the URL, and ensure you’ve enabled a plugin that supports the object.',
26
26
  'toggle-fullscreen.label': 'Toggle fullscreen',
27
- 'settings.show-hints.label': 'Show hints',
28
- 'settings.show-hints.description': 'Show helpful tips and keyboard shortcut hints in the interface.',
29
- 'settings.native-redirect.label': 'Enable native url redirect',
30
- 'settings.native-redirect.description': 'Redirect supported URLs to the native desktop application.',
31
27
  'undo-available.label': 'Click to undo previous action.',
32
28
  'undo-action.label': 'Undo',
33
29
  'undo-action.alt': 'Undo previous action',
@@ -51,12 +47,6 @@ export const translations = [
51
47
  'minify.label': 'Minify',
52
48
  'open-companion.label': 'Open companion',
53
49
  'close-companion.label': 'Close companion',
54
- 'settings.enable-statusbar.label': 'Show status bar',
55
- 'settings.enable-statusbar.description': 'Display a status bar at the bottom of the application.',
56
- 'settings.enable-deck.label': 'Enable Deck',
57
- 'settings.enable-deck.description': 'Display multiple panels side by side instead of one at a time.',
58
- 'settings.encapsulated-planks.label': 'Encapsulated planks',
59
- 'settings.encapsulated-planks.description': 'Render each plank inside its own isolated container.',
60
50
  'close-current.label': 'Close current plank',
61
51
  'close-others.label': 'Close other planks',
62
52
  'close-all.label': 'Close all planks',
@@ -7,11 +7,36 @@
7
7
  import * as Schema from 'effect/Schema';
8
8
 
9
9
  export const Settings = Schema.Struct({
10
- showHints: Schema.optional(Schema.Boolean),
11
- enableDeck: Schema.optional(Schema.Boolean),
12
- enableStatusbar: Schema.optional(Schema.Boolean),
13
- enableNativeRedirect: Schema.optional(Schema.Boolean),
10
+ enableDeck: Schema.optional(
11
+ Schema.Boolean.annotations({
12
+ title: 'Enable Deck',
13
+ description: 'Display multiple panels side by side instead of one at a time.',
14
+ }),
15
+ ),
14
16
  // TODO(burdon): Rename layoutMode? (e.g., bento | encapsulated?)
15
- encapsulatedPlanks: Schema.optional(Schema.Boolean),
17
+ encapsulatedPlanks: Schema.optional(
18
+ Schema.Boolean.annotations({
19
+ title: 'Encapsulated planks',
20
+ description: 'Render each plank inside its own isolated container.',
21
+ }),
22
+ ),
23
+ enableStatusbar: Schema.optional(
24
+ Schema.Boolean.annotations({
25
+ title: 'Show status bar',
26
+ description: 'Display a status bar at the bottom of the application.',
27
+ }),
28
+ ),
29
+ showHints: Schema.optional(
30
+ Schema.Boolean.annotations({
31
+ title: 'Show hints',
32
+ description: 'Show helpful tips and keyboard shortcut hints in the interface.',
33
+ }),
34
+ ),
35
+ enableNativeRedirect: Schema.optional(
36
+ Schema.Boolean.annotations({
37
+ title: 'Enable native url redirect',
38
+ description: 'Redirect supported URLs to the native desktop application.',
39
+ }),
40
+ ),
16
41
  }).pipe(Schema.mutable);
17
- export type Settings = Schema.Schema.Type<typeof Settings>;
42
+ export interface Settings extends Schema.Schema.Type<typeof Settings> {}
@@ -140,11 +140,4 @@ export namespace DeckAction {
140
140
  }),
141
141
  output: Schema.Void,
142
142
  }) {}
143
-
144
- export class ChangeCompanion extends Schema.TaggedClass<ChangeCompanion>()(`${meta.id}.action.change-companion`, {
145
- input: Schema.Struct({
146
- companion: Schema.Union(Schema.String, Schema.Null),
147
- }),
148
- output: Schema.Void,
149
- }) {}
150
143
  }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/adjust.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/operation';\nimport { AttentionCapabilities } from '@dxos/plugin-attention/types';\nimport { Graph } from '@dxos/plugin-graph';\nimport { byPosition } from '@dxos/util';\n\nimport { incrementPlank } from '../layout';\nimport { DeckCapabilities, PLANK_COMPANION_TYPE } from '../types';\nimport { computeActiveUpdates } from '../util';\nimport { Adjust, ChangeCompanion } from './definitions';\nimport { updateActiveDeck } from './helpers';\n\nconst handler: Operation.WithHandler<typeof Adjust> = Adjust.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n const _state = yield* Capabilities.getAtomValue(DeckCapabilities.State);\n const deck = yield* DeckCapabilities.getDeck();\n const attention = yield* Capability.get(AttentionCapabilities.Attention);\n const { graph } = yield* Capability.get(AppCapabilities.AppGraph);\n\n let soloOperation:\n | { type: 'solo'; entryId: string; mode: string }\n | { type: 'unsolo'; entryId: string }\n | undefined;\n\n if (input.type === 'increment-end' || input.type === 'increment-start') {\n const next = incrementPlank(deck.active, input);\n const { deckUpdates } = computeActiveUpdates({ next, deck, attention });\n yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => updateActiveDeck(state, deckUpdates));\n }\n\n if (input.type.startsWith('solo')) {\n const entryId = input.id;\n if (!deck.solo) {\n soloOperation = { type: 'solo', entryId, mode: input.type };\n } else {\n if (input.type === 'solo--fullscreen') {\n soloOperation = { type: 'solo', entryId, mode: 'solo--fullscreen' };\n } else if (input.type === 'solo') {\n soloOperation = { type: 'unsolo', entryId };\n }\n }\n }\n\n if (soloOperation?.type === 'solo') {\n yield* Operation.invoke(LayoutOperation.SetLayoutMode, {\n subject: soloOperation.entryId,\n mode: soloOperation.mode,\n });\n } else if (soloOperation?.type === 'unsolo') {\n yield* Operation.invoke(LayoutOperation.SetLayoutMode, { mode: 'multi' });\n yield* Operation.invoke(LayoutOperation.Open, { subject: [soloOperation.entryId] });\n }\n\n if (input.type === 'companion') {\n const companion = Function.pipe(\n Graph.getNode(graph, input.id),\n Option.map((node) =>\n Graph.getConnections(graph, node.id, 'child')\n .filter((n) => n.type === PLANK_COMPANION_TYPE)\n .toSorted((a, b) => byPosition(a.properties, b.properties)),\n ),\n Option.flatMap((companions) => (companions.length > 0 ? Option.some(companions[0]) : Option.none())),\n );\n\n if (Option.isSome(companion)) {\n yield* Operation.invoke(ChangeCompanion, { companion: companion.value.id });\n }\n }\n }),\n ),\n);\n\nexport default handler;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,cAAc;AAC1B,YAAYC,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,iBAAiBC,uBAAuB;AACjD,SAASC,iBAAiB;AAC1B,SAASC,6BAA6B;AACtC,SAASC,aAAa;AACtB,SAASC,kBAAkB;AAQ3B,IAAMC,UAAgDC,OAAOC,KAC3DC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,QAAMC,SAAS,OAAOC,aAAaC,aAAaC,iBAAiBC,KAAK;AACtE,QAAMC,OAAO,OAAOF,iBAAiBG,QAAO;AAC5C,QAAMC,YAAY,OAAOC,WAAWC,IAAIC,sBAAsBC,SAAS;AACvE,QAAM,EAAEC,MAAK,IAAK,OAAOJ,WAAWC,IAAII,gBAAgBC,QAAQ;AA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AA,EACzBC,SAAS,CAACC,GAAGC,MAAMC,WAAWF,EAAEG,YAAYF,EAAEE,UAAU,CAAA,CAAA,GAEtDC,eAAQ,CAACC,eAAgBA,WAAWC,SAAS,IAAWC,YAAKF,WAAW,CAAA,CAAE,IAAWG,YAAI,CAAA,CAAA;AAGlG,QAAWC,cAAOnB,SAAAA,GAAY;AAC5B,aAAOvC,UAAUkC,OAAOyB,iBAAiB;QAAEpB,WAAWA,UAAUqB,MAAM7B;MAAG,CAAA;IAC3E;EACF;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,iBAAelC;",
6
- "names": ["Effect", "Function", "Option", "Capabilities", "Capability", "AppCapabilities", "LayoutOperation", "Operation", "AttentionCapabilities", "Graph", "byPosition", "handler", "Adjust", "pipe", "Operation", "withHandler", "fnUntraced", "input", "_state", "Capabilities", "getAtomValue", "DeckCapabilities", "State", "deck", "getDeck", "attention", "Capability", "get", "AttentionCapabilities", "Attention", "graph", "AppCapabilities", "AppGraph", "soloOperation", "type", "next", "incrementPlank", "active", "deckUpdates", "computeActiveUpdates", "updateAtomValue", "state", "updateActiveDeck", "startsWith", "entryId", "id", "solo", "mode", "invoke", "LayoutOperation", "SetLayoutMode", "subject", "Open", "companion", "Graph", "getNode", "map", "node", "getConnections", "filter", "n", "PLANK_COMPANION_TYPE", "toSorted", "a", "b", "byPosition", "properties", "flatMap", "companions", "length", "some", "none", "isSome", "ChangeCompanion", "value"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/change-companion.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities } from '@dxos/app-framework';\nimport { Operation } from '@dxos/operation';\nimport { getLinkedVariant } from '@dxos/react-ui-attention';\n\nimport { DeckCapabilities } from '../types';\nimport { ChangeCompanion } from './definitions';\nimport { updateActiveDeck } from './helpers';\n\nconst handler: Operation.WithHandler<typeof ChangeCompanion> = ChangeCompanion.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n if (input.companion === null) {\n yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) =>\n updateActiveDeck(state, { companionOpen: false }),\n );\n } else {\n const variant = getLinkedVariant(input.companion);\n yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) =>\n updateActiveDeck(state, {\n companionOpen: true,\n companionVariant: variant,\n }),\n );\n }\n }),\n ),\n);\n\nexport default handler;\n"],
5
- "mappings": ";;;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,oBAAoB;AAC7B,SAASC,iBAAiB;AAC1B,SAASC,wBAAwB;AAMjC,IAAMC,UAAyDC,gBAAgBC,KAC7EC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,MAAIA,MAAMC,cAAc,MAAM;AAC5B,WAAOC,aAAaC,gBAAgBC,iBAAiBC,OAAO,CAACC,UAC3DC,iBAAiBD,OAAO;MAAEE,eAAe;IAAM,CAAA,CAAA;EAEnD,OAAO;AACL,UAAMC,UAAUC,iBAAiBV,MAAMC,SAAS;AAChD,WAAOC,aAAaC,gBAAgBC,iBAAiBC,OAAO,CAACC,UAC3DC,iBAAiBD,OAAO;MACtBE,eAAe;MACfG,kBAAkBF;IACpB,CAAA,CAAA;EAEJ;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,2BAAef;",
6
- "names": ["Effect", "Capabilities", "Operation", "getLinkedVariant", "handler", "ChangeCompanion", "pipe", "Operation", "withHandler", "fnUntraced", "input", "companion", "Capabilities", "updateAtomValue", "DeckCapabilities", "State", "state", "updateActiveDeck", "companionOpen", "variant", "getLinkedVariant", "companionVariant"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/definitions.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/operation';\n\nimport { meta } from '#meta';\n\nconst PartAdjustmentSchema = Schema.Union(\n Schema.Literal('close').annotations({ description: 'Close the plank.' }),\n Schema.Literal('companion').annotations({ description: 'Open the companion plank.' }),\n Schema.Literal('solo').annotations({ description: 'Solo the plank.' }),\n Schema.Literal('solo--fullscreen').annotations({ description: 'Fullscreen the plank.' }),\n Schema.Literal('increment-start').annotations({ description: 'Move the plank towards the start of the deck.' }),\n Schema.Literal('increment-end').annotations({ description: 'Move the plank towards the end of the deck.' }),\n);\nexport type PartAdjustment = Schema.Schema.Type<typeof PartAdjustmentSchema>;\n\nexport const Adjust = Operation.make({\n meta: {\n key: `${meta.id}.operation.adjust`,\n name: 'Adjust',\n description: 'Adjust the layout of a plank.',\n },\n services: [Capability.Service],\n input: Schema.Struct({\n id: Schema.String.annotations({ description: 'The id of the plank to adjust.' }),\n type: PartAdjustmentSchema.annotations({ description: 'The type of adjustment to make.' }),\n }),\n output: Schema.Void,\n});\n\nexport const UpdatePlankSize = Operation.make({\n meta: {\n key: `${meta.id}.operation.update-plank-size`,\n name: 'Update Plank Size',\n description: 'Update the size of a plank.',\n },\n services: [Capability.Service],\n input: Schema.Struct({\n id: Schema.String.annotations({ description: 'The id of the plank to resize.' }),\n size: Schema.Number.annotations({ description: 'The new size of the plank.' }),\n }),\n output: Schema.Void,\n});\n\nexport const ChangeCompanion = Operation.make({\n meta: {\n key: `${meta.id}.operation.change-companion`,\n name: 'Change Companion',\n description: 'Change the companion plank for a primary plank.',\n },\n services: [Capability.Service],\n input: Schema.Struct({\n companion: Schema.Union(Schema.String, Schema.Null),\n }),\n output: Schema.Void,\n});\n"],
5
- "mappings": ";;;;;AAAA;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAE1B,SAASC,YAAY;AAErB,IAAMC,uBAA8BC,aAC3BC,eAAQ,OAAA,EAASC,YAAY;EAAEC,aAAa;AAAmB,CAAA,GAC/DF,eAAQ,WAAA,EAAaC,YAAY;EAAEC,aAAa;AAA4B,CAAA,GAC5EF,eAAQ,MAAA,EAAQC,YAAY;EAAEC,aAAa;AAAkB,CAAA,GAC7DF,eAAQ,kBAAA,EAAoBC,YAAY;EAAEC,aAAa;AAAwB,CAAA,GAC/EF,eAAQ,iBAAA,EAAmBC,YAAY;EAAEC,aAAa;AAAgD,CAAA,GACtGF,eAAQ,eAAA,EAAiBC,YAAY;EAAEC,aAAa;AAA8C,CAAA,CAAA;AAIpG,IAAMC,SAASC,UAAUC,KAAK;EACnCC,MAAM;IACJC,KAAK,GAAGD,KAAKE,EAAE;IACfC,MAAM;IACNP,aAAa;EACf;EACAQ,UAAU;IAACC,WAAWC;;EACtBC,OAAcC,cAAO;IACnBN,IAAWO,cAAOd,YAAY;MAAEC,aAAa;IAAiC,CAAA;IAC9Ec,MAAMlB,qBAAqBG,YAAY;MAAEC,aAAa;IAAkC,CAAA;EAC1F,CAAA;EACAe,QAAeC;AACjB,CAAA;AAEO,IAAMC,kBAAkBf,UAAUC,KAAK;EAC5CC,MAAM;IACJC,KAAK,GAAGD,KAAKE,EAAE;IACfC,MAAM;IACNP,aAAa;EACf;EACAQ,UAAU;IAACC,WAAWC;;EACtBC,OAAcC,cAAO;IACnBN,IAAWO,cAAOd,YAAY;MAAEC,aAAa;IAAiC,CAAA;IAC9EkB,MAAaC,cAAOpB,YAAY;MAAEC,aAAa;IAA6B,CAAA;EAC9E,CAAA;EACAe,QAAeC;AACjB,CAAA;AAEO,IAAMI,kBAAkBlB,UAAUC,KAAK;EAC5CC,MAAM;IACJC,KAAK,GAAGD,KAAKE,EAAE;IACfC,MAAM;IACNP,aAAa;EACf;EACAQ,UAAU;IAACC,WAAWC;;EACtBC,OAAcC,cAAO;IACnBS,WAAkBxB,aAAagB,eAAeS,WAAI;EACpD,CAAA;EACAP,QAAeC;AACjB,CAAA;",
6
- "names": ["Schema", "Capability", "Operation", "meta", "PartAdjustmentSchema", "Union", "Literal", "annotations", "description", "Adjust", "Operation", "make", "meta", "key", "id", "name", "services", "Capability", "Service", "input", "Struct", "String", "type", "output", "Void", "UpdatePlankSize", "size", "Number", "ChangeCompanion", "companion", "Null"]
7
- }
@@ -1,7 +0,0 @@
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 { Context } from '@dxos/context';\nimport { Obj } from '@dxos/echo';\nimport { Operation } from '@dxos/operation';\nimport { AttentionCapabilities } from '@dxos/plugin-attention/types';\nimport { ClientCapabilities } from '@dxos/plugin-client/types';\nimport { Graph } from '@dxos/plugin-graph';\nimport { ObservabilityOperation } from '@dxos/plugin-observability/operations';\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 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 checkRemoteExistence = yield* Capability.get(ClientCapabilities.Client).pipe(\n Effect.map((client) =>\n createEdgeExistenceChecker((spaceId, body) => client.edge.http.execQuery(new Context(), spaceId, body)),\n ),\n Effect.catchAll(() => Effect.succeed(undefined)),\n );\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, 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,YAAY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Q,WAAkBC,aAAMC,MAAMC,QAAQ7F,OAAO6B,SAAAA,GAAY;QAC7DiE,QAAQ,MAAMnE;QACdoE,QAAQ,CAACC,SAAAA;AACP,gBAAMlD,SAASkD,KAAKC;AACpB,iBAAOC,IAAIC,SAASrD,MAAAA,IAAUoD,IAAIE,YAAYtD,MAAAA,IAAUnB;QAC1D;MACF,CAAA;AACA,aAAO/B,UAAU2F,SAASc,uBAAuBC,WAAW;QAC1DC,MAAM;QACNC,YAAY;UAAE3E;UAAW6D;QAAS;MACpC,CAAA;IACF;EACF;AAEA,SAAO1D;AACT,CAAA,CAAA,CAAA;AAIJ,IAAA,eAAexC;",
6
- "names": ["Effect", "Option", "Capabilities", "Capability", "AppCapabilities", "LayoutOperation", "createEdgeExistenceChecker", "expandPath", "validateNavigationTarget", "Context", "Obj", "Operation", "AttentionCapabilities", "ClientCapabilities", "Graph", "ObservabilityOperation", "handler", "LayoutOperation", "Open", "pipe", "Operation", "withHandler", "fnUntraced", "input", "graph", "Capability", "get", "AppCapabilities", "AppGraph", "attention", "AttentionCapabilities", "Attention", "capabilities", "Service", "pathResolvers", "getAll", "NavigationPathResolver", "checkRemoteExistence", "ClientCapabilities", "Client", "map", "client", "createEdgeExistenceChecker", "spaceId", "body", "edge", "http", "execQuery", "Context", "catchAll", "succeed", "undefined", "navigation", "subjectId", "subject", "expandPath", "validatedSubjects", "all", "validateNavigationTarget", "state", "Capabilities", "getAtomValue", "DeckCapabilities", "State", "workspace", "activeDeck", "invoke", "SwitchWorkspace", "deck", "getDeck", "active", "solo", "initialized", "length", "resolveDxn", "qualifiedPath", "reduce", "none", "acc", "resolver", "isSome", "opt", "dxn", "toString", "deckDxnMap", "Map", "deckId", "set", "value", "concurrency", "size", "remapped", "existing", "previouslyOpenIds", "Set", "next", "openSubjectsOnActiveDeck", "pivotId", "key", "deckUpdates", "toAttend", "_toAttend", "computeActiveUpdates", "updateAtomValue", "updateActiveDeck", "ids", "newlyOpen", "filter", "i", "has", "scrollIntoView", "schedule", "ScrollIntoView", "Expose", "typename", "match", "Graph", "getNode", "onNone", "onSome", "node", "data", "Obj", "isObject", "getTypename", "ObservabilityOperation", "SendEvent", "name", "properties"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/set-layout-mode.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 { log } from '@dxos/log';\nimport { Operation } from '@dxos/operation';\nimport { isNonNullable } from '@dxos/util';\n\nimport { DeckCapabilities, type DeckState, type LayoutMode, getMode, isLayoutMode } from '../types';\nimport { updateActiveDeck } from './helpers';\n\n/**\n * Transitions between layout modes (multi, solo, solo--fullscreen) or reverts to the previous mode.\n * Computes which planks become active/inactive and persists the previous mode for revert support.\n */\nconst handler: Operation.WithHandler<typeof LayoutOperation.SetLayoutMode> = LayoutOperation.SetLayoutMode.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n if ('mode' in input && !isLayoutMode(input.mode)) {\n return;\n }\n\n const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);\n const deck = yield* DeckCapabilities.getDeck();\n\n const computeModeUpdate = (mode: LayoutMode, subject?: string): Partial<DeckState> => {\n const current = deck.solo ? [deck.solo] : deck.active;\n const next = (mode !== 'multi' ? [subject ?? deck.solo ?? deck.active[0]] : [...deck.active, deck.solo]).filter(\n isNonNullable,\n );\n\n const removed = current.filter((id: string) => !next.includes(id));\n const closed = Array.from(new Set([...deck.inactive.filter((id: string) => !next.includes(id)), ...removed]));\n\n const soloUpdate =\n mode !== 'multi' && next[0]\n ? { solo: next[0] }\n : mode === 'multi' && deck.solo\n ? { solo: undefined, initialized: true }\n : {};\n\n const fullscreenUpdate = mode === 'solo--fullscreen' ? { fullscreen: !deck.fullscreen } : {};\n\n return {\n inactive: closed,\n ...soloUpdate,\n ...fullscreenUpdate,\n };\n };\n\n if ('mode' in input) {\n const currentMode = getMode(deck);\n const subject = 'subject' in input ? input.subject : undefined;\n const deckUpdates = computeModeUpdate(input.mode as LayoutMode, subject);\n\n yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => {\n const newPreviousMode =\n currentMode !== input.mode\n ? { ...state.previousMode, [state.activeDeck]: currentMode }\n : state.previousMode;\n return {\n ...updateActiveDeck(state, deckUpdates),\n previousMode: newPreviousMode,\n };\n });\n\n if (subject) {\n yield* Operation.schedule(LayoutOperation.Expose, { subject });\n }\n } else if ('revert' in input) {\n const deckUpdates = computeModeUpdate(state.previousMode[state.activeDeck]);\n yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => updateActiveDeck(state, deckUpdates));\n } else {\n log.warn('Invalid layout mode', input);\n }\n }),\n ),\n);\n\nexport default handler;\n"],
5
- "mappings": ";;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,oBAAoB;AAC7B,SAASC,uBAAuB;AAChC,SAASC,WAAW;AACpB,SAASC,iBAAiB;AAC1B,SAASC,qBAAqB;;AAS9B,IAAMC,UAAuEC,gBAAgBC,cAAcC,KACzGC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,MAAI,UAAUA,SAAS,CAACC,aAAaD,MAAME,IAAI,GAAG;AAChD;EACF;AAEA,QAAMC,QAAQ,OAAOC,aAAaC,aAAaC,iBAAiBC,KAAK;AACrE,QAAMC,OAAO,OAAOF,iBAAiBG,QAAO;AAE5C,QAAMC,oBAAoB,CAACR,MAAkBS,YAAAA;AAC3C,UAAMC,UAAUJ,KAAKK,OAAO;MAACL,KAAKK;QAAQL,KAAKM;AAC/C,UAAMC,QAAQb,SAAS,UAAU;MAACS,WAAWH,KAAKK,QAAQL,KAAKM,OAAO,CAAA;QAAM;SAAIN,KAAKM;MAAQN,KAAKK;OAAOG,OACvGC,aAAAA;AAGF,UAAMC,UAAUN,QAAQI,OAAO,CAACG,OAAe,CAACJ,KAAKK,S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AK,uBAAuB1C,OAAAA;;;;;;EAClC;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,0BAAeP;",
6
- "names": ["Effect", "Capabilities", "LayoutOperation", "log", "Operation", "isNonNullable", "handler", "LayoutOperation", "SetLayoutMode", "pipe", "Operation", "withHandler", "fnUntraced", "input", "isLayoutMode", "mode", "state", "Capabilities", "getAtomValue", "DeckCapabilities", "State", "deck", "getDeck", "computeModeUpdate", "subject", "current", "solo", "active", "next", "filter", "isNonNullable", "removed", "id", "includes", "closed", "Array", "from", "Set", "inactive", "soloUpdate", "undefined", "initialized", "fullscreenUpdate", "fullscreen", "currentMode", "getMode", "deckUpdates", "updateAtomValue", "newPreviousMode", "previousMode", "activeDeck", "updateActiveDeck", "schedule", "Expose", "log", "warn"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/switch-workspace.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 { AppCapabilities, isPinnedWorkspace, LayoutOperation } from '@dxos/app-toolkit';\nimport { invariant } from '@dxos/invariant';\nimport { Operation } from '@dxos/operation';\nimport { Graph, Node } from '@dxos/plugin-graph';\n\nimport { DeckCapabilities, defaultDeck } from '../types';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.SwitchWorkspace> = LayoutOperation.SwitchWorkspace.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n const { graph } = yield* Capability.get(AppCapabilities.AppGraph);\n\n {\n const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);\n // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.\n // Ideally this should be worked into the data model in a generic way.\n const shouldUpdatePrevious = !isPinnedWorkspace(state.activeDeck);\n\n yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => {\n const newDecks = state.decks[input.subject]\n ? state.decks\n : { ...state.decks, [input.subject]: { ...defaultDeck } };\n return {\n ...state,\n previousDeck: shouldUpdatePrevious ? state.activeDeck : state.previousDeck,\n activeDeck: input.subject,\n decks: newDecks,\n };\n });\n }\n\n {\n const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);\n const deck = state.decks[input.subject];\n invariant(deck, `Deck not found: ${input.subject}`);\n\n const first = deck.solo ? deck.solo : deck.active[0];\n if (first) {\n yield* Operation.schedule(LayoutOperation.ScrollIntoView, { subject: first });\n } else {\n const [item] = Graph.getConnections(graph, input.subject, 'child').filter(\n (node) => !Node.isActionLike(node) && !node.properties.disposition,\n );\n if (item) {\n yield* Operation.schedule(LayoutOperation.Open, { subject: [item.id] });\n }\n }\n }\n }),\n ),\n);\n\nexport default handler;\n"],
5
- "mappings": ";;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,iBAAiBC,mBAAmBC,uBAAuB;AACpE,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAC1B,SAASC,OAAOC,YAAY;;AAI5B,IAAMC,UAAyEC,gBAAgBC,gBAAgBC,KAC7GC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,QAAM,EAAEC,MAAK,IAAK,OAAOC,WAAWC,IAAIC,gBAAgBC,QAAQ;AAEhE;AACE,UAAMC,QAAQ,OAAOC,aAAaC,aAAaC,iBAAiBC,KAAK;AAGrE,UAAMC,uBAAuB,CAACC,kBAAkBN,MAAMO,UAAU;AAEhE,WAAON,aAAaO,gBAAgBL,iBAAiBC,OAAO,CAACJ,WAAAA;AAC3D,YAAMS,WAAWT,OAAMU,MAAMhB,MAAMiB,OAAO,IACtCX,OAAMU,QACN;QAAE,GAAGV,OAAMU;QAAO,CAAChB,MAAMiB,OAAO,GAAG;UAAE,GAAGC;QAAY;MAAE;AAC1D,aAAO;QACL,GAAGZ;QACHa,cAAcR,uBAAuBL,OAAMO,aAAaP,OAAMa;QAC9DN,YAAYb,MAAMiB;QAClBD,OAAOD;MACT;IACF,CAAA;EACF;AAEA;AACE,UAAMT,QAAQ,OAAOC,aAAaC,aAAaC,iBAAiBC,KAAK;AACrE,UAAMU,OAAOd,MAAMU,MAAMhB,MAAMiB,OAAO;AACtCI,cAAUD,MAAM,mBAAmBpB,MAAMiB,OAAO,IAAE;;;;;;;;;AAElD,UAAMK,QAAQF,KAAKG,OAAOH,KAAKG,OAAOH,KAAKI,OAAO,CAAA;AAClD,QAAIF,OAAO;AACT,aAAOzB,UAAU4B,SAAS/B,gBAAgBgC,gBAAgB;QAAET,SAASK;MAAM,CAAA;IAC7E,OAAO;AACL,YAAM,CAACK,IAAAA,IAAQC,MAAMC,eAAe5B,OAAOD,MAAMiB,SAAS,OAAA,EAASa,OACjE,CAACC,SAAS,CAACC,KAAKC,aAAaF,IAAAA,KAAS,CAACA,KAAKG,WAAWC,WAAW;AAEpE,UAAIR,MAAM;AACR,eAAO9B,UAAU4B,SAAS/B,gBAAgB0C,MAAM;UAAEnB,SAAS;YAACU,KAAKU;;QAAI,CAAA;MACvE;IACF;EACF;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,2BAAe5C;",
6
- "names": ["Effect", "Capabilities", "Capability", "AppCapabilities", "isPinnedWorkspace", "LayoutOperation", "invariant", "Operation", "Graph", "Node", "handler", "LayoutOperation", "SwitchWorkspace", "pipe", "Operation", "withHandler", "fnUntraced", "input", "graph", "Capability", "get", "AppCapabilities", "AppGraph", "state", "Capabilities", "getAtomValue", "DeckCapabilities", "State", "shouldUpdatePrevious", "isPinnedWorkspace", "activeDeck", "updateAtomValue", "newDecks", "decks", "subject", "defaultDeck", "previousDeck", "deck", "invariant", "first", "solo", "active", "schedule", "ScrollIntoView", "item", "Graph", "getConnections", "filter", "node", "Node", "isActionLike", "properties", "disposition", "Open", "id"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/adjust.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/operation';\nimport { AttentionCapabilities } from '@dxos/plugin-attention/types';\nimport { Graph } from '@dxos/plugin-graph';\nimport { byPosition } from '@dxos/util';\n\nimport { incrementPlank } from '../layout';\nimport { DeckCapabilities, PLANK_COMPANION_TYPE } from '../types';\nimport { computeActiveUpdates } from '../util';\nimport { Adjust, ChangeCompanion } from './definitions';\nimport { updateActiveDeck } from './helpers';\n\nconst handler: Operation.WithHandler<typeof Adjust> = Adjust.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n const _state = yield* Capabilities.getAtomValue(DeckCapabilities.State);\n const deck = yield* DeckCapabilities.getDeck();\n const attention = yield* Capability.get(AttentionCapabilities.Attention);\n const { graph } = yield* Capability.get(AppCapabilities.AppGraph);\n\n let soloOperation:\n | { type: 'solo'; entryId: string; mode: string }\n | { type: 'unsolo'; entryId: string }\n | undefined;\n\n if (input.type === 'increment-end' || input.type === 'increment-start') {\n const next = incrementPlank(deck.active, input);\n const { deckUpdates } = computeActiveUpdates({ next, deck, attention });\n yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => updateActiveDeck(state, deckUpdates));\n }\n\n if (input.type.startsWith('solo')) {\n const entryId = input.id;\n if (!deck.solo) {\n soloOperation = { type: 'solo', entryId, mode: input.type };\n } else {\n if (input.type === 'solo--fullscreen') {\n soloOperation = { type: 'solo', entryId, mode: 'solo--fullscreen' };\n } else if (input.type === 'solo') {\n soloOperation = { type: 'unsolo', entryId };\n }\n }\n }\n\n if (soloOperation?.type === 'solo') {\n yield* Operation.invoke(LayoutOperation.SetLayoutMode, {\n subject: soloOperation.entryId,\n mode: soloOperation.mode,\n });\n } else if (soloOperation?.type === 'unsolo') {\n yield* Operation.invoke(LayoutOperation.SetLayoutMode, { mode: 'multi' });\n yield* Operation.invoke(LayoutOperation.Open, { subject: [soloOperation.entryId] });\n }\n\n if (input.type === 'companion') {\n const companion = Function.pipe(\n Graph.getNode(graph, input.id),\n Option.map((node) =>\n Graph.getConnections(graph, node.id, 'child')\n .filter((n) => n.type === PLANK_COMPANION_TYPE)\n .toSorted((a, b) => byPosition(a.properties, b.properties)),\n ),\n Option.flatMap((companions) => (companions.length > 0 ? Option.some(companions[0]) : Option.none())),\n );\n\n if (Option.isSome(companion)) {\n yield* Operation.invoke(ChangeCompanion, { companion: companion.value.id });\n }\n }\n }),\n ),\n);\n\nexport default handler;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,cAAc;AAC1B,YAAYC,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,iBAAiBC,uBAAuB;AACjD,SAASC,iBAAiB;AAC1B,SAASC,6BAA6B;AACtC,SAASC,aAAa;AACtB,SAASC,kBAAkB;AAQ3B,IAAMC,UAAgDC,OAAOC,KAC3DC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,QAAMC,SAAS,OAAOC,aAAaC,aAAaC,iBAAiBC,KAAK;AACtE,QAAMC,OAAO,OAAOF,iBAAiBG,QAAO;AAC5C,QAAMC,YAAY,OAAOC,WAAWC,IAAIC,sBAAsBC,SAAS;AACvE,QAAM,EAAEC,MAAK,IAAK,OAAOJ,WAAWC,IAAII,gBAAgBC,QAAQ;AAEhE,MAAIC;AAKJ,MAAIhB,MAAMiB,SAAS,mBAAmBjB,MAAMiB,SAAS,mBAAmB;AACtE,UAAMC,OAAOC,eAAeb,KAAKc,QAAQpB,KAAAA;AACzC,UAAM,EAAEqB,YAAW,IAAKC,qBAAqB;MAAEJ;MAAMZ;MAAME;IAAU,CAAA;AACrE,WAAON,aAAaqB,gBAAgBnB,iBAAiBC,OAAO,CAACmB,UAAUC,iBAAiBD,OAAOH,WAAAA,CAAAA;EACjG;AAEA,MAAIrB,MAAMiB,K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AA,CAAA,CAAA;AAIJ,IAAA,iBAAelC;",
6
- "names": ["Effect", "Function", "Option", "Capabilities", "Capability", "AppCapabilities", "LayoutOperation", "Operation", "AttentionCapabilities", "Graph", "byPosition", "handler", "Adjust", "pipe", "Operation", "withHandler", "fnUntraced", "input", "_state", "Capabilities", "getAtomValue", "DeckCapabilities", "State", "deck", "getDeck", "attention", "Capability", "get", "AttentionCapabilities", "Attention", "graph", "AppCapabilities", "AppGraph", "soloOperation", "type", "next", "incrementPlank", "active", "deckUpdates", "computeActiveUpdates", "updateAtomValue", "state", "updateActiveDeck", "startsWith", "entryId", "id", "solo", "mode", "invoke", "LayoutOperation", "SetLayoutMode", "subject", "Open", "companion", "Graph", "getNode", "map", "node", "getConnections", "filter", "n", "PLANK_COMPANION_TYPE", "toSorted", "a", "b", "byPosition", "properties", "flatMap", "companions", "length", "some", "none", "isSome", "ChangeCompanion", "value"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/change-companion.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities } from '@dxos/app-framework';\nimport { Operation } from '@dxos/operation';\nimport { getLinkedVariant } from '@dxos/react-ui-attention';\n\nimport { DeckCapabilities } from '../types';\nimport { ChangeCompanion } from './definitions';\nimport { updateActiveDeck } from './helpers';\n\nconst handler: Operation.WithHandler<typeof ChangeCompanion> = ChangeCompanion.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n if (input.companion === null) {\n yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) =>\n updateActiveDeck(state, { companionOpen: false }),\n );\n } else {\n const variant = getLinkedVariant(input.companion);\n yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) =>\n updateActiveDeck(state, {\n companionOpen: true,\n companionVariant: variant,\n }),\n );\n }\n }),\n ),\n);\n\nexport default handler;\n"],
5
- "mappings": ";;;;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,oBAAoB;AAC7B,SAASC,iBAAiB;AAC1B,SAASC,wBAAwB;AAMjC,IAAMC,UAAyDC,gBAAgBC,KAC7EC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,MAAIA,MAAMC,cAAc,MAAM;AAC5B,WAAOC,aAAaC,gBAAgBC,iBAAiBC,OAAO,CAACC,UAC3DC,iBAAiBD,OAAO;MAAEE,eAAe;IAAM,CAAA,CAAA;EAEnD,OAAO;AACL,UAAMC,UAAUC,iBAAiBV,MAAMC,SAAS;AAChD,WAAOC,aAAaC,gBAAgBC,iBAAiBC,OAAO,CAACC,UAC3DC,iBAAiBD,OAAO;MACtBE,eAAe;MACfG,kBAAkBF;IACpB,CAAA,CAAA;EAEJ;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,2BAAef;",
6
- "names": ["Effect", "Capabilities", "Operation", "getLinkedVariant", "handler", "ChangeCompanion", "pipe", "Operation", "withHandler", "fnUntraced", "input", "companion", "Capabilities", "updateAtomValue", "DeckCapabilities", "State", "state", "updateActiveDeck", "companionOpen", "variant", "getLinkedVariant", "companionVariant"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/definitions.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/operation';\n\nimport { meta } from '#meta';\n\nconst PartAdjustmentSchema = Schema.Union(\n Schema.Literal('close').annotations({ description: 'Close the plank.' }),\n Schema.Literal('companion').annotations({ description: 'Open the companion plank.' }),\n Schema.Literal('solo').annotations({ description: 'Solo the plank.' }),\n Schema.Literal('solo--fullscreen').annotations({ description: 'Fullscreen the plank.' }),\n Schema.Literal('increment-start').annotations({ description: 'Move the plank towards the start of the deck.' }),\n Schema.Literal('increment-end').annotations({ description: 'Move the plank towards the end of the deck.' }),\n);\nexport type PartAdjustment = Schema.Schema.Type<typeof PartAdjustmentSchema>;\n\nexport const Adjust = Operation.make({\n meta: {\n key: `${meta.id}.operation.adjust`,\n name: 'Adjust',\n description: 'Adjust the layout of a plank.',\n },\n services: [Capability.Service],\n input: Schema.Struct({\n id: Schema.String.annotations({ description: 'The id of the plank to adjust.' }),\n type: PartAdjustmentSchema.annotations({ description: 'The type of adjustment to make.' }),\n }),\n output: Schema.Void,\n});\n\nexport const UpdatePlankSize = Operation.make({\n meta: {\n key: `${meta.id}.operation.update-plank-size`,\n name: 'Update Plank Size',\n description: 'Update the size of a plank.',\n },\n services: [Capability.Service],\n input: Schema.Struct({\n id: Schema.String.annotations({ description: 'The id of the plank to resize.' }),\n size: Schema.Number.annotations({ description: 'The new size of the plank.' }),\n }),\n output: Schema.Void,\n});\n\nexport const ChangeCompanion = Operation.make({\n meta: {\n key: `${meta.id}.operation.change-companion`,\n name: 'Change Companion',\n description: 'Change the companion plank for a primary plank.',\n },\n services: [Capability.Service],\n input: Schema.Struct({\n companion: Schema.Union(Schema.String, Schema.Null),\n }),\n output: Schema.Void,\n});\n"],
5
- "mappings": ";;;;;;AAAA;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAE1B,SAASC,YAAY;AAErB,IAAMC,uBAA8BC,aAC3BC,eAAQ,OAAA,EAASC,YAAY;EAAEC,aAAa;AAAmB,CAAA,GAC/DF,eAAQ,WAAA,EAAaC,YAAY;EAAEC,aAAa;AAA4B,CAAA,GAC5EF,eAAQ,MAAA,EAAQC,YAAY;EAAEC,aAAa;AAAkB,CAAA,GAC7DF,eAAQ,kBAAA,EAAoBC,YAAY;EAAEC,aAAa;AAAwB,CAAA,GAC/EF,eAAQ,iBAAA,EAAmBC,YAAY;EAAEC,aAAa;AAAgD,CAAA,GACtGF,eAAQ,eAAA,EAAiBC,YAAY;EAAEC,aAAa;AAA8C,CAAA,CAAA;AAIpG,IAAMC,SAASC,UAAUC,KAAK;EACnCC,MAAM;IACJC,KAAK,GAAGD,KAAKE,EAAE;IACfC,MAAM;IACNP,aAAa;EACf;EACAQ,UAAU;IAACC,WAAWC;;EACtBC,OAAcC,cAAO;IACnBN,IAAWO,cAAOd,YAAY;MAAEC,aAAa;IAAiC,CAAA;IAC9Ec,MAAMlB,qBAAqBG,YAAY;MAAEC,aAAa;IAAkC,CAAA;EAC1F,CAAA;EACAe,QAAeC;AACjB,CAAA;AAEO,IAAMC,kBAAkBf,UAAUC,KAAK;EAC5CC,MAAM;IACJC,KAAK,GAAGD,KAAKE,EAAE;IACfC,MAAM;IACNP,aAAa;EACf;EACAQ,UAAU;IAACC,WAAWC;;EACtBC,OAAcC,cAAO;IACnBN,IAAWO,cAAOd,YAAY;MAAEC,aAAa;IAAiC,CAAA;IAC9EkB,MAAaC,cAAOpB,YAAY;MAAEC,aAAa;IAA6B,CAAA;EAC9E,CAAA;EACAe,QAAeC;AACjB,CAAA;AAEO,IAAMI,kBAAkBlB,UAAUC,KAAK;EAC5CC,MAAM;IACJC,KAAK,GAAGD,KAAKE,EAAE;IACfC,MAAM;IACNP,aAAa;EACf;EACAQ,UAAU;IAACC,WAAWC;;EACtBC,OAAcC,cAAO;IACnBS,WAAkBxB,aAAagB,eAAeS,WAAI;EACpD,CAAA;EACAP,QAAeC;AACjB,CAAA;",
6
- "names": ["Schema", "Capability", "Operation", "meta", "PartAdjustmentSchema", "Union", "Literal", "annotations", "description", "Adjust", "Operation", "make", "meta", "key", "id", "name", "services", "Capability", "Service", "input", "Struct", "String", "type", "output", "Void", "UpdatePlankSize", "size", "Number", "ChangeCompanion", "companion", "Null"]
7
- }
@@ -1,7 +0,0 @@
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 { Context } from '@dxos/context';\nimport { Obj } from '@dxos/echo';\nimport { Operation } from '@dxos/operation';\nimport { AttentionCapabilities } from '@dxos/plugin-attention/types';\nimport { ClientCapabilities } from '@dxos/plugin-client/types';\nimport { Graph } from '@dxos/plugin-graph';\nimport { ObservabilityOperation } from '@dxos/plugin-observability/operations';\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 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 checkRemoteExistence = yield* Capability.get(ClientCapabilities.Client).pipe(\n Effect.map((client) =>\n createEdgeExistenceChecker((spaceId, body) => client.edge.http.execQuery(new Context(), spaceId, body)),\n ),\n Effect.catchAll(() => Effect.succeed(undefined)),\n );\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, 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,eAAe;AACxB,SAASC,WAAW;AACpB,SAASC,iBAAiB;AAC1B,SAASC,6BAA6B;AACtC,SAASC,0BAA0B;AACnC,SAASC,aAAa;AACtB,SAASC,8BAA8B;;AAOvC,IAAMC,UAA8DC,gBAAgBC,KAAKC,KACvFC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,QAAM,EAAEC,MAA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AS;MACpC,CAAA;IACF;EACF;AAEA,SAAO1D;AACT,CAAA,CAAA,CAAA;AAIJ,IAAA,eAAexC;",
6
- "names": ["Effect", "Option", "Capabilities", "Capability", "AppCapabilities", "LayoutOperation", "createEdgeExistenceChecker", "expandPath", "validateNavigationTarget", "Context", "Obj", "Operation", "AttentionCapabilities", "ClientCapabilities", "Graph", "ObservabilityOperation", "handler", "LayoutOperation", "Open", "pipe", "Operation", "withHandler", "fnUntraced", "input", "graph", "Capability", "get", "AppCapabilities", "AppGraph", "attention", "AttentionCapabilities", "Attention", "capabilities", "Service", "pathResolvers", "getAll", "NavigationPathResolver", "checkRemoteExistence", "ClientCapabilities", "Client", "map", "client", "createEdgeExistenceChecker", "spaceId", "body", "edge", "http", "execQuery", "Context", "catchAll", "succeed", "undefined", "navigation", "subjectId", "subject", "expandPath", "validatedSubjects", "all", "validateNavigationTarget", "state", "Capabilities", "getAtomValue", "DeckCapabilities", "State", "workspace", "activeDeck", "invoke", "SwitchWorkspace", "deck", "getDeck", "active", "solo", "initialized", "length", "resolveDxn", "qualifiedPath", "reduce", "none", "acc", "resolver", "isSome", "opt", "dxn", "toString", "deckDxnMap", "Map", "deckId", "set", "value", "concurrency", "size", "remapped", "existing", "previouslyOpenIds", "Set", "next", "openSubjectsOnActiveDeck", "pivotId", "key", "deckUpdates", "toAttend", "_toAttend", "computeActiveUpdates", "updateAtomValue", "updateActiveDeck", "ids", "newlyOpen", "filter", "i", "has", "scrollIntoView", "schedule", "ScrollIntoView", "Expose", "typename", "match", "Graph", "getNode", "onNone", "onSome", "node", "data", "Obj", "isObject", "getTypename", "ObservabilityOperation", "SendEvent", "name", "properties"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/set-layout-mode.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 { log } from '@dxos/log';\nimport { Operation } from '@dxos/operation';\nimport { isNonNullable } from '@dxos/util';\n\nimport { DeckCapabilities, type DeckState, type LayoutMode, getMode, isLayoutMode } from '../types';\nimport { updateActiveDeck } from './helpers';\n\n/**\n * Transitions between layout modes (multi, solo, solo--fullscreen) or reverts to the previous mode.\n * Computes which planks become active/inactive and persists the previous mode for revert support.\n */\nconst handler: Operation.WithHandler<typeof LayoutOperation.SetLayoutMode> = LayoutOperation.SetLayoutMode.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n if ('mode' in input && !isLayoutMode(input.mode)) {\n return;\n }\n\n const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);\n const deck = yield* DeckCapabilities.getDeck();\n\n const computeModeUpdate = (mode: LayoutMode, subject?: string): Partial<DeckState> => {\n const current = deck.solo ? [deck.solo] : deck.active;\n const next = (mode !== 'multi' ? [subject ?? deck.solo ?? deck.active[0]] : [...deck.active, deck.solo]).filter(\n isNonNullable,\n );\n\n const removed = current.filter((id: string) => !next.includes(id));\n const closed = Array.from(new Set([...deck.inactive.filter((id: string) => !next.includes(id)), ...removed]));\n\n const soloUpdate =\n mode !== 'multi' && next[0]\n ? { solo: next[0] }\n : mode === 'multi' && deck.solo\n ? { solo: undefined, initialized: true }\n : {};\n\n const fullscreenUpdate = mode === 'solo--fullscreen' ? { fullscreen: !deck.fullscreen } : {};\n\n return {\n inactive: closed,\n ...soloUpdate,\n ...fullscreenUpdate,\n };\n };\n\n if ('mode' in input) {\n const currentMode = getMode(deck);\n const subject = 'subject' in input ? input.subject : undefined;\n const deckUpdates = computeModeUpdate(input.mode as LayoutMode, subject);\n\n yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => {\n const newPreviousMode =\n currentMode !== input.mode\n ? { ...state.previousMode, [state.activeDeck]: currentMode }\n : state.previousMode;\n return {\n ...updateActiveDeck(state, deckUpdates),\n previousMode: newPreviousMode,\n };\n });\n\n if (subject) {\n yield* Operation.schedule(LayoutOperation.Expose, { subject });\n }\n } else if ('revert' in input) {\n const deckUpdates = computeModeUpdate(state.previousMode[state.activeDeck]);\n yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => updateActiveDeck(state, deckUpdates));\n } else {\n log.warn('Invalid layout mode', input);\n }\n }),\n ),\n);\n\nexport default handler;\n"],
5
- "mappings": ";;;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,oBAAoB;AAC7B,SAASC,uBAAuB;AAChC,SAASC,WAAW;AACpB,SAASC,iBAAiB;AAC1B,SAASC,qBAAqB;;AAS9B,IAAMC,UAAuEC,gBAAgBC,cAAcC,KACzGC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,MAAI,UAAUA,SAAS,CAACC,aAAaD,MAAME,IAAI,GAAG;AAChD;EACF;AAEA,QAAMC,QAAQ,OAAOC,aAAaC,aAAaC,iBAAiBC,KAAK;AACrE,QAAMC,OAAO,OAAOF,iBAAiBG,QAAO;AAE5C,QAAMC,oBAAoB,CAACR,MAAkBS,YAAAA;AAC3C,UAAMC,UAAUJ,KAAKK,OAAO;MAACL,KAAKK;QAAQL,KAAKM;AAC/C,UAAMC,QAAQb,SAAS,UAAU;MAACS,WAAWH,KAAKK,QAAQL,KAAKM,OAAO,CAAA;QAAM;SAAIN,KAAKM;MAAQN,KAAKK;OAAOG,OACvGC,aAAAA;AAGF,UAAMC,UAAUN,QAAQI,OAAO,CAACG,OAAe,CAACJ,KAAKK,SAASD,EAAAA,CAAAA;AAC9D,UAAME,SAASC,MAAMC,KAAK,oBAAIC,IAAI;SAAIhB,KAAKiB,SAAST,OAAO,CAACG,OAAe,CAACJ,KAAKK,SAASD,EAAAA,CAAAA;SAASD;KAAQ,CAAA;AAE3G,UAAMQ,aACJxB,SAAS,WAAWa,KAAK,CAAA,IACrB;MAAEF,MAAME,KAAK,CAAA;IAAG,IAChBb,SAAS,WAAWM,KAAKK,OACvB;MAAEA,MAAMc;MAAWC,aAAa;IAAK,IACrC,CAAC;AAET,UAAMC,mBAAmB3B,SAAS,qBAAqB;MAAE4B,YAAY,CAACtB,KAAKsB;IAAW,IAAI,CAAC;AAE3F,WAAO;MACLL,UAAUJ;MACV,GAAGK;MACH,GAAGG;IACL;EACF;AAEA,MAAI,UAAU7B,OAAO;AACnB,UAAM+B,cAAcC,QAAQxB,IAAAA;AAC5B,UAAMG,UAAU,aAAaX,QAAQA,MAAMW,UAAUgB;AACrD,UAAMM,cAAcvB,kBAAkBV,MAAME,MAAoBS,OAAAA;AAEhE,WAAOP,aAAa8B,gBAAgB5B,iBAAiBC,OAAO,CAACJ,WAAAA;AAC3D,YAAMgC,kBACJJ,gBAAgB/B,MAAME,OAClB;QAAE,GAAGC,OAAMiC;QAAc,CAACjC,OAAMkC,UAAU,GAAGN;MAAY,IACzD5B,OAAMiC;AACZ,aAAO;QACL,GAAGE,iBAAiBnC,QAAO8B,WAAAA;QAC3BG,cAAcD;MAChB;IACF,CAAA;AAEA,QAAIxB,SAAS;AACX,aAAOd,UAAU0C,SAAS7C,gBAAgB8C,QAAQ;QAAE7B;MAAQ,CAAA;IAC9D;EACF,WAAW,YAAYX,OAAO;AAC5B,UAAMiC,cAAcvB,kBAAkBP,MAAMiC,aAAajC,MAAMkC,UAAU,CAAC;AAC1E,WAAOjC,aAAa8B,gBAAgB5B,iBAAiBC,OAAO,CAACJ,WAAUmC,iBAAiBnC,QAAO8B,WAAAA,CAAAA;EACjG,OAAO;AACLQ,QAAIC,KAAK,uBAAuB1C,OAAAA;;;;;;EAClC;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,0BAAeP;",
6
- "names": ["Effect", "Capabilities", "LayoutOperation", "log", "Operation", "isNonNullable", "handler", "LayoutOperation", "SetLayoutMode", "pipe", "Operation", "withHandler", "fnUntraced", "input", "isLayoutMode", "mode", "state", "Capabilities", "getAtomValue", "DeckCapabilities", "State", "deck", "getDeck", "computeModeUpdate", "subject", "current", "solo", "active", "next", "filter", "isNonNullable", "removed", "id", "includes", "closed", "Array", "from", "Set", "inactive", "soloUpdate", "undefined", "initialized", "fullscreenUpdate", "fullscreen", "currentMode", "getMode", "deckUpdates", "updateAtomValue", "newPreviousMode", "previousMode", "activeDeck", "updateActiveDeck", "schedule", "Expose", "log", "warn"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/switch-workspace.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 { AppCapabilities, isPinnedWorkspace, LayoutOperation } from '@dxos/app-toolkit';\nimport { invariant } from '@dxos/invariant';\nimport { Operation } from '@dxos/operation';\nimport { Graph, Node } from '@dxos/plugin-graph';\n\nimport { DeckCapabilities, defaultDeck } from '../types';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.SwitchWorkspace> = LayoutOperation.SwitchWorkspace.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n const { graph } = yield* Capability.get(AppCapabilities.AppGraph);\n\n {\n const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);\n // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.\n // Ideally this should be worked into the data model in a generic way.\n const shouldUpdatePrevious = !isPinnedWorkspace(state.activeDeck);\n\n yield* Capabilities.updateAtomValue(DeckCapabilities.State, (state) => {\n const newDecks = state.decks[input.subject]\n ? state.decks\n : { ...state.decks, [input.subject]: { ...defaultDeck } };\n return {\n ...state,\n previousDeck: shouldUpdatePrevious ? state.activeDeck : state.previousDeck,\n activeDeck: input.subject,\n decks: newDecks,\n };\n });\n }\n\n {\n const state = yield* Capabilities.getAtomValue(DeckCapabilities.State);\n const deck = state.decks[input.subject];\n invariant(deck, `Deck not found: ${input.subject}`);\n\n const first = deck.solo ? deck.solo : deck.active[0];\n if (first) {\n yield* Operation.schedule(LayoutOperation.ScrollIntoView, { subject: first });\n } else {\n const [item] = Graph.getConnections(graph, input.subject, 'child').filter(\n (node) => !Node.isActionLike(node) && !node.properties.disposition,\n );\n if (item) {\n yield* Operation.schedule(LayoutOperation.Open, { subject: [item.id] });\n }\n }\n }\n }),\n ),\n);\n\nexport default handler;\n"],
5
- "mappings": ";;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,iBAAiBC,mBAAmBC,uBAAuB;AACpE,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAC1B,SAASC,OAAOC,YAAY;;AAI5B,IAAMC,UAAyEC,gBAAgBC,gBAAgBC,KAC7GC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,QAAM,EAAEC,MAAK,IAAK,OAAOC,WAAWC,IAAIC,gBAAgBC,QAAQ;AAEhE;AACE,UAAMC,QAAQ,OAAOC,aAAaC,aAAaC,iBAAiBC,KAAK;AAGrE,UAAMC,uBAAuB,CAACC,kBAAkBN,MAAMO,UAAU;AAEhE,WAAON,aAAaO,gBAAgBL,iBAAiBC,OAAO,CAACJ,WAAAA;AAC3D,YAAMS,WAAWT,OAAMU,MAAMhB,MAAMiB,OAAO,IACtCX,OAAMU,QACN;QAAE,GAAGV,OAAMU;QAAO,CAAChB,MAAMiB,OAAO,GAAG;UAAE,GAAGC;QAAY;MAAE;AAC1D,aAAO;QACL,GAAGZ;QACHa,cAAcR,uBAAuBL,OAAMO,aAAaP,OAAMa;QAC9DN,YAAYb,MAAMiB;QAClBD,OAAOD;MACT;IACF,CAAA;EACF;AAEA;AACE,UAAMT,QAAQ,OAAOC,aAAaC,aAAaC,iBAAiBC,KAAK;AACrE,UAAMU,OAAOd,MAAMU,MAAMhB,MAAMiB,OAAO;AACtCI,cAAUD,MAAM,mBAAmBpB,MAAMiB,OAAO,IAAE;;;;;;;;;AAElD,UAAMK,QAAQF,KAAKG,OAAOH,KAAKG,OAAOH,KAAKI,OAAO,CAAA;AAClD,QAAIF,OAAO;AACT,aAAOzB,UAAU4B,SAAS/B,gBAAgBgC,gBAAgB;QAAET,SAASK;MAAM,CAAA;IAC7E,OAAO;AACL,YAAM,CAACK,IAAAA,IAAQC,MAAMC,eAAe5B,OAAOD,MAAMiB,SAAS,OAAA,EAASa,OACjE,CAACC,SAAS,CAACC,KAAKC,aAAaF,IAAAA,KAAS,CAACA,KAAKG,WAAWC,WAAW;AAEpE,UAAIR,MAAM;AACR,eAAO9B,UAAU4B,SAAS/B,gBAAgB0C,MAAM;UAAEnB,SAAS;YAACU,KAAKU;;QAAI,CAAA;MACvE;IACF;EACF;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,2BAAe5C;",
6
- "names": ["Effect", "Capabilities", "Capability", "AppCapabilities", "isPinnedWorkspace", "LayoutOperation", "invariant", "Operation", "Graph", "Node", "handler", "LayoutOperation", "SwitchWorkspace", "pipe", "Operation", "withHandler", "fnUntraced", "input", "graph", "Capability", "get", "AppCapabilities", "AppGraph", "state", "Capabilities", "getAtomValue", "DeckCapabilities", "State", "shouldUpdatePrevious", "isPinnedWorkspace", "activeDeck", "updateAtomValue", "newDecks", "decks", "subject", "defaultDeck", "previousDeck", "deck", "invariant", "first", "solo", "active", "schedule", "ScrollIntoView", "item", "Graph", "getConnections", "filter", "node", "Node", "isActionLike", "properties", "disposition", "Open", "id"]
7
- }
@@ -1,5 +0,0 @@
1
- import { Operation } from '@dxos/operation';
2
- import { ChangeCompanion } from './definitions';
3
- declare const handler: Operation.WithHandler<typeof ChangeCompanion>;
4
- export default handler;
5
- //# sourceMappingURL=change-companion.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"change-companion.d.ts","sourceRoot":"","sources":["../../../../src/operations/change-companion.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGhD,QAAA,MAAM,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,eAAe,CAkB1D,CAAC;AAEF,eAAe,OAAO,CAAC"}