@dxos/plugin-deck 0.9.0 → 0.9.1-staging.ee54ba693a

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 (314) hide show
  1. package/PLUGIN.mdl +3 -1
  2. package/dist/lib/neutral/{DeckLayout-DEURA3KR.mjs → DeckLayout-B3RUUV5P.mjs} +36 -22
  3. package/dist/lib/neutral/DeckLayout-B3RUUV5P.mjs.map +7 -0
  4. package/dist/lib/neutral/DeckPlugin.mjs +4 -8
  5. package/dist/lib/neutral/DeckPlugin.mjs.map +4 -4
  6. package/dist/lib/neutral/DeckSettings-Z7GMB7XJ.mjs +32 -0
  7. package/dist/lib/neutral/DeckSettings-Z7GMB7XJ.mjs.map +7 -0
  8. package/dist/lib/neutral/{add-toast-TNB6DXWU.mjs → add-toast-BHNEH5UY.mjs} +2 -2
  9. package/dist/lib/neutral/{adjust-HNU5CCRO.mjs → adjust-MJB6UMRQ.mjs} +16 -10
  10. package/dist/lib/neutral/adjust-MJB6UMRQ.mjs.map +7 -0
  11. package/dist/lib/neutral/{app-graph-builder-HMLT627T.mjs → app-graph-builder-2F7P4IFQ.mjs} +8 -7
  12. package/dist/lib/neutral/app-graph-builder-2F7P4IFQ.mjs.map +7 -0
  13. package/dist/lib/neutral/capabilities/index.mjs +8 -8
  14. package/dist/lib/neutral/{check-app-scheme-INSOF72J.mjs → check-app-scheme-HSAORHHX.mjs} +2 -2
  15. package/dist/lib/neutral/chunk-FKGYHBUB.mjs +8 -0
  16. package/dist/lib/neutral/{chunk-BS4EOYMK.mjs → chunk-ICOJ4GMB.mjs} +37 -19
  17. package/dist/lib/neutral/chunk-ICOJ4GMB.mjs.map +7 -0
  18. package/dist/lib/neutral/chunk-KY7LMF4D.mjs +46 -0
  19. package/dist/lib/neutral/chunk-KY7LMF4D.mjs.map +7 -0
  20. package/dist/lib/neutral/{chunk-324PPIZB.mjs → chunk-KZFJ4PBT.mjs} +4 -4
  21. package/dist/lib/neutral/chunk-KZFJ4PBT.mjs.map +7 -0
  22. package/dist/lib/neutral/{chunk-GBIGQKYW.mjs → chunk-PP32NEVY.mjs} +4 -4
  23. package/dist/lib/neutral/chunk-PP32NEVY.mjs.map +7 -0
  24. package/dist/lib/neutral/chunk-SONATB35.mjs +20 -0
  25. package/dist/lib/neutral/chunk-SONATB35.mjs.map +7 -0
  26. package/dist/lib/neutral/chunk-Z2B5RSVI.mjs +1096 -0
  27. package/dist/lib/neutral/chunk-Z2B5RSVI.mjs.map +7 -0
  28. package/dist/lib/neutral/{close-ASKR22A6.mjs → close-2YGB5IIP.mjs} +4 -3
  29. package/dist/lib/neutral/{close-ASKR22A6.mjs.map → close-2YGB5IIP.mjs.map} +1 -1
  30. package/dist/lib/neutral/components/index.mjs +201 -16
  31. package/dist/lib/neutral/components/index.mjs.map +4 -4
  32. package/dist/lib/neutral/containers/index.mjs +6 -11
  33. package/dist/lib/neutral/containers/index.mjs.map +3 -3
  34. package/dist/lib/neutral/hooks/index.mjs +101 -17
  35. package/dist/lib/neutral/hooks/index.mjs.map +4 -4
  36. package/dist/lib/neutral/index.mjs +18 -2
  37. package/dist/lib/neutral/meta.json +1 -1
  38. package/dist/lib/neutral/meta.mjs +1 -1
  39. package/dist/lib/neutral/{notification-tracker-P36322BH.mjs → notification-tracker-Y5CRTWJM.mjs} +12 -10
  40. package/dist/lib/neutral/notification-tracker-Y5CRTWJM.mjs.map +7 -0
  41. package/dist/lib/neutral/{open-5OYNO3RT.mjs → open-P6XQ56M7.mjs} +8 -7
  42. package/dist/lib/neutral/open-P6XQ56M7.mjs.map +7 -0
  43. package/dist/lib/neutral/operations/index.mjs +1 -1
  44. package/dist/lib/neutral/plugin.mjs +2 -2
  45. package/dist/lib/neutral/{react-root-HH5DEUOG.mjs → react-root-E6TAFHX6.mjs} +2 -2
  46. package/dist/lib/neutral/react-root-E6TAFHX6.mjs.map +7 -0
  47. package/dist/lib/neutral/{react-surface-3UVVCK3O.mjs → react-surface-H63FXUK3.mjs} +5 -6
  48. package/dist/lib/neutral/react-surface-H63FXUK3.mjs.map +7 -0
  49. package/dist/lib/neutral/{revert-workspace-B2QLT2C4.mjs → revert-workspace-RXWP2TEE.mjs} +2 -2
  50. package/dist/lib/neutral/{scroll-into-view-B52C3PJO.mjs → scroll-into-view-HFV5EGYZ.mjs} +2 -2
  51. package/dist/lib/neutral/{set-PA35ONXO.mjs → set-HOOVB7E4.mjs} +4 -3
  52. package/dist/lib/neutral/{set-PA35ONXO.mjs.map → set-HOOVB7E4.mjs.map} +1 -1
  53. package/dist/lib/neutral/{set-layout-mode-RPCCPQRB.mjs → set-layout-mode-XAGSZZGB.mjs} +2 -2
  54. package/dist/lib/neutral/{settings-EGNYUM4T.mjs → settings-6CDQEB6B.mjs} +3 -3
  55. package/dist/lib/neutral/settings-6CDQEB6B.mjs.map +7 -0
  56. package/dist/lib/neutral/{state-IIDXMQUO.mjs → state-F4X5GPGZ.mjs} +4 -3
  57. package/dist/lib/neutral/state-F4X5GPGZ.mjs.map +7 -0
  58. package/dist/lib/neutral/{switch-workspace-LZF4KZXH.mjs → switch-workspace-PA7N6EUX.mjs} +4 -4
  59. package/dist/lib/neutral/switch-workspace-PA7N6EUX.mjs.map +7 -0
  60. package/dist/lib/neutral/translations.mjs +3 -3
  61. package/dist/lib/neutral/translations.mjs.map +3 -3
  62. package/dist/lib/neutral/types/index.mjs +11 -1
  63. package/dist/lib/neutral/{update-companion-YUCZZVGY.mjs → update-companion-6A2SKQAI.mjs} +14 -6
  64. package/dist/lib/neutral/update-companion-6A2SKQAI.mjs.map +7 -0
  65. package/dist/lib/neutral/{update-complementary-7FZNB55J.mjs → update-complementary-K55I5EV5.mjs} +2 -2
  66. package/dist/lib/neutral/{update-dialog-FNQTSSAP.mjs → update-dialog-Z3GEXMVV.mjs} +2 -2
  67. package/dist/lib/neutral/{update-plank-size-3YW4NXEY.mjs → update-plank-size-BTESVV7N.mjs} +2 -2
  68. package/dist/lib/neutral/{update-popover-G2VUD7E6.mjs → update-popover-QEVDSZSH.mjs} +2 -2
  69. package/dist/lib/neutral/{update-sidebar-KRHPUHUB.mjs → update-sidebar-VSRCN47U.mjs} +2 -2
  70. package/dist/lib/neutral/{url-handler-A6HLW4RB.mjs → url-handler-ERZXXEYR.mjs} +11 -10
  71. package/dist/lib/neutral/url-handler-ERZXXEYR.mjs.map +7 -0
  72. package/dist/types/dx.config.d.ts +28 -0
  73. package/dist/types/dx.config.d.ts.map +1 -0
  74. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  75. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -2
  76. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  77. package/dist/types/src/capabilities/index.d.ts +8 -196
  78. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  79. package/dist/types/src/capabilities/notification-tracker.d.ts +1 -1
  80. package/dist/types/src/capabilities/notification-tracker.d.ts.map +1 -1
  81. package/dist/types/src/capabilities/react-root.d.ts +1 -5
  82. package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
  83. package/dist/types/src/capabilities/react-surface.d.ts +2 -2
  84. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  85. package/dist/types/src/capabilities/settings.d.ts +1 -3
  86. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  87. package/dist/types/src/capabilities/state.d.ts +1 -187
  88. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  89. package/dist/types/src/capabilities/tools.d.ts +1 -1
  90. package/dist/types/src/capabilities/url-handler.d.ts +1 -1
  91. package/dist/types/src/components/Companion/Companion.d.ts +17 -0
  92. package/dist/types/src/components/Companion/Companion.d.ts.map +1 -0
  93. package/dist/types/src/components/Companion/index.d.ts +2 -0
  94. package/dist/types/src/components/Companion/index.d.ts.map +1 -0
  95. package/dist/types/src/components/Matrix/Matrix.d.ts +1 -1
  96. package/dist/types/src/components/Matrix/Matrix.d.ts.map +1 -1
  97. package/dist/types/src/components/Matrix/Matrix.stories.d.ts +2 -2
  98. package/dist/types/src/components/Matrix/Matrix.stories.d.ts.map +1 -1
  99. package/dist/types/src/components/Matrix/index.d.ts +1 -1
  100. package/dist/types/src/components/Matrix/index.d.ts.map +1 -1
  101. package/dist/types/src/components/Pane/Pane.d.ts +45 -0
  102. package/dist/types/src/components/Pane/Pane.d.ts.map +1 -0
  103. package/dist/types/src/components/Pane/Pane.stories.d.ts +7 -0
  104. package/dist/types/src/components/Pane/Pane.stories.d.ts.map +1 -0
  105. package/dist/types/src/components/Pane/index.d.ts +2 -0
  106. package/dist/types/src/components/Pane/index.d.ts.map +1 -0
  107. package/dist/types/src/components/Plank/Plank.d.ts +74 -0
  108. package/dist/types/src/components/Plank/Plank.d.ts.map +1 -0
  109. package/dist/types/src/components/Plank/Plank.stories.d.ts +6 -0
  110. package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -0
  111. package/dist/types/src/components/Plank/index.d.ts +2 -0
  112. package/dist/types/src/components/Plank/index.d.ts.map +1 -0
  113. package/dist/types/src/components/index.d.ts +3 -2
  114. package/dist/types/src/components/index.d.ts.map +1 -1
  115. package/dist/types/src/containers/Deck/Banner.d.ts.map +1 -1
  116. package/dist/types/src/containers/Deck/Deck.d.ts +1 -1
  117. package/dist/types/src/containers/Deck/Deck.d.ts.map +1 -1
  118. package/dist/types/src/containers/Deck/Deck.stories.d.ts +2 -2
  119. package/dist/types/src/containers/Deck/DeckPlank.d.ts +21 -0
  120. package/dist/types/src/containers/Deck/DeckPlank.d.ts.map +1 -0
  121. package/dist/types/src/containers/Deck/DeckViewport.d.ts +3 -1
  122. package/dist/types/src/containers/Deck/DeckViewport.d.ts.map +1 -1
  123. package/dist/types/src/containers/{Plank → Deck}/PlankControls.d.ts +3 -10
  124. package/dist/types/src/containers/Deck/PlankControls.d.ts.map +1 -0
  125. package/dist/types/src/containers/Deck/PlankFallback.d.ts +6 -0
  126. package/dist/types/src/containers/Deck/PlankFallback.d.ts.map +1 -0
  127. package/dist/types/src/containers/Deck/StatusBar.d.ts.map +1 -1
  128. package/dist/types/src/containers/Deck/useDeckPlank.d.ts +49 -0
  129. package/dist/types/src/containers/Deck/useDeckPlank.d.ts.map +1 -0
  130. package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts +2 -2
  131. package/dist/types/src/containers/DeckLayout/DeckLayout.stories.d.ts.map +1 -1
  132. package/dist/types/src/containers/DeckLayout/Popover.d.ts.map +1 -1
  133. package/dist/types/src/{components → containers}/DeckSettings/DeckSettings.d.ts +1 -1
  134. package/dist/types/src/containers/DeckSettings/DeckSettings.d.ts.map +1 -0
  135. package/dist/types/src/{components → containers}/DeckSettings/DeckSettings.stories.d.ts +2 -2
  136. package/dist/types/src/{components → containers}/DeckSettings/DeckSettings.stories.d.ts.map +1 -1
  137. package/dist/types/src/containers/DeckSettings/index.d.ts.map +1 -0
  138. package/dist/types/src/containers/Sidebar/ComplementarySidebar.d.ts.map +1 -1
  139. package/dist/types/src/containers/index.d.ts +1 -1
  140. package/dist/types/src/containers/index.d.ts.map +1 -1
  141. package/dist/types/src/hooks/index.d.ts +2 -0
  142. package/dist/types/src/hooks/index.d.ts.map +1 -1
  143. package/dist/types/src/hooks/useCompanionSplit.d.ts +28 -0
  144. package/dist/types/src/hooks/useCompanionSplit.d.ts.map +1 -0
  145. package/dist/types/src/hooks/useCompanions.d.ts +11 -7
  146. package/dist/types/src/hooks/useCompanions.d.ts.map +1 -1
  147. package/dist/types/src/hooks/useDeckCompanions.d.ts +2 -2
  148. package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
  149. package/dist/types/src/hooks/useDeckState.d.ts +1 -1
  150. package/dist/types/src/hooks/useDeckState.d.ts.map +1 -1
  151. package/dist/types/src/hooks/useSelectedCompanionVariant.d.ts +6 -0
  152. package/dist/types/src/hooks/useSelectedCompanionVariant.d.ts.map +1 -0
  153. package/dist/types/src/index.d.ts +1 -0
  154. package/dist/types/src/index.d.ts.map +1 -1
  155. package/dist/types/src/meta.d.ts +32 -2
  156. package/dist/types/src/meta.d.ts.map +1 -1
  157. package/dist/types/src/operations/adjust.d.ts.map +1 -1
  158. package/dist/types/src/operations/open.d.ts.map +1 -1
  159. package/dist/types/src/operations/switch-workspace.d.ts.map +1 -1
  160. package/dist/types/src/operations/update-companion.d.ts.map +1 -1
  161. package/dist/types/src/translations.d.ts +2 -2
  162. package/dist/types/src/translations.d.ts.map +1 -1
  163. package/dist/types/src/types/DeckCapabilities.d.ts +4 -4
  164. package/dist/types/src/types/DeckCapabilities.d.ts.map +1 -1
  165. package/dist/types/src/types/DeckOperation.d.ts +2 -2
  166. package/dist/types/src/types/DeckOperation.d.ts.map +1 -1
  167. package/dist/types/src/types/index.d.ts +1 -0
  168. package/dist/types/src/types/index.d.ts.map +1 -1
  169. package/dist/types/src/types/schema.d.ts +11 -9
  170. package/dist/types/src/types/schema.d.ts.map +1 -1
  171. package/dist/types/src/types/surface.d.ts +12 -0
  172. package/dist/types/src/types/surface.d.ts.map +1 -0
  173. package/dist/types/src/util/companion-view-state.d.ts +16 -0
  174. package/dist/types/src/util/companion-view-state.d.ts.map +1 -0
  175. package/dist/types/src/util/index.d.ts +1 -0
  176. package/dist/types/src/util/index.d.ts.map +1 -1
  177. package/dist/types/src/util/plank-url-params.d.ts +2 -0
  178. package/dist/types/src/util/plank-url-params.d.ts.map +1 -1
  179. package/dist/types/tsconfig.tsbuildinfo +1 -1
  180. package/dx.config.ts +35 -0
  181. package/package.json +50 -48
  182. package/src/DeckPlugin.test.ts +1 -1
  183. package/src/DeckPlugin.ts +2 -3
  184. package/src/capabilities/app-graph-builder.ts +7 -6
  185. package/src/capabilities/check-app-scheme.ts +3 -3
  186. package/src/capabilities/notification-tracker.ts +11 -9
  187. package/src/capabilities/react-root.tsx +1 -1
  188. package/src/capabilities/react-surface.tsx +4 -5
  189. package/src/capabilities/settings.ts +2 -2
  190. package/src/capabilities/state.ts +1 -1
  191. package/src/capabilities/url-handler.ts +7 -15
  192. package/src/components/Companion/Companion.tsx +91 -0
  193. package/src/components/Companion/index.ts +5 -0
  194. package/src/components/Matrix/Matrix.stories.tsx +15 -27
  195. package/src/components/Matrix/Matrix.tsx +3 -3
  196. package/src/components/Matrix/SPEC.md +1 -1
  197. package/src/components/Matrix/index.ts +1 -1
  198. package/src/components/Pane/Pane.stories.tsx +92 -0
  199. package/src/components/Pane/Pane.tsx +178 -0
  200. package/src/components/Pane/index.ts +5 -0
  201. package/src/components/Plank/Plank.stories.tsx +103 -0
  202. package/src/components/Plank/Plank.tsx +149 -0
  203. package/src/components/Plank/index.ts +5 -0
  204. package/src/components/index.ts +3 -4
  205. package/src/containers/Deck/Banner.tsx +5 -4
  206. package/src/containers/Deck/Deck.tsx +3 -3
  207. package/src/containers/Deck/DeckPlank.tsx +187 -0
  208. package/src/containers/Deck/DeckViewport.tsx +118 -246
  209. package/src/containers/{Plank → Deck}/PlankControls.tsx +21 -19
  210. package/src/containers/Deck/PlankFallback.tsx +42 -0
  211. package/src/containers/Deck/StatusBar.tsx +4 -2
  212. package/src/containers/Deck/useDeckPlank.ts +219 -0
  213. package/src/containers/DeckLayout/DeckLayout.stories.tsx +44 -60
  214. package/src/containers/DeckLayout/Dialog.tsx +1 -1
  215. package/src/containers/DeckLayout/Fallback.tsx +1 -1
  216. package/src/containers/DeckLayout/Popover.tsx +37 -20
  217. package/src/containers/DeckLayout/Toast.tsx +1 -1
  218. package/src/{components → containers}/DeckSettings/DeckSettings.stories.tsx +1 -1
  219. package/src/containers/DeckSettings/DeckSettings.tsx +42 -0
  220. package/src/containers/Sidebar/ComplementarySidebar.tsx +8 -7
  221. package/src/containers/Sidebar/Sidebar.tsx +1 -1
  222. package/src/containers/Sidebar/SidebarButton.tsx +3 -3
  223. package/src/containers/index.ts +1 -1
  224. package/src/hooks/index.ts +2 -0
  225. package/src/hooks/useCompanionSplit.ts +78 -0
  226. package/src/hooks/useCompanions.ts +39 -7
  227. package/src/hooks/useDeckCompanions.ts +3 -3
  228. package/src/hooks/useDeckState.ts +1 -1
  229. package/src/hooks/useSelectedCompanionVariant.ts +14 -0
  230. package/src/index.ts +7 -0
  231. package/src/meta.ts +2 -27
  232. package/src/operations/adjust.ts +23 -12
  233. package/src/operations/open.ts +12 -10
  234. package/src/operations/switch-workspace.ts +2 -2
  235. package/src/operations/update-companion.ts +10 -6
  236. package/src/translations.ts +3 -3
  237. package/src/types/DeckCapabilities.ts +6 -4
  238. package/src/types/DeckEvents.ts +1 -1
  239. package/src/types/DeckOperation.ts +3 -2
  240. package/src/types/index.ts +1 -0
  241. package/src/types/schema.ts +21 -16
  242. package/src/types/surface.ts +28 -0
  243. package/src/util/companion-view-state.ts +28 -0
  244. package/src/util/index.ts +1 -0
  245. package/src/util/plank-url-params.test.ts +5 -0
  246. package/src/util/plank-url-params.ts +5 -3
  247. package/src/util/sanitize-persisted-state.test.ts +1 -1
  248. package/src/util/set-active.test.ts +1 -1
  249. package/dist/lib/neutral/DeckLayout-DEURA3KR.mjs.map +0 -7
  250. package/dist/lib/neutral/DeckSettings-W5I57OXM.mjs +0 -27
  251. package/dist/lib/neutral/DeckSettings-W5I57OXM.mjs.map +0 -7
  252. package/dist/lib/neutral/adjust-HNU5CCRO.mjs.map +0 -7
  253. package/dist/lib/neutral/app-graph-builder-HMLT627T.mjs.map +0 -7
  254. package/dist/lib/neutral/chunk-324PPIZB.mjs.map +0 -7
  255. package/dist/lib/neutral/chunk-BS4EOYMK.mjs.map +0 -7
  256. package/dist/lib/neutral/chunk-GBIGQKYW.mjs.map +0 -7
  257. package/dist/lib/neutral/chunk-PYEY5SEC.mjs +0 -37
  258. package/dist/lib/neutral/chunk-PYEY5SEC.mjs.map +0 -7
  259. package/dist/lib/neutral/chunk-Q4W6B4IB.mjs +0 -8
  260. package/dist/lib/neutral/chunk-WAXJPQJI.mjs +0 -1306
  261. package/dist/lib/neutral/chunk-WAXJPQJI.mjs.map +0 -7
  262. package/dist/lib/neutral/notification-tracker-P36322BH.mjs.map +0 -7
  263. package/dist/lib/neutral/open-5OYNO3RT.mjs.map +0 -7
  264. package/dist/lib/neutral/react-root-HH5DEUOG.mjs.map +0 -7
  265. package/dist/lib/neutral/react-surface-3UVVCK3O.mjs.map +0 -7
  266. package/dist/lib/neutral/settings-EGNYUM4T.mjs.map +0 -7
  267. package/dist/lib/neutral/state-IIDXMQUO.mjs.map +0 -7
  268. package/dist/lib/neutral/switch-workspace-LZF4KZXH.mjs.map +0 -7
  269. package/dist/lib/neutral/update-companion-YUCZZVGY.mjs.map +0 -7
  270. package/dist/lib/neutral/url-handler-A6HLW4RB.mjs.map +0 -7
  271. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +0 -1
  272. package/dist/types/src/components/DeckSettings/index.d.ts.map +0 -1
  273. package/dist/types/src/containers/Plank/Plank.d.ts +0 -17
  274. package/dist/types/src/containers/Plank/Plank.d.ts.map +0 -1
  275. package/dist/types/src/containers/Plank/Plank.stories.d.ts +0 -67
  276. package/dist/types/src/containers/Plank/Plank.stories.d.ts.map +0 -1
  277. package/dist/types/src/containers/Plank/PlankComponent.d.ts +0 -17
  278. package/dist/types/src/containers/Plank/PlankComponent.d.ts.map +0 -1
  279. package/dist/types/src/containers/Plank/PlankContent.d.ts +0 -10
  280. package/dist/types/src/containers/Plank/PlankContent.d.ts.map +0 -1
  281. package/dist/types/src/containers/Plank/PlankControls.d.ts.map +0 -1
  282. package/dist/types/src/containers/Plank/PlankError.d.ts +0 -15
  283. package/dist/types/src/containers/Plank/PlankError.d.ts.map +0 -1
  284. package/dist/types/src/containers/Plank/PlankHeading.d.ts +0 -22
  285. package/dist/types/src/containers/Plank/PlankHeading.d.ts.map +0 -1
  286. package/dist/types/src/containers/Plank/PlankLoading.d.ts +0 -3
  287. package/dist/types/src/containers/Plank/PlankLoading.d.ts.map +0 -1
  288. package/dist/types/src/containers/Plank/PlankRoot.d.ts +0 -37
  289. package/dist/types/src/containers/Plank/PlankRoot.d.ts.map +0 -1
  290. package/dist/types/src/containers/Plank/index.d.ts +0 -4
  291. package/dist/types/src/containers/Plank/index.d.ts.map +0 -1
  292. package/src/components/DeckSettings/DeckSettings.tsx +0 -34
  293. package/src/containers/Plank/Plank.stories.tsx +0 -108
  294. package/src/containers/Plank/Plank.tsx +0 -22
  295. package/src/containers/Plank/PlankComponent.tsx +0 -223
  296. package/src/containers/Plank/PlankContent.tsx +0 -45
  297. package/src/containers/Plank/PlankError.tsx +0 -82
  298. package/src/containers/Plank/PlankHeading.tsx +0 -237
  299. package/src/containers/Plank/PlankLoading.tsx +0 -10
  300. package/src/containers/Plank/PlankRoot.tsx +0 -49
  301. package/src/containers/Plank/index.ts +0 -7
  302. /package/dist/lib/neutral/{add-toast-TNB6DXWU.mjs.map → add-toast-BHNEH5UY.mjs.map} +0 -0
  303. /package/dist/lib/neutral/{check-app-scheme-INSOF72J.mjs.map → check-app-scheme-HSAORHHX.mjs.map} +0 -0
  304. /package/dist/lib/neutral/{chunk-Q4W6B4IB.mjs.map → chunk-FKGYHBUB.mjs.map} +0 -0
  305. /package/dist/lib/neutral/{revert-workspace-B2QLT2C4.mjs.map → revert-workspace-RXWP2TEE.mjs.map} +0 -0
  306. /package/dist/lib/neutral/{scroll-into-view-B52C3PJO.mjs.map → scroll-into-view-HFV5EGYZ.mjs.map} +0 -0
  307. /package/dist/lib/neutral/{set-layout-mode-RPCCPQRB.mjs.map → set-layout-mode-XAGSZZGB.mjs.map} +0 -0
  308. /package/dist/lib/neutral/{update-complementary-7FZNB55J.mjs.map → update-complementary-K55I5EV5.mjs.map} +0 -0
  309. /package/dist/lib/neutral/{update-dialog-FNQTSSAP.mjs.map → update-dialog-Z3GEXMVV.mjs.map} +0 -0
  310. /package/dist/lib/neutral/{update-plank-size-3YW4NXEY.mjs.map → update-plank-size-BTESVV7N.mjs.map} +0 -0
  311. /package/dist/lib/neutral/{update-popover-G2VUD7E6.mjs.map → update-popover-QEVDSZSH.mjs.map} +0 -0
  312. /package/dist/lib/neutral/{update-sidebar-KRHPUHUB.mjs.map → update-sidebar-VSRCN47U.mjs.map} +0 -0
  313. /package/dist/types/src/{components → containers}/DeckSettings/index.d.ts +0 -0
  314. /package/src/{components → containers}/DeckSettings/index.ts +0 -0
