@dxos/plugin-explorer 0.8.4-main.c85a9c8dae → 0.8.4-main.d9fc60f731

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 (261) hide show
  1. package/LICENSE +102 -5
  2. package/PLUGIN.mdl +340 -0
  3. package/dist/lib/neutral/ExplorerArticle-4I7PNGDC.mjs +459 -0
  4. package/dist/lib/neutral/ExplorerArticle-4I7PNGDC.mjs.map +7 -0
  5. package/dist/lib/neutral/ExplorerPlugin.mjs +10 -0
  6. package/dist/lib/neutral/capabilities/index.mjs +11 -0
  7. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  8. package/dist/lib/neutral/chunk-3D7BYXOR.mjs +37 -0
  9. package/dist/lib/neutral/chunk-3D7BYXOR.mjs.map +7 -0
  10. package/dist/lib/neutral/chunk-42BYLQQA.mjs +42 -0
  11. package/dist/lib/neutral/chunk-42BYLQQA.mjs.map +7 -0
  12. package/dist/lib/neutral/chunk-7XUDLV6E.mjs +287 -0
  13. package/dist/lib/neutral/chunk-7XUDLV6E.mjs.map +7 -0
  14. package/dist/lib/{browser/chunk-4NFGHCGO.mjs → neutral/chunk-HI324IB4.mjs} +10 -25
  15. package/dist/lib/neutral/chunk-HI324IB4.mjs.map +7 -0
  16. package/dist/lib/neutral/chunk-IKHJV3Q4.mjs +20 -0
  17. package/dist/lib/neutral/chunk-IKHJV3Q4.mjs.map +7 -0
  18. package/dist/lib/{browser/chunk-6AZY4CDH.mjs → neutral/components/index.mjs} +747 -358
  19. package/dist/lib/neutral/components/index.mjs.map +7 -0
  20. package/dist/lib/neutral/containers/index.mjs +9 -0
  21. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  22. package/dist/lib/neutral/create-object-F6TKVAGV.mjs +39 -0
  23. package/dist/lib/neutral/create-object-F6TKVAGV.mjs.map +7 -0
  24. package/dist/lib/neutral/hooks/index.mjs +45 -0
  25. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  26. package/dist/lib/neutral/index.mjs +14 -0
  27. package/dist/lib/neutral/meta.json +1 -0
  28. package/dist/lib/{browser → neutral}/meta.mjs +1 -1
  29. package/dist/lib/neutral/plugin.mjs +12 -0
  30. package/dist/lib/neutral/plugin.mjs.map +7 -0
  31. package/dist/lib/neutral/react-surface-APBW2VQG.mjs +26 -0
  32. package/dist/lib/neutral/react-surface-APBW2VQG.mjs.map +7 -0
  33. package/dist/lib/neutral/testing/index.mjs +139 -0
  34. package/dist/lib/neutral/testing/index.mjs.map +7 -0
  35. package/dist/lib/neutral/translations.mjs +33 -0
  36. package/dist/lib/neutral/translations.mjs.map +7 -0
  37. package/dist/lib/{browser → neutral}/types/index.mjs +1 -1
  38. package/dist/types/data/cities.d.ts +4 -4
  39. package/dist/types/data/cities.d.ts.map +1 -1
  40. package/dist/types/data/countries-110m.d.ts +19 -22
  41. package/dist/types/data/countries-110m.d.ts.map +1 -1
  42. package/dist/types/src/ExplorerPlugin.d.ts +1 -0
  43. package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
  44. package/dist/types/src/ExplorerPlugin.test.d.ts +2 -0
  45. package/dist/types/src/ExplorerPlugin.test.d.ts.map +1 -0
  46. package/dist/types/src/capabilities/create-object.d.ts +11 -0
  47. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  48. package/dist/types/src/capabilities/index.d.ts +8 -1
  49. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  50. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  51. package/dist/types/src/components/Chart/Chart.d.ts +1 -1
  52. package/dist/types/src/components/Chart/Chart.d.ts.map +1 -1
  53. package/dist/types/src/components/Chart/Chart.stories.d.ts +4 -1
  54. package/dist/types/src/components/Chart/Chart.stories.d.ts.map +1 -1
  55. package/dist/types/src/components/Globe/Globe.d.ts +1 -1
  56. package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
  57. package/dist/types/src/components/Globe/Globe.stories.d.ts +5 -2
  58. package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
  59. package/dist/types/src/components/Graph/CanvasForceGraph.d.ts +13 -0
  60. package/dist/types/src/components/Graph/CanvasForceGraph.d.ts.map +1 -0
  61. package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts +17 -0
  62. package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts.map +1 -0
  63. package/dist/types/src/components/Graph/ForceGraph.d.ts +12 -5
  64. package/dist/types/src/components/Graph/ForceGraph.d.ts.map +1 -1
  65. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts +4 -2
  66. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts.map +1 -1
  67. package/dist/types/src/components/Graph/{adapter.d.ts → graph-adapter.d.ts} +1 -1
  68. package/dist/types/src/components/Graph/graph-adapter.d.ts.map +1 -0
  69. package/dist/types/src/components/Graph/index.d.ts +1 -1
  70. package/dist/types/src/components/Graph/index.d.ts.map +1 -1
  71. package/dist/types/src/components/Lattice/Lattice.d.ts +20 -0
  72. package/dist/types/src/components/Lattice/Lattice.d.ts.map +1 -0
  73. package/dist/types/src/components/Lattice/Lattice.stories.d.ts +8 -0
  74. package/dist/types/src/components/Lattice/Lattice.stories.d.ts.map +1 -0
  75. package/dist/types/src/components/Lattice/index.d.ts +2 -0
  76. package/dist/types/src/components/Lattice/index.d.ts.map +1 -0
  77. package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts +21 -0
  78. package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts.map +1 -0
  79. package/dist/types/src/components/Tree/Tree.d.ts +20 -23
  80. package/dist/types/src/components/Tree/Tree.d.ts.map +1 -1
  81. package/dist/types/src/components/Tree/Tree.stories.d.ts +5 -12
  82. package/dist/types/src/components/Tree/Tree.stories.d.ts.map +1 -1
  83. package/dist/types/src/components/Tree/index.d.ts +2 -0
  84. package/dist/types/src/components/Tree/index.d.ts.map +1 -1
  85. package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts +37 -2
  86. package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts.map +1 -1
  87. package/dist/types/src/components/Tree/layout/RadialTree.d.ts +35 -2
  88. package/dist/types/src/components/Tree/layout/RadialTree.d.ts.map +1 -1
  89. package/dist/types/src/components/Tree/layout/TidyTree.d.ts +24 -2
  90. package/dist/types/src/components/Tree/layout/TidyTree.d.ts.map +1 -1
  91. package/dist/types/src/components/Tree/layout/hierarchy.d.ts +17 -0
  92. package/dist/types/src/components/Tree/layout/hierarchy.d.ts.map +1 -0
  93. package/dist/types/src/components/Tree/layout/index.d.ts +5 -4
  94. package/dist/types/src/components/Tree/layout/index.d.ts.map +1 -1
  95. package/dist/types/src/components/Tree/layout/slots.d.ts +7 -0
  96. package/dist/types/src/components/Tree/layout/slots.d.ts.map +1 -0
  97. package/dist/types/src/components/Tree/layout/useContainerSize.d.ts +15 -0
  98. package/dist/types/src/components/Tree/layout/useContainerSize.d.ts.map +1 -0
  99. package/dist/types/src/components/Tree/types/tree.d.ts +41 -20
  100. package/dist/types/src/components/Tree/types/tree.d.ts.map +1 -1
  101. package/dist/types/src/components/Tree/types/types.d.ts +14 -4
  102. package/dist/types/src/components/Tree/types/types.d.ts.map +1 -1
  103. package/dist/types/src/components/index.d.ts +1 -0
  104. package/dist/types/src/components/index.d.ts.map +1 -1
  105. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts +8 -0
  106. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts.map +1 -0
  107. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts +15 -0
  108. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts.map +1 -0
  109. package/dist/types/src/containers/ExplorerArticle/Visualization.d.ts +18 -0
  110. package/dist/types/src/containers/ExplorerArticle/Visualization.d.ts.map +1 -0
  111. package/dist/types/src/containers/ExplorerArticle/index.d.ts +2 -0
  112. package/dist/types/src/containers/ExplorerArticle/index.d.ts.map +1 -0
  113. package/dist/types/src/containers/ExplorerArticle/variants.d.ts +9 -0
  114. package/dist/types/src/containers/ExplorerArticle/variants.d.ts.map +1 -0
  115. package/dist/types/src/containers/index.d.ts +1 -1
  116. package/dist/types/src/containers/index.d.ts.map +1 -1
  117. package/dist/types/src/hooks/useGraphModel.d.ts +2 -2
  118. package/dist/types/src/hooks/useGraphModel.d.ts.map +1 -1
  119. package/dist/types/src/index.d.ts +1 -3
  120. package/dist/types/src/index.d.ts.map +1 -1
  121. package/dist/types/src/meta.d.ts +1 -1
  122. package/dist/types/src/meta.d.ts.map +1 -1
  123. package/dist/types/src/plugin.d.ts +3 -0
  124. package/dist/types/src/plugin.d.ts.map +1 -0
  125. package/dist/types/src/{components/Tree/testing → testing}/generator.d.ts +1 -1
  126. package/dist/types/src/testing/generator.d.ts.map +1 -0
  127. package/dist/types/src/testing/index.d.ts +4 -0
  128. package/dist/types/src/testing/index.d.ts.map +1 -0
  129. package/dist/types/src/testing/relations.d.ts +32 -0
  130. package/dist/types/src/testing/relations.d.ts.map +1 -0
  131. package/dist/types/src/translations.d.ts +28 -26
  132. package/dist/types/src/translations.d.ts.map +1 -1
  133. package/dist/types/src/types/ExplorerAction.d.ts.map +1 -1
  134. package/dist/types/src/types/Graph.d.ts +5 -13
  135. package/dist/types/src/types/Graph.d.ts.map +1 -1
  136. package/dist/types/src/util/index.d.ts +3 -0
  137. package/dist/types/src/util/index.d.ts.map +1 -0
  138. package/dist/types/src/util/node-color.d.ts +13 -0
  139. package/dist/types/src/util/node-color.d.ts.map +1 -0
  140. package/dist/types/src/{components → util}/plot.d.ts +1 -1
  141. package/dist/types/src/util/plot.d.ts.map +1 -0
  142. package/dist/types/tsconfig.tsbuildinfo +1 -1
  143. package/package.json +104 -62
  144. package/src/ExplorerPlugin.test.ts +26 -0
  145. package/src/ExplorerPlugin.tsx +13 -24
  146. package/src/capabilities/create-object.ts +36 -0
  147. package/src/capabilities/index.ts +4 -1
  148. package/src/capabilities/react-surface.tsx +32 -0
  149. package/src/components/Chart/Chart.stories.tsx +14 -21
  150. package/src/components/Chart/Chart.tsx +1 -1
  151. package/src/components/Globe/Globe.stories.tsx +17 -20
  152. package/src/components/Globe/Globe.tsx +1 -1
  153. package/src/components/Graph/CanvasForceGraph.stories.tsx +97 -0
  154. package/src/components/Graph/CanvasForceGraph.tsx +124 -0
  155. package/src/components/Graph/ForceGraph.stories.tsx +95 -46
  156. package/src/components/Graph/ForceGraph.tsx +105 -85
  157. package/src/components/Graph/index.ts +1 -1
  158. package/src/components/Lattice/Lattice.stories.tsx +104 -0
  159. package/src/components/Lattice/Lattice.tsx +182 -0
  160. package/src/components/Lattice/index.ts +5 -0
  161. package/src/components/Tree/EdgeBundling.stories.tsx +144 -0
  162. package/src/components/Tree/Tree.stories.tsx +19 -38
  163. package/src/components/Tree/Tree.tsx +69 -100
  164. package/src/components/Tree/index.ts +2 -0
  165. package/src/components/Tree/layout/HierarchicalEdgeBundling.tsx +335 -0
  166. package/src/components/Tree/layout/RadialTree.tsx +242 -0
  167. package/src/components/Tree/layout/TidyTree.tsx +246 -0
  168. package/src/components/Tree/layout/hierarchy.ts +32 -0
  169. package/src/components/Tree/layout/index.ts +5 -5
  170. package/src/components/Tree/layout/slots.ts +19 -0
  171. package/src/components/Tree/layout/useContainerSize.ts +43 -0
  172. package/src/components/Tree/types/tree.test.ts +4 -5
  173. package/src/components/Tree/types/tree.ts +26 -31
  174. package/src/components/Tree/types/types.ts +38 -29
  175. package/src/components/index.ts +1 -0
  176. package/src/containers/ExplorerArticle/ExplorerArticle.stories.tsx +152 -0
  177. package/src/containers/ExplorerArticle/ExplorerArticle.tsx +120 -0
  178. package/src/containers/ExplorerArticle/Visualization.tsx +523 -0
  179. package/src/containers/ExplorerArticle/index.ts +5 -0
  180. package/src/containers/ExplorerArticle/variants.ts +47 -0
  181. package/src/containers/index.ts +1 -1
  182. package/src/hooks/useGraphModel.ts +22 -14
  183. package/src/index.ts +1 -4
  184. package/src/meta.ts +26 -7
  185. package/src/plugin.ts +9 -0
  186. package/src/{components/Tree/testing → testing}/generator.ts +3 -3
  187. package/src/testing/index.ts +9 -0
  188. package/src/testing/relations.ts +117 -0
  189. package/src/translations.ts +14 -13
  190. package/src/types/ExplorerAction.ts +1 -2
  191. package/src/types/Graph.ts +6 -28
  192. package/src/typings.d.ts +8 -0
  193. package/src/util/index.ts +6 -0
  194. package/src/util/node-color.ts +23 -0
  195. package/src/{components → util}/plot.ts +16 -4
  196. package/src/vite-env.d.ts +10 -0
  197. package/dist/lib/browser/ExplorerContainer-4RB2TY3G.mjs +0 -48
  198. package/dist/lib/browser/ExplorerContainer-4RB2TY3G.mjs.map +0 -7
  199. package/dist/lib/browser/chunk-4NFGHCGO.mjs.map +0 -7
  200. package/dist/lib/browser/chunk-6AZY4CDH.mjs.map +0 -7
  201. package/dist/lib/browser/chunk-YNQF4CPY.mjs +0 -24
  202. package/dist/lib/browser/chunk-YNQF4CPY.mjs.map +0 -7
  203. package/dist/lib/browser/index.mjs +0 -95
  204. package/dist/lib/browser/index.mjs.map +0 -7
  205. package/dist/lib/browser/meta.json +0 -1
  206. package/dist/lib/browser/react-surface-KAHVDMFX.mjs +0 -38
  207. package/dist/lib/browser/react-surface-KAHVDMFX.mjs.map +0 -7
  208. package/dist/lib/node-esm/ExplorerContainer-LCG425I7.mjs +0 -49
  209. package/dist/lib/node-esm/ExplorerContainer-LCG425I7.mjs.map +0 -7
  210. package/dist/lib/node-esm/chunk-DK77RB6M.mjs +0 -26
  211. package/dist/lib/node-esm/chunk-DK77RB6M.mjs.map +0 -7
  212. package/dist/lib/node-esm/chunk-DOXAIJEC.mjs +0 -11280
  213. package/dist/lib/node-esm/chunk-DOXAIJEC.mjs.map +0 -7
  214. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  215. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
  216. package/dist/lib/node-esm/chunk-V42OFY7B.mjs +0 -85
  217. package/dist/lib/node-esm/chunk-V42OFY7B.mjs.map +0 -7
  218. package/dist/lib/node-esm/index.mjs +0 -96
  219. package/dist/lib/node-esm/index.mjs.map +0 -7
  220. package/dist/lib/node-esm/meta.json +0 -1
  221. package/dist/lib/node-esm/meta.mjs +0 -9
  222. package/dist/lib/node-esm/react-surface-7XILIUI4.mjs +0 -39
  223. package/dist/lib/node-esm/react-surface-7XILIUI4.mjs.map +0 -7
  224. package/dist/lib/node-esm/types/index.mjs +0 -11
  225. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  226. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  227. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  228. package/dist/types/src/components/Graph/D3ForceGraph.d.ts +0 -14
  229. package/dist/types/src/components/Graph/D3ForceGraph.d.ts.map +0 -1
  230. package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts +0 -15
  231. package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts.map +0 -1
  232. package/dist/types/src/components/Graph/adapter.d.ts.map +0 -1
  233. package/dist/types/src/components/Graph/testing.d.ts +0 -14
  234. package/dist/types/src/components/Graph/testing.d.ts.map +0 -1
  235. package/dist/types/src/components/Tree/testing/generator.d.ts.map +0 -1
  236. package/dist/types/src/components/Tree/testing/index.d.ts +0 -2
  237. package/dist/types/src/components/Tree/testing/index.d.ts.map +0 -1
  238. package/dist/types/src/components/plot.d.ts.map +0 -1
  239. package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts +0 -6
  240. package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts.map +0 -1
  241. package/dist/types/src/containers/ExplorerContainer/index.d.ts +0 -3
  242. package/dist/types/src/containers/ExplorerContainer/index.d.ts.map +0 -1
  243. package/src/capabilities/react-surface/index.ts +0 -7
  244. package/src/capabilities/react-surface/react-surface.tsx +0 -31
  245. package/src/components/Graph/D3ForceGraph.stories.tsx +0 -84
  246. package/src/components/Graph/D3ForceGraph.tsx +0 -102
  247. package/src/components/Graph/testing.ts +0 -58
  248. package/src/components/Tree/layout/HierarchicalEdgeBundling.ts +0 -162
  249. package/src/components/Tree/layout/RadialTree.ts +0 -94
  250. package/src/components/Tree/layout/TidyTree.ts +0 -101
  251. package/src/components/Tree/testing/index.ts +0 -5
  252. package/src/containers/ExplorerContainer/ExplorerContainer.tsx +0 -53
  253. package/src/containers/ExplorerContainer/index.ts +0 -7
  254. /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/ExplorerPlugin.mjs.map} +0 -0
  255. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  256. /package/dist/lib/{browser/meta.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  257. /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
  258. /package/dist/lib/{node-esm → neutral}/meta.mjs.map +0 -0
  259. /package/dist/lib/{node-esm → neutral}/types/index.mjs.map +0 -0
  260. /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
  261. /package/src/components/Graph/{adapter.ts → graph-adapter.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-explorer",
3
- "version": "0.8.4-main.c85a9c8dae",
3
+ "version": "0.8.4-main.d9fc60f731",
4
4
  "description": "Braneframe data visualization plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -8,79 +8,119 @@
8
8
  "type": "git",
9
9
  "url": "https://github.com/dxos/dxos"
10
10
  },
11
- "license": "MIT",
11
+ "license": "FSL-1.1-Apache-2.0",
12
12
  "author": "DXOS.org",
13
13
  "sideEffects": true,
14
14
  "type": "module",
15
- "exports": {
16
- ".": {
17
- "source": "./src/index.ts",
18
- "browser": "./dist/lib/browser/index.mjs",
19
- "node": "./dist/lib/node-esm/index.mjs",
20
- "types": "./dist/types/src/index.d.ts"
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"
20
+ },
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"
21
30
  },
22
- "./meta": {
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": {
23
37
  "source": "./src/meta.ts",
24
- "browser": "./dist/lib/browser/meta.mjs",
25
- "node": "./dist/lib/node-esm/meta.mjs",
26
- "types": "./dist/types/src/meta.d.ts"
38
+ "types": "./dist/types/src/meta.d.ts",
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"
27
45
  },
28
- "./types": {
46
+ "#translations": {
47
+ "source": "./src/translations.ts",
48
+ "types": "./dist/types/src/translations.d.ts",
49
+ "default": "./dist/lib/neutral/translations.mjs"
50
+ },
51
+ "#types": {
29
52
  "source": "./src/types/index.ts",
30
- "browser": "./dist/lib/browser/types/index.mjs",
31
- "node": "./dist/lib/node-esm/types/index.mjs",
32
- "types": "./dist/types/src/types/index.d.ts"
53
+ "types": "./dist/types/src/types/index.d.ts",
54
+ "default": "./dist/lib/neutral/types/index.mjs"
33
55
  }
34
56
  },
35
- "types": "dist/types/src/index.d.ts",
36
- "typesVersions": {
37
- "*": {
38
- "meta": [
39
- "dist/types/src/meta.d.ts"
40
- ],
41
- "types": [
42
- "dist/types/src/types/index.d.ts"
43
- ]
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
+ "./assets/PLUGIN.mdl": "./PLUGIN.mdl",
64
+ "./components": {
65
+ "source": "./src/components/index.ts",
66
+ "types": "./dist/types/src/components/index.d.ts",
67
+ "default": "./dist/lib/neutral/components/index.mjs"
68
+ },
69
+ "./hooks": {
70
+ "source": "./src/hooks/index.ts",
71
+ "types": "./dist/types/src/hooks/index.d.ts",
72
+ "default": "./dist/lib/neutral/hooks/index.mjs"
73
+ },
74
+ "./plugin": {
75
+ "source": "./src/plugin.ts",
76
+ "types": "./dist/types/src/plugin.d.ts",
77
+ "default": "./dist/lib/neutral/plugin.mjs"
78
+ },
79
+ "./testing": {
80
+ "source": "./src/testing/index.ts",
81
+ "types": "./dist/types/src/testing/index.d.ts",
82
+ "default": "./dist/lib/neutral/testing/index.mjs"
83
+ },
84
+ "./translations": {
85
+ "source": "./src/translations.ts",
86
+ "types": "./dist/types/src/translations.d.ts",
87
+ "default": "./dist/lib/neutral/translations.mjs"
44
88
  }
45
89
  },
90
+ "types": "dist/types/src/index.d.ts",
46
91
  "files": [
47
92
  "dist",
48
- "src"
93
+ "src",
94
+ "PLUGIN.mdl"
49
95
  ],
50
96
  "dependencies": {
51
- "3d-force-graph": "^1.76.1",
52
97
  "@effect-atom/atom-react": "^0.5.0",
53
98
  "@observablehq/plot": "^0.6.11",
54
99
  "d3": "^7.9.0",
55
- "effect": "3.19.16",
100
+ "effect": "3.21.2",
56
101
  "force-graph": "^1.49.4",
57
- "lodash.defaultsdeep": "^4.6.1",
58
102
  "react-resize-detector": "^11.0.1",
59
- "three": "^0.178.0",
60
103
  "topojson-client": "^3.1.0",
61
- "@dxos/app-framework": "0.8.4-main.c85a9c8dae",
62
- "@dxos/async": "0.8.4-main.c85a9c8dae",
63
- "@dxos/app-toolkit": "0.8.4-main.c85a9c8dae",
64
- "@dxos/client": "0.8.4-main.c85a9c8dae",
65
- "@dxos/echo": "0.8.4-main.c85a9c8dae",
66
- "@dxos/echo-query": "0.8.4-main.c85a9c8dae",
67
- "@dxos/graph": "0.8.4-main.c85a9c8dae",
68
- "@dxos/operation": "0.8.4-main.c85a9c8dae",
69
- "@dxos/invariant": "0.8.4-main.c85a9c8dae",
70
- "@dxos/log": "0.8.4-main.c85a9c8dae",
71
- "@dxos/plugin-client": "0.8.4-main.c85a9c8dae",
72
- "@dxos/plugin-graph": "0.8.4-main.c85a9c8dae",
73
- "@dxos/react-client": "0.8.4-main.c85a9c8dae",
74
- "@dxos/plugin-search": "0.8.4-main.c85a9c8dae",
75
- "@dxos/plugin-space": "0.8.4-main.c85a9c8dae",
76
- "@dxos/react-ui-attention": "0.8.4-main.c85a9c8dae",
77
- "@dxos/react-ui-components": "0.8.4-main.c85a9c8dae",
78
- "@dxos/react-ui-mosaic": "0.8.4-main.c85a9c8dae",
79
- "@dxos/react-ui-graph": "0.8.4-main.c85a9c8dae",
80
- "@dxos/schema": "0.8.4-main.c85a9c8dae",
81
- "@dxos/react-ui-stack": "0.8.4-main.c85a9c8dae",
82
- "@dxos/types": "0.8.4-main.c85a9c8dae",
83
- "@dxos/util": "0.8.4-main.c85a9c8dae"
104
+ "@dxos/app-framework": "0.8.4-main.d9fc60f731",
105
+ "@dxos/client": "0.8.4-main.d9fc60f731",
106
+ "@dxos/compute": "0.8.4-main.d9fc60f731",
107
+ "@dxos/app-toolkit": "0.8.4-main.d9fc60f731",
108
+ "@dxos/echo": "0.8.4-main.d9fc60f731",
109
+ "@dxos/echo-query": "0.8.4-main.d9fc60f731",
110
+ "@dxos/graph": "0.8.4-main.d9fc60f731",
111
+ "@dxos/invariant": "0.8.4-main.d9fc60f731",
112
+ "@dxos/keys": "0.8.4-main.d9fc60f731",
113
+ "@dxos/log": "0.8.4-main.d9fc60f731",
114
+ "@dxos/plugin-client": "0.8.4-main.d9fc60f731",
115
+ "@dxos/plugin-space": "0.8.4-main.d9fc60f731",
116
+ "@dxos/react-ui-components": "0.8.4-main.d9fc60f731",
117
+ "@dxos/react-ui-graph": "0.8.4-main.d9fc60f731",
118
+ "@dxos/react-ui-mosaic": "0.8.4-main.d9fc60f731",
119
+ "@dxos/schema": "0.8.4-main.d9fc60f731",
120
+ "@dxos/types": "0.8.4-main.d9fc60f731",
121
+ "@dxos/util": "0.8.4-main.d9fc60f731",
122
+ "@dxos/react-ui-stack": "0.8.4-main.d9fc60f731",
123
+ "@dxos/react-client": "0.8.4-main.d9fc60f731"
84
124
  },
85
125
  "devDependencies": {
86
126
  "@types/d3": "^7.4.3",
@@ -92,19 +132,21 @@
92
132
  "@types/topojson-specification": "^1.0.5",
93
133
  "react": "~19.2.3",
94
134
  "react-dom": "~19.2.3",
95
- "vite": "^7.1.11",
96
- "@dxos/react-ui": "0.8.4-main.c85a9c8dae",
97
- "@dxos/storybook-utils": "0.8.4-main.c85a9c8dae",
98
- "@dxos/random": "0.8.4-main.c85a9c8dae",
99
- "@dxos/echo-generator": "0.8.4-main.c85a9c8dae",
100
- "@dxos/ui-theme": "0.8.4-main.c85a9c8dae"
135
+ "vite": "^8.0.14",
136
+ "@dxos/plugin-preview": "0.8.4-main.d9fc60f731",
137
+ "@dxos/random": "0.8.4-main.d9fc60f731",
138
+ "@dxos/react-ui": "0.8.4-main.d9fc60f731",
139
+ "@dxos/plugin-testing": "0.8.4-main.d9fc60f731",
140
+ "@dxos/storybook-utils": "0.8.4-main.d9fc60f731",
141
+ "@dxos/echo-generator": "0.8.4-main.d9fc60f731",
142
+ "@dxos/ui-theme": "0.8.4-main.d9fc60f731"
101
143
  },
102
144
  "peerDependencies": {
103
- "effect": "3.19.16",
145
+ "effect": "3.21.2",
104
146
  "react": "~19.2.3",
105
147
  "react-dom": "~19.2.3",
106
- "@dxos/ui-theme": "0.8.4-main.c85a9c8dae",
107
- "@dxos/react-ui": "0.8.4-main.c85a9c8dae"
148
+ "@dxos/ui-theme": "0.8.4-main.d9fc60f731",
149
+ "@dxos/react-ui": "0.8.4-main.d9fc60f731"
108
150
  },
109
151
  "publishConfig": {
110
152
  "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,37 +2,26 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import * as Effect from 'effect/Effect';
6
-
7
5
  import { Plugin } from '@dxos/app-framework';
8
6
  import { AppPlugin } from '@dxos/app-toolkit';
9
- import { Type } from '@dxos/echo';
10
- import { type CreateObject } from '@dxos/plugin-space/types';
11
- import { ViewModel } from '@dxos/schema';
12
7
 
13
- import { ReactSurface } from './capabilities';
14
- import { meta } from './meta';
15
- import { translations } from './translations';
16
- import { ExplorerAction, Graph } from './types';
8
+ import { CreateObject, ReactSurface } from '#capabilities';
9
+ import { meta } from '#meta';
10
+ import { translations } from '#translations';
11
+ import { Graph } from '#types';
12
+
13
+ // eslint-disable-next-line import/no-relative-packages
14
+ import pluginSpec from '../PLUGIN.mdl?raw';
17
15
 
18
16
  export const ExplorerPlugin = Plugin.define(meta).pipe(
19
- AppPlugin.addMetadataModule({
20
- metadata: {
21
- id: Type.getTypename(Graph.Graph),
22
- metadata: {
23
- icon: 'ph--graph--regular',
24
- iconHue: 'green',
25
- inputSchema: ExplorerAction.GraphProps,
26
- createObject: ((props, { db }) =>
27
- Effect.promise(async () => {
28
- const { view } = await ViewModel.makeFromDatabase({ db, typename: props.typename });
29
- return Graph.make({ name: props.name, view });
30
- })) satisfies CreateObject,
31
- },
32
- },
33
- }),
17
+ AppPlugin.addCreateObjectModule({ activate: CreateObject }),
34
18
  AppPlugin.addSchemaModule({ schema: [Graph.Graph] }),
35
19
  AppPlugin.addSurfaceModule({ activate: ReactSurface }),
36
20
  AppPlugin.addTranslationsModule({ translations }),
21
+ AppPlugin.addPluginAssetModule({
22
+ asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
23
+ }),
37
24
  Plugin.make,
38
25
  );
26
+
27
+ 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,4 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- export * from './react-surface';
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
8
+ export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
@@ -0,0 +1,32 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import React from 'react';
7
+
8
+ import { Capabilities, Capability } from '@dxos/app-framework';
9
+ import { Surface } from '@dxos/app-framework/ui';
10
+ import { AppSurface } from '@dxos/app-toolkit/ui';
11
+
12
+ import { ExplorerArticle } from '#containers';
13
+ import { Graph } from '#types';
14
+
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 <ExplorerArticle role={role} subject={data.subject} attendableId={data.attendableId} />;
28
+ },
29
+ }),
30
+ ),
31
+ ),
32
+ );
@@ -2,42 +2,35 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type Meta } from '@storybook/react-vite';
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
  import React from 'react';
