@dxos/plugin-explorer 0.8.4-main.74a063c4e0 → 0.8.4-main.765dc60934

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 (196) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/neutral/ExplorerArticle-EW2MBCRK.mjs +141 -0
  3. package/dist/lib/neutral/ExplorerArticle-EW2MBCRK.mjs.map +7 -0
  4. package/dist/lib/neutral/ExplorerPlugin.mjs +10 -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/{browser/types/index.mjs → neutral/chunk-7SPMPHRS.mjs} +10 -8
  8. package/dist/lib/neutral/chunk-7SPMPHRS.mjs.map +7 -0
  9. package/dist/lib/neutral/chunk-GRJXLL4Z.mjs +25 -0
  10. package/dist/lib/neutral/chunk-GRJXLL4Z.mjs.map +7 -0
  11. package/dist/lib/{browser/chunk-LSUP47BZ.mjs → neutral/chunk-HPIS2WXY.mjs} +1 -1
  12. package/dist/lib/{browser/chunk-LSUP47BZ.mjs.map → neutral/chunk-HPIS2WXY.mjs.map} +2 -2
  13. package/dist/lib/{browser → neutral/components}/index.mjs +661 -417
  14. package/dist/lib/{node-esm → neutral/components}/index.mjs.map +4 -4
  15. package/dist/lib/neutral/containers/index.mjs +9 -0
  16. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  17. package/dist/lib/neutral/create-object-F6TKVAGV.mjs +39 -0
  18. package/dist/lib/neutral/create-object-F6TKVAGV.mjs.map +7 -0
  19. package/dist/lib/neutral/hooks/index.mjs +45 -0
  20. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  21. package/dist/lib/neutral/index.mjs +14 -0
  22. package/dist/lib/neutral/meta.json +1 -0
  23. package/dist/lib/{browser → neutral}/meta.mjs +1 -1
  24. package/dist/lib/neutral/plugin.mjs +12 -0
  25. package/dist/lib/neutral/plugin.mjs.map +7 -0
  26. package/dist/lib/neutral/react-surface-APBW2VQG.mjs +26 -0
  27. package/dist/lib/neutral/react-surface-APBW2VQG.mjs.map +7 -0
  28. package/dist/lib/neutral/testing.mjs +8 -0
  29. package/dist/lib/neutral/testing.mjs.map +7 -0
  30. package/dist/lib/neutral/translations.mjs +33 -0
  31. package/dist/lib/neutral/translations.mjs.map +7 -0
  32. package/dist/lib/neutral/types/index.mjs +10 -0
  33. package/dist/lib/neutral/types/index.mjs.map +7 -0
  34. package/dist/types/data/cities.d.ts +4 -4
  35. package/dist/types/data/cities.d.ts.map +1 -1
  36. package/dist/types/data/countries-110m.d.ts +19 -22
  37. package/dist/types/data/countries-110m.d.ts.map +1 -1
  38. package/dist/types/src/ExplorerPlugin.d.ts +1 -0
  39. package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
  40. package/dist/types/src/ExplorerPlugin.test.d.ts +2 -0
  41. package/dist/types/src/ExplorerPlugin.test.d.ts.map +1 -0
  42. package/dist/types/src/capabilities/create-object.d.ts +11 -0
  43. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  44. package/dist/types/src/capabilities/index.d.ts +6 -0
  45. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  46. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  47. package/dist/types/src/components/Chart/Chart.d.ts.map +1 -1
  48. package/dist/types/src/components/Chart/Chart.stories.d.ts +4 -1
  49. package/dist/types/src/components/Chart/Chart.stories.d.ts.map +1 -1
  50. package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
  51. package/dist/types/src/components/Globe/Globe.stories.d.ts +5 -2
  52. package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
  53. package/dist/types/src/components/Graph/CanvasForceGraph.d.ts +13 -0
  54. package/dist/types/src/components/Graph/CanvasForceGraph.d.ts.map +1 -0
  55. package/dist/types/src/components/Graph/{D3ForceGraph.stories.d.ts → CanvasForceGraph.stories.d.ts} +3 -7
  56. package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts.map +1 -0
  57. package/dist/types/src/components/Graph/ForceGraph.d.ts +12 -5
  58. package/dist/types/src/components/Graph/ForceGraph.d.ts.map +1 -1
  59. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts +3 -1
  60. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts.map +1 -1
  61. package/dist/types/src/components/Graph/{adapter.d.ts → graph-adapter.d.ts} +1 -1
  62. package/dist/types/src/components/Graph/graph-adapter.d.ts.map +1 -0
  63. package/dist/types/src/components/Graph/index.d.ts +1 -1
  64. package/dist/types/src/components/Graph/index.d.ts.map +1 -1
  65. package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts +21 -0
  66. package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts.map +1 -0
  67. package/dist/types/src/components/Tree/Tree.d.ts +20 -23
  68. package/dist/types/src/components/Tree/Tree.d.ts.map +1 -1
  69. package/dist/types/src/components/Tree/Tree.stories.d.ts +5 -12
  70. package/dist/types/src/components/Tree/Tree.stories.d.ts.map +1 -1
  71. package/dist/types/src/components/Tree/index.d.ts +3 -0
  72. package/dist/types/src/components/Tree/index.d.ts.map +1 -1
  73. package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts +35 -2
  74. package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts.map +1 -1
  75. package/dist/types/src/components/Tree/layout/RadialTree.d.ts +35 -2
  76. package/dist/types/src/components/Tree/layout/RadialTree.d.ts.map +1 -1
  77. package/dist/types/src/components/Tree/layout/TidyTree.d.ts +24 -2
  78. package/dist/types/src/components/Tree/layout/TidyTree.d.ts.map +1 -1
  79. package/dist/types/src/components/Tree/layout/hierarchy.d.ts +17 -0
  80. package/dist/types/src/components/Tree/layout/hierarchy.d.ts.map +1 -0
  81. package/dist/types/src/components/Tree/layout/index.d.ts +5 -4
  82. package/dist/types/src/components/Tree/layout/index.d.ts.map +1 -1
  83. package/dist/types/src/components/Tree/layout/slots.d.ts +7 -0
  84. package/dist/types/src/components/Tree/layout/slots.d.ts.map +1 -0
  85. package/dist/types/src/components/Tree/layout/useContainerSize.d.ts +15 -0
  86. package/dist/types/src/components/Tree/layout/useContainerSize.d.ts.map +1 -0
  87. package/dist/types/src/components/Tree/space-graph-adapter.d.ts +32 -0
  88. package/dist/types/src/components/Tree/space-graph-adapter.d.ts.map +1 -0
  89. package/dist/types/src/components/Tree/testing/generator.d.ts.map +1 -1
  90. package/dist/types/src/components/Tree/testing/index.d.ts +1 -0
  91. package/dist/types/src/components/Tree/testing/index.d.ts.map +1 -1
  92. package/dist/types/src/components/Tree/testing/relations.d.ts +47 -0
  93. package/dist/types/src/components/Tree/testing/relations.d.ts.map +1 -0
  94. package/dist/types/src/components/Tree/types/tree.d.ts +6 -6
  95. package/dist/types/src/components/Tree/types/tree.d.ts.map +1 -1
  96. package/dist/types/src/components/Tree/types/types.d.ts +14 -4
  97. package/dist/types/src/components/Tree/types/types.d.ts.map +1 -1
  98. package/dist/types/src/components/plot.d.ts.map +1 -1
  99. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts +8 -0
  100. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts.map +1 -0
  101. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts +24 -0
  102. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts.map +1 -0
  103. package/dist/types/src/containers/ExplorerArticle/index.d.ts +2 -0
  104. package/dist/types/src/containers/ExplorerArticle/index.d.ts.map +1 -0
  105. package/dist/types/src/containers/index.d.ts +1 -1
  106. package/dist/types/src/containers/index.d.ts.map +1 -1
  107. package/dist/types/src/hooks/useGraphModel.d.ts +2 -2
  108. package/dist/types/src/hooks/useGraphModel.d.ts.map +1 -1
  109. package/dist/types/src/index.d.ts +1 -3
  110. package/dist/types/src/index.d.ts.map +1 -1
  111. package/dist/types/src/plugin.d.ts +3 -0
  112. package/dist/types/src/plugin.d.ts.map +1 -0
  113. package/dist/types/src/testing.d.ts +2 -0
  114. package/dist/types/src/testing.d.ts.map +1 -0
  115. package/dist/types/src/translations.d.ts +17 -17
  116. package/dist/types/src/translations.d.ts.map +1 -1
  117. package/dist/types/src/types/Graph.d.ts +3 -4
  118. package/dist/types/src/types/Graph.d.ts.map +1 -1
  119. package/dist/types/tsconfig.tsbuildinfo +1 -1
  120. package/package.json +100 -62
  121. package/src/ExplorerPlugin.test.ts +26 -0
  122. package/src/ExplorerPlugin.tsx +6 -35
  123. package/src/capabilities/create-object.ts +36 -0
  124. package/src/capabilities/index.ts +1 -0
  125. package/src/capabilities/react-surface.tsx +6 -4
  126. package/src/components/Chart/Chart.stories.tsx +14 -20
  127. package/src/components/Globe/Globe.stories.tsx +17 -19
  128. package/src/components/Graph/CanvasForceGraph.stories.tsx +83 -0
  129. package/src/components/Graph/CanvasForceGraph.tsx +124 -0
  130. package/src/components/Graph/ForceGraph.stories.tsx +69 -37
  131. package/src/components/Graph/ForceGraph.tsx +104 -85
  132. package/src/components/Graph/index.ts +1 -1
  133. package/src/components/Tree/EdgeBundling.stories.tsx +144 -0
  134. package/src/components/Tree/Tree.stories.tsx +17 -38
  135. package/src/components/Tree/Tree.tsx +69 -100
  136. package/src/components/Tree/index.ts +3 -0
  137. package/src/components/Tree/layout/HierarchicalEdgeBundling.tsx +277 -0
  138. package/src/components/Tree/layout/RadialTree.tsx +237 -0
  139. package/src/components/Tree/layout/TidyTree.tsx +246 -0
  140. package/src/components/Tree/layout/hierarchy.ts +32 -0
  141. package/src/components/Tree/layout/index.ts +5 -5
  142. package/src/components/Tree/layout/slots.ts +19 -0
  143. package/src/components/Tree/layout/useContainerSize.ts +43 -0
  144. package/src/components/Tree/space-graph-adapter.ts +96 -0
  145. package/src/components/Tree/testing/generator.ts +1 -1
  146. package/src/components/Tree/testing/index.ts +1 -0
  147. package/src/components/Tree/testing/relations.ts +182 -0
  148. package/src/components/Tree/types/tree.test.ts +1 -1
  149. package/src/components/Tree/types/tree.ts +9 -9
  150. package/src/components/Tree/types/types.ts +38 -29
  151. package/src/containers/ExplorerArticle/ExplorerArticle.stories.tsx +119 -0
  152. package/src/containers/ExplorerArticle/ExplorerArticle.tsx +153 -0
  153. package/src/containers/ExplorerArticle/index.ts +5 -0
  154. package/src/containers/index.ts +1 -1
  155. package/src/hooks/useGraphModel.ts +10 -6
  156. package/src/index.ts +1 -4
  157. package/src/plugin.ts +9 -0
  158. package/src/testing.ts +7 -0
  159. package/src/translations.ts +1 -1
  160. package/src/types/ExplorerAction.ts +1 -1
  161. package/src/types/Graph.ts +2 -3
  162. package/dist/lib/browser/index.mjs.map +0 -7
  163. package/dist/lib/browser/meta.json +0 -1
  164. package/dist/lib/browser/types/index.mjs.map +0 -7
  165. package/dist/lib/node-esm/chunk-EN3JZNEY.mjs +0 -26
  166. package/dist/lib/node-esm/chunk-EN3JZNEY.mjs.map +0 -7
  167. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  168. package/dist/lib/node-esm/index.mjs +0 -11375
  169. package/dist/lib/node-esm/meta.json +0 -1
  170. package/dist/lib/node-esm/meta.mjs +0 -9
  171. package/dist/lib/node-esm/types/index.mjs +0 -71
  172. package/dist/lib/node-esm/types/index.mjs.map +0 -7
  173. package/dist/types/src/components/Graph/D3ForceGraph.d.ts +0 -19
  174. package/dist/types/src/components/Graph/D3ForceGraph.d.ts.map +0 -1
  175. package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts.map +0 -1
  176. package/dist/types/src/components/Graph/adapter.d.ts.map +0 -1
  177. package/dist/types/src/components/Graph/testing.d.ts +0 -14
  178. package/dist/types/src/components/Graph/testing.d.ts.map +0 -1
  179. package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts +0 -6
  180. package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts.map +0 -1
  181. package/dist/types/src/containers/ExplorerContainer/index.d.ts +0 -2
  182. package/dist/types/src/containers/ExplorerContainer/index.d.ts.map +0 -1
  183. package/src/components/Graph/D3ForceGraph.stories.tsx +0 -83
  184. package/src/components/Graph/D3ForceGraph.tsx +0 -108
  185. package/src/components/Graph/testing.ts +0 -58
  186. package/src/components/Tree/layout/HierarchicalEdgeBundling.ts +0 -162
  187. package/src/components/Tree/layout/RadialTree.ts +0 -94
  188. package/src/components/Tree/layout/TidyTree.ts +0 -101
  189. package/src/containers/ExplorerContainer/ExplorerContainer.tsx +0 -53
  190. package/src/containers/ExplorerContainer/index.ts +0 -5
  191. /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/ExplorerPlugin.mjs.map} +0 -0
  192. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  193. /package/dist/lib/{browser/meta.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  194. /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/index.mjs.map} +0 -0
  195. /package/dist/lib/{node-esm → neutral}/meta.mjs.map +0 -0
  196. /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.74a063c4e0",
