@dxos/plugin-navtree 0.8.4-main.a4bbb77 → 0.8.4-main.abd8ff62ef

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/dist/lib/browser/NavTreePlugin-53I3ONRE.mjs +74 -0
  2. package/dist/lib/browser/NavTreePlugin-53I3ONRE.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +95 -122
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/translations.mjs +21 -0
  7. package/dist/lib/browser/translations.mjs.map +7 -0
  8. package/dist/types/src/NavTreePlugin.d.ts +3 -1
  9. package/dist/types/src/NavTreePlugin.d.ts.map +1 -1
  10. package/dist/types/src/NavTreePlugin.node.d.ts +4 -0
  11. package/dist/types/src/NavTreePlugin.node.d.ts.map +1 -0
  12. package/dist/types/src/NavTreePlugin.test.d.ts +2 -0
  13. package/dist/types/src/NavTreePlugin.test.d.ts.map +1 -0
  14. package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
  15. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  16. package/dist/types/src/capabilities/index.d.ts +7 -105
  17. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  18. package/dist/types/src/capabilities/keyboard.d.ts +3 -2
  19. package/dist/types/src/capabilities/keyboard.d.ts.map +1 -1
  20. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  21. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  22. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  23. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/state.d.ts +4 -18
  25. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  26. package/dist/types/src/components/NavTree/NavTree.d.ts +11 -4
  27. package/dist/types/src/components/NavTree/NavTree.d.ts.map +1 -1
  28. package/dist/types/src/components/NavTree/NavTree.stories.d.ts +10 -13
  29. package/dist/types/src/components/NavTree/NavTree.stories.d.ts.map +1 -1
  30. package/dist/types/src/components/{NavTreeContext.d.ts → NavTreeContext/NavTreeContext.d.ts} +1 -1
  31. package/dist/types/src/components/NavTreeContext/NavTreeContext.d.ts.map +1 -0
  32. package/dist/types/src/components/NavTreeContext/index.d.ts +2 -0
  33. package/dist/types/src/components/NavTreeContext/index.d.ts.map +1 -0
  34. package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts +13 -9
  35. package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts.map +1 -1
  36. package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts +3 -2
  37. package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts.map +1 -1
  38. package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts +1 -1
  39. package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts.map +1 -1
  40. package/dist/types/src/components/Sidebar/L0Menu.d.ts +8 -5
  41. package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
  42. package/dist/types/src/components/Sidebar/L1Panel.d.ts +4 -7
  43. package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
  44. package/dist/types/src/components/Sidebar/L1Tabs.d.ts +5 -4
  45. package/dist/types/src/components/Sidebar/L1Tabs.d.ts.map +1 -1
  46. package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.d.ts.map +1 -1
  47. package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.stories.d.ts.map +1 -1
  48. package/dist/types/src/components/index.d.ts +0 -3
  49. package/dist/types/src/components/index.d.ts.map +1 -1
  50. package/dist/types/src/components/types.d.ts +8 -17
  51. package/dist/types/src/components/types.d.ts.map +1 -1
  52. package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.d.ts +6 -0
  53. package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.d.ts.map +1 -0
  54. package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.stories.d.ts +28 -0
  55. package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.stories.d.ts.map +1 -0
  56. package/dist/types/src/containers/CommandsDialogContent/index.d.ts +2 -0
  57. package/dist/types/src/containers/CommandsDialogContent/index.d.ts.map +1 -0
  58. package/dist/types/src/containers/CommandsTrigger/CommandsTrigger.d.ts.map +1 -0
  59. package/dist/types/src/containers/CommandsTrigger/index.d.ts +2 -0
  60. package/dist/types/src/containers/CommandsTrigger/index.d.ts.map +1 -0
  61. package/dist/types/src/containers/NavTreeContainer/NavTreeContainer.d.ts +9 -0
  62. package/dist/types/src/containers/NavTreeContainer/NavTreeContainer.d.ts.map +1 -0
  63. package/dist/types/src/containers/NavTreeContainer/index.d.ts +3 -0
  64. package/dist/types/src/containers/NavTreeContainer/index.d.ts.map +1 -0
  65. package/dist/types/src/{components → containers/NavTreeDocumentTitle}/NavTreeDocumentTitle.d.ts +1 -1
  66. package/dist/types/src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.d.ts.map +1 -0
  67. package/dist/types/src/containers/NavTreeDocumentTitle/index.d.ts +2 -0
  68. package/dist/types/src/containers/NavTreeDocumentTitle/index.d.ts.map +1 -0
  69. package/dist/types/src/containers/index.d.ts +7 -0
  70. package/dist/types/src/containers/index.d.ts.map +1 -0
  71. package/dist/types/src/experimental/Tree.d.ts +2 -2
  72. package/dist/types/src/experimental/Tree.d.ts.map +1 -1
  73. package/dist/types/src/experimental/Tree.stories.d.ts +15 -4
  74. package/dist/types/src/experimental/Tree.stories.d.ts.map +1 -1
  75. package/dist/types/src/hooks/index.d.ts +5 -0
  76. package/dist/types/src/hooks/index.d.ts.map +1 -0
  77. package/dist/types/src/hooks/useActions.d.ts +5 -0
  78. package/dist/types/src/hooks/useActions.d.ts.map +1 -0
  79. package/dist/types/src/hooks/useLoadDescendents.d.ts +6 -0
  80. package/dist/types/src/hooks/useLoadDescendents.d.ts.map +1 -0
  81. package/dist/types/src/hooks/useNavTreeModel.d.ts +7 -0
  82. package/dist/types/src/hooks/useNavTreeModel.d.ts.map +1 -0
  83. package/dist/types/src/hooks/useNavTreeState.d.ts +18 -0
  84. package/dist/types/src/hooks/useNavTreeState.d.ts.map +1 -0
  85. package/dist/types/src/index.d.ts +3 -3
  86. package/dist/types/src/index.d.ts.map +1 -1
  87. package/dist/types/src/meta.d.ts +2 -2
  88. package/dist/types/src/meta.d.ts.map +1 -1
  89. package/dist/types/src/operations/expose.d.ts +5 -0
  90. package/dist/types/src/operations/expose.d.ts.map +1 -0
  91. package/dist/types/src/operations/index.d.ts +3 -0
  92. package/dist/types/src/operations/index.d.ts.map +1 -0
  93. package/dist/types/src/testing/app-graph-builder.d.ts +2 -3
  94. package/dist/types/src/testing/app-graph-builder.d.ts.map +1 -1
  95. package/dist/types/src/testing/generator.d.ts +5 -6
  96. package/dist/types/src/testing/generator.d.ts.map +1 -1
  97. package/dist/types/src/testing/update-state.d.ts +2 -2
  98. package/dist/types/src/testing/update-state.d.ts.map +1 -1
  99. package/dist/types/src/translations.d.ts +8 -11
  100. package/dist/types/src/translations.d.ts.map +1 -1
  101. package/dist/types/src/types/capabilities.d.ts +15 -0
  102. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  103. package/dist/types/src/types/events.d.ts +5 -0
  104. package/dist/types/src/types/events.d.ts.map +1 -0
  105. package/dist/types/src/types/index.d.ts +4 -0
  106. package/dist/types/src/types/index.d.ts.map +1 -0
  107. package/dist/types/src/{types.d.ts → types/schema.d.ts} +10 -9
  108. package/dist/types/src/types/schema.d.ts.map +1 -0
  109. package/dist/types/src/util.d.ts +12 -8
  110. package/dist/types/src/util.d.ts.map +1 -1
  111. package/dist/types/tsconfig.tsbuildinfo +1 -1
  112. package/package.json +78 -58
  113. package/src/NavTreePlugin.node.ts +37 -0
  114. package/src/NavTreePlugin.test.ts +29 -0
  115. package/src/NavTreePlugin.tsx +59 -76
  116. package/src/capabilities/app-graph-builder.ts +34 -44
  117. package/src/capabilities/index.ts +10 -8
  118. package/src/capabilities/keyboard.ts +58 -51
  119. package/src/capabilities/operation-handler.ts +16 -0
  120. package/src/capabilities/react-surface.tsx +46 -38
  121. package/src/capabilities/state.ts +128 -84
  122. package/src/components/NavTree/NavTree.stories.tsx +105 -100
  123. package/src/components/NavTree/NavTree.tsx +65 -33
  124. package/src/components/{NavTreeContext.tsx → NavTreeContext/NavTreeContext.tsx} +1 -1
  125. package/src/components/NavTreeContext/index.ts +5 -0
  126. package/src/components/NavTreeItem/NavTreeItemAction.stories.tsx +23 -15
  127. package/src/components/NavTreeItem/NavTreeItemAction.tsx +69 -46
  128. package/src/components/NavTreeItem/NavTreeItemColumns.tsx +67 -35
  129. package/src/components/Sidebar/L0Menu.tsx +148 -183
  130. package/src/components/Sidebar/L1Panel.tsx +202 -103
  131. package/src/components/Sidebar/L1Tabs.tsx +18 -34
  132. package/src/components/UserAccountAvatar/UserAccountAvatar.stories.tsx +2 -3
  133. package/src/components/UserAccountAvatar/UserAccountAvatar.tsx +1 -1
  134. package/src/components/index.ts +1 -3
  135. package/src/components/types.ts +13 -19
  136. package/src/containers/CommandsDialogContent/CommandsDialogContent.stories.tsx +46 -0
  137. package/src/containers/CommandsDialogContent/CommandsDialogContent.tsx +127 -0
  138. package/src/containers/CommandsDialogContent/index.ts +5 -0
  139. package/src/containers/CommandsTrigger/CommandsTrigger.tsx +28 -0
  140. package/src/containers/CommandsTrigger/index.ts +5 -0
  141. package/src/containers/NavTreeContainer/NavTreeContainer.tsx +271 -0
  142. package/src/containers/NavTreeContainer/index.ts +6 -0
  143. package/src/{components → containers/NavTreeDocumentTitle}/NavTreeDocumentTitle.tsx +4 -3
  144. package/src/containers/NavTreeDocumentTitle/index.ts +5 -0
  145. package/src/containers/index.ts +12 -0
  146. package/src/experimental/Tree.stories.tsx +81 -87
  147. package/src/experimental/Tree.tsx +3 -3
  148. package/src/hooks/index.ts +8 -0
  149. package/src/hooks/useActions.ts +34 -0
  150. package/src/hooks/useLoadDescendents.ts +23 -0
  151. package/src/hooks/useNavTreeModel.ts +118 -0
  152. package/src/hooks/useNavTreeState.ts +35 -0
  153. package/src/index.ts +8 -3
  154. package/src/meta.ts +9 -4
  155. package/src/operations/expose.ts +42 -0
  156. package/src/operations/index.ts +7 -0
  157. package/src/testing/app-graph-builder.ts +167 -238
  158. package/src/testing/generator.ts +41 -39
  159. package/src/testing/update-state.ts +6 -6
  160. package/src/translations.ts +8 -10
  161. package/src/types/capabilities.ts +21 -0
  162. package/src/types/events.ts +12 -0
  163. package/src/types/index.ts +7 -0
  164. package/src/{types.ts → types/schema.ts} +9 -8
  165. package/src/util.ts +28 -17
  166. package/dist/lib/browser/app-graph-builder-BCXDEDN7.mjs +0 -45
  167. package/dist/lib/browser/app-graph-builder-BCXDEDN7.mjs.map +0 -7
  168. package/dist/lib/browser/chunk-6AZKY5WZ.mjs +0 -1470
  169. package/dist/lib/browser/chunk-6AZKY5WZ.mjs.map +0 -7
  170. package/dist/lib/browser/chunk-LPAREX6J.mjs +0 -15
  171. package/dist/lib/browser/chunk-LPAREX6J.mjs.map +0 -7
  172. package/dist/lib/browser/chunk-ZENLR72O.mjs +0 -14
  173. package/dist/lib/browser/chunk-ZENLR72O.mjs.map +0 -7
  174. package/dist/lib/browser/intent-resolver-G6COWRWW.mjs +0 -47
  175. package/dist/lib/browser/intent-resolver-G6COWRWW.mjs.map +0 -7
  176. package/dist/lib/browser/keyboard-AHSAWKXA.mjs +0 -51
  177. package/dist/lib/browser/keyboard-AHSAWKXA.mjs.map +0 -7
  178. package/dist/lib/browser/react-surface-FOCB4Y5R.mjs +0 -51
  179. package/dist/lib/browser/react-surface-FOCB4Y5R.mjs.map +0 -7
  180. package/dist/lib/browser/state-2Q623V7U.mjs +0 -117
  181. package/dist/lib/browser/state-2Q623V7U.mjs.map +0 -7
  182. package/dist/types/src/capabilities/capabilities.d.ts +0 -21
  183. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  184. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  185. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  186. package/dist/types/src/components/CommandsDialog/CommandsDialog.d.ts +0 -5
  187. package/dist/types/src/components/CommandsDialog/CommandsDialog.d.ts.map +0 -1
  188. package/dist/types/src/components/CommandsDialog/CommandsTrigger.d.ts.map +0 -1
  189. package/dist/types/src/components/CommandsDialog/index.d.ts +0 -3
  190. package/dist/types/src/components/CommandsDialog/index.d.ts.map +0 -1
  191. package/dist/types/src/components/NavTreeContainer.d.ts +0 -9
  192. package/dist/types/src/components/NavTreeContainer.d.ts.map +0 -1
  193. package/dist/types/src/components/NavTreeContext.d.ts.map +0 -1
  194. package/dist/types/src/components/NavTreeDocumentTitle.d.ts.map +0 -1
  195. package/dist/types/src/events.d.ts +0 -4
  196. package/dist/types/src/events.d.ts.map +0 -1
  197. package/dist/types/src/hooks.d.ts +0 -3
  198. package/dist/types/src/hooks.d.ts.map +0 -1
  199. package/dist/types/src/types.d.ts.map +0 -1
  200. package/src/capabilities/capabilities.ts +0 -20
  201. package/src/capabilities/intent-resolver.ts +0 -37
  202. package/src/components/CommandsDialog/CommandsDialog.tsx +0 -118
  203. package/src/components/CommandsDialog/CommandsTrigger.tsx +0 -35
  204. package/src/components/CommandsDialog/index.ts +0 -6
  205. package/src/components/NavTreeContainer.tsx +0 -339
  206. package/src/events.ts +0 -11
  207. package/src/hooks.ts +0 -21
  208. /package/dist/types/src/{components/CommandsDialog → containers/CommandsTrigger}/CommandsTrigger.d.ts +0 -0
