@dxos/plugin-explorer 0.8.4-main.422d1c7879 → 0.8.4-main.43cb759274

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 (238) 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/types/index.mjs → neutral/chunk-HI324IB4.mjs} +12 -13
  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 → neutral/components}/index.mjs +730 -437
  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/neutral/types/index.mjs +10 -0
  38. package/dist/lib/neutral/types/index.mjs.map +7 -0
  39. package/dist/types/data/cities.d.ts +4 -4
  40. package/dist/types/data/cities.d.ts.map +1 -1
  41. package/dist/types/data/countries-110m.d.ts +19 -22
  42. package/dist/types/data/countries-110m.d.ts.map +1 -1
  43. package/dist/types/src/ExplorerPlugin.d.ts +1 -0
  44. package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
  45. package/dist/types/src/ExplorerPlugin.test.d.ts +2 -0
  46. package/dist/types/src/ExplorerPlugin.test.d.ts.map +1 -0
  47. package/dist/types/src/capabilities/create-object.d.ts +11 -0
  48. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  49. package/dist/types/src/capabilities/index.d.ts +6 -0
  50. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  51. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  52. package/dist/types/src/components/Chart/Chart.d.ts +1 -1
  53. package/dist/types/src/components/Chart/Chart.d.ts.map +1 -1
  54. package/dist/types/src/components/Chart/Chart.stories.d.ts +4 -1
  55. package/dist/types/src/components/Chart/Chart.stories.d.ts.map +1 -1
  56. package/dist/types/src/components/Globe/Globe.d.ts +1 -1
  57. package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
  58. package/dist/types/src/components/Globe/Globe.stories.d.ts +5 -2
  59. package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
  60. package/dist/types/src/components/Graph/CanvasForceGraph.d.ts +13 -0
  61. package/dist/types/src/components/Graph/CanvasForceGraph.d.ts.map +1 -0
  62. package/dist/types/src/components/Graph/{D3ForceGraph.stories.d.ts → CanvasForceGraph.stories.d.ts} +3 -3
  63. package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts.map +1 -0
  64. package/dist/types/src/components/Graph/ForceGraph.d.ts +12 -5
  65. package/dist/types/src/components/Graph/ForceGraph.d.ts.map +1 -1
  66. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts +3 -1
  67. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts.map +1 -1
  68. package/dist/types/src/components/Graph/{adapter.d.ts → graph-adapter.d.ts} +1 -1
  69. package/dist/types/src/components/Graph/graph-adapter.d.ts.map +1 -0
  70. package/dist/types/src/components/Graph/index.d.ts +1 -1
  71. package/dist/types/src/components/Graph/index.d.ts.map +1 -1
  72. package/dist/types/src/components/Lattice/Lattice.d.ts +20 -0
  73. package/dist/types/src/components/Lattice/Lattice.d.ts.map +1 -0
  74. package/dist/types/src/components/Lattice/Lattice.stories.d.ts +8 -0
  75. package/dist/types/src/components/Lattice/Lattice.stories.d.ts.map +1 -0
  76. package/dist/types/src/components/Lattice/index.d.ts +2 -0
  77. package/dist/types/src/components/Lattice/index.d.ts.map +1 -0
  78. package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts +21 -0
  79. package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts.map +1 -0
  80. package/dist/types/src/components/Tree/Tree.d.ts +20 -23
  81. package/dist/types/src/components/Tree/Tree.d.ts.map +1 -1
  82. package/dist/types/src/components/Tree/Tree.stories.d.ts +5 -12
  83. package/dist/types/src/components/Tree/Tree.stories.d.ts.map +1 -1
  84. package/dist/types/src/components/Tree/index.d.ts +2 -0
  85. package/dist/types/src/components/Tree/index.d.ts.map +1 -1
  86. package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts +37 -2
  87. package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts.map +1 -1
  88. package/dist/types/src/components/Tree/layout/RadialTree.d.ts +35 -2
  89. package/dist/types/src/components/Tree/layout/RadialTree.d.ts.map +1 -1
  90. package/dist/types/src/components/Tree/layout/TidyTree.d.ts +24 -2
  91. package/dist/types/src/components/Tree/layout/TidyTree.d.ts.map +1 -1
  92. package/dist/types/src/components/Tree/layout/hierarchy.d.ts +17 -0
  93. package/dist/types/src/components/Tree/layout/hierarchy.d.ts.map +1 -0
  94. package/dist/types/src/components/Tree/layout/index.d.ts +5 -4
  95. package/dist/types/src/components/Tree/layout/index.d.ts.map +1 -1
  96. package/dist/types/src/components/Tree/layout/slots.d.ts +7 -0
  97. package/dist/types/src/components/Tree/layout/slots.d.ts.map +1 -0
  98. package/dist/types/src/components/Tree/layout/useContainerSize.d.ts +15 -0
  99. package/dist/types/src/components/Tree/layout/useContainerSize.d.ts.map +1 -0
  100. package/dist/types/src/components/Tree/types/tree.d.ts +41 -20
  101. package/dist/types/src/components/Tree/types/tree.d.ts.map +1 -1
  102. package/dist/types/src/components/Tree/types/types.d.ts +14 -4
  103. package/dist/types/src/components/Tree/types/types.d.ts.map +1 -1
  104. package/dist/types/src/components/index.d.ts +1 -0
  105. package/dist/types/src/components/index.d.ts.map +1 -1
  106. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts +8 -0
  107. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts.map +1 -0
  108. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts +15 -0
  109. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts.map +1 -0
  110. package/dist/types/src/containers/ExplorerArticle/Visualization.d.ts +18 -0
  111. package/dist/types/src/containers/ExplorerArticle/Visualization.d.ts.map +1 -0
  112. package/dist/types/src/containers/ExplorerArticle/index.d.ts +2 -0
  113. package/dist/types/src/containers/ExplorerArticle/index.d.ts.map +1 -0
  114. package/dist/types/src/containers/ExplorerArticle/variants.d.ts +9 -0
  115. package/dist/types/src/containers/ExplorerArticle/variants.d.ts.map +1 -0
  116. package/dist/types/src/containers/index.d.ts +1 -1
  117. package/dist/types/src/containers/index.d.ts.map +1 -1
  118. package/dist/types/src/hooks/useGraphModel.d.ts +2 -2
  119. package/dist/types/src/hooks/useGraphModel.d.ts.map +1 -1
  120. package/dist/types/src/index.d.ts +1 -3
  121. package/dist/types/src/index.d.ts.map +1 -1
  122. package/dist/types/src/meta.d.ts +1 -1
  123. package/dist/types/src/meta.d.ts.map +1 -1
  124. package/dist/types/src/plugin.d.ts +3 -0
  125. package/dist/types/src/plugin.d.ts.map +1 -0
  126. package/dist/types/src/{components/Tree/testing → testing}/generator.d.ts +1 -1
  127. package/dist/types/src/testing/generator.d.ts.map +1 -0
  128. package/dist/types/src/testing/index.d.ts +4 -0
  129. package/dist/types/src/testing/index.d.ts.map +1 -0
  130. package/dist/types/src/testing/relations.d.ts +32 -0
  131. package/dist/types/src/testing/relations.d.ts.map +1 -0
  132. package/dist/types/src/translations.d.ts +17 -17
  133. package/dist/types/src/translations.d.ts.map +1 -1
  134. package/dist/types/src/types/Graph.d.ts +5 -6
  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 +102 -58
  144. package/src/ExplorerPlugin.test.ts +26 -0
  145. package/src/ExplorerPlugin.tsx +11 -34
  146. package/src/capabilities/create-object.ts +36 -0
  147. package/src/capabilities/index.ts +1 -0
  148. package/src/capabilities/react-surface.tsx +2 -2
  149. package/src/components/Chart/Chart.stories.tsx +14 -20
  150. package/src/components/Chart/Chart.tsx +1 -1
  151. package/src/components/Globe/Globe.stories.tsx +17 -19
  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 +88 -38
  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 +17 -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 +2 -2
  173. package/src/components/Tree/types/tree.ts +23 -28
  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 +10 -6
  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 +1 -1
  190. package/src/types/ExplorerAction.ts +1 -1
  191. package/src/types/Graph.ts +6 -14
  192. package/src/util/index.ts +6 -0
  193. package/src/util/node-color.ts +23 -0
  194. package/src/{components → util}/plot.ts +16 -4
  195. package/src/vite-env.d.ts +10 -0
  196. package/dist/lib/browser/chunk-LSUP47BZ.mjs +0 -24
  197. package/dist/lib/browser/chunk-LSUP47BZ.mjs.map +0 -7
  198. package/dist/lib/browser/index.mjs.map +0 -7
  199. package/dist/lib/browser/meta.json +0 -1
  200. package/dist/lib/browser/types/index.mjs.map +0 -7
  201. package/dist/lib/node-esm/chunk-EN3JZNEY.mjs +0 -26
  202. package/dist/lib/node-esm/chunk-EN3JZNEY.mjs.map +0 -7
  203. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  204. package/dist/lib/node-esm/index.mjs +0 -11375
  205. package/dist/lib/node-esm/index.mjs.map +0 -7
  206. package/dist/lib/node-esm/meta.json +0 -1
  207. package/dist/lib/node-esm/meta.mjs +0 -9
  208. package/dist/lib/node-esm/types/index.mjs +0 -71
  209. package/dist/lib/node-esm/types/index.mjs.map +0 -7
  210. package/dist/types/src/components/Graph/D3ForceGraph.d.ts +0 -15
  211. package/dist/types/src/components/Graph/D3ForceGraph.d.ts.map +0 -1
  212. package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts.map +0 -1
  213. package/dist/types/src/components/Graph/adapter.d.ts.map +0 -1
  214. package/dist/types/src/components/Graph/testing.d.ts +0 -14
  215. package/dist/types/src/components/Graph/testing.d.ts.map +0 -1
  216. package/dist/types/src/components/Tree/testing/generator.d.ts.map +0 -1
  217. package/dist/types/src/components/Tree/testing/index.d.ts +0 -2
  218. package/dist/types/src/components/Tree/testing/index.d.ts.map +0 -1
  219. package/dist/types/src/components/plot.d.ts.map +0 -1
  220. package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts +0 -6
  221. package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts.map +0 -1
  222. package/dist/types/src/containers/ExplorerContainer/index.d.ts +0 -2
  223. package/dist/types/src/containers/ExplorerContainer/index.d.ts.map +0 -1
  224. package/src/components/Graph/D3ForceGraph.stories.tsx +0 -83
  225. package/src/components/Graph/D3ForceGraph.tsx +0 -108
  226. package/src/components/Graph/testing.ts +0 -58
  227. package/src/components/Tree/layout/HierarchicalEdgeBundling.ts +0 -162
  228. package/src/components/Tree/layout/RadialTree.ts +0 -94
  229. package/src/components/Tree/layout/TidyTree.ts +0 -101
  230. package/src/components/Tree/testing/index.ts +0 -5
  231. package/src/containers/ExplorerContainer/ExplorerContainer.tsx +0 -53
  232. package/src/containers/ExplorerContainer/index.ts +0 -5
  233. /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/ExplorerPlugin.mjs.map} +0 -0
  234. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  235. /package/dist/lib/{browser/meta.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  236. /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/index.mjs.map} +0 -0
  237. /package/dist/lib/{node-esm → neutral}/meta.mjs.map +0 -0
  238. /package/src/components/Graph/{adapter.ts → graph-adapter.ts} +0 -0
