@dxos/plugin-deck 0.7.5-main.9d2a38b → 0.7.5-main.c41020f

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 (233) hide show
  1. package/dist/lib/browser/{app-graph-builder-67VRUD5K.mjs → app-graph-builder-IYHAGFA3.mjs} +61 -31
  2. package/dist/lib/browser/app-graph-builder-IYHAGFA3.mjs.map +7 -0
  3. package/dist/lib/browser/{check-app-scheme-GEX6W2R5.mjs → check-app-scheme-S3EYUPMF.mjs} +3 -3
  4. package/dist/lib/browser/{check-app-scheme-GEX6W2R5.mjs.map → check-app-scheme-S3EYUPMF.mjs.map} +2 -2
  5. package/dist/lib/browser/{chunk-5VFDMW5M.mjs → chunk-22AQ5IVX.mjs} +2 -2
  6. package/dist/lib/browser/chunk-22AQ5IVX.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-FT33W5CI.mjs +128 -0
  8. package/dist/lib/browser/chunk-FT33W5CI.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-G2X3ZDCE.mjs +24 -0
  10. package/dist/lib/browser/chunk-G2X3ZDCE.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-KANJBSIX.mjs +97 -0
  12. package/dist/lib/browser/chunk-KANJBSIX.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-JQJ5UWVB.mjs → chunk-N7TEPFVR.mjs} +3 -2
  14. package/dist/lib/browser/{chunk-JQJ5UWVB.mjs.map → chunk-N7TEPFVR.mjs.map} +3 -3
  15. package/dist/lib/browser/chunk-O4RFYYQ6.mjs +1114 -0
  16. package/dist/lib/browser/chunk-O4RFYYQ6.mjs.map +7 -0
  17. package/dist/lib/browser/index.mjs +45 -78
  18. package/dist/lib/browser/index.mjs.map +4 -4
  19. package/dist/lib/browser/intent-resolver-ZD67BRUI.mjs +488 -0
  20. package/dist/lib/browser/intent-resolver-ZD67BRUI.mjs.map +7 -0
  21. package/dist/lib/browser/meta.json +1 -1
  22. package/dist/lib/browser/{react-root-UL7ZDRVZ.mjs → react-root-6ILKHD5J.mjs} +12 -17
  23. package/dist/lib/browser/react-root-6ILKHD5J.mjs.map +7 -0
  24. package/dist/lib/browser/react-surface-O75FKXAI.mjs +39 -0
  25. package/dist/lib/browser/react-surface-O75FKXAI.mjs.map +7 -0
  26. package/dist/lib/browser/{settings-FNWW6WIJ.mjs → settings-H35U6NHE.mjs} +6 -7
  27. package/dist/lib/browser/settings-H35U6NHE.mjs.map +7 -0
  28. package/dist/lib/browser/state-U4SHOPJW.mjs +129 -0
  29. package/dist/lib/browser/state-U4SHOPJW.mjs.map +7 -0
  30. package/dist/lib/browser/tools-64LXGLYR.mjs +59 -0
  31. package/dist/lib/browser/tools-64LXGLYR.mjs.map +7 -0
  32. package/dist/lib/browser/types.mjs +16 -4
  33. package/dist/lib/browser/url-handler-MVHTKUYA.mjs +72 -0
  34. package/dist/lib/browser/url-handler-MVHTKUYA.mjs.map +7 -0
  35. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  36. package/dist/types/src/capabilities/app-graph-builder.d.ts +181 -0
  37. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  38. package/dist/types/src/capabilities/capabilities.d.ts +137 -8
  39. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  40. package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -0
  41. package/dist/types/src/capabilities/index.d.ts +188 -3
  42. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  43. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
  44. package/dist/types/src/capabilities/react-root.d.ts.map +1 -0
  45. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  46. package/dist/types/src/capabilities/settings.d.ts.map +1 -0
  47. package/dist/types/src/capabilities/state.d.ts +79 -0
  48. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  49. package/dist/types/src/capabilities/tools.d.ts +10 -0
  50. package/dist/types/src/capabilities/tools.d.ts.map +1 -0
  51. package/dist/types/src/capabilities/url-handler.d.ts.map +1 -0
  52. package/dist/types/src/components/DeckLayout/ActiveNode.d.ts +1 -2
  53. package/dist/types/src/components/DeckLayout/ActiveNode.d.ts.map +1 -1
  54. package/dist/types/src/components/DeckLayout/Banner.d.ts +1 -2
  55. package/dist/types/src/components/DeckLayout/Banner.d.ts.map +1 -1
  56. package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts +1 -4
  57. package/dist/types/src/components/DeckLayout/ComplementarySidebar.d.ts.map +1 -1
  58. package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts +1 -2
  59. package/dist/types/src/components/DeckLayout/ContentEmpty.d.ts.map +1 -1
  60. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts +2 -7
  61. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
  62. package/dist/types/src/components/DeckLayout/Fallback.d.ts +1 -2
  63. package/dist/types/src/components/DeckLayout/Fallback.d.ts.map +1 -1
  64. package/dist/types/src/components/DeckLayout/Fullscreen.d.ts +1 -2
  65. package/dist/types/src/components/DeckLayout/Fullscreen.d.ts.map +1 -1
  66. package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts +3 -3
  67. package/dist/types/src/components/DeckLayout/NodePlankHeading.d.ts.map +1 -1
  68. package/dist/types/src/components/DeckLayout/Plank.d.ts +8 -6
  69. package/dist/types/src/components/DeckLayout/Plank.d.ts.map +1 -1
  70. package/dist/types/src/components/DeckLayout/PlankControls.d.ts +2 -2
  71. package/dist/types/src/components/DeckLayout/PlankControls.d.ts.map +1 -1
  72. package/dist/types/src/components/DeckLayout/PlankError.d.ts +6 -6
  73. package/dist/types/src/components/DeckLayout/PlankError.d.ts.map +1 -1
  74. package/dist/types/src/components/DeckLayout/PlankLoading.d.ts +1 -2
  75. package/dist/types/src/components/DeckLayout/PlankLoading.d.ts.map +1 -1
  76. package/dist/types/src/components/DeckLayout/Sidebar.d.ts +1 -2
  77. package/dist/types/src/components/DeckLayout/Sidebar.d.ts.map +1 -1
  78. package/dist/types/src/components/DeckLayout/SidebarButton.d.ts +6 -5
  79. package/dist/types/src/components/DeckLayout/SidebarButton.d.ts.map +1 -1
  80. package/dist/types/src/components/DeckLayout/StatusBar.d.ts +1 -2
  81. package/dist/types/src/components/DeckLayout/StatusBar.d.ts.map +1 -1
  82. package/dist/types/src/components/DeckLayout/Toast.d.ts +2 -3
  83. package/dist/types/src/components/DeckLayout/Toast.d.ts.map +1 -1
  84. package/dist/types/src/components/DeckLayout/Topbar.d.ts +1 -2
  85. package/dist/types/src/components/DeckLayout/Topbar.d.ts.map +1 -1
  86. package/dist/types/src/components/LayoutSettings.d.ts +1 -2
  87. package/dist/types/src/components/LayoutSettings.d.ts.map +1 -1
  88. package/dist/types/src/components/fragments.d.ts +2 -0
  89. package/dist/types/src/components/fragments.d.ts.map +1 -1
  90. package/dist/types/src/components/index.d.ts +0 -2
  91. package/dist/types/src/components/index.d.ts.map +1 -1
  92. package/dist/types/src/events.d.ts +1 -0
  93. package/dist/types/src/events.d.ts.map +1 -1
  94. package/dist/types/src/hooks/useMainSize.d.ts +2 -2
  95. package/dist/types/src/hooks/useNode.d.ts.map +1 -1
  96. package/dist/types/src/layout.d.ts +5 -19
  97. package/dist/types/src/layout.d.ts.map +1 -1
  98. package/dist/types/src/meta.d.ts +1 -0
  99. package/dist/types/src/meta.d.ts.map +1 -1
  100. package/dist/types/src/translations.d.ts +3 -3
  101. package/dist/types/src/types.d.ts +117 -2
  102. package/dist/types/src/types.d.ts.map +1 -1
  103. package/dist/types/src/util/index.d.ts +3 -1
  104. package/dist/types/src/util/index.d.ts.map +1 -1
  105. package/dist/types/src/util/layoutAppliesTopbar.d.ts +2 -0
  106. package/dist/types/src/util/layoutAppliesTopbar.d.ts.map +1 -0
  107. package/dist/types/src/util/set-active.d.ts +9 -0
  108. package/dist/types/src/util/set-active.d.ts.map +1 -0
  109. package/dist/types/src/util/useHoistStatusbar.d.ts.map +1 -1
  110. package/package.json +32 -31
  111. package/src/DeckPlugin.ts +23 -59
  112. package/src/capabilities/{layout/app-graph-builder.ts → app-graph-builder.ts} +40 -28
  113. package/src/capabilities/capabilities.ts +5 -7
  114. package/src/capabilities/{navigation/check-app-scheme.ts → check-app-scheme.ts} +2 -2
  115. package/src/capabilities/index.ts +12 -3
  116. package/src/capabilities/intent-resolver.ts +368 -0
  117. package/src/capabilities/{layout/react-root.tsx → react-root.tsx} +8 -14
  118. package/src/capabilities/react-surface.tsx +31 -0
  119. package/src/capabilities/{settings/settings.ts → settings.ts} +4 -5
  120. package/src/capabilities/state.ts +108 -0
  121. package/src/capabilities/tools.ts +66 -0
  122. package/src/capabilities/url-handler.ts +65 -0
  123. package/src/components/DeckLayout/ActiveNode.tsx +2 -3
  124. package/src/components/DeckLayout/ComplementarySidebar.tsx +185 -77
  125. package/src/components/DeckLayout/ContentEmpty.tsx +7 -10
  126. package/src/components/DeckLayout/DeckLayout.tsx +141 -84
  127. package/src/components/DeckLayout/Fullscreen.tsx +2 -3
  128. package/src/components/DeckLayout/NodePlankHeading.tsx +57 -65
  129. package/src/components/DeckLayout/Plank.tsx +33 -41
  130. package/src/components/DeckLayout/PlankControls.tsx +12 -11
  131. package/src/components/DeckLayout/PlankError.tsx +6 -5
  132. package/src/components/DeckLayout/Sidebar.tsx +17 -20
  133. package/src/components/DeckLayout/SidebarButton.tsx +25 -31
  134. package/src/components/DeckLayout/StatusBar.tsx +5 -11
  135. package/src/components/DeckLayout/Toast.tsx +2 -2
  136. package/src/components/LayoutSettings.tsx +8 -8
  137. package/src/components/fragments.ts +8 -0
  138. package/src/components/index.ts +0 -2
  139. package/src/events.ts +1 -0
  140. package/src/hooks/useMainSize.ts +3 -3
  141. package/src/hooks/useNode.ts +3 -1
  142. package/src/layout.ts +43 -212
  143. package/src/meta.ts +1 -0
  144. package/src/translations.ts +8 -8
  145. package/src/types.ts +103 -4
  146. package/src/util/index.ts +3 -1
  147. package/src/util/layoutAppliesTopbar.ts +7 -0
  148. package/src/util/set-active.ts +47 -0
  149. package/src/util/useHoistStatusbar.ts +13 -8
  150. package/dist/lib/browser/app-graph-builder-67VRUD5K.mjs.map +0 -7
  151. package/dist/lib/browser/chunk-2M4PXYNB.mjs +0 -1052
  152. package/dist/lib/browser/chunk-2M4PXYNB.mjs.map +0 -7
  153. package/dist/lib/browser/chunk-2PJNBVCY.mjs +0 -39
  154. package/dist/lib/browser/chunk-2PJNBVCY.mjs.map +0 -7
  155. package/dist/lib/browser/chunk-4C2AFTET.mjs +0 -186
  156. package/dist/lib/browser/chunk-4C2AFTET.mjs.map +0 -7
  157. package/dist/lib/browser/chunk-5VFDMW5M.mjs.map +0 -7
  158. package/dist/lib/browser/chunk-KY5WXIXY.mjs +0 -44
  159. package/dist/lib/browser/chunk-KY5WXIXY.mjs.map +0 -7
  160. package/dist/lib/browser/deck-PLCSKPGL.mjs +0 -26
  161. package/dist/lib/browser/deck-PLCSKPGL.mjs.map +0 -7
  162. package/dist/lib/browser/intent-resolver-FVOQSTBX.mjs +0 -152
  163. package/dist/lib/browser/intent-resolver-FVOQSTBX.mjs.map +0 -7
  164. package/dist/lib/browser/intent-resolver-K7GW4A2I.mjs +0 -249
  165. package/dist/lib/browser/intent-resolver-K7GW4A2I.mjs.map +0 -7
  166. package/dist/lib/browser/location-QHRBQBQN.mjs +0 -35
  167. package/dist/lib/browser/location-QHRBQBQN.mjs.map +0 -7
  168. package/dist/lib/browser/react-context-3BDW7W2N.mjs +0 -32
  169. package/dist/lib/browser/react-context-3BDW7W2N.mjs.map +0 -7
  170. package/dist/lib/browser/react-root-UL7ZDRVZ.mjs.map +0 -7
  171. package/dist/lib/browser/react-surface-VPNOGGNN.mjs +0 -28
  172. package/dist/lib/browser/react-surface-VPNOGGNN.mjs.map +0 -7
  173. package/dist/lib/browser/settings-FNWW6WIJ.mjs.map +0 -7
  174. package/dist/lib/browser/state-7I5BD7SE.mjs +0 -34
  175. package/dist/lib/browser/state-7I5BD7SE.mjs.map +0 -7
  176. package/dist/lib/browser/url-handler-Z5B7LD3N.mjs +0 -76
  177. package/dist/lib/browser/url-handler-Z5B7LD3N.mjs.map +0 -7
  178. package/dist/types/src/capabilities/layout/app-graph-builder.d.ts +0 -181
  179. package/dist/types/src/capabilities/layout/app-graph-builder.d.ts.map +0 -1
  180. package/dist/types/src/capabilities/layout/deck.d.ts +0 -4
  181. package/dist/types/src/capabilities/layout/deck.d.ts.map +0 -1
  182. package/dist/types/src/capabilities/layout/index.d.ts +0 -229
  183. package/dist/types/src/capabilities/layout/index.d.ts.map +0 -1
  184. package/dist/types/src/capabilities/layout/intent-resolver.d.ts.map +0 -1
  185. package/dist/types/src/capabilities/layout/react-context.d.ts +0 -8
  186. package/dist/types/src/capabilities/layout/react-context.d.ts.map +0 -1
  187. package/dist/types/src/capabilities/layout/react-root.d.ts.map +0 -1
  188. package/dist/types/src/capabilities/layout/state.d.ts +0 -42
  189. package/dist/types/src/capabilities/layout/state.d.ts.map +0 -1
  190. package/dist/types/src/capabilities/navigation/check-app-scheme.d.ts.map +0 -1
  191. package/dist/types/src/capabilities/navigation/index.d.ts +0 -5
  192. package/dist/types/src/capabilities/navigation/index.d.ts.map +0 -1
  193. package/dist/types/src/capabilities/navigation/intent-resolver.d.ts +0 -4
  194. package/dist/types/src/capabilities/navigation/intent-resolver.d.ts.map +0 -1
  195. package/dist/types/src/capabilities/navigation/location.d.ts +0 -4
  196. package/dist/types/src/capabilities/navigation/location.d.ts.map +0 -1
  197. package/dist/types/src/capabilities/navigation/set-location.d.ts +0 -10
  198. package/dist/types/src/capabilities/navigation/set-location.d.ts.map +0 -1
  199. package/dist/types/src/capabilities/navigation/url-handler.d.ts.map +0 -1
  200. package/dist/types/src/capabilities/settings/index.d.ts +0 -3
  201. package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
  202. package/dist/types/src/capabilities/settings/react-surface.d.ts.map +0 -1
  203. package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
  204. package/dist/types/src/components/DeckContext.d.ts +0 -11
  205. package/dist/types/src/components/DeckContext.d.ts.map +0 -1
  206. package/dist/types/src/components/LayoutContext.d.ts +0 -5
  207. package/dist/types/src/components/LayoutContext.d.ts.map +0 -1
  208. package/dist/types/src/layout.test.d.ts +0 -2
  209. package/dist/types/src/layout.test.d.ts.map +0 -1
  210. package/dist/types/src/util/layout-parts.d.ts +0 -7
  211. package/dist/types/src/util/layout-parts.d.ts.map +0 -1
  212. package/src/capabilities/layout/deck.ts +0 -25
  213. package/src/capabilities/layout/index.ts +0 -12
  214. package/src/capabilities/layout/intent-resolver.ts +0 -128
  215. package/src/capabilities/layout/react-context.tsx +0 -26
  216. package/src/capabilities/layout/state.ts +0 -32
  217. package/src/capabilities/navigation/index.ts +0 -10
  218. package/src/capabilities/navigation/intent-resolver.ts +0 -216
  219. package/src/capabilities/navigation/location.ts +0 -28
  220. package/src/capabilities/navigation/set-location.ts +0 -38
  221. package/src/capabilities/navigation/url-handler.ts +0 -67
  222. package/src/capabilities/settings/index.ts +0 -8
  223. package/src/capabilities/settings/react-surface.tsx +0 -23
  224. package/src/components/DeckContext.ts +0 -19
  225. package/src/components/LayoutContext.ts +0 -12
  226. package/src/layout.test.ts +0 -380
  227. package/src/util/layout-parts.ts +0 -12
  228. /package/dist/types/src/capabilities/{navigation/check-app-scheme.d.ts → check-app-scheme.d.ts} +0 -0
  229. /package/dist/types/src/capabilities/{layout/intent-resolver.d.ts → intent-resolver.d.ts} +0 -0
  230. /package/dist/types/src/capabilities/{layout/react-root.d.ts → react-root.d.ts} +0 -0
  231. /package/dist/types/src/capabilities/{settings/react-surface.d.ts → react-surface.d.ts} +0 -0
  232. /package/dist/types/src/capabilities/{settings/settings.d.ts → settings.d.ts} +0 -0
  233. /package/dist/types/src/capabilities/{navigation/url-handler.d.ts → url-handler.d.ts} +0 -0