package/package.json CHANGED
@@ -1,89 +1,109 @@
1
1
  {
2
2
  "name": "@dxos/plugin-navtree",
3
- "version": "0.8.4-main.a4bbb77",
3
+ "version": "0.8.4-main.abd8ff62ef",
4
4
  "description": "DXOS Surface plugin for a tree view visualization of the graph.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/dxos/dxos"
10
+ },
7
11
  "license": "MIT",
8
12
  "author": "DXOS.org",
9
13
  "sideEffects": true,
10
14
  "type": "module",
15
+ "imports": {
16
+ "#plugin": {
17
+ "browser": "./src/NavTreePlugin.tsx",
18
+ "node": "./src/NavTreePlugin.node.ts",
19
+ "default": "./src/NavTreePlugin.tsx"
20
+ },
21
+ "#capabilities": "./src/capabilities/index.ts",
22
+ "#components": "./src/components/index.ts",
23
+ "#containers": "./src/containers/index.ts",
24
+ "#hooks": "./src/hooks/index.ts",
25
+ "#meta": "./src/meta.ts",
26
+ "#operations": "./src/operations/index.ts",
27
+ "#testing": "./src/testing/index.ts",
28
+ "#translations": "./src/translations.ts",
29
+ "#types": "./src/types/index.ts"
30
+ },
11
31
  "exports": {
12
32
  ".": {
13
33
  "source": "./src/index.ts",
14
34
  "types": "./dist/types/src/index.d.ts",
15
35
  "browser": "./dist/lib/browser/index.mjs"
36
+ },
37
+ "./translations": {
38
+ "source": "./src/translations.ts",
39
+ "types": "./dist/types/src/translations.d.ts",
40
+ "browser": "./dist/lib/browser/translations.mjs",
41
+ "node": "./dist/lib/node-esm/translations.mjs"
16
42
  }
17
43
  },
