@dxos/plugin-explorer 0.8.4-main.dedc0f3 → 0.8.4-main.dfabb4ec29

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 (194) hide show
  1. package/dist/lib/neutral/ExplorerContainer-5TOK2ZEY.mjs +40 -0
  2. package/dist/lib/neutral/ExplorerContainer-5TOK2ZEY.mjs.map +7 -0
  3. package/dist/lib/neutral/ExplorerPlugin.mjs +26 -0
  4. package/dist/lib/neutral/ExplorerPlugin.mjs.map +7 -0
  5. package/dist/lib/neutral/capabilities/index.mjs +11 -0
  6. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  7. package/dist/lib/neutral/chunk-5X5ATGCS.mjs +73 -0
  8. package/dist/lib/neutral/chunk-5X5ATGCS.mjs.map +7 -0
  9. package/dist/lib/neutral/chunk-HPIS2WXY.mjs +24 -0
  10. package/dist/lib/neutral/chunk-HPIS2WXY.mjs.map +7 -0
  11. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  12. package/dist/lib/{browser/chunk-VNOGW2JS.mjs → neutral/components/index.mjs} +344 -411
  13. package/dist/lib/{node-esm/chunk-ODMJ7DPA.mjs.map → neutral/components/index.mjs.map} +4 -4
  14. package/dist/lib/neutral/containers/index.mjs +9 -0
  15. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  16. package/dist/lib/neutral/create-object-F6TKVAGV.mjs +39 -0
  17. package/dist/lib/neutral/create-object-F6TKVAGV.mjs.map +7 -0
  18. package/dist/lib/neutral/hooks/index.mjs +40 -0
  19. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  20. package/dist/lib/neutral/index.mjs +14 -0
  21. package/dist/lib/neutral/meta.json +1 -0
  22. package/dist/lib/{browser → neutral}/meta.mjs +2 -3
  23. package/dist/lib/neutral/plugin.mjs +12 -0
  24. package/dist/lib/neutral/plugin.mjs.map +7 -0
  25. package/dist/lib/neutral/react-surface-U3JEY7V7.mjs +26 -0
  26. package/dist/lib/neutral/react-surface-U3JEY7V7.mjs.map +7 -0
  27. package/dist/lib/neutral/translations.mjs +33 -0
  28. package/dist/lib/neutral/translations.mjs.map +7 -0
  29. package/dist/lib/neutral/types/index.mjs +10 -0
  30. package/dist/types/data/cities.d.ts +4 -4
  31. package/dist/types/data/cities.d.ts.map +1 -1
  32. package/dist/types/data/countries-110m.d.ts +19 -22
  33. package/dist/types/data/countries-110m.d.ts.map +1 -1
  34. package/dist/types/src/ExplorerPlugin.d.ts +3 -1
  35. package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
  36. package/dist/types/src/ExplorerPlugin.test.d.ts +2 -0
  37. package/dist/types/src/ExplorerPlugin.test.d.ts.map +1 -0
  38. package/dist/types/src/capabilities/create-object.d.ts +11 -0
  39. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  40. package/dist/types/src/capabilities/index.d.ts +8 -2
  41. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  42. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  43. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  44. package/dist/types/src/components/Chart/Chart.d.ts.map +1 -1
  45. package/dist/types/src/components/Chart/Chart.stories.d.ts +7 -2
  46. package/dist/types/src/components/Chart/Chart.stories.d.ts.map +1 -1
  47. package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
  48. package/dist/types/src/components/Globe/Globe.stories.d.ts +8 -3
  49. package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
  50. package/dist/types/src/components/Graph/CanvasForceGraph.d.ts +13 -0
  51. package/dist/types/src/components/Graph/CanvasForceGraph.d.ts.map +1 -0
  52. package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts +17 -0
  53. package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts.map +1 -0
  54. package/dist/types/src/components/Graph/ForceGraph.d.ts +12 -5
  55. package/dist/types/src/components/Graph/ForceGraph.d.ts.map +1 -1
  56. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts +7 -3
  57. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts.map +1 -1
  58. package/dist/types/src/components/Graph/{adapter.d.ts → graph-adapter.d.ts} +2 -2
  59. package/dist/types/src/components/Graph/graph-adapter.d.ts.map +1 -0
  60. package/dist/types/src/components/Graph/index.d.ts +1 -1
  61. package/dist/types/src/components/Graph/index.d.ts.map +1 -1
  62. package/dist/types/src/components/Graph/testing.d.ts.map +1 -1
  63. package/dist/types/src/components/Tree/Tree.d.ts.map +1 -1
  64. package/dist/types/src/components/Tree/Tree.stories.d.ts +5 -2
  65. package/dist/types/src/components/Tree/Tree.stories.d.ts.map +1 -1
  66. package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts.map +1 -1
  67. package/dist/types/src/components/Tree/layout/RadialTree.d.ts.map +1 -1
  68. package/dist/types/src/components/Tree/layout/TidyTree.d.ts.map +1 -1
  69. package/dist/types/src/components/Tree/testing/generator.d.ts.map +1 -1
  70. package/dist/types/src/components/Tree/types/tree.d.ts +19 -17
  71. package/dist/types/src/components/Tree/types/tree.d.ts.map +1 -1
  72. package/dist/types/src/components/Tree/types/types.d.ts +1 -1
  73. package/dist/types/src/components/Tree/types/types.d.ts.map +1 -1
  74. package/dist/types/src/components/index.d.ts +0 -4
  75. package/dist/types/src/components/index.d.ts.map +1 -1
  76. package/dist/types/src/components/plot.d.ts.map +1 -1
  77. package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts +6 -0
  78. package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts.map +1 -0
  79. package/dist/types/src/containers/ExplorerContainer/index.d.ts +2 -0
  80. package/dist/types/src/containers/ExplorerContainer/index.d.ts.map +1 -0
  81. package/dist/types/src/containers/index.d.ts +3 -0
  82. package/dist/types/src/containers/index.d.ts.map +1 -0
  83. package/dist/types/src/hooks/useGraphModel.d.ts.map +1 -1
  84. package/dist/types/src/index.d.ts +1 -3
  85. package/dist/types/src/index.d.ts.map +1 -1
  86. package/dist/types/src/meta.d.ts +2 -3
  87. package/dist/types/src/meta.d.ts.map +1 -1
  88. package/dist/types/src/plugin.d.ts +3 -0
  89. package/dist/types/src/plugin.d.ts.map +1 -0
  90. package/dist/types/src/translations.d.ts +34 -13
  91. package/dist/types/src/translations.d.ts.map +1 -1
  92. package/dist/types/src/types/ExplorerAction.d.ts +6 -0
  93. package/dist/types/src/types/ExplorerAction.d.ts.map +1 -0
  94. package/dist/types/src/types/Graph.d.ts +23 -0
  95. package/dist/types/src/types/Graph.d.ts.map +1 -0
  96. package/dist/types/src/types/index.d.ts +2 -2
  97. package/dist/types/src/types/index.d.ts.map +1 -1
  98. package/dist/types/tsconfig.tsbuildinfo +1 -1
  99. package/package.json +107 -59
  100. package/src/ExplorerPlugin.test.ts +26 -0
  101. package/src/ExplorerPlugin.tsx +15 -54
  102. package/src/capabilities/create-object.ts +36 -0
  103. package/src/capabilities/index.ts +3 -3
  104. package/src/capabilities/react-surface.tsx +24 -15
  105. package/src/components/Chart/Chart.stories.tsx +19 -25
  106. package/src/components/Globe/Globe.stories.tsx +22 -24
  107. package/src/components/Graph/CanvasForceGraph.stories.tsx +83 -0
  108. package/src/components/Graph/CanvasForceGraph.tsx +124 -0
  109. package/src/components/Graph/ForceGraph.stories.tsx +83 -35
  110. package/src/components/Graph/ForceGraph.tsx +104 -85
  111. package/src/components/Graph/{adapter.ts → graph-adapter.ts} +14 -8
  112. package/src/components/Graph/index.ts +1 -1
  113. package/src/components/Graph/testing.ts +11 -8
  114. package/src/components/Tree/Tree.stories.tsx +44 -38
  115. package/src/components/Tree/Tree.tsx +10 -5
  116. package/src/components/Tree/testing/generator.ts +4 -2
  117. package/src/components/Tree/types/tree.test.ts +7 -6
  118. package/src/components/Tree/types/tree.ts +42 -21
  119. package/src/components/Tree/types/types.ts +1 -1
  120. package/src/components/index.ts +0 -4
  121. package/src/containers/ExplorerContainer/ExplorerContainer.tsx +51 -0
  122. package/src/containers/ExplorerContainer/index.ts +5 -0
  123. package/src/containers/index.ts +7 -0
  124. package/src/hooks/useGraphModel.ts +17 -10
  125. package/src/index.ts +1 -4
  126. package/src/meta.ts +9 -6
  127. package/src/plugin.ts +9 -0
  128. package/src/translations.ts +17 -12
  129. package/src/types/ExplorerAction.ts +20 -0
  130. package/src/types/Graph.ts +49 -0
  131. package/src/types/index.ts +2 -2
  132. package/src/typings.d.ts +8 -0
  133. package/dist/lib/browser/ExplorerContainer-7MTDS2TQ.mjs +0 -37
  134. package/dist/lib/browser/ExplorerContainer-7MTDS2TQ.mjs.map +0 -7
  135. package/dist/lib/browser/chunk-2MKBRIUT.mjs +0 -31
  136. package/dist/lib/browser/chunk-2MKBRIUT.mjs.map +0 -7
  137. package/dist/lib/browser/chunk-3YITRGGW.mjs +0 -203
  138. package/dist/lib/browser/chunk-3YITRGGW.mjs.map +0 -7
  139. package/dist/lib/browser/chunk-CZZ3DDR7.mjs +0 -38
  140. package/dist/lib/browser/chunk-CZZ3DDR7.mjs.map +0 -7
  141. package/dist/lib/browser/chunk-UL5EDJPE.mjs +0 -21
  142. package/dist/lib/browser/chunk-UL5EDJPE.mjs.map +0 -7
  143. package/dist/lib/browser/chunk-VNOGW2JS.mjs.map +0 -7
  144. package/dist/lib/browser/index.mjs +0 -112
  145. package/dist/lib/browser/index.mjs.map +0 -7
  146. package/dist/lib/browser/intent-resolver-7MVEYNX7.mjs +0 -24
  147. package/dist/lib/browser/intent-resolver-7MVEYNX7.mjs.map +0 -7
  148. package/dist/lib/browser/meta.json +0 -1
  149. package/dist/lib/browser/react-surface-VLGQKYBI.mjs +0 -31
  150. package/dist/lib/browser/react-surface-VLGQKYBI.mjs.map +0 -7
  151. package/dist/lib/browser/types/index.mjs +0 -10
  152. package/dist/lib/node-esm/ExplorerContainer-OBSRVHZZ.mjs +0 -38
  153. package/dist/lib/node-esm/ExplorerContainer-OBSRVHZZ.mjs.map +0 -7
  154. package/dist/lib/node-esm/chunk-3ODK27PU.mjs +0 -33
  155. package/dist/lib/node-esm/chunk-3ODK27PU.mjs.map +0 -7
  156. package/dist/lib/node-esm/chunk-4GWDNZ4Z.mjs +0 -39
  157. package/dist/lib/node-esm/chunk-4GWDNZ4Z.mjs.map +0 -7
  158. package/dist/lib/node-esm/chunk-GFYXDQQV.mjs +0 -205
  159. package/dist/lib/node-esm/chunk-GFYXDQQV.mjs.map +0 -7
  160. package/dist/lib/node-esm/chunk-ODMJ7DPA.mjs +0 -11343
  161. package/dist/lib/node-esm/chunk-PIAXA43R.mjs +0 -23
  162. package/dist/lib/node-esm/chunk-PIAXA43R.mjs.map +0 -7
  163. package/dist/lib/node-esm/index.mjs +0 -113
  164. package/dist/lib/node-esm/index.mjs.map +0 -7
  165. package/dist/lib/node-esm/intent-resolver-NL3SR2XF.mjs +0 -25
  166. package/dist/lib/node-esm/intent-resolver-NL3SR2XF.mjs.map +0 -7
  167. package/dist/lib/node-esm/meta.json +0 -1
  168. package/dist/lib/node-esm/meta.mjs +0 -10
  169. package/dist/lib/node-esm/react-surface-BYJABDS5.mjs +0 -32
  170. package/dist/lib/node-esm/react-surface-BYJABDS5.mjs.map +0 -7
  171. package/dist/lib/node-esm/types/index.mjs +0 -11
  172. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  173. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  174. package/dist/types/src/components/ExplorerContainer.d.ts +0 -9
  175. package/dist/types/src/components/ExplorerContainer.d.ts.map +0 -1
  176. package/dist/types/src/components/Graph/D3ForceGraph.d.ts +0 -14
  177. package/dist/types/src/components/Graph/D3ForceGraph.d.ts.map +0 -1
  178. package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts +0 -20
  179. package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts.map +0 -1
  180. package/dist/types/src/components/Graph/adapter.d.ts.map +0 -1
  181. package/dist/types/src/types/schema.d.ts +0 -12
  182. package/dist/types/src/types/schema.d.ts.map +0 -1
  183. package/dist/types/src/types/types.d.ts +0 -18
  184. package/dist/types/src/types/types.d.ts.map +0 -1
  185. package/src/capabilities/intent-resolver.ts +0 -19
  186. package/src/components/ExplorerContainer.tsx +0 -37
  187. package/src/components/Graph/D3ForceGraph.stories.tsx +0 -67
  188. package/src/components/Graph/D3ForceGraph.tsx +0 -101
  189. package/src/types/schema.ts +0 -16
  190. package/src/types/types.ts +0 -22
  191. /package/dist/lib/{browser/meta.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  192. /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
  193. /package/dist/lib/{node-esm → neutral}/meta.mjs.map +0 -0
  194. /package/dist/lib/{node-esm → neutral}/types/index.mjs.map +0 -0
package/package.json CHANGED
@@ -1,103 +1,151 @@
1
1
  {
2
2
  "name": "@dxos/plugin-explorer",
3
- "version": "0.8.4-main.dedc0f3",
3
+ "version": "0.8.4-main.dfabb4ec29",
4
4
  "description": "Braneframe data visualization plugin",
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",
11
- "exports": {
12
- ".": {
13
- "source": "./src/index.ts",
14
- "types": "./dist/types/src/index.d.ts",
15
- "browser": "./dist/lib/browser/index.mjs",
16
- "node": "./dist/lib/node-esm/index.mjs"
15
+ "imports": {
16
+ "#capabilities": {
17
+ "source": "./src/capabilities/index.ts",
18
+ "types": "./dist/types/src/capabilities/index.d.ts",
19
+ "default": "./dist/lib/neutral/capabilities/index.mjs"
17
20
  },
18
- "./meta": {
21
+ "#components": {
22
+ "source": "./src/components/index.ts",
23
+ "types": "./dist/types/src/components/index.d.ts",
24
+ "default": "./dist/lib/neutral/components/index.mjs"
25
+ },
26
+ "#containers": {
27
+ "source": "./src/containers/index.ts",
28
+ "types": "./dist/types/src/containers/index.d.ts",
29
+ "default": "./dist/lib/neutral/containers/index.mjs"
30
+ },
31
+ "#hooks": {
32
+ "source": "./src/hooks/index.ts",
33
+ "types": "./dist/types/src/hooks/index.d.ts",
34
+ "default": "./dist/lib/neutral/hooks/index.mjs"
35
+ },
36
+ "#meta": {
19
37
  "source": "./src/meta.ts",
20
38
  "types": "./dist/types/src/meta.d.ts",
21
- "browser": "./dist/lib/browser/meta.mjs",
22
- "node": "./dist/lib/node-esm/meta.mjs"
39
+ "default": "./dist/lib/neutral/meta.mjs"
40
+ },
41
+ "#plugin": {
42
+ "source": "./src/ExplorerPlugin.tsx",
43
+ "types": "./dist/types/src/ExplorerPlugin.d.ts",
44
+ "default": "./dist/lib/neutral/ExplorerPlugin.mjs"
45
+ },
46
+ "#translations": {
47
+ "source": "./src/translations.ts",
48
+ "types": "./dist/types/src/translations.d.ts",
49
+ "default": "./dist/lib/neutral/translations.mjs"
23
50
  },
24
- "./types": {
51
+ "#types": {
25
52
  "source": "./src/types/index.ts",
26
53
  "types": "./dist/types/src/types/index.d.ts",
27
- "browser": "./dist/lib/browser/types/index.mjs",
28
- "node": "./dist/lib/node-esm/types/index.mjs"
54
+ "default": "./dist/lib/neutral/types/index.mjs"
29
55
  }
30
56
  },
31
- "types": "dist/types/src/index.d.ts",
32
- "typesVersions": {
33
- "*": {
34
- "meta": [
35
- "dist/types/src/meta.d.ts"
36
- ],
37
- "types": [
38
- "dist/types/src/types/index.d.ts"
39
- ]
57
+ "exports": {
58
+ ".": {
59
+ "source": "./src/index.ts",
60
+ "types": "./dist/types/src/index.d.ts",
61
+ "default": "./dist/lib/neutral/index.mjs"
62
+ },
63
+ "./components": {
64
+ "source": "./src/components/index.ts",
65
+ "types": "./dist/types/src/components/index.d.ts",
66
+ "default": "./dist/lib/neutral/components/index.mjs"
67
+ },
68
+ "./hooks": {
69
+ "source": "./src/hooks/index.ts",
70
+ "types": "./dist/types/src/hooks/index.d.ts",
71
+ "default": "./dist/lib/neutral/hooks/index.mjs"
72
+ },
73
+ "./plugin": {
74
+ "source": "./src/plugin.ts",
75
+ "types": "./dist/types/src/plugin.d.ts",
76
+ "default": "./dist/lib/neutral/plugin.mjs"
77
+ },
78
+ "./translations": {
79
+ "source": "./src/translations.ts",
80
+ "types": "./dist/types/src/translations.d.ts",
81
+ "default": "./dist/lib/neutral/translations.mjs"
40
82
  }
41
83
  },
84
+ "types": "dist/types/src/index.d.ts",
42
85
  "files": [
43
86
  "dist",
44
87
  "src"
45
88
  ],
46
89
  "dependencies": {
47
90
  "3d-force-graph": "^1.76.1",
91
+ "@effect-atom/atom-react": "^0.5.0",
48
92
  "@observablehq/plot": "^0.6.11",
49
- "@preact-signals/safe-react": "^0.9.0",
50
- "@preact/signals-core": "^1.9.0",
51
93
  "d3": "^7.9.0",
52
- "effect": "3.17.7",
94
+ "effect": "3.20.0",
53
95
  "force-graph": "^1.49.4",
54
96
  "lodash.defaultsdeep": "^4.6.1",
55
97
  "react-resize-detector": "^11.0.1",
56
98
  "three": "^0.178.0",
57
99
  "topojson-client": "^3.1.0",
58
- "@dxos/app-framework": "0.8.4-main.dedc0f3",
59
- "@dxos/async": "0.8.4-main.dedc0f3",
60
- "@dxos/client": "0.8.4-main.dedc0f3",
61
- "@dxos/echo": "0.8.4-main.dedc0f3",
62
- "@dxos/echo-schema": "0.8.4-main.dedc0f3",
63
- "@dxos/invariant": "0.8.4-main.dedc0f3",
64
- "@dxos/graph": "0.8.4-main.dedc0f3",
65
- "@dxos/live-object": "0.8.4-main.dedc0f3",
66
- "@dxos/log": "0.8.4-main.dedc0f3",
67
- "@dxos/plugin-client": "0.8.4-main.dedc0f3",
68
- "@dxos/plugin-graph": "0.8.4-main.dedc0f3",
69
- "@dxos/plugin-search": "0.8.4-main.dedc0f3",
70
- "@dxos/react-client": "0.8.4-main.dedc0f3",
71
- "@dxos/react-ui-attention": "0.8.4-main.dedc0f3",
72
- "@dxos/plugin-space": "0.8.4-main.dedc0f3",
73
- "@dxos/react-ui-graph": "0.8.4-main.dedc0f3",
74
- "@dxos/react-ui-stack": "0.8.4-main.dedc0f3",
75
- "@dxos/util": "0.8.4-main.dedc0f3",
76
- "@dxos/schema": "0.8.4-main.dedc0f3"
100
+ "@dxos/app-framework": "0.8.4-main.dfabb4ec29",
101
+ "@dxos/app-toolkit": "0.8.4-main.dfabb4ec29",
102
+ "@dxos/async": "0.8.4-main.dfabb4ec29",
103
+ "@dxos/client": "0.8.4-main.dfabb4ec29",
104
+ "@dxos/compute": "0.8.4-main.dfabb4ec29",
105
+ "@dxos/graph": "0.8.4-main.dfabb4ec29",
106
+ "@dxos/echo": "0.8.4-main.dfabb4ec29",
107
+ "@dxos/echo-query": "0.8.4-main.dfabb4ec29",
108
+ "@dxos/invariant": "0.8.4-main.dfabb4ec29",
109
+ "@dxos/log": "0.8.4-main.dfabb4ec29",
110
+ "@dxos/plugin-client": "0.8.4-main.dfabb4ec29",
111
+ "@dxos/plugin-graph": "0.8.4-main.dfabb4ec29",
112
+ "@dxos/react-client": "0.8.4-main.dfabb4ec29",
113
+ "@dxos/plugin-search": "0.8.4-main.dfabb4ec29",
114
+ "@dxos/react-ui-attention": "0.8.4-main.dfabb4ec29",
115
+ "@dxos/react-ui-components": "0.8.4-main.dfabb4ec29",
116
+ "@dxos/react-ui-graph": "0.8.4-main.dfabb4ec29",
117
+ "@dxos/plugin-space": "0.8.4-main.dfabb4ec29",
118
+ "@dxos/react-ui-mosaic": "0.8.4-main.dfabb4ec29",
119
+ "@dxos/schema": "0.8.4-main.dfabb4ec29",
120
+ "@dxos/react-ui-stack": "0.8.4-main.dfabb4ec29",
121
+ "@dxos/util": "0.8.4-main.dfabb4ec29",
122
+ "@dxos/types": "0.8.4-main.dfabb4ec29"
77
123
  },
78
124
  "devDependencies": {
79
125
  "@types/d3": "^7.4.3",
80
126
  "@types/d3-hierarchy": "^3.1.6",
81
127
  "@types/lodash.defaultsdeep": "^4.6.6",
82
- "@types/react": "~18.2.0",
83
- "@types/react-dom": "~18.2.0",
128
+ "@types/react": "~19.2.7",
129
+ "@types/react-dom": "~19.2.3",
84
130
  "@types/topojson-client": "^3.1.4",
85
131
  "@types/topojson-specification": "^1.0.5",
86
- "react": "~18.2.0",
87
- "react-dom": "~18.2.0",
88
- "vite": "7.1.1",
89
- "@dxos/echo-generator": "0.8.4-main.dedc0f3",
90
- "@dxos/random": "0.8.4-main.dedc0f3",
91
- "@dxos/storybook-utils": "0.8.4-main.dedc0f3",
92
- "@dxos/react-ui": "0.8.4-main.dedc0f3",
93
- "@dxos/react-ui-theme": "0.8.4-main.dedc0f3"
132
+ "react": "~19.2.3",
133
+ "react-dom": "~19.2.3",
134
+ "vite": "^8.0.10",
135
+ "@dxos/plugin-preview": "0.8.4-main.dfabb4ec29",
136
+ "@dxos/echo-generator": "0.8.4-main.dfabb4ec29",
137
+ "@dxos/react-ui": "0.8.4-main.dfabb4ec29",
138
+ "@dxos/plugin-testing": "0.8.4-main.dfabb4ec29",
139
+ "@dxos/random": "0.8.4-main.dfabb4ec29",
140
+ "@dxos/storybook-utils": "0.8.4-main.dfabb4ec29",
141
+ "@dxos/ui-theme": "0.8.4-main.dfabb4ec29"
94
142
  },
95
143
  "peerDependencies": {
96
- "effect": "^3.13.3",
97
- "react": "~18.2.0",
98
- "react-dom": "~18.2.0",
99
- "@dxos/react-ui": "0.8.4-main.dedc0f3",
100
- "@dxos/react-ui-theme": "0.8.4-main.dedc0f3"
144
+ "effect": "3.20.0",
145
+ "react": "~19.2.3",
146
+ "react-dom": "~19.2.3",
147
+ "@dxos/react-ui": "0.8.4-main.dfabb4ec29",
148
+ "@dxos/ui-theme": "0.8.4-main.dfabb4ec29"
101
149
  },
102
150
  "publishConfig": {
103
151
  "access": "public"
@@ -0,0 +1,26 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { describe, test } from 'vitest';
6
+
7
+ import { ClientPlugin } from '@dxos/plugin-client/plugin';
8
+ import { createComposerTestApp } from '@dxos/plugin-testing/harness';
9
+
10
+ import { ExplorerPlugin } from '#plugin';
11
+
12
+ import { meta } from './meta';
13
+
14
+ const moduleId = (name: string) => `${meta.id}.module.${name}`;
15
+
16
+ describe('ExplorerPlugin', () => {
17
+ test('modules activate on the expected events', async ({ expect }) => {
18
+ await using harness = await createComposerTestApp({
19
+ plugins: [ClientPlugin({}), ExplorerPlugin()],
20
+ });
21
+
22
+ expect(harness.manager.getActive()).toEqual(
23
+ expect.arrayContaining([moduleId('CreateObject'), moduleId('schema'), moduleId('ReactSurface')]),
24
+ );
25
+ });
26
+ });
@@ -2,59 +2,20 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, Events, contributes, createIntent, defineModule, definePlugin } from '@dxos/app-framework';
6
- import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
7
- import { SpaceCapabilities } from '@dxos/plugin-space';
8
- import { defineObjectForm } from '@dxos/plugin-space/types';
5
+ import { Plugin } from '@dxos/app-framework';
6
+ import { AppPlugin } from '@dxos/app-toolkit';
9
7
 
10
- import { IntentResolver, ReactSurface } from './capabilities';
11
- import { meta } from './meta';
12
- import { translations } from './translations';
13
- import { ExplorerAction, ViewType } from './types';
8
+ import { CreateObject, ReactSurface } from '#capabilities';
9
+ import { meta } from '#meta';
10
+ import { translations } from '#translations';
11
+ import { Graph } from '#types';
14
12
 
15
- export const ExplorerPlugin = () =>
16
- definePlugin(meta, [
17
- defineModule({
18
- id: `${meta.id}/module/translations`,
19
- activatesOn: Events.SetupTranslations,
20
- activate: () => contributes(Capabilities.Translations, translations),
21
- }),
22
- defineModule({
23
- id: `${meta.id}/module/metadata`,
24
- activatesOn: Events.SetupMetadata,
25
- activate: () =>
26
- contributes(Capabilities.Metadata, {
27
- id: ViewType.typename,
28
- metadata: {
29
- icon: 'ph--graph--regular',
30
- },
31
- }),
32
- }),
33
- defineModule({
34
- id: `${meta.id}/module/object-form`,
35
- activatesOn: ClientEvents.SetupSchema,
36
- activate: () =>
37
- contributes(
38
- SpaceCapabilities.ObjectForm,
39
- defineObjectForm({
40
- objectSchema: ViewType,
41
- getIntent: () => createIntent(ExplorerAction.Create),
42
- }),
43
- ),
44
- }),
45
- defineModule({
46
- id: `${meta.id}/module/schema`,
47
- activatesOn: ClientEvents.SetupSchema,
48
- activate: () => contributes(ClientCapabilities.Schema, [ViewType]),
49
- }),
50
- defineModule({
51
- id: `${meta.id}/module/react-surface`,
52
- activatesOn: Events.SetupReactSurface,
53
- activate: ReactSurface,
54
- }),
55
- defineModule({
56
- id: `${meta.id}/module/intent-resolver`,
57
- activatesOn: Events.SetupIntentResolver,
58
- activate: IntentResolver,
59
- }),
60
- ]);
13
+ export const ExplorerPlugin = Plugin.define(meta).pipe(
14
+ AppPlugin.addCreateObjectModule({ activate: CreateObject }),
15
+ AppPlugin.addSchemaModule({ schema: [Graph.Graph] }),
16
+ AppPlugin.addSurfaceModule({ activate: ReactSurface }),
17
+ AppPlugin.addTranslationsModule({ translations }),
18
+ Plugin.make,
19
+ );
20
+
21
+ export default ExplorerPlugin;
@@ -0,0 +1,36 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { Operation } from '@dxos/compute';
9
+ import { Type } from '@dxos/echo';
10
+ import { SpaceOperation } from '@dxos/plugin-space';
11
+ import { SpaceCapabilities } from '@dxos/plugin-space';
12
+ import { ViewModel } from '@dxos/schema';
13
+
14
+ import { ExplorerAction, Graph } from '#types';
15
+
16
+ export default Capability.makeModule(
17
+ Effect.fnUntraced(function* () {
18
+ return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
19
+ id: Type.getTypename(Graph.Graph),
20
+ inputSchema: ExplorerAction.GraphProps,
21
+ createObject: (props, options) =>
22
+ Effect.gen(function* () {
23
+ const object = yield* Effect.promise(async () => {
24
+ const { view } = await ViewModel.makeFromDatabase({ db: options.db, typename: props.typename });
25
+ return Graph.make({ name: props.name, view });
26
+ });
27
+ return yield* Operation.invoke(SpaceOperation.AddObject, {
28
+ object,
29
+ target: options.target,
30
+ hidden: true,
31
+ targetNodeId: options.targetNodeId,
32
+ });
33
+ }),
34
+ });
35
+ }),
36
+ );
@@ -2,7 +2,7 @@
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
6
 
7
- export const IntentResolver = lazy(() => import('./intent-resolver'));
8
- export const ReactSurface = lazy(() => import('./react-surface'));
7
+ export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
8
+ export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
@@ -2,22 +2,31 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import * as Effect from 'effect/Effect';
5
6
  import React from 'react';
6
7
 
7
- import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
8
- import { Obj } from '@dxos/echo';
8
+ import { Capabilities, Capability } from '@dxos/app-framework';
9
+ import { Surface } from '@dxos/app-framework/ui';
10
+ import { AppSurface } from '@dxos/app-toolkit/ui';
9
11
 
10
- import { ExplorerContainer } from '../components';
11
- import { EXPLORER_PLUGIN } from '../meta';
12
- import { ViewType } from '../types';
12
+ import { ExplorerContainer } from '#containers';
13
+ import { Graph } from '#types';
13
14
 
14
- export default () =>
15
- contributes(
16
- Capabilities.ReactSurface,
17
- createSurface({
18
- id: `${EXPLORER_PLUGIN}/article`,
19
- role: ['article', 'section'],
20
- filter: (data): data is { subject: ViewType } => Obj.instanceOf(ViewType, data.subject),
21
- component: ({ data, role }) => <ExplorerContainer view={data.subject} role={role} />,
22
- }),
23
- );
15
+ export default Capability.makeModule(() =>
16
+ Effect.succeed(
17
+ Capability.contributes(
18
+ Capabilities.ReactSurface,
19
+ Surface.create({
20
+ id: 'article',
21
+ // TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
22
+ filter: AppSurface.oneOf(
23
+ AppSurface.object(AppSurface.Article, Graph.Graph),
24
+ AppSurface.object(AppSurface.Section, Graph.Graph),
25
+ ),
26
+ component: ({ data, role }) => {
27
+ return <ExplorerContainer role={role} subject={data.subject} attendableId={data.attendableId} />;
28
+ },
29
+ }),
30
+ ),
31
+ ),
32
+ );
@@ -2,41 +2,35 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
- import { type Meta } from '@storybook/react-vite';
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
8
6
  import React from 'react';
9
7
 
10
- import { ClientRepeater } from '@dxos/react-client/testing';
11
- import { withLayout, withTheme } from '@dxos/storybook-utils';
8
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
12
9
 
13
10
  import CitiesData from '../../../data/cities.js';
14
-
15
11
  import { Chart } from './Chart';
16
12
 
17
- // TODO(burdon): Generate data with geo lat/lng.
18
- // TODO(burdon): How to provide geo service via agent?
19
-
20
- const Story = () => {
21
- if (!CitiesData) {
22
- return null;
23
- }
24
-
25
- const items = CitiesData.features.map((feature: any) => ({
26
- x: feature.geometry.coordinates[0],
27
- y: feature.geometry.coordinates[1],
28
- }));
13
+ const items = CitiesData.features.map((feature: any) => ({
14
+ x: feature.geometry.coordinates[0],
15
+ y: feature.geometry.coordinates[1],
16
+ }));
29
17
 
30
- return <Chart items={items} accessor={(obj) => ({ x: obj.x, y: obj.y })} options={{ stroke: 'blue' }} />;
31
- };
32
-
33
- // TODO(burdon): Change to decorator.
34
- export const Default = () => <ClientRepeater component={Story} />;
18
+ const DefaultStory = () => (
19
+ <Chart items={items} accessor={(obj) => ({ x: obj.x, y: obj.y })} options={{ stroke: 'blue' }} />
20
+ );
35
21
 
36
22
  const meta = {
37
- title: 'plugins/plugin-explorer/Chart',
23
+ title: 'plugins/plugin-explorer/components/Chart',
38
24
  component: Chart,
39
- decorators: [withTheme, withLayout({ fullscreen: true })],
25
+ render: DefaultStory,
26
+ decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
27
+ parameters: {
28
+ layout: 'fullscreen',
29
+ },
40
30
  } satisfies Meta<typeof Chart>;
41
31
 
42
32
  export default meta;
33
+
34
+ type Story = StoryObj<typeof meta>;
35
+
36
+ export const Default: Story = {};
@@ -2,34 +2,28 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
5
  import { dot, geo, graticule, plot, sphere } from '@observablehq/plot';
8
- import { type Meta } from '@storybook/react-vite';
6
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
9
7
  import { geoCircle } from 'd3';
10
8
  import React, { useEffect } from 'react';
11
9
  import { useResizeDetector } from 'react-resize-detector';
12
10
  import { feature } from 'topojson-client';
13
11
 
14
- import { ClientRepeater } from '@dxos/react-client/testing';
15
- import { withLayout, withTheme } from '@dxos/storybook-utils';
12
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
16
13
 
17
14
  import CitiesData from '../../../data/cities.js';
18
15
  import CountriesData from '../../../data/countries-110m.js';
19
-
20
16
  import { Globe } from './Globe';
21
17
 
22
18
  // TODO(burdon): Generate data with geo lat/lng.
23
19
  // TODO(burdon): How to provide geo service via agent?
24
20
 
25
- const DefaultStory = () => {
26
- const items = CitiesData.features.map((feature: any) => ({
27
- lat: feature.geometry.coordinates[0],
28
- lng: feature.geometry.coordinates[1],
29
- }));
21
+ const items = CitiesData.features.map((feature: any) => ({
22
+ lat: feature.geometry.coordinates[0],
23
+ lng: feature.geometry.coordinates[1],
24
+ }));
30
25
 
31
- return <Globe items={items} />;
32
- };
26
+ const DefaultStory = () => <Globe items={items} />;
33
27
 
34
28
  const ExtendedStory = () => {
35
29
  const { ref: containerRef, width = 0, height = 0 } = useResizeDetector({ refreshRate: 200 });
@@ -39,11 +33,6 @@ const ExtendedStory = () => {
39
33
  }
40
34
 
41
35
  const land = feature(CountriesData as any, CountriesData.objects.land as any);
42
- const items = CitiesData.features.map((feature: any) => ({
43
- lat: feature.geometry.coordinates[0],
44
- lng: feature.geometry.coordinates[1],
45
- }));
46
-
47
36
  const city = items[0];
48
37
  const circle = geoCircle().center([city.lat, city.lng]).radius(16)();
49
38
 
@@ -52,7 +41,6 @@ const ExtendedStory = () => {
52
41
  const drawing = plot({
53
42
  // https://observablehq.com/plot/features/projections
54
43
  projection: { type: 'orthographic', rotate: [-city.lat + 30, -30] },
55
- // projection: { type: 'equirectangular', rotate: [-140, -30] },
56
44
  width,
57
45
  height,
58
46
  style: {
@@ -82,12 +70,22 @@ const ExtendedStory = () => {
82
70
  };
83
71
 
84
72
  const meta = {
85
- title: 'plugins/plugin-explorer/Globe',
86
- decorators: [withTheme, withLayout({ fullscreen: true })],
87
- } satisfies Meta;
73
+ title: 'plugins/plugin-explorer/components/Globe',
74
+ component: Globe,
75
+ decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
76
+ parameters: {
77
+ layout: 'fullscreen',
78
+ },
79
+ } satisfies Meta<typeof Globe>;
88
80
 
89
81
  export default meta;
90
82
 
91
- export const Default = () => <ClientRepeater component={DefaultStory} createSpace />;
83
+ type Story = StoryObj<typeof meta>;
92
84
 
93
- export const Extended = () => <ClientRepeater component={ExtendedStory} createSpace />;
85
+ export const Default: Story = {
86
+ render: DefaultStory,
87
+ };
88
+
89
+ export const Extended: Story = {
90
+ render: ExtendedStory,
91
+ };
@@ -0,0 +1,83 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import * as Effect from 'effect/Effect';
7
+ import React from 'react';
8
+
9
+ import { withPluginManager } from '@dxos/app-framework/testing';
10
+ import { Type, View } from '@dxos/echo';
11
+ import { ClientPlugin } from '@dxos/plugin-client/plugin';
12
+ import { initializeIdentity } from '@dxos/plugin-client/testing';
13
+ import { corePlugins } from '@dxos/plugin-testing';
14
+ import { random } from '@dxos/random';
15
+ import { useSpaces } from '@dxos/react-client/echo';
16
+ import { Loading, withLayout, withTheme } from '@dxos/react-ui/testing';
17
+ import { ViewModel } from '@dxos/schema';
18
+ import { type ValueGenerator } from '@dxos/schema/testing';
19
+ import { HasRelationship, Organization, Person, Pipeline } from '@dxos/types';
20
+
21
+ import { useGraphModel } from '#hooks';
22
+ import { Graph } from '#types';
23
+
24
+ import { CanvasForceGraph } from './CanvasForceGraph';
25
+ import { generate } from './testing';
26
+
27
+ const generator = random as any as ValueGenerator;
28
+
29
+ random.seed(1);
30
+
31
+ const DefaultStory = () => {
32
+ const [space] = useSpaces();
33
+ const model = useGraphModel(space);
34
+ if (!space || !model) {
35
+ return <Loading data={{ space: !!space, model: !!model }} />;
36
+ }
37
+
38
+ return <CanvasForceGraph model={model} />;
39
+ };
40
+
41
+ const meta = {
42
+ title: 'plugins/plugin-explorer/components/CanvasForceGraph',
43
+ component: CanvasForceGraph,
44
+ render: DefaultStory,
45
+ decorators: [
46
+ withTheme(),
47
+ withLayout({ layout: 'fullscreen' }),
48
+ withPluginManager({
49
+ plugins: [
50
+ ...corePlugins(),
51
+ ClientPlugin({
52
+ types: [
53
+ Graph.Graph,
54
+ View.View,
55
+ HasRelationship.HasRelationship,
56
+ Organization.Organization,
57
+ Pipeline.Pipeline,
58
+ Person.Person,
59
+ ],
60
+ onClientInitialized: ({ client }) =>
61
+ Effect.gen(function* () {
62
+ const { personalSpace } = yield* initializeIdentity(client);
63
+ yield* Effect.promise(() => generate(personalSpace, generator));
64
+ const { view } = yield* Effect.promise(() =>
65
+ ViewModel.makeFromDatabase({ db: personalSpace.db, typename: Type.getTypename(Graph.Graph) }),
66
+ );
67
+ personalSpace.db.add(Graph.make({ name: 'Test', view }));
68
+ yield* Effect.promise(() => personalSpace.db.flush({ indexes: true }));
69
+ }),
70
+ }),
71
+ ],
72
+ }),
73
+ ],
74
+ parameters: {
75
+ layout: 'fullscreen',
76
+ },
77
+ } satisfies Meta<typeof CanvasForceGraph>;
78
+
79
+ export default meta;
80
+
81
+ type Story = StoryObj<typeof meta>;
82
+
83
+ export const Default: Story = {};