@dxos/plugin-deck 0.8.4-main.7ace549 → 0.8.4-main.937b3ca

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