18
44
  "types": "dist/types/src/index.d.ts",
19
- "typesVersions": {
20
- "*": {}
21
- },
22
45
  "files": [
23
46
  "dist",
24
47
  "src"
25
48
  ],
26
49
  "dependencies": {
27
- "@atlaskit/pragmatic-drag-and-drop": "^1.4.0",
28
- "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3",
29
- "@preact-signals/safe-react": "^0.9.0",
30
- "@preact/signals-core": "^1.12.1",
50
+ "@atlaskit/pragmatic-drag-and-drop": "1.7.7",
51
+ "@atlaskit/pragmatic-drag-and-drop-hitbox": "1.1.0",
31
52
  "@radix-ui/react-dismissable-layer": "1.1.5",
32
53
  "@radix-ui/react-use-controllable-state": "1.1.0",
33
- "date-fns": "^3.3.1",
34
- "@dxos/app-framework": "0.8.4-main.a4bbb77",
35
- "@dxos/app-graph": "0.8.4-main.a4bbb77",
36
- "@dxos/async": "0.8.4-main.a4bbb77",
37
- "@dxos/echo": "0.8.4-main.a4bbb77",
38
- "@dxos/debug": "0.8.4-main.a4bbb77",
39
- "@dxos/echo-schema": "0.8.4-main.a4bbb77",
40
- "@dxos/invariant": "0.8.4-main.a4bbb77",
41
- "@dxos/keyboard": "0.8.4-main.a4bbb77",
42
- "@dxos/lit-ui": "0.8.4-main.a4bbb77",
43
- "@dxos/live-object": "0.8.4-main.a4bbb77",
44
- "@dxos/local-storage": "0.8.4-main.a4bbb77",
45
- "@dxos/log": "0.8.4-main.a4bbb77",
46
- "@dxos/plugin-deck": "0.8.4-main.a4bbb77",
47
- "@dxos/plugin-graph": "0.8.4-main.a4bbb77",
48
- "@dxos/plugin-observability": "0.8.4-main.a4bbb77",
49
- "@dxos/protocols": "0.8.4-main.a4bbb77",
50
- "@dxos/react-client": "0.8.4-main.a4bbb77",
51
- "@dxos/react-ui-attention": "0.8.4-main.a4bbb77",
52
- "@dxos/react-ui-list": "0.8.4-main.a4bbb77",
53
- "@dxos/react-ui-menu": "0.8.4-main.a4bbb77",
54
- "@dxos/react-ui-searchlist": "0.8.4-main.a4bbb77",
55
- "@dxos/react-ui-stack": "0.8.4-main.a4bbb77",
56
- "@dxos/react-ui-tabs": "0.8.4-main.a4bbb77",
57
- "@dxos/util": "0.8.4-main.a4bbb77"
54
+ "date-fns": "^3.6.0",
55
+ "@dxos/app-framework": "0.8.4-main.abd8ff62ef",
56
+ "@dxos/app-toolkit": "0.8.4-main.abd8ff62ef",
57
+ "@dxos/async": "0.8.4-main.abd8ff62ef",
58
+ "@dxos/app-graph": "0.8.4-main.abd8ff62ef",
59
+ "@dxos/debug": "0.8.4-main.abd8ff62ef",
60
+ "@dxos/compute": "0.8.4-main.abd8ff62ef",
61
+ "@dxos/invariant": "0.8.4-main.abd8ff62ef",
62
+ "@dxos/echo": "0.8.4-main.abd8ff62ef",
63
+ "@dxos/keyboard": "0.8.4-main.abd8ff62ef",
64
+ "@dxos/log": "0.8.4-main.abd8ff62ef",
65
+ "@dxos/lit-ui": "0.8.4-main.abd8ff62ef",
66
+ "@dxos/plugin-deck": "0.8.4-main.abd8ff62ef",
67
+ "@dxos/plugin-graph": "0.8.4-main.abd8ff62ef",
68
+ "@dxos/plugin-observability": "0.8.4-main.abd8ff62ef",
69
+ "@dxos/protocols": "0.8.4-main.abd8ff62ef",
70
+ "@dxos/react-client": "0.8.4-main.abd8ff62ef",
71
+ "@dxos/react-ui-attention": "0.8.4-main.abd8ff62ef",
72
+ "@dxos/react-ui-list": "0.8.4-main.abd8ff62ef",
73
+ "@dxos/react-ui-menu": "0.8.4-main.abd8ff62ef",
74
+ "@dxos/react-ui-mosaic": "0.8.4-main.abd8ff62ef",
75
+ "@dxos/react-ui-search": "0.8.4-main.abd8ff62ef",
76
+ "@dxos/react-ui-tabs": "0.8.4-main.abd8ff62ef",
77
+ "@dxos/react-ui-stack": "0.8.4-main.abd8ff62ef",
78
+ "@dxos/util": "0.8.4-main.abd8ff62ef"
58
79
  },