7
7
 
8
- import { ClientRepeater } from '@dxos/react-client/testing';
9
8
  import { withLayout, withTheme } from '@dxos/react-ui/testing';
10
9
 
11
10
  import CitiesData from '../../../data/cities.js';
12
-
13
11
  import { Chart } from './Chart';
14
12
 
15
- // TODO(burdon): Generate data with geo lat/lng.
16
- // TODO(burdon): How to provide geo service via agent?
17
-
18
- const Story = () => {
19
- if (!CitiesData) {
20
- return null;
21
- }
22
-
23
- const items = CitiesData.features.map((feature: any) => ({
24
- x: feature.geometry.coordinates[0],
25
- y: feature.geometry.coordinates[1],
26
- }));
13
+ const items = CitiesData.features.map((feature: any) => ({
14
+ x: feature.geometry.coordinates[0],
15
+ y: feature.geometry.coordinates[1],
16
+ }));
27
17
 
28
- return <Chart items={items} accessor={(obj) => ({ x: obj.x, y: obj.y })} options={{ stroke: 'blue' }} />;
29
- };
30
-
31
- // TODO(burdon): Change to decorator.
32
- 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
+ );
33
21
 
34
22
  const meta = {
35
23
  title: 'plugins/plugin-explorer/components/Chart',
36
24
  component: Chart,
37
- decorators: [withTheme(), withLayout()],
25
+ render: DefaultStory,
26
+ decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
38
27
  parameters: {
39
28
  layout: 'fullscreen',
40
29
  },
41
30
  } satisfies Meta<typeof Chart>;