package/LICENSE CHANGED
@@ -1,8 +1,105 @@
1
- MIT License
2
- Copyright (c) 2022 DXOS
1
+ # Functional Source License, Version 1.1, ALv2 Future License
3
2
 
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ ## Abbreviation
5
4
 
6
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ FSL-1.1-Apache-2.0
7
6
 
8
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
+ ## Notice
8
+
9
+ Copyright 2026 DXOS
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
package/PLUGIN.mdl ADDED
@@ -0,0 +1,340 @@
1
+ ---
2
+ id: org.dxos.plugin.explorer
3
+ name: ExplorerPlugin
4
+ version: 0.1.0
5
+ ---
6
+
7
+ An interactive hypergraph visualization plugin for `DXOS` Composer that reveals relationships between objects in a workspace.
8
+ The plugin renders a live `Graph` object — backed by a `View` and a `QueryAST` query — through four switchable layout
9
+ variants: force-directed, radial cluster, edge bundling, and lattice.
10
+ Node colours are derived from ECHO object types; hovering a node triggers an anchor-card preview.
11
+
12
+ ## Extensions
13
+
14
+ The following extension dialects are used in this document.
15
+ Each extension is defined in the Appendix or resolved via its URI.
16
+
17
+ | Term | URI |
18
+ |-------------|--------------------------------|
19
+ | `type` | `org.dxos.mdl.type@1.0` |
20
+ | `feat` | `org.dxos.mdl.feat@1.0` |
21
+ | `test` | `org.dxos.mdl.test@1.0` |
22
+ | `component` | `org.dxos.mdl.component@1.0` |
23
+ | `op` | `org.dxos.mdl.op@1.0` |
24
+
25
+ ## Types
26
+
27
+ ```mdl
28
+ type QueryInput
29
+ fields:
30
+ raw?: string # raw query string entered by the user
31
+ ast: QueryAST.Query # compiled AST produced by QueryBuilder
32
+ ```
33
+
34
+ ```mdl
35
+ type GraphObject
36
+ desc: ECHO-persistent object that describes a hypergraph visualisation session.
37
+ fields:
38
+ name?: string
39
+ view: Ref<View> # schema view that defines visible fields
40
+ query: QueryInput
41
+ ```
42
+
43
+ ```mdl
44
+ type ExplorerVariant
45
+ literals: force | cluster | bundle | lattice
46
+ ```
47
+
48
+ ## Components
49
+
50
+ ```mdl
51
+ component ExplorerArticle
52
+ desc: |
53
+ Top-level article / section surface for a Graph object.
54
+ Renders one of four SVG layout variants and a toolbar for switching between them.
55
+ props:
56
+ role: article | section
57
+ subject: Ref<View>
58
+ attendableId?: string
59
+ state:
60
+ variant: ExplorerVariant # active layout; default force
61
+ filter?: Filter.Any # compiled from toolbar query input
62
+ model?: SpaceGraphModel # live reactive graph built from db + filter
63
+ slots:
64
+ toolbar?: ReactNode # shown only when role === article
65
+ actions:
66
+ setVariant(v: ExplorerVariant)
67
+ setFilter(raw: string)
68
+ layout: |
69
+ ┌────────────────────────────────┐
70
+ │ [toolbar slot — article only] │
71
+ │ [QueryEditor] [variant tabs] │
72
+ ├────────────────────────────────┤
73
+ │ │
74
+ │ SVG canvas (force / cluster │
75
+ │ / bundle / lattice) │
76
+ │ │
77
+ └────────────────────────────────┘
78
+ ```
79
+
80
+ ```mdl
81
+ component Visualization
82
+ desc: |
83
+ Internal component that owns a single persistent SVG.Graph mount.
84
+ Swaps the active GraphProjector when the variant changes, seeding the
85
+ new projector with the previous layout so node positions tween smoothly.
86
+ props:
87
+ variant: ExplorerVariant
88
+ model: SpaceGraphModel
89
+ state:
90
+ projector?: GraphProjector<SpaceGraphNode>
91
+ actions:
92
+ createProjector(variant: ExplorerVariant, prev?: GraphLayout) → GraphProjector
93
+ createRenderNode(variant: ExplorerVariant) → RenderNode
94
+ ```
95
+
96
+ ## Operations
97
+
98
+ ```mdl
99
+ op createGraph
100
+ desc: |
101
+ Creates a new Graph object scoped to a target space or collection.
102
+ Derives a ViewModel from the database for the selected typename, then
103
+ writes the object via SpaceOperation.AddObject.
104
+ input:
105
+ name?: string
106
+ typename?: string # ECHO typename used to seed the initial view
107
+ target: Space | Collection
108
+ targetNodeId?: string
109
+ output: GraphObject
110
+ effects: [echo:write]
111
+ note: |
112
+ The typename is resolved through ViewModel.makeFromDatabase; the resulting
113
+ View is stored as a Ref inside the Graph object.
114
+ ```
115
+
116
+ ```mdl
117
+ op buildFilter
118
+ desc: |
119
+ Compiles a raw query string into a Filter via QueryBuilder.
120
+ Pure — no side effects; result is passed to SpaceGraphModel.setFilter.
121
+ input:
122
+ raw: string
123
+ output: Filter.Any
124
+ errors:
125
+ ParseError: raw string is not valid query syntax
126
+ ```
127
+
128
+ ## Features
129
+
130
+ ```mdl
131
+ feat F-1: Graph Object
132
+
133
+ req F-1.1: A Graph object stores a name, a View ref, and a compiled QueryAST.
134
+ req F-1.2:
135
+ when: user creates a new graph
136
+ then: op:createGraph derives a ViewModel from the chosen typename and writes the Graph to ECHO
137
+
138
+ req F-1.3:
139
+ when: Graph is persisted
140
+ then: it appears in the space object list and can be opened as an article
141
+ ```
142
+
143
+ ```mdl
144
+ feat F-2: Live Graph Model
145
+
146
+ req F-2.1:
147
+ when: ExplorerArticle mounts with a valid Graph subject
148
+ then: SpaceGraphModel is opened against the subject's database
149
+
150
+ req F-2.2:
151
+ when: user types a query in the toolbar
152
+ then: op:buildFilter compiles the raw string; model.setFilter applied; SVG re-renders
153
+
154
+ req F-2.3:
155
+ when: Graph is unmounted
156
+ then: SpaceGraphModel is closed and all subscriptions released
157
+
158
+ req F-2.4:
159
+ when: an ECHO object in the database changes
160
+ then: SpaceGraphModel emits an update and SVG.Graph re-renders without full remount
161
+ tags: [reactive, collaborative]
162
+ ```
163
+
164
+ ```mdl
165
+ feat F-3: Visualization Variants
166
+
167
+ req F-3.1:
168
+ when: variant tab is selected
169
+ then: Visualization swaps projector; previous node x/y seed the new projector so positions tween
170
+
171
+ req F-3.2:
172
+ when: variant is force
173
+ then: SVG.Zoom wrapper is mounted enabling pan/zoom drag interaction
174
+
175
+ req F-3.3:
176
+ when: variant is cluster or bundle
177
+ then: no SVG.Zoom wrapper; leaves grouped by typename; radial labels fade in after tween
178
+
179
+ req F-3.4:
180
+ when: variant is lattice
181
+ then: nodes rendered as small rounded rectangles sorted by typename then label
182
+
183
+ req F-3.5:
184
+ when: variant is cluster and user clicks a root or group node
185
+ then: subtree toggles collapsed/expanded via GraphClusterProjector.toggleCollapsed
186
+ ```
187
+
188
+ ```mdl
189
+ feat F-4: Node Interaction
190
+
191
+ req F-4.1:
192
+ when: pointer enters a node
193
+ then: DxAnchorActivate event dispatched with the object's DXN and label, kind: card
194
+
195
+ req F-4.2:
196
+ when: pointer leaves a node
197
+ then: DxAnchorActivate cleared (onNodeHover called with null)
198
+
199
+ req F-4.3:
200
+ when: node has no underlying ECHO object (synthetic root / group)
201
+ then: no preview dispatched; node rendered in neutral colour
202
+ ```
203
+
204
+ ## Acceptance
205
+
206
+ ```mdl
207
+ test T-1: Graph creation
208
+ given: user opens the object creation dialog and selects Graph
209
+ when: a typename is selected and the form submitted
210
+ then:
211
+ - op:createGraph runs without error
212
+ - new Graph object visible in space object list
213
+ - Graph.view references a valid View object
214
+ ```
215
+
216
+ ```mdl
217
+ test T-2: Article mounts model
218
+ given: a Graph with a populated query
219
+ when: ExplorerArticle is rendered with role === article
220
+ then:
221
+ - SpaceGraphModel is opened
222
+ - SVG canvas renders nodes derived from the database
223
+ - toolbar shows QueryEditor and variant tabs
224
+ ```
225
+
226
+ ```mdl
227
+ test T-3: Variant switch preserves positions
228
+ given: force variant is active with nodes positioned
229
+ when: user switches to cluster variant
230
+ then:
231
+ - projector is recreated from previous layout
232
+ - nodes tween from old positions to cluster target positions
233
+ - SVG.Zoom wrapper is absent in the new mount
234
+ ```
235
+
236
+ ```mdl
237
+ test T-4: Query filter updates graph
238
+ given: ExplorerArticle is open with all objects visible
239
+ when: user types a typename filter in QueryEditor
240
+ then:
241
+ - op:buildFilter returns a Filter without error
242
+ - SpaceGraphModel.setFilter applied
243
+ - only matching nodes remain visible in the SVG
244
+ ```
245
+
246
+ ```mdl
247
+ test T-5: Node hover preview
248
+ given: force-directed graph with at least one ECHO object node
249
+ when: pointer enters that node
250
+ then:
251
+ - DxAnchorActivate event fired with correct DXN
252
+ - kind === card
253
+ ```
254
+
255
+ ```mdl
256
+ test T-6: Lattice sort order
257
+ given: database contains objects of two typenames A and B
258
+ when: lattice variant is active
259
+ then:
260
+ - all typename-A nodes appear before typename-B nodes (or vice-versa, consistent order)
261
+ - within each group nodes are ordered alphabetically by label
262
+ ```
263
+
264
+ ```mdl
265
+ test T-7: Model closed on unmount
266
+ given: ExplorerArticle is mounted and SpaceGraphModel is open
267
+ when: component unmounts
268
+ then:
269
+ - SpaceGraphModel.close() is called
270
+ - no lingering ECHO subscriptions remain
271
+ ```
272
+
273
+ ---
274
+
275
+ ## Appendix: Extension Definitions
276
+
277
+ Extension block types used in this document are defined below using
278
+ the core `ext` primitive — the only construct the base language provides.
279
+
280
+ ```mdl
281
+ ext type
282
+ uri: org.dxos.mdl.type@1.0
283
+ desc: A named data structure with typed fields and optional literals.
284
+ fields:
285
+ desc?: Prose
286
+ fields?: FieldMap # name[?]: TypeExpr (# inline comment)
287
+ literals?: UnionList # a | b | c
288
+ extends?: TypeRef[]
289
+ ```
290
+
291
+ ```mdl
292
+ ext feat
293
+ uri: org.dxos.mdl.feat@1.0
294
+ desc: A named feature grouping one or more requirements.
295
+ fields:
296
+ desc?: Prose
297
+ req: RequirementList
298
+ nesting: self # feat blocks may contain feat blocks
299
+ ```
300
+
301
+ ```mdl
302
+ ext test
303
+ uri: org.dxos.mdl.test@1.0
304
+ desc: An acceptance scenario expressed as given / when / then steps.
305
+ fields:
306
+ given?: Step | Step[]
307
+ when?: Step | Step[]
308
+ then: Step | Step[]
309
+ tags?: TagList
310
+ ```
311
+
312
+ ```mdl
313
+ ext component
314
+ uri: org.dxos.mdl.component@1.0
315
+ desc: A UI component with props, internal state, slots, actions, and events.
316
+ fields:
317
+ desc?: Prose
318
+ props?: FieldMap # external inputs (immutable inside component)
319
+ state?: FieldMap # internal reactive state
320
+ slots?: FieldMap # named ReactNode injection points
321
+ actions?: ActionMap # methods the component exposes or handles
322
+ emits?: EventMap # events the component raises to its parent
323
+ layout?: CodeBlock # ASCII sketch of visual structure (non-normative)
324
+ ```
325
+
326
+ ```mdl
327
+ ext op
328
+ uri: org.dxos.mdl.op@1.0
329
+ desc: |
330
+ A named operation with typed inputs, outputs, and declared errors.
331
+ Pure ops have no effects or requires. Effectful ops declare both.
332
+ fields:
333
+ desc?: Prose
334
+ input?: FieldMap # named input parameters
335
+ output?: TypeExpr # return type
336
+ errors?: ErrorMap # name: Prose (when this error occurs)
337
+ effects?: EffectList # echo:read | echo:write | http | fs | ...
338
+ requires?: ServiceList # injected service dependencies
339
+ note?: Prose # implementation guidance (non-normative)
340
+ ```