59
80
  "devDependencies": {
60
- "@effect-rx/rx-react": "0.42.4",
61
- "@effect/platform": "0.92.1",
62
- "@types/react": "~19.2.0",
63
- "@types/react-dom": "~19.2.0",
64
- "effect": "3.18.3",
65
- "react": "~19.2.0",
66
- "react-dom": "~19.2.0",
67
- "vite": "7.1.9",
68
- "@dxos/echo-signals": "0.8.4-main.a4bbb77",
69
- "@dxos/plugin-attention": "0.8.4-main.a4bbb77",
70
- "@dxos/plugin-client": "0.8.4-main.a4bbb77",
71
- "@dxos/plugin-space": "0.8.4-main.a4bbb77",
72
- "@dxos/plugin-storybook-layout": "0.8.4-main.a4bbb77",
73
- "@dxos/plugin-theme": "0.8.4-main.a4bbb77",
74
- "@dxos/random": "0.8.4-main.a4bbb77",
75
- "@dxos/react-ui": "0.8.4-main.a4bbb77",
76
- "@dxos/react-ui-theme": "0.8.4-main.a4bbb77",
77
- "@dxos/storybook-utils": "0.8.4-main.a4bbb77"
81
+ "@effect-atom/atom-react": "^0.5.0",
82
+ "@effect/platform": "0.94.4",
83
+ "@types/react": "~19.2.7",
84
+ "@types/react-dom": "~19.2.3",
85
+ "effect": "3.20.0",
86
+ "react": "~19.2.3",
87
+ "react-dom": "~19.2.3",
88
+ "vite": "^8.0.10",
89
+ "@dxos/plugin-attention": "0.8.4-main.abd8ff62ef",
90
+ "@dxos/plugin-space": "0.8.4-main.abd8ff62ef",
91
+ "@dxos/plugin-client": "0.8.4-main.abd8ff62ef",
92
+ "@dxos/plugin-testing": "0.8.4-main.abd8ff62ef",
93
+ "@dxos/plugin-theme": "0.8.4-main.abd8ff62ef",
94
+ "@dxos/random": "0.8.4-main.abd8ff62ef",
95
+ "@dxos/react-ui": "0.8.4-main.abd8ff62ef",
96
+ "@dxos/storybook-utils": "0.8.4-main.abd8ff62ef",
97
+ "@dxos/ui-theme": "0.8.4-main.abd8ff62ef"
78
98
  },