3
+ "version": "0.8.4-main.765dc60934",
4
4
  "description": "Braneframe data visualization plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -8,49 +8,85 @@
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
15
  "imports": {
16
- "#capabilities": "./src/capabilities/index.ts",
17
- "#components": "./src/components/index.ts",
18
- "#containers": "./src/containers/index.ts",
19
- "#hooks": "./src/hooks/index.ts",
20
- "#meta": "./src/meta.ts",
21
- "#types": "./src/types/index.ts"
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"
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": {
37
+ "source": "./src/meta.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"
45
+ },
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": {
52
+ "source": "./src/types/index.ts",
53
+ "types": "./dist/types/src/types/index.d.ts",
54
+ "default": "./dist/lib/neutral/types/index.mjs"
55
+ }
22
56
  },
23
57
  "exports": {
24
58
  ".": {
25
59
  "source": "./src/index.ts",
26
- "browser": "./dist/lib/browser/index.mjs",
27
- "node": "./dist/lib/node-esm/index.mjs",
28
- "types": "./dist/types/src/index.d.ts"
60
+ "types": "./dist/types/src/index.d.ts",
61
+ "default": "./dist/lib/neutral/index.mjs"
29
62
  },
30
- "./meta": {
31
- "source": "./src/meta.ts",
32
- "browser": "./dist/lib/browser/meta.mjs",
33
- "node": "./dist/lib/node-esm/meta.mjs",
34
- "types": "./dist/types/src/meta.d.ts"
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"
35
67
  },
36
- "./types": {
37
- "source": "./src/types/index.ts",
38
- "browser": "./dist/lib/browser/types/index.mjs",
39
- "node": "./dist/lib/node-esm/types/index.mjs",
40
- "types": "./dist/types/src/types/index.d.ts"
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
+ "./testing": {
79
+ "source": "./src/testing.ts",
80
+ "types": "./dist/types/src/testing.d.ts",
81
+ "default": "./dist/lib/neutral/testing.mjs"
82
+ },
83
+ "./translations": {
84
+ "source": "./src/translations.ts",
85
+ "types": "./dist/types/src/translations.d.ts",
86
+ "default": "./dist/lib/neutral/translations.mjs"
41
87
  }
42
88
  },
43
89
  "types": "dist/types/src/index.d.ts",
44
- "typesVersions": {
45
- "*": {
46
- "meta": [
47
- "dist/types/src/meta.d.ts"
48
- ],
49
- "types": [
50
- "dist/types/src/types/index.d.ts"
51
- ]
52
- }
53
- },
54
90
  "files": [
55
91
  "dist",
56
92
  "src"
@@ -66,29 +102,29 @@
66
102
  "react-resize-detector": "^11.0.1",
67
103
  "three": "^0.178.0",
68
104
  "topojson-client": "^3.1.0",
69
- "@dxos/app-framework": "0.8.4-main.74a063c4e0",
70
- "@dxos/async": "0.8.4-main.74a063c4e0",
71
- "@dxos/app-toolkit": "0.8.4-main.74a063c4e0",
72
- "@dxos/client": "0.8.4-main.74a063c4e0",
73
- "@dxos/echo": "0.8.4-main.74a063c4e0",
74
- "@dxos/echo-query": "0.8.4-main.74a063c4e0",
75
- "@dxos/graph": "0.8.4-main.74a063c4e0",
76
- "@dxos/operation": "0.8.4-main.74a063c4e0",
77
- "@dxos/log": "0.8.4-main.74a063c4e0",
78
- "@dxos/invariant": "0.8.4-main.74a063c4e0",
79
- "@dxos/plugin-client": "0.8.4-main.74a063c4e0",
80
- "@dxos/plugin-graph": "0.8.4-main.74a063c4e0",
81
- "@dxos/plugin-search": "0.8.4-main.74a063c4e0",
82
- "@dxos/plugin-space": "0.8.4-main.74a063c4e0",
83
- "@dxos/react-client": "0.8.4-main.74a063c4e0",
84
- "@dxos/react-ui-components": "0.8.4-main.74a063c4e0",
85
- "@dxos/react-ui-attention": "0.8.4-main.74a063c4e0",
86
- "@dxos/react-ui-graph": "0.8.4-main.74a063c4e0",
87
- "@dxos/react-ui-mosaic": "0.8.4-main.74a063c4e0",
88
- "@dxos/types": "0.8.4-main.74a063c4e0",
89
- "@dxos/util": "0.8.4-main.74a063c4e0",
90
- "@dxos/react-ui-stack": "0.8.4-main.74a063c4e0",
91
- "@dxos/schema": "0.8.4-main.74a063c4e0"
105
+ "@dxos/app-toolkit": "0.8.4-main.765dc60934",
106
+ "@dxos/async": "0.8.4-main.765dc60934",
107
+ "@dxos/app-framework": "0.8.4-main.765dc60934",
108
+ "@dxos/client": "0.8.4-main.765dc60934",
109
+ "@dxos/compute": "0.8.4-main.765dc60934",
110
+ "@dxos/echo-query": "0.8.4-main.765dc60934",
111
+ "@dxos/echo": "0.8.4-main.765dc60934",
112
+ "@dxos/plugin-client": "0.8.4-main.765dc60934",
113
+ "@dxos/invariant": "0.8.4-main.765dc60934",
114
+ "@dxos/log": "0.8.4-main.765dc60934",
115
+ "@dxos/plugin-search": "0.8.4-main.765dc60934",
116
+ "@dxos/plugin-graph": "0.8.4-main.765dc60934",
117
+ "@dxos/plugin-space": "0.8.4-main.765dc60934",
118
+ "@dxos/graph": "0.8.4-main.765dc60934",
119
+ "@dxos/react-client": "0.8.4-main.765dc60934",
120
+ "@dxos/react-ui-attention": "0.8.4-main.765dc60934",
121
+ "@dxos/react-ui-components": "0.8.4-main.765dc60934",
122
+ "@dxos/react-ui-graph": "0.8.4-main.765dc60934",
123
+ "@dxos/react-ui-mosaic": "0.8.4-main.765dc60934",
124
+ "@dxos/schema": "0.8.4-main.765dc60934",
125
+ "@dxos/util": "0.8.4-main.765dc60934",
126
+ "@dxos/types": "0.8.4-main.765dc60934",
127
+ "@dxos/react-ui-stack": "0.8.4-main.765dc60934"
92
128
  },
93
129
  "devDependencies": {
94
130
  "@types/d3": "^7.4.3",
@@ -100,19 +136,21 @@
100
136
  "@types/topojson-specification": "^1.0.5",
101
137
  "react": "~19.2.3",
102
138
  "react-dom": "~19.2.3",
103
- "vite": "^7.1.11",
104
- "@dxos/echo-generator": "0.8.4-main.74a063c4e0",
105
- "@dxos/react-ui": "0.8.4-main.74a063c4e0",
106
- "@dxos/random": "0.8.4-main.74a063c4e0",
107
- "@dxos/storybook-utils": "0.8.4-main.74a063c4e0",
108
- "@dxos/ui-theme": "0.8.4-main.74a063c4e0"
139
+ "vite": "^8.0.13",
140
+ "@dxos/echo-generator": "0.8.4-main.765dc60934",
141
+ "@dxos/plugin-preview": "0.8.4-main.765dc60934",
142
+ "@dxos/plugin-testing": "0.8.4-main.765dc60934",
143
+ "@dxos/random": "0.8.4-main.765dc60934",
144
+ "@dxos/storybook-utils": "0.8.4-main.765dc60934",
145
+ "@dxos/react-ui": "0.8.4-main.765dc60934",
146
+ "@dxos/ui-theme": "0.8.4-main.765dc60934"
109
147
  },
110
148
  "peerDependencies": {
111
149
  "effect": "3.20.0",
112
150
  "react": "~19.2.3",
113
151
  "react-dom": "~19.2.3",
114
- "@dxos/ui-theme": "0.8.4-main.74a063c4e0",
115
- "@dxos/react-ui": "0.8.4-main.74a063c4e0"
152
+ "@dxos/react-ui": "0.8.4-main.765dc60934",
153
+ "@dxos/ui-theme": "0.8.4-main.765dc60934"
116
154
  },
117
155
  "publishConfig": {
118
156
  "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,49 +2,20 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import * as Effect from 'effect/Effect';
6
- import * as Option from 'effect/Option';
7
-
8
5
  import { Plugin } from '@dxos/app-framework';
9
6
  import { AppPlugin } from '@dxos/app-toolkit';
10
- import { Annotation, Type } from '@dxos/echo';
11
- import { Operation } from '@dxos/operation';
12
- import { SpaceOperation } from '@dxos/plugin-space/operations';
13
- import { type CreateObject } from '@dxos/plugin-space/types';
14
- import { ViewModel } from '@dxos/schema';
15
7
 
16
- import { ReactSurface } from '#capabilities';
8
+ import { CreateObject, ReactSurface } from '#capabilities';
17
9
  import { meta } from '#meta';
18
- import { ExplorerAction, Graph } from '#types';
19
-
20
- import { translations } from './translations';
10
+ import { translations } from '#translations';
11
+ import { Graph } from '#types';
21
12
 
22
13
  export const ExplorerPlugin = Plugin.define(meta).pipe(
23
- AppPlugin.addMetadataModule({
24
- metadata: {
25
- id: Type.getTypename(Graph.Graph),
26
- metadata: {
27
- icon: Annotation.IconAnnotation.get(Graph.Graph).pipe(Option.getOrThrow).icon,
28
- iconHue: Annotation.IconAnnotation.get(Graph.Graph).pipe(Option.getOrThrow).hue ?? 'white',
29
- inputSchema: ExplorerAction.GraphProps,
30
- createObject: ((props, options) =>
31
- Effect.gen(function* () {
32
- const object = yield* Effect.promise(async () => {
33
- const { view } = await ViewModel.makeFromDatabase({ db: options.db, typename: props.typename });
34
- return Graph.make({ name: props.name, view });
35
- });
36
- return yield* Operation.invoke(SpaceOperation.AddObject, {
37
- object,
38
- target: options.target,
39
- hidden: true,
40
- targetNodeId: options.targetNodeId,
41
- });
42
- })) satisfies CreateObject,
43
- },
44
- },
45
- }),
14
+ AppPlugin.addCreateObjectModule({ activate: CreateObject }),
46
15
  AppPlugin.addSchemaModule({ schema: [Graph.Graph] }),
47
16
  AppPlugin.addSurfaceModule({ activate: ReactSurface }),
48
17
  AppPlugin.addTranslationsModule({ translations }),
49
18
  Plugin.make,
50
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
+ );
@@ -4,4 +4,5 @@
4
4
 
5
5
  import { Capability } from '@dxos/app-framework';
6
6
 
7
+ export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
7
8
  export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
@@ -9,7 +9,7 @@ import { Capabilities, Capability } from '@dxos/app-framework';
9
9
  import { Surface } from '@dxos/app-framework/ui';
10
10
  import { AppSurface } from '@dxos/app-toolkit/ui';
11
11
 
12
- import { ExplorerContainer } from '#containers';
12
+ import { ExplorerArticle } from '#containers';
13
13
  import { Graph } from '#types';
14
14
 
15
15
  export default Capability.makeModule(() =>
@@ -19,10 +19,12 @@ export default Capability.makeModule(() =>
19
19
  Surface.create({
20
20
  id: 'article',
21
21
  // TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
22
- role: ['article', 'section'],
23
- filter: AppSurface.objectArticle(Graph.Graph),
22
+ filter: AppSurface.oneOf(
23
+ AppSurface.object(AppSurface.Article, Graph.Graph),
24
+ AppSurface.object(AppSurface.Section, Graph.Graph),
25
+ ),
24
26
  component: ({ data, role }) => {
25
- return <ExplorerContainer role={role} subject={data.subject} attendableId={data.attendableId} />;
27
+ return <ExplorerArticle role={role} subject={data.subject} attendableId={data.attendableId} />;
26
28
  },
27
29
  }),
28
30
  ),
@@ -2,41 +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
11
  import { Chart } from './Chart';
13
12
 
14
- // TODO(burdon): Generate data with geo lat/lng.
15
- // TODO(burdon): How to provide geo service via agent?
13
+ const items = CitiesData.features.map((feature: any) => ({
14
+ x: feature.geometry.coordinates[0],
15
+ y: feature.geometry.coordinates[1],
16
+ }));
16
17
 
17
- const Story = () => {
18
- if (!CitiesData) {
19
- return null;
20
- }
21
-
22
- const items = CitiesData.features.map((feature: any) => ({
23
- x: feature.geometry.coordinates[0],
24
- y: feature.geometry.coordinates[1],
25
- }));
26
-
27
- return <Chart items={items} accessor={(obj) => ({ x: obj.x, y: obj.y })} options={{ stroke: 'blue' }} />;
28
- };
29
-
30
- // TODO(burdon): Change to decorator.
31
- 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
+ );
32
21
 
33
22
  const meta = {
34
23
  title: 'plugins/plugin-explorer/components/Chart',
35
24
  component: Chart,
36
- decorators: [withTheme(), withLayout()],
25
+ render: DefaultStory,
26
+ decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
37
27
  parameters: {
38
28
  layout: 'fullscreen',
39
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 = {};
@@ -3,13 +3,12 @@
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';
@@ -19,14 +18,12 @@ import { Globe } from './Globe';
19
18
  // TODO(burdon): Generate data with geo lat/lng.
20
19
  // TODO(burdon): How to provide geo service via agent?
21
20
 
22
- const DefaultStory = () => {
23
- const items = CitiesData.features.map((feature: any) => ({
24
- lat: feature.geometry.coordinates[0],
25
- lng: feature.geometry.coordinates[1],
26
- }));
21
+ const items = CitiesData.features.map((feature: any) => ({
22
+ lat: feature.geometry.coordinates[0],
23
+ lng: feature.geometry.coordinates[1],
24
+ }));
27
25
 
28
- return <Globe items={items} />;
29
- };
26
+ const DefaultStory = () => <Globe items={items} />;
30
27
 
31
28
  const ExtendedStory = () => {
32
29
  const { ref: containerRef, width = 0, height = 0 } = useResizeDetector({ refreshRate: 200 });
@@ -36,11 +33,6 @@ const ExtendedStory = () => {
36
33
  }
37
34
 
38
35
  const land = feature(CountriesData as any, CountriesData.objects.land as any);
39
- const items = CitiesData.features.map((feature: any) => ({
40
- lat: feature.geometry.coordinates[0],
41
- lng: feature.geometry.coordinates[1],
42
- }));
43
-
44
36
  const city = items[0];
45
37
  const circle = geoCircle().center([city.lat, city.lng]).radius(16)();
46
38
 
@@ -49,7 +41,6 @@ const ExtendedStory = () => {
49
41
  const drawing = plot({
50
42
  // https://observablehq.com/plot/features/projections
51
43
  projection: { type: 'orthographic', rotate: [-city.lat + 30, -30] },
52
- // projection: { type: 'equirectangular', rotate: [-140, -30] },
53
44
  width,
54
45
  height,
55
46
  style: {
@@ -80,14 +71,21 @@ const ExtendedStory = () => {
80
71
 
81
72
  const meta = {
82
73
  title: 'plugins/plugin-explorer/components/Globe',
83
- decorators: [withTheme(), withLayout()],
74
+ component: Globe,
75
+ decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
84
76
  parameters: {
85
77
  layout: 'fullscreen',
86
78
  },
87
- } satisfies Meta;
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/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 } 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 { generate } from '../Tree/testing';
25
+ import { CanvasForceGraph } from './CanvasForceGraph';
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?.db);
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 = {};