@@ -7,6 +7,7 @@ import { AppCapabilities, AppNode, LayoutOperation } from "@dxos/app-toolkit";
7
7
  import { Operation } from "@dxos/compute";
8
8
  import { AttentionCapabilities } from "@dxos/plugin-attention";
9
9
  import { GraphBuilder, NodeMatcher } from "@dxos/plugin-graph";
10
+ import { Position } from "@dxos/util";
10
11
  import { meta } from "#meta";
11
12
  import { DeckCapabilities } from "#types";
12
13
  var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
@@ -39,7 +40,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
39
40
  label: [
40
41
  "close-current.label",
41
42
  {
42
- ns: meta.id
43
+ ns: meta.profile.key
43
44
  }
44
45
  ],
45
46
  icon: "ph--x--regular"
@@ -60,7 +61,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
60
61
  label: [
61
62
  "close-others.label",
62
63
  {
63
- ns: meta.id
64
+ ns: meta.profile.key
64
65
  }
65
66
  ],
66
67
  icon: "ph--x-square--regular"
@@ -78,7 +79,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
78
79
  label: [
79
80
  "close-all.label",
80
81
  {
81
- ns: meta.id
82
+ ns: meta.profile.key
82
83
  }
83
84
  ],
84
85
  icon: "ph--x-circle--regular"