79
99
  "peerDependencies": {
80
- "@effect-rx/rx-react": "^0.34.1",
81
- "@effect/platform": "^0.80.12",
82
- "effect": "^3.13.3",
83
- "react": "^19.0.0",
84
- "react-dom": "^19.0.0",
85
- "@dxos/react-ui": "0.8.4-main.a4bbb77",
86
- "@dxos/react-ui-theme": "0.8.4-main.a4bbb77"
100
+ "@effect-atom/atom-react": "^0.5.0",
101
+ "@effect/platform": "0.94.4",
102
+ "effect": "3.20.0",
103
+ "react": "~19.2.3",
104
+ "react-dom": "~19.2.3",
105
+ "@dxos/ui-theme": "0.8.4-main.abd8ff62ef",
106
+ "@dxos/react-ui": "0.8.4-main.abd8ff62ef"
87
107
  },
88
108
  "publishConfig": {
89
109
  "access": "public"
@@ -0,0 +1,37 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Plugin } from '@dxos/app-framework';
6
+ import { AppPlugin } from '@dxos/app-toolkit';
7
+ import { type TreeData } from '@dxos/react-ui-list';
8
+
9
+ import { AppGraphBuilder, OperationHandler } from '#capabilities';
10
+ import { meta } from '#meta';
11
+
12
+ const NODE_TYPE = 'dxos/app-graph/node';
13
+
14
+ export const NavTreePlugin = Plugin.define(meta).pipe(
15
+ AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
16
+ AppPlugin.addMetadataModule({
17
+ metadata: {
18
+ id: NODE_TYPE,
19
+ metadata: {
20
+ parse: ({ item }: TreeData, type: string) => {
21
+ switch (type) {
22
+ case 'node':
23
+ return item;
24
+ case 'object':
25
+ return item.data;
26
+ case 'view-object':
27
+ return { id: `${item.id}-view`, object: item.data };
28
+ }
29
+ },
30
+ },
31
+ },
32
+ }),
33
+ AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
34
+ Plugin.make,
35
+ );
36
+
37
+ export default NavTreePlugin;
@@ -0,0 +1,29 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { describe, test } from 'vitest';
6
+
7
+ import { ActivationEvents } from '@dxos/app-framework';
8
+ import { createComposerTestApp } from '@dxos/plugin-testing/harness';
9
+
10
+ import { NavTreePlugin } from '#plugin';
11
+
12
+ import { meta } from './meta';
13
+
14
+ const moduleId = (name: string) => `${meta.id}.module.${name}`;
15
+
16
+ describe('NavTreePlugin', () => {
17
+ test('modules activate on the expected events', async ({ expect }) => {
18
+ await using harness = await createComposerTestApp({
19
+ plugins: [NavTreePlugin()],
20
+ });
21
+
22
+ expect(harness.manager.getActive()).toEqual(
23
+ expect.arrayContaining([moduleId('AppGraphBuilder'), moduleId('metadata')]),
24
+ );
25
+
26
+ await harness.fire(ActivationEvents.SetupOperationHandler);
27
+ expect(harness.manager.getActive()).toContain(moduleId('OperationHandler'));
28
+ });
29
+ });
@@ -2,93 +2,76 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import {
6
- Capabilities,
7
- Events,
8
- LayoutAction,
9
- allOf,
10
- contributes,
11
- createIntent,
12
- defineModule,
13
- definePlugin,
14
- } from '@dxos/app-framework';
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { ActivationEvent, ActivationEvents, Capabilities, Capability, Plugin } from '@dxos/app-framework';
8
+ import { AppActivationEvents, AppCapabilities, AppPlugin, LayoutOperation } from '@dxos/app-toolkit';
9
+ import { Graph } from '@dxos/plugin-graph';
15
10
  import { type TreeData } from '@dxos/react-ui-list';