42
31
 
43
32
  export default meta;
33
+
34
+ type Story = StoryObj<typeof meta>;
35
+
36
+ export const Default: Story = {};
@@ -7,7 +7,7 @@ import { type DotOptions } from '@observablehq/plot';
7
7
  import React, { useEffect } from 'react';
8
8
  import { useResizeDetector } from 'react-resize-detector';
9
9
 
10
- import { type Accessor, type Point, createAdapter } from '../plot';
10
+ import { type Accessor, type Point, createAdapter } from '../../util';
11
11
 
12
12
  const defaultOptions: DotOptions = {
13
13
  r: 4,
@@ -3,31 +3,27 @@
3
3
  //
4
4
 
5
5
  import { dot, geo, graticule, plot, sphere } from '@observablehq/plot';
6
- import { type Meta } from '@storybook/react-vite';
6
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
7
7
  import { geoCircle } from 'd3';
8
8
  import React, { useEffect } from 'react';
9
9
  import { useResizeDetector } from 'react-resize-detector';
10
10
  import { feature } from 'topojson-client';
11
11
 
12
- import { ClientRepeater } from '@dxos/react-client/testing';
13
12
  import { withLayout, withTheme } from '@dxos/react-ui/testing';
14
13
 
15
14
  import CitiesData from '../../../data/cities.js';
16
15
  import CountriesData from '../../../data/countries-110m.js';
17
-
18
16
  import { Globe } from './Globe';
19
17
 
20
18
  // TODO(burdon): Generate data with geo lat/lng.
21
19
  // TODO(burdon): How to provide geo service via agent?
22
20
 
23
- const DefaultStory = () => {
24
- const items = CitiesData.features.map((feature: any) => ({
25
- lat: feature.geometry.coordinates[0],
26
- lng: feature.geometry.coordinates[1],
27
- }));
21
+ const items = CitiesData.features.map((feature: any) => ({
22
+ lat: feature.geometry.coordinates[0],
23
+ lng: feature.geometry.coordinates[1],
24
+ }));
28
25
 
29
- return <Globe items={items} />;
30
- };
26
+ const DefaultStory = () => <Globe items={items} />;
31
27
 
32
28
  const ExtendedStory = () => {
33
29
  const { ref: containerRef, width = 0, height = 0 } = useResizeDetector({ refreshRate: 200 });
@@ -37,11 +33,6 @@ const ExtendedStory = () => {
37
33
  }
38
34
 
39
35
  const land = feature(CountriesData as any, CountriesData.objects.land as any);
40
- const items = CitiesData.features.map((feature: any) => ({
41
- lat: feature.geometry.coordinates[0],
42
- lng: feature.geometry.coordinates[1],
43
- }));
44
-
45
36
  const city = items[0];
46
37
  const circle = geoCircle().center([city.lat, city.lng]).radius(16)();
47
38
 
@@ -50,7 +41,6 @@ const ExtendedStory = () => {
50
41
  const drawing = plot({
51
42
  // https://observablehq.com/plot/features/projections
52
43
  projection: { type: 'orthographic', rotate: [-city.lat + 30, -30] },
53
- // projection: { type: 'equirectangular', rotate: [-140, -30] },
54
44
  width,
55
45
  height,
56
46
  style: {
@@ -81,14 +71,21 @@ const ExtendedStory = () => {
81
71
 
82
72
  const meta = {
83
73
  title: 'plugins/plugin-explorer/components/Globe',
84
- decorators: [withTheme(), withLayout()],
74
+ component: Globe,
75
+ decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
85
76
  parameters: {
86
77
  layout: 'fullscreen',
87
78
  },
88
- } satisfies Meta;
79
+ } satisfies Meta<typeof Globe>;
89
80
 
90
81
  export default meta;
91
82
 
92
- export const Default = () => <ClientRepeater component={DefaultStory} createSpace />;
83
+ type Story = StoryObj<typeof meta>;
93
84
 
94
- 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
+ };
@@ -9,7 +9,7 @@ import { useResizeDetector } from 'react-resize-detector';
9
9
  import * as topojson from 'topojson-client';
10
10
 
11
11
  import CountriesData from '../../../data/countries-110m.js';
12
- import { type Accessor, type GeoLocation, createAdapter } from '../plot';
12
+ import { type Accessor, type GeoLocation, createAdapter } from '../../util';
13
13
 
14
14
  const defaultOptions: DotOptions = {
15
15
  r: 4,
@@ -0,0 +1,97 @@
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/testing';
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, createObjectFactory, createRelationFactory } 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
+
26
+ const generator = random as any as ValueGenerator;
27
+
28
+ random.seed(1);
29
+
30
+ const DefaultStory = () => {
31
+ const [space] = useSpaces();
32
+ const model = useGraphModel(space?.db);
33
+ if (!space || !model) {
34
+ return <Loading data={{ space: !!space, model: !!model }} />;
35
+ }
36
+
37
+ return <CanvasForceGraph model={model} />;
38
+ };
39
+
40
+ const meta = {
41
+ title: 'plugins/plugin-explorer/components/CanvasForceGraph',
42
+ component: CanvasForceGraph,
43
+ render: DefaultStory,
44
+ decorators: [
45
+ withTheme(),
46
+ withLayout({ layout: 'fullscreen' }),
47
+ withPluginManager({
48
+ plugins: [
49
+ ...corePlugins(),
50
+ ClientPlugin({
51
+ types: [
52
+ Graph.Graph,
53
+ View.View,
54
+ HasRelationship.HasRelationship,
55
+ Organization.Organization,
56
+ Pipeline.Pipeline,
57
+ Person.Person,
58
+ ],
59
+ onClientInitialized: ({ client }) =>
60
+ Effect.gen(function* () {
61
+ const { personalSpace } = yield* initializeIdentity(client);
62
+ yield* Effect.promise(() =>
63
+ createObjectFactory(
64
+ personalSpace.db,
65
+ generator,
66
+ )([
67
+ { type: Organization.Organization, count: 20 },
68
+ { type: Person.Person, count: 30 },
69
+ { type: Pipeline.Pipeline, count: 10 },
70
+ ]),
71
+ );
72
+ yield* Effect.promise(() =>
73
+ createRelationFactory(
74
+ personalSpace.db,
75
+ generator,
76
+ )([{ type: HasRelationship.HasRelationship, count: 20, data: { kind: 'friend' } }]),
77
+ );
78
+ const { view } = yield* Effect.promise(() =>
79
+ ViewModel.makeFromDatabase({ db: personalSpace.db, typename: Type.getTypename(Graph.Graph) }),
80
+ );
81
+ personalSpace.db.add(Graph.make({ name: 'Test', view }));
82
+ yield* Effect.promise(() => personalSpace.db.flush({ indexes: true }));
83
+ }),
84
+ }),
85
+ ],
86
+ }),
87
+ ],
88
+ parameters: {
89
+ layout: 'fullscreen',
90
+ },
91
+ } satisfies Meta<typeof CanvasForceGraph>;
92
+
93
+ export default meta;
94
+
95
+ type Story = StoryObj<typeof meta>;
96
+
97
+ export const Default: Story = {};