@@ -98,7 +99,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
98
99
  label: [
99
100
  state.sidebarState === "expanded" ? "collapse-navigation-sidebar.label" : "open-navigation-sidebar.label",
100
101
  {
101
- ns: meta.id
102
+ ns: meta.profile.key
102
103
  }
103
104
  ],
104
105
  icon: "ph--sidebar--regular",
@@ -106,7 +107,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
106
107
  macos: "meta+'"
107
108
  },
108
109
  disposition: "pin-end",
109
- position: "last",
110
+ position: Position.last,
110
111
  l0Breakpoint: "lg"
111
112
  }
112
113
  };
@@ -118,7 +119,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
118
119
  ] : [
119
120
  toggleSidebar
120
121
  ];
121
- })
122
+ }).pipe(Effect.orDie)
122
123
  })
123
124
  ]);
124
125
  return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions.flat());
@@ -126,4 +127,4 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
126
127
  export {
127
128
  app_graph_builder_default as default
128
129
  };
129
- //# sourceMappingURL=app-graph-builder-HMLT627T.mjs.map
130
+ //# sourceMappingURL=app-graph-builder-2F7P4IFQ.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/app-graph-builder.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, AppNode, LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { AttentionCapabilities } from '@dxos/plugin-attention';\nimport { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';\nimport { Position } from '@dxos/util';\n\nimport { meta } from '#meta';\nimport { DeckCapabilities } from '#types';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* Effect.all([\n GraphBuilder.createExtension({\n id: 'notFound',\n match: NodeMatcher.whenRoot,\n connector: () => Effect.succeed([AppNode.makeNotFound()]),\n }),\n\n GraphBuilder.createExtension({\n id: 'root',\n match: NodeMatcher.whenRoot,\n actions: (_node, get) =>\n Effect.gen(function* () {\n // NOTE(Zan): This is currently disabled.\n // TODO(Zan): Fullscreen needs to know the active node and provide that to the layout part.\n // const _fullscreen = {\n // id: `${LayoutAction.UpdateLayout._tag}/fullscreen`,\n // data: async () => {\n // const { dispatchPromise: dispatch } = context.get(Capabilities.IntentDispatcher);\n // await dispatch(\n // createIntent(LayoutAction.SetLayoutMode, { part: 'mode', options: { mode: 'fullscreen' } }),\n // );\n // },\n // properties: {\n // label: ['toggle-fullscreen.label', { ns: meta.id }],\n // icon: 'ph--arrows-out--regular',\n // keyBinding: {\n // macos: 'ctrl+meta+f',\n // windows: 'shift+ctrl+f',\n // },\n // },\n // };\n\n const closeCurrent = {\n id: `${LayoutOperation.Close.meta.key}.current`,\n data: Effect.fnUntraced(function* () {\n const attention = yield* Capability.get(AttentionCapabilities.Attention);\n const attended = attention.getCurrent().at(-1);\n if (attended) {\n yield* Operation.invoke(LayoutOperation.Close, { subject: [attended] });\n }\n }),\n properties: {\n label: ['close-current.label', { ns: meta.profile.key }],\n icon: 'ph--x--regular',\n },\n };\n\n const closeOthers = {\n id: `${LayoutOperation.Close.meta.key}.others`,\n data: Effect.fnUntraced(function* () {\n const attention = yield* Capability.get(AttentionCapabilities.Attention);\n const deck = yield* DeckCapabilities.getDeck();\n const attended = attention.getCurrent().at(-1);\n const ids = deck.active.filter((id: string) => id !== attended) ?? [];\n yield* Operation.invoke(LayoutOperation.Close, { subject: ids });\n }),\n properties: {\n label: ['close-others.label', { ns: meta.profile.key }],\n icon: 'ph--x-square--regular',\n },\n };\n\n const closeAll = {\n id: `${LayoutOperation.Close.meta.key}.all`,\n data: Effect.fnUntraced(function* () {\n const deck = yield* DeckCapabilities.getDeck();\n yield* Operation.invoke(LayoutOperation.Close, { subject: deck.active });\n }),\n properties: {\n label: ['close-all.label', { ns: meta.profile.key }],\n icon: 'ph--x-circle--regular',\n },\n };\n\n const state = get(yield* Capability.get(DeckCapabilities.State));\n const deck = state.decks[state.activeDeck];\n\n const toggleSidebar = {\n id: `${LayoutOperation.UpdateSidebar.meta.key}.nav`,\n data: Effect.fnUntraced(function* () {\n yield* Capabilities.updateAtomValue(DeckCapabilities.State, (s) => ({\n ...s,\n sidebarState: s.sidebarState === 'expanded' ? ('collapsed' as const) : ('expanded' as const),\n }));\n }),\n properties: {\n label: [\n state.sidebarState === 'expanded'\n ? 'collapse-navigation-sidebar.label'\n : 'open-navigation-sidebar.label',\n { ns: meta.profile.key },\n ],\n icon: 'ph--sidebar--regular',\n keyBinding: {\n macos: \"meta+'\",\n },\n disposition: 'pin-end',\n position: Position.last,\n l0Breakpoint: 'lg',\n },\n };\n\n return !deck?.solo ? [closeCurrent, closeOthers, closeAll, toggleSidebar] : [toggleSidebar];\n }).pipe(Effect.orDie),\n }),\n ]);\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions.flat());\n }),\n);\n"],
5
+ "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,iBAAiBC,SAASC,uBAAuB;AAC1D,SAASC,iBAAiB;AAC1B,SAASC,6BAA6B;AACtC,SAASC,cAAcC,mBAAmB;AAC1C,SAASC,gBAAgB;AAEzB,SAASC,YAAY;AACrB,SAASC,wBAAwB;AAEjC,IAAA,4BAAeV,WAAWW,WACjBC,kBAAW,aAAA;AAChB,QAAMC,aAAa,OAAcC,WAAI;IACnCR,aAAaS,gBAAgB;MAC3BC,IAAI;MACJC,OAAOV,YAAYW;MACnBC,WAAW,MAAaC,eAAQ;QAAClB,QAAQmB,aAAY;OAAG;IAC1D,CAAA;IAEAf,aAAaS,gBAAgB;MAC3BC,IAAI;MACJC,OAAOV,YAAYW;MACnBI,SAAS,CAACC,OAAOC,QACRC,WAAI,aAAA;AAqBT,cAAMC,eAAe;UACnBV,IAAI,GAAGb,gBAAgBwB,MAAMlB,KAAKmB,GAAG;UACrCC,MAAajB,kBAAW,aAAA;AACtB,kBAAMkB,YAAY,OAAO9B,WAAWwB,IAAInB,sBAAsB0B,SAAS;AACvE,kBAAMC,WAAWF,UAAUG,WAAU,EAAGC,GAAG,EAAC;AAC5C,gBAAIF,UAAU;AACZ,qBAAO5B,UAAU+B,OAAOhC,gBAAgBwB,OAAO;gBAAES,SAAS;kBAACJ;;cAAU,CAAA;YACvE;UACF,CAAA;UACAK,YAAY;YACVC,OAAO;cAAC;cA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AACM,OAAO;cAClE,GAAGA;cACHC,cAAcD,EAAEC,iBAAiB,aAAc,cAAyB;YAC1E,EAAA;UACF,CAAA;UACApB,YAAY;YACVC,OAAO;cACLW,MAAMQ,iBAAiB,aACnB,sCACA;cACJ;gBAAElB,IAAI9B,KAAK+B,QAAQZ;cAAI;;YAEzBa,MAAM;YACNiB,YAAY;cACVC,OAAO;YACT;YACAC,aAAa;YACbC,UAAUrD,SAASsD;YACnBC,cAAc;UAChB;QACF;AAEA,eAAO,CAACpB,MAAMqB,OAAO;UAACtC;UAAcgB;UAAaM;UAAUK;YAAiB;UAACA;;MAC/E,CAAA,EAAGY,KAAYC,YAAK;IACxB,CAAA;GACD;AAED,SAAOlE,WAAWmE,YAAYlE,gBAAgBmE,iBAAiBvD,WAAWwD,KAAI,CAAA;AAChF,CAAA,CAAA;",
6
+ "names": ["Effect", "Capabilities", "Capability", "AppCapabilities", "AppNode", "LayoutOperation", "Operation", "AttentionCapabilities", "GraphBuilder", "NodeMatcher", "Position", "meta", "DeckCapabilities", "makeModule", "fnUntraced", "extensions", "all", "createExtension", "id", "match", "whenRoot", "connector", "succeed", "makeNotFound", "actions", "_node", "get", "gen", "closeCurrent", "Close", "key", "data", "attention", "Attention", "attended", "getCurrent", "at", "invoke", "subject", "properties", "label", "ns", "profile", "icon", "closeOthers", "deck", "getDeck", "ids", "active", "filter", "closeAll", "state", "State", "decks", "activeDeck", "toggleSidebar", "UpdateSidebar", "updateAtomValue", "s", "sidebarState", "keyBinding", "macos", "disposition", "position", "last", "l0Breakpoint", "solo", "pipe", "orDie", "contributes", "AppGraphBuilder", "flat"]
7
+ }
@@ -2,15 +2,15 @@ import "../chunk-J5LGTIGS.mjs";
2
2
 
