@dxos/plugin-explorer 0.8.4-main.e8ec1fe → 0.8.4-main.effb148878

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 (271) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/neutral/ExplorerArticle-LLNHXWNG.mjs +420 -0
  3. package/dist/lib/neutral/ExplorerArticle-LLNHXWNG.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/neutral/chunk-7FSP4SPO.mjs +69 -0
  8. package/dist/lib/neutral/chunk-7FSP4SPO.mjs.map +7 -0
  9. package/dist/lib/neutral/chunk-CWN2BELW.mjs +287 -0
  10. package/dist/lib/neutral/chunk-CWN2BELW.mjs.map +7 -0
  11. package/dist/lib/neutral/chunk-GRJXLL4Z.mjs +25 -0
  12. package/dist/lib/neutral/chunk-GRJXLL4Z.mjs.map +7 -0
  13. package/dist/lib/neutral/chunk-IKHJV3Q4.mjs +20 -0
  14. package/dist/lib/neutral/chunk-IKHJV3Q4.mjs.map +7 -0
  15. package/dist/lib/neutral/chunk-LL3PXKB5.mjs +40 -0
  16. package/dist/lib/neutral/chunk-LL3PXKB5.mjs.map +7 -0
  17. package/dist/lib/{node-esm/chunk-NPIP4VEH.mjs → neutral/components/index.mjs} +890 -314
  18. package/dist/lib/neutral/components/index.mjs.map +7 -0
  19. package/dist/lib/neutral/containers/index.mjs +9 -0
  20. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  21. package/dist/lib/neutral/create-object-F6TKVAGV.mjs +39 -0
  22. package/dist/lib/neutral/create-object-F6TKVAGV.mjs.map +7 -0
  23. package/dist/lib/neutral/hooks/index.mjs +45 -0
  24. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  25. package/dist/lib/neutral/index.mjs +14 -0
  26. package/dist/lib/neutral/meta.json +1 -0
  27. package/dist/lib/{browser → neutral}/meta.mjs +1 -1
  28. package/dist/lib/neutral/plugin.mjs +12 -0
  29. package/dist/lib/neutral/plugin.mjs.map +7 -0
  30. package/dist/lib/neutral/react-surface-APBW2VQG.mjs +26 -0
  31. package/dist/lib/neutral/react-surface-APBW2VQG.mjs.map +7 -0
  32. package/dist/lib/neutral/testing/index.mjs +193 -0
  33. package/dist/lib/neutral/testing/index.mjs.map +7 -0
  34. package/dist/lib/neutral/translations.mjs +33 -0
  35. package/dist/lib/neutral/translations.mjs.map +7 -0
  36. package/dist/lib/{browser → neutral}/types/index.mjs +1 -2
  37. package/dist/types/data/cities.d.ts +4 -4
  38. package/dist/types/data/cities.d.ts.map +1 -1
  39. package/dist/types/data/countries-110m.d.ts +19 -22
  40. package/dist/types/data/countries-110m.d.ts.map +1 -1
  41. package/dist/types/src/ExplorerPlugin.d.ts +3 -1
  42. package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
  43. package/dist/types/src/ExplorerPlugin.test.d.ts +2 -0
  44. package/dist/types/src/ExplorerPlugin.test.d.ts.map +1 -0
  45. package/dist/types/src/capabilities/create-object.d.ts +11 -0
  46. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  47. package/dist/types/src/capabilities/index.d.ts +8 -2
  48. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  49. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  50. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  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} +2 -2
  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 +45 -22
  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 -2
  104. package/dist/types/src/components/index.d.ts.map +1 -1
  105. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts +13 -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 +30 -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 +24 -0
  110. package/dist/types/src/containers/ExplorerArticle/Visualization.d.ts.map +1 -0
  111. package/dist/types/src/containers/ExplorerArticle/experimental.stories.d.ts +7 -0
  112. package/dist/types/src/containers/ExplorerArticle/experimental.stories.d.ts.map +1 -0
  113. package/dist/types/src/containers/ExplorerArticle/index.d.ts +2 -0
  114. package/dist/types/src/containers/ExplorerArticle/index.d.ts.map +1 -0
  115. package/dist/types/src/containers/ExplorerArticle/variants.d.ts +9 -0
  116. package/dist/types/src/containers/ExplorerArticle/variants.d.ts.map +1 -0
  117. package/dist/types/src/containers/index.d.ts +3 -0
  118. package/dist/types/src/containers/index.d.ts.map +1 -0
  119. package/dist/types/src/hooks/useGraphModel.d.ts +2 -2
  120. package/dist/types/src/hooks/useGraphModel.d.ts.map +1 -1
  121. package/dist/types/src/index.d.ts +1 -3
  122. package/dist/types/src/index.d.ts.map +1 -1
  123. package/dist/types/src/meta.d.ts +2 -2
  124. package/dist/types/src/meta.d.ts.map +1 -1
  125. package/dist/types/src/plugin.d.ts +3 -0
  126. package/dist/types/src/plugin.d.ts.map +1 -0
  127. package/dist/types/src/{components/Tree/testing → testing}/generator.d.ts +1 -1
  128. package/dist/types/src/testing/generator.d.ts.map +1 -0
  129. package/dist/types/src/testing/index.d.ts +4 -0
  130. package/dist/types/src/testing/index.d.ts.map +1 -0
  131. package/dist/types/src/testing/relations.d.ts +47 -0
  132. package/dist/types/src/testing/relations.d.ts.map +1 -0
  133. package/dist/types/src/translations.d.ts +31 -22
  134. package/dist/types/src/translations.d.ts.map +1 -1
  135. package/dist/types/src/types/ExplorerAction.d.ts +1 -18
  136. package/dist/types/src/types/ExplorerAction.d.ts.map +1 -1
  137. package/dist/types/src/types/Graph.d.ts +14 -25
  138. package/dist/types/src/types/Graph.d.ts.map +1 -1
  139. package/dist/types/src/util/index.d.ts +3 -0
  140. package/dist/types/src/util/index.d.ts.map +1 -0
  141. package/dist/types/src/util/node-color.d.ts +13 -0
  142. package/dist/types/src/util/node-color.d.ts.map +1 -0
  143. package/dist/types/src/{components → util}/plot.d.ts +1 -1
  144. package/dist/types/src/util/plot.d.ts.map +1 -0
  145. package/dist/types/tsconfig.tsbuildinfo +1 -1
  146. package/package.json +114 -62
  147. package/src/ExplorerPlugin.test.ts +26 -0
  148. package/src/ExplorerPlugin.tsx +15 -56
  149. package/src/capabilities/create-object.ts +36 -0
  150. package/src/capabilities/index.ts +3 -3
  151. package/src/capabilities/react-surface.tsx +24 -19
  152. package/src/components/Chart/Chart.stories.tsx +16 -23
  153. package/src/components/Chart/Chart.tsx +1 -1
  154. package/src/components/Globe/Globe.stories.tsx +19 -22
  155. package/src/components/Globe/Globe.tsx +1 -1
  156. package/src/components/Graph/CanvasForceGraph.stories.tsx +83 -0
  157. package/src/components/Graph/CanvasForceGraph.tsx +124 -0
  158. package/src/components/Graph/ForceGraph.stories.tsx +83 -42
  159. package/src/components/Graph/ForceGraph.tsx +105 -85
  160. package/src/components/Graph/{adapter.ts → graph-adapter.ts} +14 -8
  161. package/src/components/Graph/index.ts +1 -1
  162. package/src/components/Lattice/Lattice.stories.tsx +90 -0
  163. package/src/components/Lattice/Lattice.tsx +182 -0
  164. package/src/components/Lattice/index.ts +5 -0
  165. package/src/components/Tree/EdgeBundling.stories.tsx +144 -0
  166. package/src/components/Tree/Tree.stories.tsx +20 -38
  167. package/src/components/Tree/Tree.tsx +69 -95
  168. package/src/components/Tree/index.ts +2 -0
  169. package/src/components/Tree/layout/HierarchicalEdgeBundling.tsx +335 -0
  170. package/src/components/Tree/layout/RadialTree.tsx +242 -0
  171. package/src/components/Tree/layout/TidyTree.tsx +246 -0
  172. package/src/components/Tree/layout/hierarchy.ts +32 -0
  173. package/src/components/Tree/layout/index.ts +5 -5
  174. package/src/components/Tree/layout/slots.ts +19 -0
  175. package/src/components/Tree/layout/useContainerSize.ts +43 -0
  176. package/src/components/Tree/types/tree.test.ts +6 -5
  177. package/src/components/Tree/types/tree.ts +42 -26
  178. package/src/components/Tree/types/types.ts +38 -29
  179. package/src/components/index.ts +1 -4
  180. package/src/containers/ExplorerArticle/ExplorerArticle.stories.tsx +142 -0
  181. package/src/containers/ExplorerArticle/ExplorerArticle.tsx +112 -0
  182. package/src/containers/ExplorerArticle/Visualization.tsx +497 -0
  183. package/src/containers/ExplorerArticle/experimental.stories.tsx +446 -0
  184. package/src/containers/ExplorerArticle/index.ts +5 -0
  185. package/src/containers/ExplorerArticle/variants.ts +37 -0
  186. package/src/containers/index.ts +7 -0
  187. package/src/hooks/useGraphModel.ts +25 -14
  188. package/src/index.ts +1 -4
  189. package/src/meta.ts +24 -6
  190. package/src/plugin.ts +9 -0
  191. package/src/{components/Tree/testing → testing}/generator.ts +5 -3
  192. package/src/testing/index.ts +9 -0
  193. package/src/testing/relations.ts +192 -0
  194. package/src/translations.ts +16 -13
  195. package/src/types/ExplorerAction.ts +9 -19
  196. package/src/types/Graph.ts +25 -25
  197. package/src/typings.d.ts +8 -0
  198. package/src/util/index.ts +6 -0
  199. package/src/util/node-color.ts +23 -0
  200. package/src/{components → util}/plot.ts +16 -4
  201. package/dist/lib/browser/ExplorerContainer-NOLLVUTE.mjs +0 -50
  202. package/dist/lib/browser/ExplorerContainer-NOLLVUTE.mjs.map +0 -7
  203. package/dist/lib/browser/chunk-2MKBRIUT.mjs +0 -31
  204. package/dist/lib/browser/chunk-2MKBRIUT.mjs.map +0 -7
  205. package/dist/lib/browser/chunk-6BVXZQPP.mjs +0 -188
  206. package/dist/lib/browser/chunk-6BVXZQPP.mjs.map +0 -7
  207. package/dist/lib/browser/chunk-ARBGXQFH.mjs +0 -11089
  208. package/dist/lib/browser/chunk-ARBGXQFH.mjs.map +0 -7
  209. package/dist/lib/browser/chunk-JDSUIUNR.mjs +0 -80
  210. package/dist/lib/browser/chunk-JDSUIUNR.mjs.map +0 -7
  211. package/dist/lib/browser/chunk-UBHZGWZQ.mjs +0 -24
  212. package/dist/lib/browser/chunk-UBHZGWZQ.mjs.map +0 -7
  213. package/dist/lib/browser/index.mjs +0 -119
  214. package/dist/lib/browser/index.mjs.map +0 -7
  215. package/dist/lib/browser/intent-resolver-YS5LZC3A.mjs +0 -31
  216. package/dist/lib/browser/intent-resolver-YS5LZC3A.mjs.map +0 -7
  217. package/dist/lib/browser/meta.json +0 -1
  218. package/dist/lib/browser/react-surface-BVTCOVLK.mjs +0 -35
  219. package/dist/lib/browser/react-surface-BVTCOVLK.mjs.map +0 -7
  220. package/dist/lib/node-esm/ExplorerContainer-N3S5KSUX.mjs +0 -51
  221. package/dist/lib/node-esm/ExplorerContainer-N3S5KSUX.mjs.map +0 -7
  222. package/dist/lib/node-esm/chunk-3ODK27PU.mjs +0 -33
  223. package/dist/lib/node-esm/chunk-3ODK27PU.mjs.map +0 -7
  224. package/dist/lib/node-esm/chunk-CRSVAZNA.mjs +0 -190
  225. package/dist/lib/node-esm/chunk-CRSVAZNA.mjs.map +0 -7
  226. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  227. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
  228. package/dist/lib/node-esm/chunk-MS72BATS.mjs +0 -81
  229. package/dist/lib/node-esm/chunk-MS72BATS.mjs.map +0 -7
  230. package/dist/lib/node-esm/chunk-NPIP4VEH.mjs.map +0 -7
  231. package/dist/lib/node-esm/chunk-UXZM5VJB.mjs +0 -26
  232. package/dist/lib/node-esm/chunk-UXZM5VJB.mjs.map +0 -7
  233. package/dist/lib/node-esm/index.mjs +0 -120
  234. package/dist/lib/node-esm/index.mjs.map +0 -7
  235. package/dist/lib/node-esm/intent-resolver-VCEC67WX.mjs +0 -32
  236. package/dist/lib/node-esm/intent-resolver-VCEC67WX.mjs.map +0 -7
  237. package/dist/lib/node-esm/meta.json +0 -1
  238. package/dist/lib/node-esm/meta.mjs +0 -9
  239. package/dist/lib/node-esm/react-surface-4HFEX52O.mjs +0 -36
  240. package/dist/lib/node-esm/react-surface-4HFEX52O.mjs.map +0 -7
  241. package/dist/lib/node-esm/types/index.mjs +0 -12
  242. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  243. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  244. package/dist/types/src/components/ExplorerContainer.d.ts +0 -9
  245. package/dist/types/src/components/ExplorerContainer.d.ts.map +0 -1
  246. package/dist/types/src/components/Graph/D3ForceGraph.d.ts +0 -14
  247. package/dist/types/src/components/Graph/D3ForceGraph.d.ts.map +0 -1
  248. package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts +0 -15
  249. package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts.map +0 -1
  250. package/dist/types/src/components/Graph/adapter.d.ts.map +0 -1
  251. package/dist/types/src/components/Graph/testing.d.ts +0 -14
  252. package/dist/types/src/components/Graph/testing.d.ts.map +0 -1
  253. package/dist/types/src/components/Tree/testing/generator.d.ts.map +0 -1
  254. package/dist/types/src/components/Tree/testing/index.d.ts +0 -2
  255. package/dist/types/src/components/Tree/testing/index.d.ts.map +0 -1
  256. package/dist/types/src/components/plot.d.ts.map +0 -1
  257. package/src/capabilities/intent-resolver.ts +0 -21
  258. package/src/components/ExplorerContainer.tsx +0 -54
  259. package/src/components/Graph/D3ForceGraph.stories.tsx +0 -78
  260. package/src/components/Graph/D3ForceGraph.tsx +0 -101
  261. package/src/components/Graph/testing.ts +0 -55
  262. package/src/components/Tree/layout/HierarchicalEdgeBundling.ts +0 -162
  263. package/src/components/Tree/layout/RadialTree.ts +0 -94
  264. package/src/components/Tree/layout/TidyTree.ts +0 -101
  265. package/src/components/Tree/testing/index.ts +0 -5
  266. /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/ExplorerPlugin.mjs.map} +0 -0
  267. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  268. /package/dist/lib/{browser/meta.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  269. /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
  270. /package/dist/lib/{node-esm → neutral}/meta.mjs.map +0 -0
  271. /package/dist/lib/{node-esm → neutral}/types/index.mjs.map +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.
@@ -0,0 +1,420 @@
1
+ import {
2
+ getNodeFillForObject
3
+ } from "./chunk-IKHJV3Q4.mjs";
4
+ import "./chunk-J5LGTIGS.mjs";
5
+
6
+ // src/containers/ExplorerArticle/ExplorerArticle.tsx
7
+ import React2, { useCallback as useCallback2, useEffect as useEffect2, useMemo as useMemo2, useState as useState2 } from "react";
8
+ import { Obj as Obj2 } from "@dxos/echo";
9
+ import { QueryBuilder } from "@dxos/echo-query";
10
+ import { useObject } from "@dxos/react-client/echo";
11
+ import { DxAnchorActivate, Icon, Panel, Toolbar } from "@dxos/react-ui";
12
+ import { QueryEditor } from "@dxos/react-ui-components";
13
+ import "@dxos/react-ui-graph/styles/graph.css";
14
+ import { useGraphModel } from "#hooks";
15
+
16
+ // src/containers/ExplorerArticle/variants.ts
17
+ var VARIANTS = [
18
+ {
19
+ value: "force",
20
+ icon: "ph--graph--regular",
21
+ label: "Force-directed"
22
+ },
23
+ {
24
+ value: "cluster",
25
+ icon: "ph--asterisk-simple--regular",
26
+ label: "Radial cluster"
27
+ },
28
+ {
29
+ value: "bundle",
30
+ icon: "ph--circles-three-plus--regular",
31
+ label: "Edge bundling"
32
+ },
33
+ {
34
+ value: "lattice",
35
+ icon: "ph--grid-four--regular",
36
+ label: "Lattice"
37
+ },
38
+ {
39
+ value: "swarm",
40
+ icon: "ph--fish--regular",
41
+ label: "Swarm"
42
+ }
43
+ ];
44
+ var isVariant = (value) => value === "force" || value === "cluster" || value === "bundle" || value === "lattice" || value === "swarm";
45
+
46
+ // src/containers/ExplorerArticle/Visualization.tsx
47
+ import { RegistryContext } from "@effect-atom/atom-react";
48
+ import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
49
+ import { Obj } from "@dxos/echo";
50
+ import { useThemeContext } from "@dxos/react-ui";
51
+ import { CLUSTER_NODE_TYPE_GROUP, CLUSTER_NODE_TYPE_LEAF, CLUSTER_NODE_TYPE_ROOT, GraphBundleProjector, GraphClusterProjector, GraphForceProjector, GraphLatticeProjector, SVG } from "@dxos/react-ui-graph";
52
+ import { Flock, FlockModel, Vec2 } from "@dxos/react-ui-sfx";
53
+ var Visualization = ({ variant, model, onNodeHover }) => {
54
+ const registry = useContext(RegistryContext);
55
+ const { themeMode } = useThemeContext();
56
+ const flockBackground = themeMode === "dark" ? "#0a0a0a" : "#fafafa";
57
+ const containerRef = useRef(null);
58
+ const [size, setSize] = useState({
59
+ width: 0,
60
+ height: 0
61
+ });
62
+ const svgRef = useRef(null);
63
+ const [projector, setProjector] = useState();
64
+ const projectorRef = useRef(void 0);
65
+ projectorRef.current = projector;
66
+ const lastLayoutRef = useRef(void 0);
67
+ const flockModel = useMemo(() => new FlockModel(registry), [
68
+ registry
69
+ ]);
70
+ const [modelRev, setModelRev] = useState(0);
71
+ useEffect(() => model?.subscribe(() => setModelRev((r) => r + 1)), [
72
+ model
73
+ ]);
74
+ useEffect(() => {
75
+ const el = containerRef.current;
76
+ if (!el) {
77
+ return;
78
+ }
79
+ const rect = el.getBoundingClientRect();
80
+ setSize({
81
+ width: rect.width,
82
+ height: rect.height
83
+ });
84
+ const observer = new ResizeObserver((entries) => {
85
+ const entry = entries[0];
86
+ if (!entry) {
87
+ return;
88
+ }
89
+ const { width, height } = entry.contentRect;
90
+ setSize((prev) => prev.width === width && prev.height === height ? prev : {
91
+ width,
92
+ height
93
+ });
94
+ });
95
+ observer.observe(el);
96
+ return () => observer.disconnect();
97
+ }, []);
98
+ useEffect(() => {
99
+ if (projectorRef.current?.layout) {
100
+ lastLayoutRef.current = projectorRef.current.layout;
101
+ } else if (flockModel.boids.length > 0 && size.width > 0 && size.height > 0) {
102
+ lastLayoutRef.current = boidsToLayout(flockModel.boids, size, lastLayoutRef.current);
103
+ }
104
+ if (variant === "swarm") {
105
+ setProjector(void 0);
106
+ return;
107
+ }
108
+ if (!svgRef.current) {
109
+ return;
110
+ }
111
+ setProjector(createProjector(variant, svgRef.current, lastLayoutRef.current));
112
+ }, [
113
+ variant,
114
+ flockModel,
115
+ size.width,
116
+ size.height
117
+ ]);
118
+ useEffect(() => {
119
+ if (variant !== "swarm" || !size.width || !size.height) {
120
+ return;
121
+ }
122
+ const nodes = model?.graph.nodes ?? [];
123
+ if (nodes.length === 0) {
124
+ return;
125
+ }
126
+ flockModel.setBoids(seedBoidsFromNodes(nodes, lastLayoutRef.current, size, flockModel));
127
+ }, [
128
+ variant,
129
+ flockModel,
130
+ model,
131
+ modelRev,
132
+ size.width,
133
+ size.height
134
+ ]);
135
+ const renderNode = useMemo(() => createRenderNode(variant), [
136
+ variant
137
+ ]);
138
+ const handleInspect = useCallback((node, event) => {
139
+ if (!node) {
140
+ onNodeHover?.(null);
141
+ return;
142
+ }
143
+ onNodeHover?.({
144
+ id: node.id,
145
+ data: node.data?.data?.object
146
+ }, event);
147
+ }, [
148
+ onNodeHover
149
+ ]);
150
+ const handleSelect = useCallback((node) => {
151
+ if (variant !== "cluster" || !node || node.type !== CLUSTER_NODE_TYPE_ROOT && node.type !== CLUSTER_NODE_TYPE_GROUP) {
152
+ return;
153
+ }
154
+ const cluster = projector;
155
+ cluster?.toggleCollapsed(node.id);
156
+ }, [
157
+ variant,
158
+ projector
159
+ ]);
160
+ return /* @__PURE__ */ React.createElement("div", {
161
+ ref: containerRef,
162
+ className: "dx-expander relative"
163
+ }, variant === "swarm" ? /* @__PURE__ */ React.createElement(Flock, {
164
+ model: flockModel,
165
+ coloring: "Movement",
166
+ background: flockBackground
167
+ }) : /* @__PURE__ */ React.createElement(SVG.Root, {
168
+ ref: svgRef
169
+ }, /* @__PURE__ */ React.createElement(SVG.Zoom, {
170
+ extent: [
171
+ 1 / 2,
172
+ 2
173
+ ]
174
+ }, /* @__PURE__ */ React.createElement(SVG.Graph, {
175
+ model,
176
+ projector,
177
+ renderNode,
178
+ drag: variant === "force",
179
+ onInspect: handleInspect,
180
+ onSelect: handleSelect
181
+ }))));
182
+ };
183
+ var seedBoidsFromNodes = (nodes, lastLayout, { width, height }, flockModel) => {
184
+ const cx = width / 2;
185
+ const cy = height / 2;
186
+ const spread = Math.min(width, height) * 0.5;
187
+ const snapshot = new Map((lastLayout?.graph.nodes ?? []).map((n) => [
188
+ n.id,
189
+ n
190
+ ]));
191
+ return nodes.map((node) => {
192
+ const prev = snapshot.get(node.id);
193
+ const px = prev?.x ?? (Math.random() - 0.5) * spread;
194
+ const py = prev?.y ?? (Math.random() - 0.5) * spread;
195
+ const existing = flockModel.findBoid(node.id);
196
+ return {
197
+ id: node.id,
198
+ position: new Vec2(cx + px, cy + py),
199
+ velocity: existing?.velocity ?? new Vec2(),
200
+ color: existing?.color,
201
+ last: existing?.last ?? []
202
+ };
203
+ });
204
+ };
205
+ var boidsToLayout = (boids, { width, height }, prevLayout) => {
206
+ const cx = width / 2;
207
+ const cy = height / 2;
208
+ const previousById = new Map((prevLayout?.graph.nodes ?? []).map((n) => [
209
+ n.id,
210
+ n
211
+ ]));
212
+ const nodes = boids.filter((b) => b.id !== void 0).map((boid) => {
213
+ const id = boid.id;
214
+ const prev = previousById.get(id);
215
+ return {
216
+ ...prev ?? {
217
+ id
218
+ },
219
+ x: boid.position.x - cx,
220
+ y: boid.position.y - cy
221
+ };
222
+ });
223
+ return {
224
+ graph: {
225
+ nodes,
226
+ // Edges aren't represented in the swarm — keep whatever the previous layout had so
227
+ // the next projector still has a topology to bind to via mergeData.
228
+ edges: prevLayout?.graph.edges ?? []
229
+ }
230
+ };
231
+ };
232
+ var TWEEN_MS = 500;
233
+ var createProjector = (variant, ctx, prev) => {
234
+ switch (variant) {
235
+ case "force":
236
+ return new GraphForceProjector(ctx, void 0, void 0, prev);
237
+ case "lattice":
238
+ return new GraphLatticeProjector(ctx, {
239
+ duration: TWEEN_MS,
240
+ // Plugin-explorer overrides the projector's force-matched default (6)
241
+ // with a smaller node so the lattice reads as a dense matrix.
242
+ radius: 4,
243
+ // Cluster by typename first so same-type rects sit together; break ties by label.
244
+ sortBy: (node) => {
245
+ const obj = node.data?.data?.object;
246
+ const typename = obj ? Obj.getTypename(obj) ?? "(untyped)" : "(untyped)";
247
+ const label = (obj && Obj.getLabel(obj)) ?? node.data?.data?.label ?? node.id;
248
+ return `${typename} ${label}`;
249
+ }
250
+ }, void 0, prev);
251
+ case "cluster":
252
+ return new GraphClusterProjector(ctx, {
253
+ duration: TWEEN_MS,
254
+ groupOf: typenameGroupOf,
255
+ rootLabel: "Database",
256
+ groupLabel: shortTypename,
257
+ // All three node kinds share the same radius — leaves, groups, and root read
258
+ // as members of the same circle rather than ranked by size.
259
+ rootRadius: 4,
260
+ groupRadius: 4
261
+ }, void 0, prev);
262
+ case "bundle":
263
+ return new GraphBundleProjector(ctx, {
264
+ duration: TWEEN_MS,
265
+ groupOf: typenameGroupOf
266
+ }, void 0, prev);
267
+ }
268
+ };
269
+ var typenameGroupOf = (node) => {
270
+ const obj = node.data?.data?.object;
271
+ return obj ? Obj.getTypename(obj) ?? "(untyped)" : void 0;
272
+ };
273
+ var createRenderNode = (variant) => {
274
+ switch (variant) {
275
+ case "swarm":
276
+ return void 0;
277
+ case "force":
278
+ return (group, node) => {
279
+ const r = node.r ?? 6;
280
+ group.append("circle").attr("r", r).style("cursor", "pointer").style("fill", getNodeFillForObject(node.data?.data?.object));
281
+ };
282
+ case "lattice":
283
+ return (group, node) => {
284
+ const r = node.r ?? 6;
285
+ const sz = r * 2;
286
+ group.append("rect").attr("x", -r).attr("y", -r).attr("width", sz).attr("height", sz).attr("rx", r * 0.3).attr("ry", r * 0.3).style("cursor", "pointer").style("fill", getNodeFillForObject(node.data?.data?.object));
287
+ };
288
+ case "cluster":
289
+ return (group, node) => {
290
+ const obj = node.data?.data?.object;
291
+ const r = node.r ?? 4;
292
+ group.append("circle").attr("r", r).style("cursor", "pointer").style("fill", obj ? getNodeFillForObject(obj) : "var(--color-neutral-500)");
293
+ if (node.type === CLUSTER_NODE_TYPE_LEAF) {
294
+ appendRadialLeafLabel(group, node, obj, r);
295
+ } else if (node.type === CLUSTER_NODE_TYPE_ROOT) {
296
+ appendRootLabel(group, node, r);
297
+ } else if (node.type === CLUSTER_NODE_TYPE_GROUP) {
298
+ appendRadialGroupLabel(group, node, r);
299
+ }
300
+ };
301
+ case "bundle":
302
+ return (group, node) => {
303
+ const obj = node.data?.data?.object;
304
+ const r = node.r ?? 4;
305
+ group.append("circle").attr("r", r).style("cursor", "pointer").style("fill", obj ? getNodeFillForObject(obj) : "var(--color-neutral-500)");
306
+ appendRadialLeafLabel(group, node, obj, r);
307
+ };
308
+ }
309
+ };
310
+ var LABEL_FADE_MS = 200;
311
+ var appendRadialLeafLabel = (group, node, obj, r) => {
312
+ const label = (obj && Obj.getLabel(obj)) ?? node.data?.data?.label ?? node.id;
313
+ if (!label) {
314
+ return;
315
+ }
316
+ const targetX = node.tx ?? node.x ?? 0;
317
+ const targetY = node.ty ?? node.y ?? 0;
318
+ const angleDeg = Math.atan2(targetY, targetX) * 180 / Math.PI;
319
+ const flipped = angleDeg > 90 || angleDeg < -90;
320
+ group.append("text").classed("dx-cluster-label", true).attr("dy", "0.32em").attr("transform", `rotate(${flipped ? angleDeg + 180 : angleDeg})`).attr("x", flipped ? -(r + 4) : r + 4).attr("text-anchor", flipped ? "end" : "start").attr("opacity", 0).style("pointer-events", "none").text(label).transition().delay(TWEEN_MS).duration(LABEL_FADE_MS).attr("opacity", 1);
321
+ };
322
+ var appendRadialGroupLabel = (group, node, r) => {
323
+ if (!node.label) {
324
+ return;
325
+ }
326
+ const targetX = node.tx ?? node.x ?? 0;
327
+ const targetY = node.ty ?? node.y ?? 0;
328
+ const angleDeg = Math.atan2(targetY, targetX) * 180 / Math.PI;
329
+ const flipped = angleDeg > 90 || angleDeg < -90;
330
+ group.append("text").classed("dx-cluster-label", true).classed("dx-cluster-label-group", true).attr("dy", "0.32em").attr("transform", `rotate(${flipped ? angleDeg + 180 : angleDeg})`).attr("x", flipped ? r + 4 : -(r + 4)).attr("text-anchor", flipped ? "start" : "end").attr("opacity", 0).style("pointer-events", "none").text(node.label).transition().delay(TWEEN_MS).duration(LABEL_FADE_MS).attr("opacity", 1);
331
+ };
332
+ var appendRootLabel = (group, node, r) => {
333
+ if (!node.label) {
334
+ return;
335
+ }
336
+ group.append("text").classed("dx-cluster-label", true).classed("dx-cluster-label-root", true).attr("text-anchor", "middle").attr("y", -(r + 6)).attr("opacity", 0).style("pointer-events", "none").text(node.label).transition().delay(TWEEN_MS).duration(LABEL_FADE_MS).attr("opacity", 1);
337
+ };
338
+ var shortTypename = (typename) => {
339
+ const last = typename.split(".").pop() ?? typename;
340
+ return last.charAt(0).toUpperCase() + last.slice(1);
341
+ };
342
+
343
+ // src/containers/ExplorerArticle/ExplorerArticle.tsx
344
+ var ExplorerArticle = ({ role, subject, variant }) => {
345
+ const [view] = useObject(subject);
346
+ const [filter, setFilter] = useState2();
347
+ const db = view && Obj2.getDatabase(view);
348
+ const model = useGraphModel(db, filter);
349
+ const builder = useMemo2(() => new QueryBuilder(), []);
350
+ const handleChange = useCallback2((value) => {
351
+ setFilter(builder.build(value).filter);
352
+ }, [
353
+ builder
354
+ ]);
355
+ const [selected, setSelected] = useState2(isVariant(variant) ? variant : "force");
356
+ useEffect2(() => {
357
+ if (isVariant(variant)) {
358
+ setSelected(variant);
359
+ }
360
+ }, [
361
+ variant
362
+ ]);
363
+ const handleVariantChange = useCallback2((value) => {
364
+ if (isVariant(value)) {
365
+ setSelected(value);
366
+ }
367
+ }, []);
368
+ const handleHover = useCallback2((node, event) => {
369
+ if (!node || !event) {
370
+ return;
371
+ }
372
+ const obj = node.data;
373
+ if (!obj || !Obj2.isObject(obj)) {
374
+ return;
375
+ }
376
+ const dxn = Obj2.getURI(obj);
377
+ if (!dxn) {
378
+ return;
379
+ }
380
+ const target = event.target;
381
+ target.dispatchEvent(new DxAnchorActivate({
382
+ dxn,
383
+ kind: "card",
384
+ trigger: target,
385
+ label: Obj2.getLabel(obj) ?? dxn
386
+ }));
387
+ }, []);
388
+ const showToolbar = role === "article";
389
+ if (!db || !model) {
390
+ return null;
391
+ }
392
+ return /* @__PURE__ */ React2.createElement(Panel.Root, {
393
+ role
394
+ }, showToolbar && /* @__PURE__ */ React2.createElement(Panel.Toolbar, {
395
+ asChild: true
396
+ }, /* @__PURE__ */ React2.createElement(Toolbar.Root, null, /* @__PURE__ */ React2.createElement(QueryEditor, {
397
+ db,
398
+ onChange: handleChange
399
+ }), /* @__PURE__ */ React2.createElement(Toolbar.ToggleGroup, {
400
+ type: "single",
401
+ value: selected,
402
+ onValueChange: handleVariantChange
403
+ }, VARIANTS.map(({ value, icon, label }) => /* @__PURE__ */ React2.createElement(Toolbar.ToggleGroupItem, {
404
+ key: value,
405
+ value,
406
+ "aria-label": label,
407
+ title: label
408
+ }, /* @__PURE__ */ React2.createElement(Icon, {
409
+ icon,
410
+ size: 4
411
+ })))))), /* @__PURE__ */ React2.createElement(Panel.Content, null, /* @__PURE__ */ React2.createElement(Visualization, {
412
+ variant: selected,
413
+ model,
414
+ onNodeHover: handleHover
415
+ })));
416
+ };
417
+ export {
418
+ ExplorerArticle as default
419
+ };
420
+ //# sourceMappingURL=ExplorerArticle-LLNHXWNG.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/ExplorerArticle/ExplorerArticle.tsx", "../../../src/containers/ExplorerArticle/variants.ts", "../../../src/containers/ExplorerArticle/Visualization.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { type Filter, Obj, type View } from '@dxos/echo';\nimport { QueryBuilder } from '@dxos/echo-query';\nimport { useObject } from '@dxos/react-client/echo';\nimport { DxAnchorActivate, Icon, Panel, Toolbar } from '@dxos/react-ui';\nimport { QueryEditor, type QueryEditorProps } from '@dxos/react-ui-components';\n// Side-effect import: Visualization drives `SVG.Graph` directly. Without the CSS the\n// `g.dx-edge path` rules — including `fill: none` — never reach the bundle and SVG\n// defaults (stroke: none, fill: black) make every edge invisible.\nimport '@dxos/react-ui-graph/styles/graph.css';\n\nimport { type TreeNode } from '#components';\nimport { useGraphModel } from '#hooks';\n\nimport { type ExplorerArticleVariant, VARIANTS, isVariant } from './variants';\nimport { Visualization } from './Visualization';\n\nexport type { ExplorerArticleVariant } from './variants';\n\nexport type ExplorerArticleProps = AppSurface.ObjectArticleProps<View.View>;\n\n/**\n * Thin wrapper: owns the query editor, the variant toggle, and the DxAnchor preview\n * dispatch. The actual rendering — SVG projector swaps and the swarm canvas — lives in\n * `Visualization`.\n */\nexport const ExplorerArticle = ({ role, subject, variant }: ExplorerArticleProps) => {\n const [view] = useObject(subject);\n const [filter, setFilter] = useState<Filter.Any>();\n\n const db = view && Obj.getDatabase(view);\n const model = useGraphModel(db, filter);\n\n const builder = useMemo(() => new QueryBuilder(), []);\n const handleChange = useCallback<NonNullable<QueryEditorProps['onChange']>>(\n (value) => {\n setFilter(builder.build(value).filter);\n },\n [builder],\n );\n\n const [selected, setSelected] = useState<ExplorerArticleVariant>(isVariant(variant) ? variant : 'force');\n useEffect(() => {\n if (isVariant(variant)) {\n setSelected(variant);\n }\n }, [variant]);\n\n const handleVariantChange = useCallback((value: string) => {\n if (isVariant(value)) {\n setSelected(value);\n }\n }, []);\n\n const handleHover = useCallback((node: TreeNode | null, event?: MouseEvent) => {\n if (!node || !event) {\n return;\n }\n const obj = node.data;\n if (!obj || !Obj.isObject(obj)) {\n return;\n }\n const dxn = Obj.getURI(obj);\n if (!dxn) {\n return;\n }\n\n const target = event.target as HTMLElement;\n target.dispatchEvent(\n new DxAnchorActivate({\n dxn,\n kind: 'card',\n trigger: target,\n label: Obj.getLabel(obj) ?? dxn,\n }),\n );\n }, []);\n\n const showToolbar = role === 'article';\n\n if (!db || !model) {\n return null;\n }\n\n return (\n <Panel.Root role={role}>\n {showToolbar && (\n <Panel.Toolbar asChild>\n <Toolbar.Root>\n <QueryEditor db={db} onChange={handleChange} />\n <Toolbar.ToggleGroup type='single' value={selected} onValueChange={handleVariantChange}>\n {VARIANTS.map(({ value, icon, label }) => (\n <Toolbar.ToggleGroupItem key={value} value={value} aria-label={label} title={label}>\n <Icon icon={icon} size={4} />\n </Toolbar.ToggleGroupItem>\n ))}\n </Toolbar.ToggleGroup>\n </Toolbar.Root>\n </Panel.Toolbar>\n )}\n <Panel.Content>\n <Visualization variant={selected} model={model} onNodeHover={handleHover} />\n </Panel.Content>\n </Panel.Root>\n );\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\n/** Visualization variants exposed by `ExplorerArticle`. */\nexport type ExplorerArticleVariant = 'force' | 'cluster' | 'bundle' | 'lattice' | 'swarm';\n\nexport const VARIANTS: { value: ExplorerArticleVariant; icon: string; label: string }[] = [\n {\n value: 'force',\n icon: 'ph--graph--regular',\n label: 'Force-directed',\n },\n {\n value: 'cluster',\n icon: 'ph--asterisk-simple--regular',\n label: 'Radial cluster',\n },\n {\n value: 'bundle',\n icon: 'ph--circles-three-plus--regular',\n label: 'Edge bundling',\n },\n {\n value: 'lattice',\n icon: 'ph--grid-four--regular',\n label: 'Lattice',\n },\n {\n value: 'swarm',\n icon: 'ph--fish--regular',\n label: 'Swarm',\n },\n];\n\nexport const isVariant = (value: unknown): value is ExplorerArticleVariant =>\n value === 'force' || value === 'cluster' || value === 'bundle' || value === 'lattice' || value === 'swarm';\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { RegistryContext } from '@effect-atom/atom-react';\nimport React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Obj } from '@dxos/echo';\nimport { useThemeContext } from '@dxos/react-ui';\nimport {\n CLUSTER_NODE_TYPE_GROUP,\n CLUSTER_NODE_TYPE_LEAF,\n CLUSTER_NODE_TYPE_ROOT,\n GraphBundleProjector,\n GraphClusterProjector,\n GraphForceProjector,\n type GraphLayout,\n type GraphLayoutNode,\n GraphLatticeProjector,\n type GraphProjector,\n type RenderNode,\n SVG,\n type SVGContext,\n} from '@dxos/react-ui-graph';\nimport { Flock, type FlockBoid, FlockModel, Vec2 } from '@dxos/react-ui-sfx';\nimport { type SpaceGraphEdge, type SpaceGraphModel, type SpaceGraphNode } from '@dxos/schema';\n\nimport { type TreeNode } from '#components';\n\nimport { getNodeFillForObject } from '../../util';\nimport { type ExplorerArticleVariant } from './variants';\n\nexport type VisualizationProps = {\n variant: ExplorerArticleVariant;\n model: SpaceGraphModel;\n onNodeHover?: (node: TreeNode | null, event?: MouseEvent) => void;\n};\n\n/**\n * Renders the active visualization variant.\n *\n * For SVG variants (force, cluster, bundle, lattice), one `<SVG.Graph>` instance is\n * kept mounted; only the projector swaps. Each new projector receives the previous\n * layout so node x/y survive the swap and the projector's `animate()` tweens to the\n * new target.\n *\n * The `swarm` variant is canvas-based and uses a `FlockModel`. On entry, boids are\n * seeded from `model.graph.nodes` with positions taken from the latest SVG layout\n * (matched by node id). On exit, the boids' current positions are written back to\n * `lastLayoutRef` so the next SVG projector starts from where the swarm left off.\n */\nexport const Visualization = ({ variant, model, onNodeHover }: VisualizationProps) => {\n const registry = useContext(RegistryContext);\n const { themeMode } = useThemeContext();\n // Match the visible app background so the swarm canvas reads as continuous\n // with the rest of the UI. Page bg comes from --color-baseSurface tokens\n // (dark = neutral-950 ≈ #0a0a0a, light = neutral-50 ≈ #fafafa).\n const flockBackground = themeMode === 'dark' ? '#0a0a0a' : '#fafafa';\n const containerRef = useRef<HTMLDivElement | null>(null);\n const [size, setSize] = useState({ width: 0, height: 0 });\n\n const svgRef = useRef<SVGContext>(null);\n const [projector, setProjector] = useState<GraphProjector<SpaceGraphNode> | undefined>();\n const projectorRef = useRef<GraphProjector<SpaceGraphNode> | undefined>(undefined);\n projectorRef.current = projector;\n\n // Latest layout we hand to the next SVG projector as `prev` — captured both when\n // leaving an SVG variant (live projector.layout) and when leaving swarm (boid\n // positions translated back to center-origin).\n const lastLayoutRef = useRef<GraphLayout<SpaceGraphNode> | undefined>(undefined);\n\n // Reactive source of truth for the boid array used by the swarm view.\n const flockModel = useMemo(() => new FlockModel(registry), [registry]);\n\n // Subscribe to the graph atom — keeps it alive across child unmounts (effect-atom\n // disposes atoms with no subscribers) and triggers re-renders when query results land.\n const [modelRev, setModelRev] = useState(0);\n useEffect(() => model?.subscribe(() => setModelRev((r) => r + 1)), [model]);\n\n // Track the visualization container size so we can translate between canvas\n // (top-left origin) and graph (center origin) coordinates when entering or\n // leaving swarm.\n useEffect(() => {\n const el = containerRef.current;\n if (!el) {\n return;\n }\n\n const rect = el.getBoundingClientRect();\n setSize({ width: rect.width, height: rect.height });\n\n const observer = new ResizeObserver((entries) => {\n const entry = entries[0];\n if (!entry) {\n return;\n }\n const { width, height } = entry.contentRect;\n setSize((prev) => (prev.width === width && prev.height === height ? prev : { width, height }));\n });\n\n observer.observe(el);\n return () => observer.disconnect();\n }, []);\n\n // Recreate the projector when the variant changes. Two transitions need special handling:\n // - leaving an SVG variant: snapshot live projector.layout into lastLayoutRef.\n // - leaving swarm: convert current boid positions (canvas-coord) back into a\n // center-origin layout in lastLayoutRef so the next projector animates from\n // where the boids ended up.\n useEffect(() => {\n if (projectorRef.current?.layout) {\n lastLayoutRef.current = projectorRef.current.layout as GraphLayout<SpaceGraphNode>;\n } else if (flockModel.boids.length > 0 && size.width > 0 && size.height > 0) {\n lastLayoutRef.current = boidsToLayout(flockModel.boids, size, lastLayoutRef.current);\n }\n\n if (variant === 'swarm') {\n setProjector(undefined);\n return;\n }\n\n if (!svgRef.current) {\n return;\n }\n\n setProjector(createProjector(variant, svgRef.current, lastLayoutRef.current));\n }, [variant, flockModel, size.width, size.height]);\n\n // Seed the flock with boids derived from current graph nodes whenever we enter\n // swarm (or model data lands while in swarm). Positions are reused from the last\n // SVG layout where the id matches; otherwise a small random spread around center.\n useEffect(() => {\n if (variant !== 'swarm' || !size.width || !size.height) {\n return;\n }\n const nodes = model?.graph.nodes ?? [];\n if (nodes.length === 0) {\n return;\n }\n flockModel.setBoids(seedBoidsFromNodes(nodes, lastLayoutRef.current, size, flockModel));\n }, [variant, flockModel, model, modelRev, size.width, size.height]);\n\n const renderNode = useMemo(() => createRenderNode(variant), [variant]);\n\n const handleInspect = useCallback(\n (node: GraphLayoutNode<SpaceGraphNode> | null, event: MouseEvent) => {\n // null = pointerleave: forward to the shared hover handler so it can clear any preview.\n if (!node) {\n onNodeHover?.(null);\n return;\n }\n onNodeHover?.({ id: node.id, data: node.data?.data?.object }, event);\n },\n [onNodeHover],\n );\n\n // Cluster-only: clicking a root / group node toggles its subtree open/closed.\n const handleSelect = useCallback(\n (node: GraphLayoutNode<SpaceGraphNode>) => {\n if (\n variant !== 'cluster' ||\n !node ||\n (node.type !== CLUSTER_NODE_TYPE_ROOT && node.type !== CLUSTER_NODE_TYPE_GROUP)\n ) {\n return;\n }\n\n const cluster = projector as GraphClusterProjector<SpaceGraphNode> | undefined;\n cluster?.toggleCollapsed(node.id);\n },\n [variant, projector],\n );\n\n return (\n <div ref={containerRef} className='dx-expander relative'>\n {variant === 'swarm' ? (\n <Flock model={flockModel} coloring='Movement' background={flockBackground} />\n ) : (\n <SVG.Root ref={svgRef}>\n <SVG.Zoom extent={[1 / 2, 2]}>\n <SVG.Graph<SpaceGraphNode, SpaceGraphEdge>\n model={model}\n projector={projector}\n renderNode={renderNode}\n drag={variant === 'force'}\n onInspect={handleInspect}\n onSelect={handleSelect}\n />\n </SVG.Zoom>\n </SVG.Root>\n )}\n </div>\n );\n};\n\n/**\n * Build the boid set for entering swarm. For each model node, take the position from\n * `lastLayout` (id-matched), or a random spread around center if the id isn't there.\n * Position reuse keeps in-flight transitions visually continuous.\n */\nconst seedBoidsFromNodes = (\n nodes: readonly SpaceGraphNode[],\n lastLayout: GraphLayout<SpaceGraphNode> | undefined,\n { width, height }: { width: number; height: number },\n flockModel: FlockModel,\n): FlockBoid[] => {\n const cx = width / 2;\n const cy = height / 2;\n const spread = Math.min(width, height) * 0.5;\n const snapshot = new Map((lastLayout?.graph.nodes ?? []).map((n) => [n.id, n] as const));\n return nodes.map((node) => {\n const prev = snapshot.get(node.id);\n const px = prev?.x ?? (Math.random() - 0.5) * spread;\n const py = prev?.y ?? (Math.random() - 0.5) * spread;\n // Preserve existing boid velocity/colour if we already have one for this id —\n // keeps mid-air boids moving smoothly when the model emits multiple times.\n const existing = flockModel.findBoid(node.id);\n return {\n id: node.id,\n position: new Vec2(cx + px, cy + py),\n velocity: existing?.velocity ?? new Vec2(),\n color: existing?.color,\n last: existing?.last ?? [],\n };\n });\n};\n\n/**\n * Translate canvas-coord boid positions back into a center-origin layout that the\n * next SVG projector can consume as `prev`. Matches nodes from `prevLayout` by id so\n * label / data references are preserved; falls back to creating fresh layout nodes\n * for boids whose ids aren't present in the prior layout.\n */\nconst boidsToLayout = (\n boids: readonly FlockBoid[],\n { width, height }: { width: number; height: number },\n prevLayout: GraphLayout<SpaceGraphNode> | undefined,\n): GraphLayout<SpaceGraphNode> => {\n const cx = width / 2;\n const cy = height / 2;\n const previousById = new Map((prevLayout?.graph.nodes ?? []).map((n) => [n.id, n] as const));\n const nodes: GraphLayoutNode<SpaceGraphNode>[] = boids\n .filter((b) => b.id !== undefined)\n .map((boid) => {\n const id = boid.id!;\n const prev = previousById.get(id);\n return {\n ...(prev ?? { id }),\n x: boid.position.x - cx,\n y: boid.position.y - cy,\n };\n });\n return {\n graph: {\n nodes,\n // Edges aren't represented in the swarm — keep whatever the previous layout had so\n // the next projector still has a topology to bind to via mergeData.\n edges: prevLayout?.graph.edges ?? [],\n },\n };\n};\n\n/** Cross-variant tween duration. Matches the renderer's edge fade timing so node movement and edge enter/exit complete together. */\nconst TWEEN_MS = 500;\n\nconst createProjector = (\n variant: Exclude<ExplorerArticleVariant, 'swarm'>,\n ctx: SVGContext,\n prev?: GraphLayout<SpaceGraphNode>,\n): GraphProjector<SpaceGraphNode> => {\n switch (variant) {\n case 'force':\n // Force has no `duration` — its own simulation drives motion via ticks.\n return new GraphForceProjector<SpaceGraphNode>(ctx, undefined, undefined, prev);\n\n case 'lattice':\n return new GraphLatticeProjector<SpaceGraphNode>(\n ctx,\n {\n duration: TWEEN_MS,\n // Plugin-explorer overrides the projector's force-matched default (6)\n // with a smaller node so the lattice reads as a dense matrix.\n radius: 4,\n // Cluster by typename first so same-type rects sit together; break ties by label.\n sortBy: (node: GraphLayoutNode<SpaceGraphNode>) => {\n const obj = node.data?.data?.object;\n const typename = obj ? (Obj.getTypename(obj) ?? '(untyped)') : '(untyped)';\n const label = (obj && Obj.getLabel(obj)) ?? node.data?.data?.label ?? node.id;\n return `${typename} ${label}`;\n },\n },\n undefined,\n prev,\n );\n\n case 'cluster':\n return new GraphClusterProjector<SpaceGraphNode>(\n ctx,\n {\n duration: TWEEN_MS,\n groupOf: typenameGroupOf,\n rootLabel: 'Database',\n groupLabel: shortTypename,\n // All three node kinds share the same radius — leaves, groups, and root read\n // as members of the same circle rather than ranked by size.\n rootRadius: 4,\n groupRadius: 4,\n },\n undefined,\n prev,\n );\n\n case 'bundle':\n return new GraphBundleProjector<SpaceGraphNode>(\n ctx,\n {\n duration: TWEEN_MS,\n groupOf: typenameGroupOf,\n },\n undefined,\n prev,\n );\n }\n};\n\n/** Group leaves by typename so same-type leaves cluster together — used by both the\n * cluster (visible structural nodes) and bundle (invisible routing anchors) projectors. */\nconst typenameGroupOf = (node: GraphLayoutNode<SpaceGraphNode>): string | undefined => {\n const obj = node.data?.data?.object;\n return obj ? (Obj.getTypename(obj) ?? '(untyped)') : undefined;\n};\n\nconst createRenderNode = (variant: ExplorerArticleVariant): RenderNode<SpaceGraphNode> | undefined => {\n switch (variant) {\n case 'swarm':\n return undefined;\n\n case 'force':\n return (group, node) => {\n const r = node.r ?? 6;\n group\n .append('circle')\n .attr('r', r)\n .style('cursor', 'pointer')\n .style('fill', getNodeFillForObject(node.data?.data?.object as Obj.Unknown | undefined));\n };\n\n case 'lattice':\n return (group, node) => {\n const r = node.r ?? 6;\n const sz = r * 2;\n group\n .append('rect')\n .attr('x', -r)\n .attr('y', -r)\n .attr('width', sz)\n .attr('height', sz)\n .attr('rx', r * 0.3)\n .attr('ry', r * 0.3)\n .style('cursor', 'pointer')\n .style('fill', getNodeFillForObject(node.data?.data?.object as Obj.Unknown | undefined));\n };\n\n case 'cluster':\n return (group, node) => {\n const obj = node.data?.data?.object as Obj.Unknown | undefined;\n const r = node.r ?? 4;\n // Synthetic root / group nodes have no underlying ECHO object; render them as\n // smaller, neutral circles so the hierarchy reads as \"structure + leaves\".\n group\n .append('circle')\n .attr('r', r)\n .style('cursor', 'pointer')\n .style('fill', obj ? getNodeFillForObject(obj) : 'var(--color-neutral-500)');\n if (node.type === CLUSTER_NODE_TYPE_LEAF) {\n appendRadialLeafLabel(group, node, obj, r);\n } else if (node.type === CLUSTER_NODE_TYPE_ROOT) {\n appendRootLabel(group, node, r);\n } else if (node.type === CLUSTER_NODE_TYPE_GROUP) {\n appendRadialGroupLabel(group, node, r);\n }\n };\n\n case 'bundle':\n // Bundle layout renders ONLY leaves (root/group are invisible routing anchors).\n return (group, node) => {\n const obj = node.data?.data?.object as Obj.Unknown | undefined;\n const r = node.r ?? 4;\n group\n .append('circle')\n .attr('r', r)\n .style('cursor', 'pointer')\n .style('fill', obj ? getNodeFillForObject(obj) : 'var(--color-neutral-500)');\n appendRadialLeafLabel(group, node, obj, r);\n };\n }\n};\n\n/** Fade-in duration applied to labels after the layout tween completes. */\nconst LABEL_FADE_MS = 200;\n\n/**\n * Append a radial leaf label outside the ring, oriented outward. Compute orientation\n * from the TARGET position (tx/ty) — at enter time node.x/y is still at the previous\n * projector's coordinates, so using current x/y would orient the label by the\n * pre-transition layout (wrong) and the rotation wouldn't update during the tween.\n */\nconst appendRadialLeafLabel = (\n group: Parameters<RenderNode<SpaceGraphNode>>[0],\n node: GraphLayoutNode<SpaceGraphNode>,\n obj: Obj.Unknown | undefined,\n r: number,\n): void => {\n const label = (obj && Obj.getLabel(obj)) ?? node.data?.data?.label ?? node.id;\n if (!label) {\n return;\n }\n\n const targetX = (node as any).tx ?? node.x ?? 0;\n const targetY = (node as any).ty ?? node.y ?? 0;\n const angleDeg = (Math.atan2(targetY, targetX) * 180) / Math.PI;\n const flipped = angleDeg > 90 || angleDeg < -90;\n group\n .append('text')\n .classed('dx-cluster-label', true)\n .attr('dy', '0.32em')\n .attr('transform', `rotate(${flipped ? angleDeg + 180 : angleDeg})`)\n .attr('x', flipped ? -(r + 4) : r + 4)\n .attr('text-anchor', flipped ? 'end' : 'start')\n .attr('opacity', 0)\n .style('pointer-events', 'none')\n .text(label)\n .transition()\n .delay(TWEEN_MS)\n .duration(LABEL_FADE_MS)\n .attr('opacity', 1);\n};\n\nconst appendRadialGroupLabel = (\n group: Parameters<RenderNode<SpaceGraphNode>>[0],\n node: GraphLayoutNode<SpaceGraphNode>,\n r: number,\n): void => {\n if (!node.label) {\n return;\n }\n\n const targetX = (node as any).tx ?? node.x ?? 0;\n const targetY = (node as any).ty ?? node.y ?? 0;\n const angleDeg = (Math.atan2(targetY, targetX) * 180) / Math.PI;\n const flipped = angleDeg > 90 || angleDeg < -90;\n group\n .append('text')\n .classed('dx-cluster-label', true)\n .classed('dx-cluster-label-group', true)\n .attr('dy', '0.32em')\n .attr('transform', `rotate(${flipped ? angleDeg + 180 : angleDeg})`)\n .attr('x', flipped ? r + 4 : -(r + 4))\n .attr('text-anchor', flipped ? 'start' : 'end')\n .attr('opacity', 0)\n .style('pointer-events', 'none')\n .text(node.label)\n .transition()\n .delay(TWEEN_MS)\n .duration(LABEL_FADE_MS)\n .attr('opacity', 1);\n};\n\nconst appendRootLabel = (\n group: Parameters<RenderNode<SpaceGraphNode>>[0],\n node: GraphLayoutNode<SpaceGraphNode>,\n r: number,\n): void => {\n if (!node.label) {\n return;\n }\n\n group\n .append('text')\n .classed('dx-cluster-label', true)\n .classed('dx-cluster-label-root', true)\n .attr('text-anchor', 'middle')\n .attr('y', -(r + 6))\n .attr('opacity', 0)\n .style('pointer-events', 'none')\n .text(node.label)\n .transition()\n .delay(TWEEN_MS)\n .duration(LABEL_FADE_MS)\n .attr('opacity', 1);\n};\n\n/** Drop the package prefix from a typename for display: `org.dxos.type.Person` → `Person`. */\nconst shortTypename = (typename: string): string => {\n const last = typename.split('.').pop() ?? typename;\n return last.charAt(0).toUpperCase() + last.slice(1);\n};\n"],
5
+ "mappings": ";;;;;;AAIA,OAAOA,UAASC,eAAAA,cAAaC,aAAAA,YAAWC,WAAAA,UAASC,YAAAA,iBAAgB;AAGjE,SAAsBC,OAAAA,YAAsB;AAC5C,SAASC,oBAAoB;AAC7B,SAASC,iBAAiB;AAC1B,SAASC,kBAAkBC,MAAMC,OAAOC,eAAe;AACvD,SAASC,mBAA0C;AAInD,OAAO;AAGP,SAASC,qBAAqB;;;ACXvB,IAAMC,WAA6E;EACxF;IACEC,OAAO;IACPC,MAAM;IACNC,OAAO;EACT;EACA;IACEF,OAAO;IACPC,MAAM;IACNC,OAAO;EACT;EACA;IACEF,OAAO;IACPC,MAAM;IACNC,OAAO;EACT;EACA;IACEF,OAAO;IACPC,MAAM;IACNC,OAAO;EACT;EACA;IACEF,OAAO;IACPC,MAAM;IACNC,OAAO;EACT;;AAGK,IAAMC,YAAY,CAACH,UACxBA,UAAU,WAAWA,UAAU,aAAaA,UAAU,YAAYA,UAAU,aAAaA,UAAU;;;AChCrG,SAASI,uBAAuB;AAChC,OAAOC,SAASC,aAAaC,YAAYC,WAAWC,SAASC,QAAQC,gBAAgB;AAErF,SAASC,WAAW;AACpB,SAASC,uBAAuB;AAChC,SACEC,yBACAC,wBACAC,wBACAC,sBACAC,uBACAC,qBAGAC,uBAGAC,WAEK;AACP,SAASC,OAAuBC,YAAYC,YAAY;AA2BjD,IAAMC,gBAAgB,CAAC,EAAEC,SAASC,OAAOC,YAAW,MAAsB;AAC/E,QAAMC,WAAWC,WAAWC,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AAarC;;AAIrE;",
6
+ "names": ["React", "useCallback", "useEffect", "useMemo", "useState", "Obj", "QueryBuilder", "useObject", "DxAnchorActivate", "Icon", "Panel", "Toolbar", "QueryEditor", "useGraphModel", "VARIANTS", "value", "icon", "label", "isVariant", "RegistryContext", "React", "useCallback", "useContext", "useEffect", "useMemo", "useRef", "useState", "Obj", "useThemeContext", "CLUSTER_NODE_TYPE_GROUP", "CLUSTER_NODE_TYPE_LEAF", "CLUSTER_NODE_TYPE_ROOT", "GraphBundleProjector", "GraphClusterProjector", "GraphForceProjector", "GraphLatticeProjector", "SVG", "Flock", "FlockModel", "Vec2", "Visualization", "variant", "model", "onNodeHover", "registry", "useContext", "RegistryContext", "themeMode", "useThemeContext", "flockBackground", "containerRef", "useRef", "size", "setSize", "useState", "width", "height", "svgRef", "projector", "setProjector", "projectorRef", "undefined", "current", "lastLayoutRef", "flockModel", "useMemo", "FlockModel", "modelRev", "setModelRev", "useEffect", "subscribe", "r", "el", "rect", "getBoundingClientRect", "observer", "ResizeObserver", "entries", "entry", "contentRect", "prev", "observe", "disconnect", "layout", "boids", "length", "boidsToLayout", "createProjector", "nodes", "graph", "setBoids", "seedBoidsFromNodes", "renderNode", "createRenderNode", "handleInspect", "useCallback", "node", "event", "id", "data", "object", "handleSelect", "type", "CLUSTER_NODE_TYPE_ROOT", "CLUSTER_NODE_TYPE_GROUP", "cluster", "toggleCollapsed", "div", "ref", "className", "Flock", "coloring", "background", "SVG", "Root", "Zoom", "extent", "Graph", "drag", "onInspect", "onSelect", "lastLayout", "cx", "cy", "spread", "Math", "min", "snapshot", "Map", "map", "n", "get", "px", "x", "random", "py", "y", "existing", "findBoid", "position", "Vec2", "velocity", "color", "last", "prevLayout", "previousById", "filter", "b", "boid", "edges", "TWEEN_MS", "ctx", "GraphForceProjector", "GraphLatticeProjector", "duration", "radius", "sortBy", "obj", "typename", "Obj", "getTypename", "label", "getLabel", "GraphClusterProjector", "groupOf", "typenameGroupOf", "rootLabel", "groupLabel", "shortTypename", "rootRadius", "groupRadius", "GraphBundleProjector", "group", "append", "attr", "style", "getNodeFillForObject", "sz", "CLUSTER_NODE_TYPE_LEAF", "appendRadialLeafLabel", "appendRootLabel", "appendRadialGroupLabel", "LABEL_FADE_MS", "targetX", "tx", "targetY", "ty", "angleDeg", "atan2", "PI", "flipped", "classed", "text", "transition", "delay", "split", "pop", "charAt", "toUpperCase", "slice", "ExplorerArticle", "role", "subject", "variant", "view", "useObject", "filter", "setFilter", "useState", "db", "Obj", "getDatabase", "model", "useGraphModel", "builder", "useMemo", "QueryBuilder", "handleChange", "useCallback", "value", "build", "selected", "setSelected", "isVariant", "useEffect", "handleVariantChange", "handleHover", "node", "event", "obj", "data", "isObject", "dxn", "getURI", "target", "dispatchEvent", "DxAnchorActivate", "kind", "trigger", "label", "getLabel", "showToolbar", "React", "Panel", "Root", "Toolbar", "asChild", "QueryEditor", "onChange", "ToggleGroup", "type", "onValueChange", "VARIANTS", "map", "icon", "ToggleGroupItem", "key", "aria-label", "title", "Icon", "size", "Content", "Visualization", "onNodeHover"]
7
+ }
@@ -0,0 +1,10 @@
1
+ import {
2
+ ExplorerPlugin,
3
+ ExplorerPlugin_default
4
+ } from "./chunk-GRJXLL4Z.mjs";
5
+ import "./chunk-J5LGTIGS.mjs";
6
+ export {
7
+ ExplorerPlugin,
8
+ ExplorerPlugin_default as default
9
+ };
10
+ //# sourceMappingURL=ExplorerPlugin.mjs.map
@@ -0,0 +1,11 @@
1
+ import "../chunk-J5LGTIGS.mjs";
2
+
3
+ // src/capabilities/index.ts
4
+ import { Capability } from "@dxos/app-framework";
5
+ var CreateObject = Capability.lazy("CreateObject", () => import("../create-object-F6TKVAGV.mjs"));
6
+ var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-APBW2VQG.mjs"));
7
+ export {
8
+ CreateObject,
9
+ ReactSurface
10
+ };
11
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/capabilities/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n"],
5
+ "mappings": ";;;AAIA,SAASA,kBAAkB;AAEpB,IAAMC,eAAeD,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;AAClE,IAAMC,eAAeH,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;",
6
+ "names": ["Capability", "CreateObject", "lazy", "ReactSurface"]
7
+ }