16
11
 
17
- import { AppGraphBuilder, IntentResolver, Keyboard, ReactSurface, State } from './capabilities';
18
- import { NODE_TYPE } from './components';
19
- import { NavTreeEvents } from './events';
20
- import { meta } from './meta';
21
- import { translations } from './translations';
12
+ import { AppGraphBuilder, Keyboard, OperationHandler, ReactSurface, State } from '#capabilities';
13
+ import { NODE_TYPE } from '#containers';
14
+ import { meta } from '#meta';
15
+ import { translations } from '#translations';
16
+ import { NavTreeEvents } from '#types';
22
17
 
23
- export const NavTreePlugin = definePlugin(meta, () => [
24
- defineModule({
25
- id: `${meta.id}/module/state`,
26
- activatesOn: Events.LayoutReady,
27
- activatesAfter: [NavTreeEvents.StateReady],
28
- activate: State,
29
- }),
30
- defineModule({
31
- id: `${meta.id}/module/translations`,
32
- activatesOn: Events.SetupTranslations,
33
- activate: () => contributes(Capabilities.Translations, translations),
34
- }),
35
- defineModule({
36
- id: `${meta.id}/module/metadata`,
37
- activatesOn: Events.SetupMetadata,
38
- activate: () =>
39
- contributes(Capabilities.Metadata, {
40
- id: NODE_TYPE,
41
- metadata: {
42
- parse: ({ item }: TreeData, type: string) => {
43
- switch (type) {
44
- case 'node':
45
- return item;
46
- case 'object':
47
- return item.data;
48
- case 'view-object':
49
- return { id: `${item.id}-view`, object: item.data };
50
- }
51
- },
18
+ export const NavTreePlugin = Plugin.define(meta).pipe(
19
+ AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
20
+ AppPlugin.addMetadataModule({
21
+ metadata: {
22
+ id: NODE_TYPE,
23
+ metadata: {
24
+ parse: ({ item }: TreeData, type: string) => {
25
+ switch (type) {
26
+ case 'node':
27
+ return item;
28
+ case 'object':
29
+ return item.data;
30
+ case 'view-object':
31
+ return { id: `${item.id}-view`, object: item.data };
32
+ }
52
33
  },
53
- }),
34
+ },
35
+ },
36
+ }),
37
+ AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
38
+ AppPlugin.addSurfaceModule({ activate: ReactSurface }),
39
+ AppPlugin.addTranslationsModule({ translations }),
40
+ Plugin.addModule({
41
+ id: 'state',
42
+ activatesOn: AppActivationEvents.LayoutReady,
43
+ firesAfterActivation: [NavTreeEvents.StateReady],
44
+ activate: State,
54
45
  }),
55
- defineModule({
56
- id: `${meta.id}/module/expose`,
57
- activatesOn: allOf(Events.DispatcherReady, Events.AppGraphReady, Events.LayoutReady, NavTreeEvents.StateReady),
58
- activate: async (context) => {
59
- const layout = context.getCapability(Capabilities.Layout);
60
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
61
- const { graph } = context.getCapability(Capabilities.AppGraph);
62
- if (dispatch && layout.active.length === 1) {
46
+ Plugin.addModule({
47
+ id: 'expose',
48
+ activatesOn: ActivationEvent.allOf(
49
+ ActivationEvents.OperationInvokerReady,
50
+ AppActivationEvents.AppGraphReady,
51
+ AppActivationEvents.LayoutReady,
52
+ NavTreeEvents.StateReady,
53
+ ),
54
+ activate: Effect.fnUntraced(function* () {
55
+ const layout = yield* Capabilities.getAtomValue(AppCapabilities.Layout);
56
+ const { invokePromise } = yield* Capability.get(Capabilities.OperationInvoker);
57
+ const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
58
+ if (invokePromise && layout.active.length === 1) {
63
59
  // TODO(wittjosiah): This should really be fired once the navtree renders for the first time.
64
60
  // That is the point at which the graph is expanded and the path should be available.
65
- void graph
66
- .waitForPath({ target: layout.active[0] }, { timeout: 30_000 })
67
- .then(() => dispatch(createIntent(LayoutAction.Expose, { part: 'navigation', subject: layout.active[0] })))
61
+ void Graph.waitForPath(graph, { target: layout.active[0] }, { timeout: 30_000 })
62
+ .then(() => invokePromise(LayoutOperation.Expose, { subject: layout.active[0] }))
68
63
  .catch(() => {});
69
64
  }
70
65
 
71
66
  return [];
72
- },
67
+ }),
73
68
  }),
74
- defineModule({
75
- id: `${meta.id}/module/keyboard`,
76
- activatesOn: Events.AppGraphReady,
69
+ Plugin.addModule({
70
+ id: 'keyboard',
71
+ activatesOn: ActivationEvent.allOf(AppActivationEvents.AppGraphReady, ActivationEvents.OperationInvokerReady),
77
72
  activate: Keyboard,
78
73
  }),
79
- defineModule({
80
- id: `${meta.id}/module/react-surface`,
81
- activatesOn: Events.SetupReactSurface,
82
- activate: ReactSurface,
83
- }),
84
- defineModule({
85
- id: `${meta.id}/module/intent-resolver`,
86
- activatesOn: Events.SetupIntentResolver,
87
- activate: IntentResolver,
88
- }),
89
- defineModule({
90
- id: `${meta.id}/module/app-graph-builder`,
91
- activatesOn: Events.SetupAppGraph,
92
- activate: AppGraphBuilder,
93
- }),
94
- ]);
74
+ Plugin.make,
75
+ );
76
+
77
+ export default NavTreePlugin;
@@ -2,51 +2,41 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Rx } from '@effect-rx/rx-react';
6
- import { Option, pipe } from 'effect';
5
+ import * as Effect from 'effect/Effect';
7
6
 
8
- import { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
9
- import { ROOT_ID, createExtension } from '@dxos/plugin-graph';
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
9
+ import { Operation } from '@dxos/compute';
10
+ import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
10
11
 
11
- import { COMMANDS_DIALOG, meta } from '../meta';
12
+ import { COMMANDS_DIALOG, meta } from '#meta';
12
13
 
13
- export default (context: PluginContext) =>
14
- contributes(
15
- Capabilities.AppGraphBuilder,
16
- createExtension({
17
- id: meta.id,
18
- actions: (node) =>
19
- Rx.make((get) =>
20
- pipe(
21
- get(node),
22
- Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
23
- Option.map(() => [
24
- {
25
- id: COMMANDS_DIALOG,
26
- data: async () => {
27
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
28
- await dispatch(
29
- createIntent(LayoutAction.UpdateDialog, {
30
- part: 'dialog',
31
- subject: COMMANDS_DIALOG,
32
- options: {
33
- blockAlign: 'start',
34
- },
35
- }),
36
- );
37
- },
38
- properties: {
39
- label: ['open commands label', { ns: meta.id }],
40
- icon: 'ph--magnifying-glass--regular',
41
- keyBinding: {
42
- macos: 'meta+k',
43
- windows: 'ctrl+k',
44
- },
45
- },
14
+ export default Capability.makeModule(
15
+ Effect.fnUntraced(function* () {
16
+ const extensions = yield* GraphBuilder.createExtension({
17
+ id: 'root',
18
+ match: NodeMatcher.whenRoot,
19
+ actions: () =>
20
+ Effect.succeed([
21
+ Node.makeAction({
22
+ id: COMMANDS_DIALOG,
23
+ data: () =>
24
+ Operation.invoke(LayoutOperation.UpdateDialog, {
25
+ subject: COMMANDS_DIALOG,
26
+ blockAlign: 'start',
27
+ }),
28
+ properties: {
29
+ label: ['open-commands.label', { ns: meta.id }],
30
+ icon: 'ph--magnifying-glass--regular',
31
+ keyBinding: {
32
+ macos: 'meta+k',
33
+ windows: 'ctrl+k',
46
34
  },
47
- ]),
48
- Option.getOrElse(() => []),
49
- ),
50
- ),
51
- }),
52
- );
35
+ },
36
+ }),
37
+ ]),
38
+ });
39
+
40
+ return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
41
+ }),
42
+ );
@@ -2,12 +2,14 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { lazy } from '@dxos/app-framework';
5
+ import { Capability } from '@dxos/app-framework';
6
+ import { OperationHandlerSet } from '@dxos/compute';
6
7
 
7
- export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
8
- export const IntentResolver = lazy(() => import('./intent-resolver'));
9
- export const Keyboard = lazy(() => import('./keyboard'));
10
- export const ReactSurface = lazy(() => import('./react-surface'));
11
- export const State = lazy(() => import('./state'));
12
-
13
- export * from './capabilities';
8
+ export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
9
+ export const Keyboard = Capability.lazy('Keyboard', () => import('./keyboard'));
10
+ export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
11
+ 'OperationHandler',
12
+ () => import('./operation-handler'),
13
+ );
14
+ export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
15
+ export const State = Capability.lazy('State', () => import('./state'));
@@ -2,58 +2,65 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities as AppCapabilities, type PluginContext, contributes } from '@dxos/app-framework';
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities, Capability } from '@dxos/app-framework';
8
+ import { AppCapabilities } from '@dxos/app-toolkit';
6
9
  import { debounce } from '@dxos/async';
7
10
  import { Keyboard } from '@dxos/keyboard';
8
- import { type Node, isAction } from '@dxos/plugin-graph';
11
+ import { Graph, Node, runAction } from '@dxos/plugin-graph';
9
12
  import { getHostPlatform } from '@dxos/util';
10
13
 
11
- import { KEY_BINDING } from '../meta';
12
-
13
- export default (context: PluginContext) => {
14
- const { graph } = context.getCapability(AppCapabilities.AppGraph);
15
-
16
- // TODO(wittjosiah): Factor out.
17
- // TODO(wittjosiah): Handle removal of actions.
18
- const visitor = (node: Node, path: string[]) => {
19
- let shortcut: string | undefined;
20
- if (typeof node.properties.keyBinding === 'object') {
21
- const availablePlatforms = Object.keys(node.properties.keyBinding);
22
- const platform = getHostPlatform();
23
- shortcut = availablePlatforms.includes(platform)
24
- ? node.properties.keyBinding[platform]
25
- : platform === 'ios'
26
- ? node.properties.keyBinding.macos // Fallback to macos if ios-specific bindings not provided.
27
- : platform === 'linux' || platform === 'unknown'
28
- ? node.properties.keyBinding.windows // Fallback to windows if platform-specific bindings not provided.
29
- : undefined;
30
- } else {
31
- shortcut = node.properties.keyBinding;
32
- }
33
-
34
- if (shortcut && isAction(node)) {
35
- Keyboard.singleton.getContext(path.slice(0, -1).join('/')).bind({
36
- shortcut,
37
- handler: () => {
38
- void node.data({ parent: node, caller: KEY_BINDING });
39
- },
40
- data: node.properties.label,
41
- });
42
- }
43
- };
44
-
45
- const eventHandler = debounce(() => {
46
- graph.traverse({ visitor });
47
- }, 500);
48
-
49
- const unsubscribe = graph.onNodeChanged.on(eventHandler);
50
-
51
- // TODO(burdon): Create context and plugin.
52
- Keyboard.singleton.initialize();
53
- Keyboard.singleton.setCurrentContext(graph.root.id);
54
-
55
- return contributes(AppCapabilities.Null, null, () => {
56
- unsubscribe();
57
- Keyboard.singleton.destroy();
58
- });
59
- };
14
+ import { KEY_BINDING } from '#meta';
15
+
16
+ export default Capability.makeModule(
17
+ Effect.fnUntraced(function* () {
18
+ const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
19
+ const invoker = yield* Capability.get(Capabilities.OperationInvoker);
20
+ const pluginContext = yield* Capability.Service;
21
+
22
+ // TODO(wittjosiah): Factor out.
23
+ // TODO(wittjosiah): Handle removal of actions.
24
+ const visitor = (node: Node.Node, path: string[]) => {
25
+ let shortcut: string | undefined;
26
+ if (typeof node.properties.keyBinding === 'object') {
27
+ const availablePlatforms = Object.keys(node.properties.keyBinding);
28
+ const platform = getHostPlatform();
29
+ shortcut = availablePlatforms.includes(platform)
30
+ ? node.properties.keyBinding[platform]
31
+ : platform === 'ios'
32
+ ? node.properties.keyBinding.macos // Fallback to macos if ios-specific bindings not provided.
33
+ : platform === 'linux' || platform === 'unknown'
34
+ ? node.properties.keyBinding.windows // Fallback to windows if platform-specific bindings not provided.
35
+ : undefined;
36
+ } else {
37
+ shortcut = node.properties.keyBinding;
38
+ }
39
+
40
+ if (shortcut && Node.isAction(node)) {
41
+ Keyboard.singleton.getContext(path.slice(0, -1).join('/')).bind({
42
+ shortcut,
43
+ handler: () => void runAction(invoker, pluginContext, node, { parent: node, caller: KEY_BINDING }),
44
+ data: node.properties.label,
45
+ });
46
+ }
47
+ };
48
+
49
+ const eventHandler = debounce(() => {
50
+ Graph.traverse(graph, { relation: ['child', 'action'], visitor });
51
+ }, 500);
52
+
53
+ const unsubscribe = graph.onNodeChanged.on(eventHandler);
54
+
55
+ // TODO(burdon): Create context and plugin.
56
+ Keyboard.singleton.initialize();
57
+ Keyboard.singleton.setCurrentContext(Node.RootId);
58
+
59
+ return Capability.contributes(Capabilities.Null, null, () =>
60
+ Effect.sync(() => {
61
+ unsubscribe();
62
+ Keyboard.singleton.destroy();
63
+ }),
64
+ );
65
+ }),
66
+ );
@@ -0,0 +1,16 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities, Capability } from '@dxos/app-framework';
8
+ import type { OperationHandlerSet } from '@dxos/compute';
9
+
10
+ import { NavTreeOperationHandlerSet } from '#operations';
11
+
12
+ export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
13
+ Effect.fnUntraced(function* () {
14
+ return Capability.contributes(Capabilities.OperationHandler, NavTreeOperationHandlerSet);
15
+ }),
16
+ );