3
3
  // src/capabilities/index.ts
4
4
  import { Capability } from "@dxos/app-framework";
5
- var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-HMLT627T.mjs"));
6
- var CheckAppScheme = Capability.lazy("CheckAppScheme", () => import("../check-app-scheme-INSOF72J.mjs"));
7
- var NotificationTracker = Capability.lazy("NotificationTracker", () => import("../notification-tracker-P36322BH.mjs"));
5
+ var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-2F7P4IFQ.mjs"));
6
+ var CheckAppScheme = Capability.lazy("CheckAppScheme", () => import("../check-app-scheme-HSAORHHX.mjs"));
7
+ var NotificationTracker = Capability.lazy("NotificationTracker", () => import("../notification-tracker-Y5CRTWJM.mjs"));
8
8
  var OperationHandler = Capability.lazy("OperationHandler", () => import("../operation-handler-266CVMTW.mjs"));
9
- var ReactRoot = Capability.lazy("ReactRoot", () => import("../react-root-HH5DEUOG.mjs"));
10
- var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-3UVVCK3O.mjs"));
11
- var DeckSettings = Capability.lazy("DeckSettings", () => import("../settings-EGNYUM4T.mjs"));
12
- var DeckState = Capability.lazy("DeckState", () => import("../state-IIDXMQUO.mjs"));
13
- var UrlHandler = Capability.lazy("UrlHandler", () => import("../url-handler-A6HLW4RB.mjs"));
9
+ var ReactRoot = Capability.lazy("ReactRoot", () => import("../react-root-E6TAFHX6.mjs"));
10
+ var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-H63FXUK3.mjs"));
11
+ var DeckSettings = Capability.lazy("DeckSettings", () => import("../settings-6CDQEB6B.mjs"));
12
+ var DeckState = Capability.lazy("DeckState", () => import("../state-F4X5GPGZ.mjs"));
13
+ var UrlHandler = Capability.lazy("UrlHandler", () => import("../url-handler-ERZXXEYR.mjs"));
14
14
  export {
15
15
  AppGraphBuilder,
16
16
  CheckAppScheme,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  check_app_scheme_default,
3
3
  shouldDeferNavigationHandlers
4
- } from "./chunk-324PPIZB.mjs";
4
+ } from "./chunk-KZFJ4PBT.mjs";
5
5
  import "./chunk-J5LGTIGS.mjs";
6
6
  export {
7
7
  check_app_scheme_default as default,
8
8
  shouldDeferNavigationHandlers
9
9
  };