@@ -1,42 +0,0 @@
1
- declare const _default: () => import("@dxos/app-framework").Capability<import("packages/core/echo/live-object/dist/types/src").ReactiveObject<{
2
- complementarySidebarOpen: boolean;
3
- layoutMode: "solo" | "deck" | "fullscreen";
4
- sidebarOpen: boolean;
5
- complementarySidebarContent?: any;
6
- dialogOpen: boolean;
7
- dialogContent?: any;
8
- dialogBlockAlign?: "center" | "start" | undefined;
9
- dialogType?: "alert" | "default" | undefined;
10
- popoverOpen: boolean;
11
- popoverContent?: any;
12
- popoverAnchorId?: string | undefined;
13
- toasts: {
14
- readonly id: string;
15
- readonly title?: string | [string, {
16
- ns: string;
17
- count?: number | undefined;
18
- }] | undefined;
19
- readonly icon?: string | undefined;
20
- readonly description?: string | [string, {
21
- ns: string;
22
- count?: number | undefined;
23
- }] | undefined;
24
- readonly duration?: number | undefined;
25
- readonly closeLabel?: string | [string, {
26
- ns: string;
27
- count?: number | undefined;
28
- }] | undefined;
29
- readonly actionLabel?: string | [string, {
30
- ns: string;
31
- count?: number | undefined;
32
- }] | undefined;
33
- readonly actionAlt?: string | [string, {
34
- ns: string;
35
- count?: number | undefined;
36
- }] | undefined;
37
- readonly onAction?: any;
38
- }[];
39
- scrollIntoView?: string | undefined;
40
- }>>;
41
- export default _default;
42
- //# sourceMappingURL=state.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/layout/state.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,wBAqBE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"check-app-scheme.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/navigation/check-app-scheme.ts"],"names":[],"mappings":"AAOA,OAAO,EAA6B,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;kCA4BtD,cAAc;AAA7C,wBAQE"}
@@ -1,5 +0,0 @@
1
- export declare const CheckAppScheme: (props?: import("@dxos/app-framework").PluginsContext | undefined) => Promise<import("@dxos/app-framework").Capability<null>>;
2
- export declare const LocationState: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("packages/common/util/dist/types/src").DeepReadonly<import("@dxos/app-framework").Capabilities.MutableLocation>>>;
3
- export declare const NavigationIntentResolver: (props?: import("@dxos/app-framework").PluginsContext | undefined) => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.IntentResolver>>;
4
- export declare const UrlHandler: (props?: import("@dxos/app-framework").PluginsContext | undefined) => Promise<import("@dxos/app-framework").Capability<null>>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/navigation/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,+HAA2C,CAAC;AACvE,eAAO,MAAM,aAAa,gMAAmC,CAAC;AAC9D,eAAO,MAAM,wBAAwB,oLAA0C,CAAC;AAChF,eAAO,MAAM,UAAU,+HAAsC,CAAC"}
@@ -1,4 +0,0 @@
1
- import { Capabilities, type PluginsContext } from '@dxos/app-framework';
2
- declare const _default: (context: PluginsContext) => import("@dxos/app-framework").Capability<Capabilities.IntentResolver>;
3
- export default _default;
4
- //# sourceMappingURL=intent-resolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/navigation/intent-resolver.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,YAAY,EAWZ,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;kCAYJ,cAAc;AAAvC,wBAuLK"}
@@ -1,4 +0,0 @@
1
- import { Capabilities } from '@dxos/app-framework';
2
- declare const _default: () => import("@dxos/app-framework").Capability<import("packages/common/util/dist/types/src").DeepReadonly<Capabilities.MutableLocation>>;
3
- export default _default;
4
- //# sourceMappingURL=location.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/navigation/location.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAiC,MAAM,qBAAqB,CAAC;;AAQlF,wBAeE"}
@@ -1,10 +0,0 @@
1
- import { type Layout, type LayoutParts, type Capabilities } from '@dxos/app-framework';
2
- import { type AttentionManager } from '@dxos/plugin-attention';
3
- export type SetLocationOptions = {
4
- next: LayoutParts;
5
- location: Capabilities.MutableLocation;
6
- layout: Layout;
7
- attention?: AttentionManager;
8
- };
9
- export declare const setLocation: ({ next, location, layout, attention }: SetLocationOptions) => string | undefined;
10
- //# sourceMappingURL=set-location.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"set-location.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/navigation/set-location.ts"],"names":[],"mappings":"AAIA,OAAO,EAAW,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChG,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,YAAY,CAAC,eAAe,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,WAAW,0CAA2C,kBAAkB,uBAuBpF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"url-handler.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/navigation/url-handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;kCAQE,cAAc;AAA7C,wBA+CE"}
@@ -1,3 +0,0 @@
1
- export declare const ReactSurface: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.ReactSurface>>;
2
- export declare const DeckSettings: (props?: unknown) => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.Settings>>;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/settings/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,iIAAwC,CAAC;AAClE,eAAO,MAAM,YAAY,6HAAmC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/settings/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAA8B,MAAM,qBAAqB,CAAC;;AAM/E,wBAUK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/settings/settings.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAe,MAAM,qBAAqB,CAAC;;AAMhE,wBAWE"}
@@ -1,11 +0,0 @@
1
- import { type Context } from 'react';
2
- import { type LayoutMode } from '@dxos/app-framework';
3
- export type PlankSizing = Record<string, number>;
4
- export type DeckContextType = {
5
- plankSizing: PlankSizing;
6
- currentUndoId: string | undefined;
7
- layoutModeHistory: LayoutMode[];
8
- };
9
- export declare const DeckContext: Context<DeckContextType | null>;
10
- export declare const useDeckContext: () => DeckContextType;
11
- //# sourceMappingURL=DeckContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeckContext.d.ts","sourceRoot":"","sources":["../../../../src/components/DeckContext.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAA6B,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACjD,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,iBAAiB,EAAE,UAAU,EAAE,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,OAAO,CAAC,eAAe,GAAG,IAAI,CAA+C,CAAC;AAExG,eAAO,MAAM,cAAc,QAAO,eAAqF,CAAC"}
@@ -1,5 +0,0 @@
1
- import { type Context } from 'react';
2
- import type { Layout } from '@dxos/app-framework';
3
- export declare const LayoutContext: Context<Layout | null>;
4
- export declare const useLayout: () => Layout;
5
- //# sourceMappingURL=LayoutContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LayoutContext.d.ts","sourceRoot":"","sources":["../../../../src/components/LayoutContext.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAA6B,MAAM,OAAO,CAAC;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,MAAM,GAAG,IAAI,CAAsC,CAAC;AAExF,eAAO,MAAM,SAAS,QAAO,MAAgF,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=layout.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"layout.test.d.ts","sourceRoot":"","sources":["../../../src/layout.test.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- import { type LayoutMode, type LayoutPart } from '@dxos/app-framework';
2
- /**
3
- * If in solo mode and the part is the main part, open it in solo mode.
4
- * From the dispatch POV we refer to both 'solo' and 'main' as 'main'.
5
- */
6
- export declare const getEffectivePart: (partName: LayoutPart, layoutMode: LayoutMode) => LayoutPart;
7
- //# sourceMappingURL=layout-parts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"layout-parts.d.ts","sourceRoot":"","sources":["../../../../src/util/layout-parts.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,aAAc,UAAU,cAAc,UAAU,KAAG,UACd,CAAC"}
@@ -1,25 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { contributes } from '@dxos/app-framework';
6
- import { LocalStorageStore } from '@dxos/local-storage';
7
-
8
- import { type DeckContextType } from '../../components';
9
- import { DeckCapabilities } from '../capabilities';
10
-
11
- // NOTE: The key is this currently for backwards compatibility of storage.
12
- const DECK_KEY = 'dxos.org/settings/deck';
13
-
14
- export default () => {
15
- const deck = new LocalStorageStore<DeckContextType>(DECK_KEY, {
16
- plankSizing: {},
17
- currentUndoId: undefined,
18
- // TODO(Zan): Cap depth!
19
- layoutModeHistory: [],
20
- });
21
-
22
- deck.prop({ key: 'plankSizing', type: LocalStorageStore.json<Record<string, number>>() });
23
-
24
- return contributes(DeckCapabilities.DeckState, deck.values, () => deck.close());
25
- };
@@ -1,12 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { lazy } from '@dxos/app-framework';
6
-
7
- export const DeckState = lazy(() => import('./deck'));
8
- export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
9
- export const LayoutIntentResolver = lazy(() => import('./intent-resolver'));
10
- export const LayoutState = lazy(() => import('./state'));
11
- export const ReactContext = lazy(() => import('./react-context'));
12
- export const ReactRoot = lazy(() => import('./react-root'));
@@ -1,128 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { batch } from '@preact/signals-core';
6
-
7
- import {
8
- Capabilities,
9
- createResolver,
10
- contributes,
11
- IntentAction,
12
- LayoutAction,
13
- openIds,
14
- Toast as ToastSchema,
15
- type LayoutMode,
16
- type PluginsContext,
17
- } from '@dxos/app-framework';
18
- import { S } from '@dxos/echo-schema';
19
- import { log } from '@dxos/log';
20
-
21
- import { DECK_PLUGIN } from '../../meta';
22
- import { DeckAction } from '../../types';
23
- import { DeckCapabilities } from '../capabilities';
24
-
25
- export default (context: PluginsContext) =>
26
- contributes(Capabilities.IntentResolver, [
27
- createResolver(DeckAction.UpdatePlankSize, (data) => {
28
- const deck = context.requestCapability(DeckCapabilities.MutableDeckState);
29
- deck.plankSizing[data.id] = data.size;
30
- }),
31
- createResolver(IntentAction.ShowUndo, (data) => {
32
- const deck = context.requestCapability(DeckCapabilities.MutableDeckState);
33
- const layout = context.requestCapability(Capabilities.MutableLayout);
34
- const { undoPromise: undo } = context.requestCapability(Capabilities.IntentDispatcher);
35
-
36
- // TODO(wittjosiah): Support undoing further back than the last action.
37
- if (deck.currentUndoId) {
38
- layout.toasts = layout.toasts.filter((toast) => toast.id !== deck.currentUndoId);
39
- }
40
- deck.currentUndoId = `${IntentAction.ShowUndo._tag}-${Date.now()}`;
41
- layout.toasts = [
42
- ...layout.toasts,
43
- {
44
- id: deck.currentUndoId,
45
- title: data.message ?? ['undo available label', { ns: DECK_PLUGIN }],
46
- duration: 10_000,
47
- actionLabel: ['undo action label', { ns: DECK_PLUGIN }],
48
- actionAlt: ['undo action alt', { ns: DECK_PLUGIN }],
49
- closeLabel: ['undo close label', { ns: DECK_PLUGIN }],
50
- onAction: () => undo(),
51
- },
52
- ];
53
- }),
54
- createResolver(
55
- LayoutAction.SetLayout,
56
- ({ element, state, component, subject, anchorId, dialogBlockAlign, dialogType }) => {
57
- const layout = context.requestCapability(Capabilities.MutableLayout);
58
- switch (element) {
59
- case 'sidebar': {
60
- layout.sidebarOpen = state ?? !layout.sidebarOpen;
61
- break;
62
- }
63
-
64
- case 'complementary': {
65
- layout.complementarySidebarOpen = !!state;
66
- // TODO(thure): Hoist content into the c11y sidebar of Deck.
67
- // layout.complementarySidebarContent = component || subject ? { component, subject } : null;
68
- break;
69
- }
70
-
71
- case 'dialog': {
72
- layout.dialogOpen = state ?? Boolean(component);
73
- layout.dialogContent = component ? { component, subject } : null;
74
- layout.dialogBlockAlign = dialogBlockAlign ?? 'center';
75
- layout.dialogType = dialogType;
76
- break;
77
- }
78
-
79
- case 'popover': {
80
- layout.popoverOpen = state ?? Boolean(component);
81
- layout.popoverContent = component ? { component, subject } : null;
82
- layout.popoverAnchorId = anchorId;
83
- break;
84
- }
85
-
86
- case 'toast': {
87
- if (S.is(ToastSchema)(subject)) {
88
- layout.toasts = [...layout.toasts, subject];
89
- }
90
- break;
91
- }
92
- }
93
- },
94
- ),
95
- createResolver(LayoutAction.SetLayoutMode, (data) => {
96
- const layout = context.requestCapability(Capabilities.MutableLayout);
97
- const location = context.requestCapability(Capabilities.MutableLocation);
98
- const deck = context.requestCapability(DeckCapabilities.MutableDeckState);
99
-
100
- const setMode = (mode: LayoutMode) => {
101
- const main = openIds(location.active, ['main']);
102
- const solo = openIds(location.active, ['solo']);
103
- const current = layout.layoutMode === 'solo' ? solo : main;
104
- // When un-soloing, the solo entry is added to the deck.
105
- const next = mode === 'solo' ? solo : [...main, ...solo];
106
- const removed = current.filter((id) => !next.includes(id));
107
- const closed = Array.from(new Set([...location.closed.filter((id) => !next.includes(id)), ...removed]));
108
-
109
- location.closed = closed;
110
- layout.layoutMode = mode;
111
- };
112
-
113
- return batch(() => {
114
- if ('layoutMode' in data) {
115
- deck.layoutModeHistory.push(layout.layoutMode);
116
- setMode(data.layoutMode);
117
- } else if (data.revert) {
118
- setMode(deck.layoutModeHistory.pop() ?? 'solo');
119
- } else {
120
- log.warn('Invalid layout mode', data);
121
- }
122
- });
123
- }),
124
- createResolver(LayoutAction.ScrollIntoView, ({ id }) => {
125
- const layout = context.requestCapability(Capabilities.MutableLayout);
126
- layout.scrollIntoView = id;
127
- }),
128
- ]);
@@ -1,26 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import React, { type PropsWithChildren } from 'react';
6
-
7
- import { Capabilities, contributes, useCapability } from '@dxos/app-framework';
8
-
9
- import { DeckContext, LayoutContext } from '../../components';
10
- import { DECK_PLUGIN } from '../../meta';
11
- import { DeckCapabilities } from '../capabilities';
12
-
13
- export default () =>
14
- contributes(Capabilities.ReactContext, {
15
- id: DECK_PLUGIN,
16
- context: (props: PropsWithChildren) => {
17
- const layout = useCapability(Capabilities.Layout);
18
- const deck = useCapability(DeckCapabilities.MutableDeckState);
19
-
20
- return (
21
- <LayoutContext.Provider value={layout}>
22
- <DeckContext.Provider value={deck}>{props.children}</DeckContext.Provider>
23
- </LayoutContext.Provider>
24
- );
25
- },
26
- });
@@ -1,32 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { Capabilities, contributes, type LayoutMode, type Layout } from '@dxos/app-framework';
6
- import { LocalStorageStore } from '@dxos/local-storage';
7
-
8
- // NOTE: The key is this currently for backwards compatibility of storage.
9
- const LAYOUT_KEY = 'dxos.org/settings/layout';
10
-
11
- export default () => {
12
- const layout = new LocalStorageStore<Layout>(LAYOUT_KEY, {
13
- layoutMode: 'solo',
14
- sidebarOpen: true,
15
- complementarySidebarOpen: false,
16
- dialogContent: null,
17
- dialogOpen: false,
18
- dialogBlockAlign: undefined,
19
- dialogType: undefined,
20
- popoverContent: null,
21
- popoverAnchorId: undefined,
22
- popoverOpen: false,
23
- toasts: [],
24
- });
25
-
26
- layout
27
- .prop({ key: 'layoutMode', type: LocalStorageStore.enum<LayoutMode>() })
28
- .prop({ key: 'sidebarOpen', type: LocalStorageStore.bool() })
29
- .prop({ key: 'complementarySidebarOpen', type: LocalStorageStore.bool() });
30
-
31
- return contributes(Capabilities.Layout, layout.values, () => layout.close());
32
- };
@@ -1,10 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { lazy } from '@dxos/app-framework';
6
-
7
- export const CheckAppScheme = lazy(() => import('./check-app-scheme'));
8
- export const LocationState = lazy(() => import('./location'));
9
- export const NavigationIntentResolver = lazy(() => import('./intent-resolver'));
10
- export const UrlHandler = lazy(() => import('./url-handler'));
@@ -1,216 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { batch } from '@preact/signals-core';
6
- import { pipe } from 'effect';
7
-
8
- import {
9
- Capabilities,
10
- chain,
11
- contributes,
12
- createIntent,
13
- createResolver,
14
- LayoutAction,
15
- NavigationAction,
16
- openIds,
17
- SLUG_PATH_SEPARATOR,
18
- type LayoutEntry,
19
- type LayoutPart,
20
- type PluginsContext,
21
- } from '@dxos/app-framework';
22
- import { isReactiveObject, getTypename } from '@dxos/live-object';
23
- import { AttentionCapabilities } from '@dxos/plugin-attention';
24
- import { ObservabilityAction } from '@dxos/plugin-observability/types';
25
-
26
- import { setLocation } from './set-location';
27
- import { closeEntry, incrementPlank, openEntry } from '../../layout';
28
- import { DECK_PLUGIN } from '../../meta';
29
- import { type DeckSettingsProps } from '../../types';
30
- import { getEffectivePart } from '../../util';
31
-
32
- // TODO(wittjosiah): Factor out navgiation from deck plugin.
33
- export default (context: PluginsContext) =>
34
- contributes(Capabilities.IntentResolver, [
35
- createResolver(NavigationAction.Open, (data) => {
36
- const { graph } = context.requestCapability(Capabilities.AppGraph);
37
- const location = context.requestCapability(Capabilities.MutableLocation);
38
- const layout = context.requestCapability(Capabilities.MutableLayout);
39
- const attention = context.requestCapability(AttentionCapabilities.Attention);
40
- const settings = context
41
- .requestCapabilities(Capabilities.SettingsStore)[0]
42
- ?.getStore<DeckSettingsProps>(DECK_PLUGIN)?.value;
43
-
44
- const previouslyOpenIds = new Set<string>(openIds(location.active));
45
- const layoutMode = layout.layoutMode;
46
- const toAttend = batch(() => {
47
- const processLayoutEntry = (partName: string, entryString: string, currentLayout: any) => {
48
- // TODO(burdon): Option to toggle?
49
- const toggle = false;
50
- const [id, path] = entryString.split(SLUG_PATH_SEPARATOR);
51
- const layoutEntry: LayoutEntry = { id, ...(path ? { path } : {}) };
52
- const effectivePart = getEffectivePart(partName as LayoutPart, layoutMode);
53
- if (
54
- toggle &&
55
- layoutMode === 'deck' &&
56
- effectivePart === 'main' &&
57
- currentLayout[effectivePart]?.some((entry: LayoutEntry) => entry.id === id) &&
58
- !data?.noToggle
59
- ) {
60
- // If we're in deck mode and the main part is already open, toggle it closed.
61
- return closeEntry(currentLayout, { part: effectivePart as LayoutPart, entryId: id });
62
- } else {
63
- return openEntry(currentLayout, effectivePart, layoutEntry, {
64
- positioning: settings?.newPlankPositioning,
65
- });
66
- }
67
- };
68
-
69
- let newLayout = location.active;
70
- Object.entries(data.activeParts).forEach(([partName, layoutEntries]) => {
71
- if (Array.isArray(layoutEntries)) {
72
- layoutEntries.forEach((activePartEntry: string) => {
73
- newLayout = processLayoutEntry(partName, activePartEntry, newLayout);
74
- });
75
- } else if (typeof layoutEntries === 'string') {
76
- // Legacy single string entry.
77
- newLayout = processLayoutEntry(partName, layoutEntries, newLayout);
78
- }
79
- });
80
-
81
- return setLocation({ next: newLayout, layout, location, attention });
82
- });
83
-
84
- const ids = openIds(location.active);
85
- const newlyOpen = ids.filter((i) => !previouslyOpenIds.has(i));
86
-
87
- return {
88
- data: { open: ids },
89
- intents: [
90
- createIntent(LayoutAction.ScrollIntoView, { id: newlyOpen[0] ?? toAttend }),
91
- ...(toAttend ? [createIntent(NavigationAction.Expose, { id: toAttend })] : []),
92
- ...newlyOpen.map((id) => {
93
- const active = graph?.findNode(id)?.data;
94
- const typename = isReactiveObject(active) ? getTypename(active) : undefined;
95
- return createIntent(ObservabilityAction.SendEvent, {
96
- name: 'navigation.activate',
97
- properties: {
98
- id,
99
- typename,
100
- },
101
- });
102
- }),
103
- ],
104
- };
105
- }),
106
- createResolver(NavigationAction.AddToActive, (data) => {
107
- const location = context.requestCapability(Capabilities.MutableLocation);
108
- const layout = context.requestCapability(Capabilities.MutableLayout);
109
- const attention = context.requestCapability(AttentionCapabilities.Attention);
110
- const settings = context
111
- .requestCapabilities(Capabilities.SettingsStore)[0]
112
- ?.getStore<DeckSettingsProps>(DECK_PLUGIN)?.value;
113
-
114
- const layoutEntry = { id: data.id };
115
- const effectivePart = getEffectivePart(data.part, layout.layoutMode);
116
-
117
- setLocation({
118
- next: openEntry(location.active, effectivePart, layoutEntry, {
119
- positioning: data.positioning ?? settings?.newPlankPositioning,
120
- pivotId: data.pivotId,
121
- }),
122
- layout,
123
- location,
124
- attention,
125
- });
126
-
127
- const intents = [];
128
- if (data.scrollIntoView && layout.layoutMode === 'deck') {
129
- intents.push(createIntent(LayoutAction.ScrollIntoView, { id: data.id }));
130
- }
131
-
132
- return { intents };
133
- }),
134
- createResolver(NavigationAction.Close, (data) => {
135
- const location = context.requestCapability(Capabilities.MutableLocation);
136
- const layout = context.requestCapability(Capabilities.MutableLayout);
137
- const attention = context.requestCapability(AttentionCapabilities.Attention);
138
-
139
- let newLayout = location.active;
140
- const layoutMode = layout.layoutMode;
141
- const intentParts = data.activeParts;
142
- Object.keys(intentParts).forEach((partName: string) => {
143
- const effectivePart = getEffectivePart(partName as LayoutPart, layoutMode);
144
- const ids = intentParts[partName];
145
- if (Array.isArray(ids)) {
146
- ids.forEach((id: string) => {
147
- newLayout = closeEntry(newLayout, { part: effectivePart, entryId: id });
148
- });
149
- } else {
150
- // Legacy single string entry
151
- newLayout = closeEntry(newLayout, { part: effectivePart, entryId: ids });
152
- }
153
- });
154
-
155
- const toAttend = setLocation({ next: newLayout, layout, location, attention });
156
- return { intents: [createIntent(LayoutAction.ScrollIntoView, { id: toAttend })] };
157
- }),
158
- createResolver(NavigationAction.Set, (data) => {
159
- const layout = context.requestCapability(Capabilities.MutableLayout);
160
- const location = context.requestCapability(Capabilities.MutableLocation);
161
- const attention = context.requestCapability(AttentionCapabilities.Attention);
162
-
163
- return batch(() => {
164
- const toAttend = setLocation({ next: data.activeParts, layout, location, attention });
165
- return { intents: [createIntent(LayoutAction.ScrollIntoView, { id: toAttend })] };
166
- });
167
- }),
168
- createResolver(NavigationAction.Adjust, (adjustment) => {
169
- const location = context.requestCapability(Capabilities.MutableLocation);
170
- const layout = context.requestCapability(Capabilities.MutableLayout);
171
- const attention = context.requestCapability(AttentionCapabilities.Attention);
172
-
173
- return batch(() => {
174
- if (adjustment.type === 'increment-end' || adjustment.type === 'increment-start') {
175
- setLocation({
176
- next: incrementPlank(location.active, {
177
- type: adjustment.type,
178
- layoutCoordinate: adjustment.layoutCoordinate,
179
- }),
180
- layout,
181
- location,
182
- attention,
183
- });
184
- }
185
-
186
- if (adjustment.type === 'solo') {
187
- const entryId = adjustment.layoutCoordinate.entryId;
188
- if (layout.layoutMode !== 'solo') {
189
- // Solo the entry.
190
- return {
191
- intents: [
192
- // NOTE: The order of these is important.
193
- pipe(
194
- createIntent(NavigationAction.Open, { activeParts: { solo: [entryId] } }),
195
- chain(LayoutAction.SetLayoutMode, { layoutMode: 'solo' }),
196
- ),
197
- ],
198
- };
199
- } else {
200
- // Un-solo the current entry.
201
- return {
202
- intents: [
203
- // NOTE: The order of these is important.
204
- pipe(
205
- createIntent(LayoutAction.SetLayoutMode, { layoutMode: 'deck' }),
206
- chain(NavigationAction.Close, { activeParts: { solo: [entryId] } }),
207
- chain(NavigationAction.Open, { activeParts: { main: [entryId] }, noToggle: true }),
208
- chain(LayoutAction.ScrollIntoView, { id: entryId }),
209
- ),
210
- ],
211
- };
212
- }
213
- }
214
- });
215
- }),
216
- ]);
@@ -1,28 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { Capabilities, contributes, type LayoutParts } from '@dxos/app-framework';
6
- import { LocalStorageStore } from '@dxos/local-storage';
7
-
8
- import { NAV_ID } from '../../components';
9
-
10
- // NOTE: The key is this currently for backwards compatibility of storage.
11
- const LOCATION_KEY = 'dxos.org/settings/layout';
12
-
13
- export default () => {
14
- // TODO(wittjosiah): This active state is not a generic navigation state but quite deck specific.
15
- // It is also closely tied to the layout mode state (which also seems quite deck specific).
16
- // The layout and navigation interfaces need to be revisited and cleaned up.
17
- // Doing this cleanup should also help simplify some of the convoluted logic for managing it.
18
- const location = new LocalStorageStore<Capabilities.MutableLocation>(LOCATION_KEY, {
19
- active: { sidebar: [{ id: NAV_ID }] },
20
- closed: [],
21
- });
22
-
23
- location
24
- .prop({ key: 'active', type: LocalStorageStore.json<LayoutParts>() })
25
- .prop({ key: 'closed', type: LocalStorageStore.json<string[]>() });
26
-
27
- return contributes(Capabilities.Location, location.values, () => location.close());
28
- };