10
- //# sourceMappingURL=check-app-scheme-INSOF72J.mjs.map
10
+ //# sourceMappingURL=check-app-scheme-HSAORHHX.mjs.map
@@ -0,0 +1,8 @@
1
+ // src/operations/index.ts
2
+ import { OperationHandlerSet } from "@dxos/compute";
3
+ var DeckOperationHandlerSet = OperationHandlerSet.lazy(() => import("./add-toast-BHNEH5UY.mjs"), () => import("./adjust-MJB6UMRQ.mjs"), () => import("./close-2YGB5IIP.mjs"), () => import("./open-P6XQ56M7.mjs"), () => import("./revert-workspace-RXWP2TEE.mjs"), () => import("./scroll-into-view-HFV5EGYZ.mjs"), () => import("./set-HOOVB7E4.mjs"), () => import("./set-layout-mode-XAGSZZGB.mjs"), () => import("./switch-workspace-PA7N6EUX.mjs"), () => import("./update-companion-6A2SKQAI.mjs"), () => import("./update-complementary-K55I5EV5.mjs"), () => import("./update-dialog-Z3GEXMVV.mjs"), () => import("./update-plank-size-BTESVV7N.mjs"), () => import("./update-popover-QEVDSZSH.mjs"), () => import("./update-sidebar-VSRCN47U.mjs"));
4
+
5
+ export {
6
+ DeckOperationHandlerSet
7
+ };
8
+ //# sourceMappingURL=chunk-FKGYHBUB.mjs.map
@@ -4,9 +4,10 @@ import {
4
4
 
5
5
  // src/types/schema.ts
6
6
  import * as Schema from "effect/Schema";
7
- import { Label, LayoutOperation } from "@dxos/app-toolkit";
7
+ import { AppNode, LayoutOperation, Translations } from "@dxos/app-toolkit";
8
8
  import { meta } from "#meta";
9
- import { PLANK_COMPANION_TYPE, DECK_COMPANION_TYPE } from "@dxos/app-toolkit";
9
+ var PLANK_COMPANION_TYPE = AppNode.PLANK_COMPANION_TYPE;
10
+ var DECK_COMPANION_TYPE = AppNode.DECK_COMPANION_TYPE;
10
11
  var PlankSizing = Schema.Record({
11
12
  key: Schema.String,
12
13
  value: Schema.Number
@@ -26,8 +27,8 @@ var DeckState = Schema.Struct({
26
27
  plankSizing: Schema.mutable(PlankSizing),
27
28
  /** Whether the companion pane is visible alongside the active plank(s). */
28
29
  companionOpen: Schema.Boolean,
29
- /** Which companion variant to display when the companion pane is open. */
30
- companionVariant: Schema.optional(Schema.String),
30
+ /** Orientation of the companion splitter: `horizontal` (side-by-side) or `vertical` (stacked). */
31
+ companionOrientation: Schema.optional(Schema.Literal("horizontal", "vertical")),
31
32
  /** Persisted companion frame widths in rem, keyed by frame ID. */
32
33
  companionFrameSizing: Schema.mutable(PlankSizing)
33
34
  });
@@ -39,7 +40,7 @@ var defaultDeck = {
39
40
  fullscreen: false,
40
41
  plankSizing: {},
41
42
  companionOpen: false,
42
- companionVariant: void 0,
43
+ companionOrientation: "horizontal",
43
44
  companionFrameSizing: {}
44
45
  };
45
46
  var LayoutMode = Schema.Literal("multi", "solo", "solo--fullscreen");
@@ -83,8 +84,8 @@ var EphemeralDeckState = Schema.Struct({
83
84
  popoverSide: Schema.optional(Schema.Literal("top", "right", "bottom", "left")),
84
85
  popoverAnchor: Schema.optional(Schema.Any),
85
86
  popoverAnchorId: Schema.optional(Schema.String),
86
- popoverKind: Schema.optional(Schema.Literal("base", "card")),
87
- popoverTitle: Schema.optional(Label.annotations({
87
+ popoverKind: Schema.optional(Schema.Literal("base", "card", "rename")),
88
+ popoverTitle: Schema.optional(Translations.Label.annotations({
88
89
  description: "The title of the popover."
89
90
  })),
90
91
  /** Ref of the subject to be passed to the popover Surface. */
@@ -105,7 +106,9 @@ var EphemeralDeckState = Schema.Struct({
105
106
  const PartAdjustmentSchema2 = Schema.Union(Schema.Literal("close").annotations({
106
107
  description: "Close the plank."
107
108
  }), Schema.Literal("companion").annotations({
108
- description: "Open the companion plank."
109
+ description: "Open the companion plank side-by-side."
110
+ }), Schema.Literal("companion-vertical").annotations({
111
+ description: "Open the companion plank stacked vertically."
109
112
  }), Schema.Literal("solo").annotations({
110
113
  description: "Solo the plank."
111
114
  }), Schema.Literal("solo--fullscreen").annotations({
@@ -119,13 +122,13 @@ var EphemeralDeckState = Schema.Struct({
119
122
  id: Schema.String,
120
123
  type: PartAdjustmentSchema2
121
124
  }));
122
- class Adjust2 extends Schema.TaggedClass()(`${meta.id}.action.adjust`, {
125
+ class Adjust2 extends Schema.TaggedClass()(`${meta.profile.key}.action.adjust`, {
123
126
  input: DeckAction2.Adjustment,
124
127
  output: Schema.Void
125
128
  }) {
126
129
  }
127
130
  DeckAction2.Adjust = Adjust2;
128
- class UpdatePlankSize2 extends Schema.TaggedClass()(`${meta.id}.action.update-plank-size`, {
131
+ class UpdatePlankSize2 extends Schema.TaggedClass()(`${meta.profile.key}.action.update-plank-size`, {
129
132
  input: Schema.Struct({
130
133
  id: Schema.String,
131
134
  size: Schema.Number
@@ -137,6 +140,14 @@ var EphemeralDeckState = Schema.Struct({
137
140
  })(DeckAction || (DeckAction = {}));
138
141
  var DeckAction;
139
142
 
143
+ // src/types/surface.ts
144
+ import { Surface } from "@dxos/app-framework/ui";
145
+ var StatusBar = Surface.makeType("org.dxos.plugin.statusBar.role.statusBar");
146
+ var StatusBarFooter = Surface.makeType("org.dxos.plugin.statusBar.role.footer");
147
+ var VersionInfo = Surface.makeType("org.dxos.plugin.statusBar.role.versionInfo");
148
+ var Hints = Surface.makeType("org.dxos.plugin.support.role.hints");
149
+ var Keyshortcuts = Surface.makeType("org.dxos.plugin.support.role.keyshortcuts");
150
+
140
151
  // src/types/DeckCapabilities.ts
141
152
  var DeckCapabilities_exports = {};
142
153
  __export(DeckCapabilities_exports, {
@@ -150,9 +161,9 @@ import { Capabilities, Capability } from "@dxos/app-framework";
150
161
  import { invariant } from "@dxos/invariant";
151
162
  import { meta as meta2 } from "#meta";
152
163
  var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-deck/src/types/DeckCapabilities.ts";
153
- var Settings = Capability.make(`${meta2.id}.capability.settings`);
154
- var State = Capability.make(`${meta2.id}.capability.state`);
155
- var EphemeralState = Capability.make(`${meta2.id}.capability.ephemeral-state`);
164
+ var Settings = Capability.make(`${meta2.profile.key}.capability.settings`);
165
+ var State = Capability.make(`${meta2.profile.key}.capability.state`);
166
+ var EphemeralState = Capability.make(`${meta2.profile.key}.capability.ephemeral-state`);
156
167
  var getDeck = () => Effect.gen(function* () {
157
168
  const state = yield* Capabilities.getAtomValue(State);
158
169
  const deck = state.decks[state.activeDeck];
@@ -168,7 +179,7 @@ __export(DeckEvents_exports, {
168
179
  });
169
180
  import { AppActivationEvents } from "@dxos/app-toolkit";
170
181
  import { meta as meta3 } from "#meta";
171
- var StateReady = AppActivationEvents.createStateEvent(`${meta3.id}.state-ready`);
182
+ var StateReady = AppActivationEvents.createStateEvent(`${meta3.profile.key}.state-ready`);
172
183
  var SettingsReady = AppActivationEvents.createSettingsEvent(Settings.identifier);
173
184
 
174
185
  // src/types/DeckOperation.ts
@@ -182,11 +193,13 @@ import { Capability as Capability2 } from "@dxos/app-framework";
182
193
  import { Operation } from "@dxos/compute";
183
194
  import { DXN } from "@dxos/keys";
184
195
  import { meta as meta4 } from "#meta";
185
- var makeKey = (name) => DXN.make(`${meta4.id}.operation.${name}`);
196
+ var makeKey = (name) => DXN.make(`${meta4.profile.key}.operation.${name}`);
186
197
  var PartAdjustmentSchema = Schema2.Union(Schema2.Literal("close").annotations({
187
198
  description: "Close the plank."
188
199
  }), Schema2.Literal("companion").annotations({
189
- description: "Open the companion plank."
200
+ description: "Open the companion plank side-by-side."
201
+ }), Schema2.Literal("companion-vertical").annotations({
202
+ description: "Open the companion plank stacked vertically."
190
203
  }), Schema2.Literal("solo").annotations({
191
204
  description: "Solo the plank."
192
205
  }), Schema2.Literal("solo--fullscreen").annotations({
@@ -264,6 +277,8 @@ var Settings2 = Schema3.Struct({
264
277
  }).pipe(Schema3.mutable);
265
278
 
266
279
  export {
280
+ PLANK_COMPANION_TYPE,
281
+ DECK_COMPANION_TYPE,
267
282
  PlankSizing,
268
283
  DeckState,
269
284
  defaultDeck,
@@ -272,11 +287,14 @@ export {
272
287
  StoredDeckState,
273
288
  EphemeralDeckState,
274
289
  DeckAction,
275
- PLANK_COMPANION_TYPE,
276
- DECK_COMPANION_TYPE,
290
+ StatusBar,
291
+ StatusBarFooter,
292
+ VersionInfo,
293
+ Hints,
294
+ Keyshortcuts,
277
295
  DeckCapabilities_exports,
278
296
  DeckEvents_exports,
279
297
  DeckOperation_exports,
280
298
  Settings_exports
281
299
  };
282
- //# sourceMappingURL=chunk-BS4EOYMK.mjs.map
300
+ //# sourceMappingURL=chunk-ICOJ4GMB.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types/schema.ts", "../../../src/types/surface.ts", "../../../src/types/DeckCapabilities.ts", "../../../src/types/DeckEvents.ts", "../../../src/types/DeckOperation.ts", "../../../src/types/Settings.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { AppNode, LayoutOperation, Translations } from '@dxos/app-toolkit';\nimport { type DeepReadonly } from '@dxos/util';\n\nimport { meta } from '#meta';\n\nexport const PLANK_COMPANION_TYPE = AppNode.PLANK_COMPANION_TYPE;\nexport const DECK_COMPANION_TYPE = AppNode.DECK_COMPANION_TYPE;\n\nexport type Part = 'solo' | 'multi' | 'complementary';\nexport type ResolvedPart = Part | 'solo-primary' | 'solo-companion';\n\nexport const PlankSizing = Schema.Record({ key: Schema.String, value: Schema.Number });\nexport type PlankSizing = Schema.Schema.Type<typeof PlankSizing>;\n\nexport const DeckState = Schema.Struct({\n /** If false, the deck has not yet left solo mode and new planks should be soloed. */\n initialized: Schema.Boolean,\n /** Item IDs of planks currently displayed in multi-mode. */\n active: Schema.mutable(Schema.Array(Schema.String)),\n /** Item IDs of planks that have been closed; used for state persistence and reopening. */\n inactive: Schema.mutable(Schema.Array(Schema.String)),\n /** Item ID of the single plank displayed in solo or fullscreen mode. */\n solo: Schema.optional(Schema.String),\n /** Whether the solo plank is displayed in fullscreen mode (no heading or sidebars). */\n fullscreen: Schema.Boolean,\n /** Persisted plank widths in rem, keyed by item ID. */\n plankSizing: Schema.mutable(PlankSizing),\n /** Whether the companion pane is visible alongside the active plank(s). */\n companionOpen: Schema.Boolean,\n /** Orientation of the companion splitter: `horizontal` (side-by-side) or `vertical` (stacked). */\n companionOrientation: Schema.optional(Schema.Literal('horizontal', 'vertical')),\n /** Persisted companion frame widths in rem, keyed by frame ID. */\n companionFrameSizing: Schema.mutable(PlankSizing),\n});\nexport type DeckState = Schema.Schema.Type<typeof DeckState>;\n\nexport const defaultDeck: DeckState = {\n initialized: false,\n active: [],\n inactive: [],\n solo: undefined,\n fullscreen: false,\n plankSizing: {},\n companionOpen: false,\n companionOrientation: 'horizontal',\n companionFrameSizing: {},\n};\n\n//\n// Layout\n//\n\nconst LayoutMode = Schema.Literal('multi', 'solo', 'solo--fullscreen');\nexport type LayoutMode = Schema.Schema.Type<typeof LayoutMode>;\nexport const isLayoutMode = (value: any): value is LayoutMode => Schema.is(LayoutMode)(value);\nexport const getMode = (deck: DeckState | DeepReadonly<DeckState>): LayoutMode => {\n if (deck.solo) {\n return deck.fullscreen ? 'solo--fullscreen' : 'solo';\n }\n\n return 'multi';\n};\n\n// Persisted plugin state (stored in KVS/localStorage).\nexport const StoredDeckState = Schema.Struct({\n sidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),\n complementarySidebarState: Schema.Literal('closed', 'collapsed', 'expanded'),\n complementarySidebarPanel: Schema.optional(Schema.String),\n activeDeck: Schema.String,\n previousDeck: Schema.String,\n decks: Schema.mutable(Schema.Record({ key: Schema.String, value: Schema.mutable(DeckState) })),\n previousMode: Schema.mutable(Schema.Record({ key: Schema.String, value: LayoutMode })),\n}).pipe(Schema.mutable);\nexport type StoredDeckState = Schema.Schema.Type<typeof StoredDeckState>;\n\n// Transient/ephemeral plugin state (not persisted).\nexport const EphemeralDeckState = Schema.Struct({\n dialogOpen: Schema.Boolean,\n dialogType: Schema.optional(Schema.Literal('default', 'alert')),\n dialogBlockAlign: Schema.optional(Schema.Literal('start', 'center', 'end')),\n dialogOverlayClasses: Schema.optional(Schema.String),\n dialogOverlayStyle: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n /** Data to be passed to the dialog Surface. */\n dialogContent: Schema.NullOr(Schema.Struct({ component: Schema.String, props: Schema.optional(Schema.Any) })),\n popoverOpen: Schema.Boolean,\n popoverSide: Schema.optional(Schema.Literal('top', 'right', 'bottom', 'left')),\n popoverAnchor: Schema.optional(Schema.Any),\n popoverAnchorId: Schema.optional(Schema.String),\n popoverKind: Schema.optional(Schema.Literal('base', 'card', 'rename')),\n popoverTitle: Schema.optional(Translations.Label.annotations({ description: 'The title of the popover.' })),\n /** Ref of the subject to be passed to the popover Surface. */\n popoverContentRef: Schema.optional(Schema.String),\n /** Data to be passed to the popover Surface. */\n popoverContent: Schema.NullOr(\n Schema.Union(\n Schema.Struct({ component: Schema.String, props: Schema.optional(Schema.Any) }),\n Schema.Struct({ subject: Schema.Any }),\n ),\n ),\n toasts: Schema.mutable(Schema.Array(LayoutOperation.Toast)),\n currentUndoId: Schema.optional(Schema.String),\n /** The identifier of a component to scroll into view when it is mounted. */\n scrollIntoView: Schema.optional(Schema.String),\n}).pipe(Schema.mutable);\nexport type EphemeralDeckState = Schema.Schema.Type<typeof EphemeralDeckState>;\n\n// Combined state type (for convenience in components that need both).\nexport type DeckPluginState = StoredDeckState & EphemeralDeckState;\n\nexport namespace DeckAction {\n const PartAdjustmentSchema = Schema.Union(\n Schema.Literal('close').annotations({ description: 'Close the plank.' }),\n Schema.Literal('companion').annotations({ description: 'Open the companion plank side-by-side.' }),\n Schema.Literal('companion-vertical').annotations({ description: 'Open the companion plank stacked vertically.' }),\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 );\n export type PartAdjustment = Schema.Schema.Type<typeof PartAdjustmentSchema>;\n export const Adjustment = Schema.mutable(Schema.Struct({ id: Schema.String, type: PartAdjustmentSchema }));\n export type Adjustment = Schema.Schema.Type<typeof Adjustment>;\n\n // An atomic transaction to apply to the deck, describing which element to move to which location.\n export class Adjust extends Schema.TaggedClass<Adjust>()(`${meta.profile.key}.action.adjust`, {\n input: Adjustment,\n output: Schema.Void,\n }) {}\n\n export class UpdatePlankSize extends Schema.TaggedClass<UpdatePlankSize>()(\n `${meta.profile.key}.action.update-plank-size`,\n {\n input: Schema.Struct({\n id: Schema.String,\n size: Schema.Number,\n }),\n output: Schema.Void,\n },\n ) {}\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Surface } from '@dxos/app-framework/ui';\n\n/** Slot for the main status-bar container. */\nexport const StatusBar: Surface.RoleToken<Record<string, unknown>> = Surface.makeType(\n 'org.dxos.plugin.statusBar.role.statusBar',\n);\n\n/** Slot for the status-bar footer region. */\nexport const StatusBarFooter: Surface.RoleToken<Record<string, unknown>> = Surface.makeType(\n 'org.dxos.plugin.statusBar.role.footer',\n);\n\n/** Slot for the version-info widget in the banner. */\nexport const VersionInfo: Surface.RoleToken<Record<string, unknown>> = Surface.makeType(\n 'org.dxos.plugin.statusBar.role.versionInfo',\n);\n\n/** Slot for the keyboard-shortcuts hints overlay. */\nexport const Hints: Surface.RoleToken<Record<string, unknown>> = Surface.makeType('org.dxos.plugin.support.role.hints');\n\n/** Slot for the full keyboard-shortcuts list. */\nexport const Keyshortcuts: Surface.RoleToken<Record<string, unknown>> = Surface.makeType(\n 'org.dxos.plugin.support.role.keyshortcuts',\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { type Atom } from '@effect-atom/atom-react';\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { invariant } from '@dxos/invariant';\n\nimport { meta } from '#meta';\n\nimport { type DeckState, type EphemeralDeckState, type StoredDeckState } from './schema';\n\nexport const Settings = Capability.make<Atom.Writable<import('./Settings').Settings>>(\n `${meta.profile.key}.capability.settings`,\n);\n\n/** Persisted state (stored in KVS/localStorage). */\nexport const State = Capability.make<Atom.Writable<StoredDeckState>>(`${meta.profile.key}.capability.state`);\n\n/** Transient/ephemeral state (not persisted). */\nexport const EphemeralState = Capability.make<Atom.Writable<EphemeralDeckState>>(\n `${meta.profile.key}.capability.ephemeral-state`,\n);\n\n/** Get the current active deck from state. */\nexport const getDeck = (): Effect.Effect<DeckState, Error, Capability.Service> =>\n Effect.gen(function* () {\n const state = yield* Capabilities.getAtomValue(State);\n const deck = state.decks[state.activeDeck];\n invariant(deck, `Deck not found: ${state.activeDeck}`);\n return deck;\n });\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { type ActivationEvent } from '@dxos/app-framework';\nimport { AppActivationEvents } from '@dxos/app-toolkit';\n\nimport { meta } from '#meta';\n\nimport * as DeckCapabilities from './DeckCapabilities';\n\nexport const StateReady: ActivationEvent.ActivationEvent = AppActivationEvents.createStateEvent(\n `${meta.profile.key}.state-ready`,\n);\n\n/** Fired when DeckSettings capability is ready. */\nexport const SettingsReady: ActivationEvent.ActivationEvent = AppActivationEvents.createSettingsEvent(\n DeckCapabilities.Settings.identifier,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { DXN } from '@dxos/keys';\n\nimport { meta } from '#meta';\n\nconst makeKey = (name: string) => DXN.make(`${meta.profile.key}.operation.${name}`);\n\nconst PartAdjustmentSchema = Schema.Union(\n Schema.Literal('close').annotations({ description: 'Close the plank.' }),\n Schema.Literal('companion').annotations({ description: 'Open the companion plank side-by-side.' }),\n Schema.Literal('companion-vertical').annotations({ description: 'Open the companion plank stacked vertically.' }),\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);\n\nexport type PartAdjustment = Schema.Schema.Type<typeof PartAdjustmentSchema>;\n\nexport const Adjust = Operation.make({\n meta: {\n key: makeKey('adjust'),\n name: 'Adjust',\n description: 'Adjust the layout of a plank.',\n icon: 'ph--layout--regular',\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: makeKey('updatePlankSize'),\n name: 'Update Plank Size',\n description: 'Update the size of a plank.',\n icon: 'ph--arrows-out--regular',\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", "//\n// Copyright 2023 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nexport const Settings = Schema.Struct({\n enableDeck: Schema.optional(\n Schema.Boolean.annotations({\n title: 'Enable Deck',\n description: 'Display multiple panels side by side instead of one at a time.',\n }),\n ),\n // TODO(burdon): Rename layoutMode? (e.g., bento/encapsulated or floating/compact, etc.)\n encapsulatedPlanks: Schema.optional(\n Schema.Boolean.annotations({\n title: 'Encapsulated planks',\n description: 'Render each plank inside its own isolated container.',\n }),\n ),\n showHints: Schema.optional(\n Schema.Boolean.annotations({\n title: 'Show hints',\n description: 'Show helpful tips and keyboard shortcut hints in the interface.',\n }),\n ),\n enableNativeRedirect: Schema.optional(\n Schema.Boolean.annotations({\n title: 'Enable native url redirect',\n description: 'Redirect supported URLs to the native desktop application.',\n }),\n ),\n}).pipe(Schema.mutable);\nexport interface Settings extends Schema.Schema.Type<typeof Settings> {}\n"],
5
+ "mappings": ";;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,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ta", "PLANK_COMPANION_TYPE", "DECK_COMPANION_TYPE", "PlankSizing", "Record", "key", "String", "value", "Number", "DeckState", "Struct", "initialized", "Boolean", "active", "mutable", "Array", "inactive", "solo", "optional", "fullscreen", "plankSizing", "companionOpen", "companionOrientation", "Literal", "companionFrameSizing", "defaultDeck", "undefined", "LayoutMode", "isLayoutMode", "is", "getMode", "deck", "StoredDeckState", "sidebarState", "complementarySidebarState", "complementarySidebarPanel", "activeDeck", "previousDeck", "decks", "previousMode", "pipe", "EphemeralDeckState", "dialogOpen", "dialogType", "dialogBlockAlign", "dialogOverlayClasses", "dialogOverlayStyle", "Any", "dialogContent", "NullOr", "component", "props", "popoverOpen", "popoverSide", "popoverAnchor", "popoverAnchorId", "popoverKind", "popoverTitle", "Label", "annotations", "description", "popoverContentRef", "popoverContent", "Union", "subject", "toasts", "Toast", "currentUndoId", "scrollIntoView", "DeckAction", "PartAdjustmentSchema", "Adjustment", "id", "type", "Adjust", "TaggedClass", "profile", "input", "output", "Void", "UpdatePlankSize", "size", "Surface", "StatusBar", "makeType", "StatusBarFooter", "VersionInfo", "Hints", "Keyshortcuts", "Effect", "Capabilities", "Capability", "invariant", "meta", "Settings", "getDeck", "State", "deck", "activeDeck", "AppActivationEvents", "meta", "StateReady", "AppActivationEvents", "createStateEvent", "meta", "profile", "key", "SettingsReady", "createSettingsEvent", "Settings", "identifier", "Schema", "Capability", "Operation", "DXN", "meta", "makeKey", "name", "make", "profile", "key", "PartAdjustmentSchema", "Union", "Literal", "annotations", "description", "Adjust", "icon", "services", "Service", "input", "Struct", "id", "String", "type", "output", "Void", "UpdatePlankSize", "size", "Number", "Settings", "Schema", "Struct", "enableDeck", "optional", "Boolean", "annotations", "title", "description", "encapsulatedPlanks", "showHints", "enableNativeRedirect", "pipe", "mutable"]
7
+ }
@@ -0,0 +1,46 @@
1
+ // src/meta.ts
2
+ import { Plugin } from "@dxos/app-framework";
3
+
4
+ // dx.config.ts
5
+ import { Config2 } from "@dxos/app-framework/config";
6
+ import { trim } from "@dxos/util";
7
+ var dx_config_default = Config2.make({
8
+ plugin: {
9
+ key: "org.dxos.plugin.deck",
10
+ name: "Layout",
11
+ author: "DXOS",
12
+ description: trim`
13
+ The Deck plugin is the core layout engine for DXOS Composer. It manages the multi-plank
14
+ workspace (the "deck"), sidebar panels, dialogs, popovers, and toast notifications, giving
15
+ users a flexible, persistent workspace they can arrange to match their workflow.
16
+
17
+ In multi mode, subjects are opened as resizable "planks" arranged side by side. Users can
18
+ navigate with stack semantics — opening from a pivot truncates planks to the right and
19
+ appends the new one — or switch to solo or fullscreen mode for focused, distraction-free
20
+ viewing.
21
+
22
+ Layout state (active planks, sidebar visibility, plank sizes, companion pane) is persisted
23
+ across sessions via KVS/localStorage. URL routing is handled by the plugin so that any
24
+ workspace configuration can be bookmarked or shared as a deep link.
25
+
26
+ All layout changes are expressed through typed LayoutOperations (Open, Close, SetLayoutMode,
27
+ UpdateSidebar, UpdateDialog, UpdatePopover, etc.) that any plugin in the system can dispatch,
28
+ keeping the layout logic centralised and easy to extend.
29
+ `,
30
+ icon: {
31
+ key: "ph--layout--regular"
32
+ },
33
+ spec: "PLUGIN.mdl",
34
+ tags: [
35
+ "system"
36
+ ]
37
+ }
38
+ });
39
+
40
+ // src/meta.ts
41
+ var meta = Plugin.getMetaFromConfig(dx_config_default);
42
+
43
+ export {
44
+ meta
45
+ };
46
+ //# sourceMappingURL=chunk-KY7LMF4D.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts", "../../../dx.config.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport config from '../dx.config';\n\nexport const meta = Plugin.getMetaFromConfig(config);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.deck',\n name: 'Layout',\n author: 'DXOS',\n description: trim`\n The Deck plugin is the core layout engine for DXOS Composer. It manages the multi-plank\n workspace (the \"deck\"), sidebar panels, dialogs, popovers, and toast notifications, giving\n users a flexible, persistent workspace they can arrange to match their workflow.\n\n In multi mode, subjects are opened as resizable \"planks\" arranged side by side. Users can\n navigate with stack semantics — opening from a pivot truncates planks to the right and\n appends the new one — or switch to solo or fullscreen mode for focused, distraction-free\n viewing.\n\n Layout state (active planks, sidebar visibility, plank sizes, companion pane) is persisted\n across sessions via KVS/localStorage. URL routing is handled by the plugin so that any\n workspace configuration can be bookmarked or shared as a deep link.\n\n All layout changes are expressed through typed LayoutOperations (Open, Close, SetLayoutMode,\n UpdateSidebar, UpdateDialog, UpdatePopover, etc.) that any plugin in the system can dispatch,\n keeping the layout logic centralised and easy to extend.\n `,\n icon: { key: 'ph--layout--regular' },\n spec: 'PLUGIN.mdl',\n tags: ['system'],\n },\n});\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;;;ACAvB,SAASC,eAAe;AACxB,SAASC,YAAY;AAErB,IAAA,oBAAeD,QAAQE,KAAK;EAC1BC,QAAQ;IACNC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,aAAaN;;;;;;;;;;;;;;;;;;IAkBbO,MAAM;MAAEJ,KAAK;IAAsB;IACnCK,MAAM;IACNC,MAAM;MAAC;;EACT;AACF,CAAA;;;AD1BO,IAAMC,OAAOC,OAAOC,kBAAkBC,iBAAAA;",
6
+ "names": ["Plugin", "Config2", "trim", "make", "plugin", "key", "name", "author", "description", "icon", "spec", "tags", "meta", "Plugin", "getMetaFromConfig", "config"]
7
+ }
@@ -1,7 +1,7 @@
1
1
  // src/capabilities/check-app-scheme.ts
2
2
  import * as Effect from "effect/Effect";
3
3
  import { Capabilities, Capability } from "@dxos/app-framework";
4
- import { APP_SCHEME, AppCapabilities, LayoutOperation } from "@dxos/app-toolkit";
4
+ import { AppCapabilities, LayoutOperation, NativePasskey } from "@dxos/app-toolkit";
5
5
  import { EffectEx } from "@dxos/effect";
6
6
  import { isTauri } from "@dxos/util";
7
7
  import { DeckCapabilities } from "#types";
@@ -13,7 +13,7 @@ var isSafari = () => {
13
13
  };
14
14
  var canRedirectToScheme = () => {
15
15
  try {
16
- const schemeUrl = APP_SCHEME + window.location.pathname.replace(/^\/+/, "") + window.location.search;
16
+ const schemeUrl = NativePasskey.APP_SCHEME + window.location.pathname.replace(/^\/+/, "") + window.location.search;
17
17
  new URL(schemeUrl);
18
18
  return true;
19
19
  } catch {
@@ -41,7 +41,7 @@ var tryOpenNativeApp = () => {
41
41
  };
42
42
  window.addEventListener("blur", onBlur);
43
43
  document.addEventListener("visibilitychange", onVisibilityChange);
44
- const schemeUrl = APP_SCHEME + window.location.pathname.replace(/^\/+/, "") + window.location.search;
44
+ const schemeUrl = NativePasskey.APP_SCHEME + window.location.pathname.replace(/^\/+/, "") + window.location.search;
45
45
  const iframe = document.createElement("iframe");
46
46
  iframe.style.display = "none";
47
47
  iframe.src = schemeUrl;
@@ -98,4 +98,4 @@ export {
98
98
  shouldDeferNavigationHandlers,
99
99
  check_app_scheme_default
100
100
  };
101
- //# sourceMappingURL=chunk-324PPIZB.mjs.map
101
+ //# sourceMappingURL=chunk-KZFJ4PBT.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/check-app-scheme.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, LayoutOperation, NativePasskey } from '@dxos/app-toolkit';\nimport { EffectEx } from '@dxos/effect';\nimport { isTauri } from '@dxos/util';\n\nimport { DeckCapabilities } from '#types';\n\n/** Identifier for the native redirect dialog surface (defined in welcome plugin). */\nconst NATIVE_REDIRECT_DIALOG = 'org.dxos.plugin.welcome.component.native-redirect-dialog';\n\nconst SCHEME_TIMEOUT_MS = 500;\n\nconst isSafari = (): boolean => {\n const ua = navigator.userAgent;\n return ua.includes('Safari') && !ua.includes('Chrome') && !ua.includes('Chromium');\n};\n\n/** Check if the current page URL can be converted to a valid custom scheme URL. */\nconst canRedirectToScheme = (): boolean => {\n try {\n const schemeUrl = NativePasskey.APP_SCHEME + window.location.pathname.replace(/^\\/+/, '') + window.location.search;\n new URL(schemeUrl);\n return true;\n } catch {\n return false;\n }\n};\n\n/**\n * Try to open the native app via custom scheme.\n * Resolves `true` if the app opened (page lost focus), `false` if it didn't within the timeout.\n */\nconst tryOpenNativeApp = (): Promise<boolean> => {\n return new Promise((resolve) => {\n let resolved = false;\n\n const onBlur = () => {\n if (!resolved) {\n resolved = true;\n cleanup();\n resolve(true);\n }\n };\n\n const cleanup = () => {\n window.removeEventListener('blur', onBlur);\n document.removeEventListener('visibilitychange', onVisibilityChange);\n };\n\n const onVisibilityChange = () => {\n if (document.hidden) {\n onBlur();\n }\n };\n\n window.addEventListener('blur', onBlur);\n document.addEventListener('visibilitychange', onVisibilityChange);\n\n // Try the scheme via hidden iframe.\n const schemeUrl = NativePasskey.APP_SCHEME + window.location.pathname.replace(/^\\/+/, '') + window.location.search;\n const iframe = document.createElement('iframe');\n iframe.style.display = 'none';\n iframe.src = schemeUrl;\n document.body.appendChild(iframe);\n setTimeout(() => iframe.remove(), 3000);\n\n // If no blur within timeout, the app isn't running.\n setTimeout(() => {\n if (!resolved) {\n resolved = true;\n cleanup();\n resolve(false);\n }\n }, SCHEME_TIMEOUT_MS);\n });\n};\n\n/** Dispatch all NavigationHandler contributions with the current page URL. */\nconst dispatchNavigationHandlers = Effect.fn(function* () {\n const url = new URL(window.location.href);\n const handlers = yield* Capability.getAll(AppCapabilities.NavigationHandler);\n yield* Effect.all(\n handlers.map((handler) => handler(url)),\n { concurrency: 'unbounded' },\n );\n});\n\n/**\n * Checks whether the native redirect setting is enabled and the redirect should be attempted.\n * Exported for the URL handler to decide whether to defer NavigationHandler dispatch.\n */\nexport const shouldDeferNavigationHandlers = (): boolean => {\n return !isTauri() && !isSafari() && !import.meta.env.DEV && canRedirectToScheme();\n};\n\n/**\n * When running in a web browser (not Tauri) with native redirect enabled,\n * tries to open the native app via custom scheme. Defers NavigationHandlers\n * to prevent the web app from consuming one-time tokens before the native app.\n *\n * If the app opens: shows dialog with \"Open here\" callback that dispatches handlers.\n * If the app doesn't open: dispatches handlers immediately.\n * In Safari: universal links handle this natively, so the check is skipped.\n */\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const capabilities = yield* Capability.Service;\n const { invoke } = yield* Capability.get(Capabilities.OperationInvoker);\n const settings = yield* Capabilities.getAtomValue(DeckCapabilities.Settings);\n\n if (!settings?.enableNativeRedirect || !shouldDeferNavigationHandlers()) {\n return;\n }\n\n const appOpened = yield* Effect.promise(() => tryOpenNativeApp());\n if (appOpened) {\n const onOpenHere = () =>\n Effect.gen(function* () {\n yield* dispatchNavigationHandlers();\n yield* invoke(LayoutOperation.UpdateDialog, { state: false });\n }).pipe(Effect.provideService(Capability.Service, capabilities), EffectEx.runAndForwardErrors);\n\n yield* invoke(LayoutOperation.UpdateDialog, {\n subject: NATIVE_REDIRECT_DIALOG,\n type: 'alert',\n overlayClasses: 'dark bg-neutral-950!',\n props: { onOpenHere },\n });\n } else {\n yield* dispatchNavigationHandlers();\n }\n }),\n);\n"],
5
+ "mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,iBAAiBC,iBAAiBC,qBAAqB;AAChE,SAASC,gBAAgB;AACzB,SAASC,eAAe;AAExB,SAASC,wBAAwB;AAGjC,IAAMC,yBAAyB;AAE/B,IAAMC,oBAAoB;AAE1B,IAAMC,WAAW,MAAA;AACf,QAAMC,KAAKC,UAAUC;AACrB,SAAOF,GAAGG,SAAS,QAAA,KAAa,CAACH,GAAGG,SAAS,QAAA,KAAa,CAACH,GAAGG,SAAS,UAAA;AACzE;AAGA,IAAMC,sBAAsB,MAAA;AAC1B,MAAI;AACF,UAAMC,YAAYZ,c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C;IAAEQ,aAAa;EAAY,CAAA;AAE/B,CAAA;AAMO,IAAMC,gCAAgC,MAAA;AAC3C,SAAO,CAACjD,QAAAA,KAAa,CAACI,SAAAA,KAAc,CAAC,YAAY8C,IAAIC,OAAO1C,oBAAAA;AAC9D;AAWA,IAAA,2BAAed,WAAWyD,WACjBC,kBAAW,aAAA;AAChB,QAAMC,eAAe,OAAO3D,WAAW4D;AACvC,QAAM,EAAEC,OAAM,IAAK,OAAO7D,WAAW8D,IAAI/D,aAAagE,gBAAgB;AACtE,QAAMC,WAAW,OAAOjE,aAAakE,aAAa3D,iBAAiB4D,QAAQ;AAE3E,MAAI,CAACF,UAAUG,wBAAwB,CAACb,8BAAAA,GAAiC;AACvE;EACF;AAEA,QAAMc,YAAY,OAAcC,eAAQ,MAAM9C,iBAAAA,CAAAA;AAC9C,MAAI6C,WAAW;AACb,UAAME,aAAa,MACVC,WAAI,aAAA;AACT,aAAO5B,2BAAAA;AACP,aAAOkB,OAAO3D,gBAAgBsE,cAAc;QAAEC,OAAO;MAAM,CAAA;IAC7D,CAAA,EAAGC,KAAYC,sBAAe3E,WAAW4D,SAASD,YAAAA,GAAevD,SAASwE,mBAAmB;AAE/F,WAAOf,OAAO3D,gBAAgBsE,cAAc;MAC1CK,SAAStE;MACTuE,MAAM;MACNC,gBAAgB;MAChBC,OAAO;QAAEV;MAAW;IACtB,CAAA;EACF,OAAO;AACL,WAAO3B,2BAAAA;EACT;AACF,CAAA,CAAA;",
6
+ "names": ["Effect", "Capabilities", "Capability", "AppCapabilities", "LayoutOperation", "NativePasskey", "EffectEx", "isTauri", "DeckCapabilities", "NATIVE_REDIRECT_DIALOG", "SCHEME_TIMEOUT_MS", "isSafari", "ua", "navigator", "userAgent", "includes", "canRedirectToScheme", "schemeUrl", "APP_SCHEME", "window", "location", "pathname", "replace", "search", "URL", "tryOpenNativeApp", "Promise", "resolve", "resolved", "onBlur", "cleanup", "removeEventListener", "document", "onVisibilityChange", "hidden", "addEventListener", "iframe", "createElement", "style", "display", "src", "body", "appendChild", "setTimeout", "remove", "dispatchNavigationHandlers", "fn", "url", "href", "handlers", "getAll", "NavigationHandler", "all", "map", "handler", "concurrency", "shouldDeferNavigationHandlers", "env", "DEV", "makeModule", "fnUntraced", "capabilities", "Service", "invoke", "get", "OperationInvoker", "settings", "getAtomValue", "Settings", "enableNativeRedirect", "appOpened", "promise", "onOpenHere", "gen", "UpdateDialog", "state", "pipe", "provideService", "runAndForwardErrors", "subject", "type", "overlayClasses", "props"]
7
+ }
@@ -1,16 +1,16 @@
1
1
  // src/util/plank-url-params.ts
2
- import { fromUrlPath, toUrlPath } from "@dxos/app-toolkit";
2
+ import { Paths } from "@dxos/app-toolkit";
3
3
  var PLANK_PARAM = "plank";
4
4
  var serializePlanks = (active, existingSearch) => {
5
5
  const params = new URLSearchParams(existingSearch);
6
6
  params.delete(PLANK_PARAM);
7
7
  for (const id of active) {
8
- params.append(PLANK_PARAM, toUrlPath(id));
8
+ params.append(PLANK_PARAM, Paths.toUrlPath(id));
9
9
  }
10
10
  return params.size > 0 ? `?${params.toString()}` : "";
11
11
  };
12
12
  var deserializePlanks = (url) => {
13
- return url.searchParams.getAll(PLANK_PARAM).map(fromUrlPath);
13
+ return Array.from(new Set(url.searchParams.getAll(PLANK_PARAM).map(Paths.fromUrlPath)));
14
14
  };
15
15
  var stripPlanks = (existingSearch) => {
16
16
  const params = new URLSearchParams(existingSearch);
@@ -109,4 +109,4 @@ export {
109
109
  sanitizePersistedState,
110
110
  computeActiveUpdates
111
111
  };
112
- //# sourceMappingURL=chunk-GBIGQKYW.mjs.map
112
+ //# sourceMappingURL=chunk-PP32NEVY.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/util/plank-url-params.ts", "../../../src/util/sanitize-persisted-state.ts", "../../../src/util/set-active.ts", "../../../src/util/layoutAppliesTopbar.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Paths } from '@dxos/app-toolkit';\n\nconst PLANK_PARAM = 'plank';\n\n/**\n * Serialize deck active qualified IDs into a URL search string.\n * Preserves non-plank query params from the existing search string.\n */\nexport const serializePlanks = (active: readonly string[], existingSearch: string): string => {\n const params = new URLSearchParams(existingSearch);\n params.delete(PLANK_PARAM);\n for (const id of active) {\n params.append(PLANK_PARAM, Paths.toUrlPath(id));\n }\n return params.size > 0 ? `?${params.toString()}` : '';\n};\n\n/**\n * Deserialize plank query params from a URL back to qualified graph IDs.\n * Duplicates are dropped (preserving first occurrence): a shared or hand-edited URL may repeat a\n * `plank` param, and the deck's `active` list must stay unique so each plank renders under a distinct key.\n */\nexport const deserializePlanks = (url: URL): string[] => {\n return Array.from(new Set(url.searchParams.getAll(PLANK_PARAM).map(Paths.fromUrlPath)));\n};\n\n/**\n * Strip plank query params from a search string, preserving all others.\n */\nexport const stripPlanks = (existingSearch: string): string => {\n const params = new URLSearchParams(existingSearch);\n params.delete(PLANK_PARAM);\n return params.size > 0 ? `?${params.toString()}` : '';\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type StoredDeckState } from '#types';\n\n/**\n * Sanitizes persisted deck state on startup.\n *\n * Persisted state may contain values that are inappropriate to restore across sessions:\n *\n * - **Fullscreen**: Cleared unconditionally to prevent the user from getting stuck in fullscreen\n * mode if the app was closed (or crashed) while fullscreen was active.\n *\n * - **Active planks in solo-mode decks**: When a deck is in solo mode, any items in `active`\n * represent planks that were kept mounted (hidden) during the session for fast deck↔solo\n * switching. After a restart these planks would need to fully remount anyway, so retaining\n * them only adds unnecessary load. Clearing `active` for solo-mode decks avoids rendering\n * stale planks in the background on startup.\n *\n * Returns a new state object if any changes were made, or the original state if clean.\n */\nexport const sanitizePersistedState = (state: StoredDeckState): StoredDeckState => {\n let needsUpdate = false;\n const cleanedDecks = { ...state.decks };\n\n for (const [id, deck] of Object.entries(cleanedDecks)) {\n if (!deck) {\n continue;\n }\n\n let updated = false;\n let cleanedDeck = deck;\n\n if (deck.fullscreen) {\n cleanedDeck = { ...cleanedDeck, fullscreen: false };\n updated = true;\n }\n\n if (deck.solo && deck.active.length > 0) {\n cleanedDeck = { ...cleanedDeck, active: [] };\n updated = true;\n }\n\n if (updated) {\n cleanedDecks[id] = cleanedDeck;\n needsUpdate = true;\n }\n }\n\n return needsUpdate ? { ...state, decks: cleanedDecks } : state;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type AttentionManager } from '@dxos/react-ui-attention';\n\nimport { type DeckState } from '#types';\n\nexport type SetActiveOptions = {\n next: string[];\n deck: DeckState;\n attention?: AttentionManager;\n};\n\nexport type SetActiveResult = {\n /** Updates to apply to the deck. */\n deckUpdates: {\n inactive: string[];\n solo: string | undefined;\n active: string[];\n fullscreen: boolean;\n };\n /** ID of the item to attend (scroll into view) if attention changed. */\n toAttend?: string;\n};\n\n/**\n * Computes the new active state for the deck without mutating.\n * Returns the updates to apply and optionally an item to attend.\n */\nexport const computeActiveUpdates = ({ next, deck, attention }: SetActiveOptions): SetActiveResult => {\n const active = deck.solo ? [deck.solo] : deck.active;\n const removed = active.filter((id) => !next.includes(id));\n const closed = Array.from(new Set([...deck.inactive.filter((id) => !next.includes(id)), ...removed]));\n\n const updates = {\n inactive: closed,\n solo: deck.solo,\n active: deck.active,\n fullscreen: deck.fullscreen,\n };\n\n if (deck.solo || !deck.initialized) {\n updates.solo = next[0];\n } else {\n updates.active = next;\n }\n\n if (deck.fullscreen && !updates.solo) {\n updates.fullscreen = false;\n }\n\n let toAttend: string | undefined;\n if (attention) {\n const attended = attention.getCurrent();\n const [attendedId] = Array.from(attended);\n const isAttendedAvailable = !!attendedId && next.includes(attendedId);\n if (!isAttendedAvailable) {\n const attendedIndex = active.indexOf(attendedId);\n // If outside of bounds, focus on the first/last plank, otherwise focus on the new plank in the same position.\n const index = attendedIndex === -1 ? 0 : attendedIndex >= next.length ? next.length - 1 : attendedIndex;\n toAttend = next[index];\n }\n }\n\n return { deckUpdates: updates, toAttend };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type LayoutMode } from '#types';\n\nexport const layoutAppliesTopbar = (breakpoint: string, layoutMode?: LayoutMode) => {\n return (\n document.body.getAttribute('data-platform') === 'windows' &&\n breakpoint === 'desktop' &&\n layoutMode !== 'solo--fullscreen'\n );\n};\n"],
5
+ "mappings": ";AAIA,SAASA,aAAa;AAEtB,IAAMC,cAAc;AAMb,IAAMC,kBAAkB,CAACC,QAA2BC,mBAAAA;AACzD,QAAMC,SAAS,IAAIC,gBAAgBF,cAAAA;AACnCC,SAAOE,OAAON,WAAAA;AACd,aAAWO,MAAML,QAAQ;AACvBE,WAAOI,OAAOR,aAAaD,MAAMU,UAAUF,EAAAA,CAAAA;EAC7C;AACA,SAAOH,OAAOM,OAAO,IAAI,IAAIN,OAAOO,SAAQ,CAAA,KAAO;AACrD;AAOO,IAAMC,oBAAoB,CAACC,QAAAA;AAChC,SAAOC,MAAMC,KAAK,IAAIC,IAAIH,IAAII,aAAaC,OAAOlB,WAAAA,EAAamB,IAAIpB,MAAMqB,WAAW,CAAA,CAAA;AACtF;AAKO,IAAMC,cAAc,CAAClB,mBAAAA;AAC1B,QAAMC,SAAS,IAAIC,gBAAgBF,cAAAA;AACnCC,SAAOE,OAAON,WAAAA;AACd,SAAOI,OAAOM,OAAO,IAAI,IAAIN,OAAOO,SAAQ,CAAA,KAAO;AACrD;;;ACfO,IAAMW,yBAAyB,CAACC,UAAAA;AACrC,MAAIC,cAAc;AAClB,QAAMC,eAAe;IAAE,GAAGF,MAAMG;EAAM;AAEtC,aAAW,CAACC,IAAIC,IAAAA,KAASC,OAAOC,QAAQL,YAAAA,GAAe;AACrD,QAAI,CAACG,MAAM;AACT;IACF;AAEA,QAAIG,UAAU;AACd,QAAIC,cAAcJ;AAElB,QAAIA,KAAKK,YAAY;AACnBD,oBAAc;QAAE,GAAGA;QAAaC,YAAY;MAAM;AAClDF,gBAAU;IACZ;AAEA,QAAIH,KAAKM,QAAQN,KAAKO,OAAOC,SAA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jB,KAAKwB,KAAAA;IAClB;EACF;AAEA,SAAO;IAAEE,aAAaZ;IAASG;EAAS;AAC1C;;;AC5DO,IAAMU,sBAAsB,CAACC,YAAoBC,eAAAA;AACtD,SACEC,SAASC,KAAKC,aAAa,eAAA,MAAqB,aAChDJ,eAAe,aACfC,eAAe;AAEnB;",
6
+ "names": ["Paths", "PLANK_PARAM", "serializePlanks", "active", "existingSearch", "params", "URLSearchParams", "delete", "id", "append", "toUrlPath", "size", "toString", "deserializePlanks", "url", "Array", "from", "Set", "searchParams", "getAll", "map", "fromUrlPath", "stripPlanks", "sanitizePersistedState", "state", "needsUpdate", "cleanedDecks", "decks", "id", "deck", "Object", "entries", "updated", "cleanedDeck", "fullscreen", "solo", "active", "length", "computeActiveUpdates", "next", "deck", "attention", "active", "solo", "removed", "filter", "id", "includes", "closed", "Array", "from", "Set", "inactive", "updates", "fullscreen", "initialized", "toAttend", "attended", "getCurrent", "attendedId", "isAttendedAvailable", "attendedIndex", "indexOf", "index", "length", "deckUpdates", "layoutAppliesTopbar", "breakpoint", "layoutMode", "document", "body", "getAttribute"]
7
+ }
@@ -0,0 +1,20 @@
1
+ // src/util/companion-view-state.ts
2
+ import * as Schema from "effect/Schema";
3
+ import { defineViewState } from "@dxos/react-ui-attention";
4
+ var COMPANION_VIEW_STATE_CONTEXT = "deck-companion";
5
+ var CompanionSelectionSchema = Schema.Struct({
6
+ /** Linked variant of the currently selected companion tab. */
7
+ variant: Schema.optional(Schema.String)
8
+ }).pipe(Schema.mutable);
9
+ var companionVariantAspect = defineViewState({
10
+ key: "deck-companion-variant",
11
+ backend: "local",
12
+ schema: CompanionSelectionSchema,
13
+ defaultValue: () => ({})
14
+ });
15
+
16
+ export {
17
+ COMPANION_VIEW_STATE_CONTEXT,
18
+ companionVariantAspect
19
+ };
20
+ //# sourceMappingURL=chunk-SONATB35.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/util/companion-view-state.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { type AspectDef, defineViewState } from '@dxos/react-ui-attention';\n\n/** Global context shared by the deck-companion view-state aspects (split point + selected variant). */\nexport const COMPANION_VIEW_STATE_CONTEXT = 'deck-companion';\n\nconst CompanionSelectionSchema = Schema.Struct({\n /** Linked variant of the currently selected companion tab. */\n variant: Schema.optional(Schema.String),\n}).pipe(Schema.mutable);\n\nexport type CompanionSelection = Schema.Schema.Type<typeof CompanionSelectionSchema>;\n\n/**\n * The globally-selected companion variant, persisted (localStorage) so reopening the companion restores\n * the last-selected tab. Stored via react-ui-attention view state for consistency with the split point.\n */\nexport const companionVariantAspect: AspectDef<CompanionSelection> = defineViewState<CompanionSelection>({\n key: 'deck-companion-variant',\n backend: 'local',\n schema: CompanionSelectionSchema,\n defaultValue: () => ({}),\n});\n"],
5
+ "mappings": ";AAIA,YAAYA,YAAY;AAExB,SAAyBC,uBAAuB;AAGzC,IAAMC,+BAA+B;AAE5C,IAAMC,2BAAkCC,cAAO;;EAE7CC,SAAgBC,gBAAgBC,aAAM;AACxC,CAAA,EAAGC,KAAYC,cAAO;AAQf,IAAMC,yBAAwDT,gBAAoC;EACvGU,KAAK;EACLC,SAAS;EACTC,QAAQV;EACRW,cAAc,OAAO,CAAC;AACxB,CAAA;",
6
+ "names": ["Schema", "defineViewState", "COMPANION_VIEW_STATE_CONTEXT", "CompanionSelectionSchema", "Struct", "variant", "optional", "String", "pipe", "mutable", "companionVariantAspect", "key", "backend", "schema", "defaultValue"]
7
+ }