@dxos/plugin-explorer 0.8.4-main.7996785055 → 0.8.4-main.8baae0fced

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 (251) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/neutral/ExplorerArticle-EAKRB55W.mjs +277 -0
  3. package/dist/lib/neutral/ExplorerArticle-EAKRB55W.mjs.map +7 -0
  4. package/dist/lib/neutral/ExplorerPlugin.mjs +10 -0
  5. package/dist/lib/neutral/capabilities/index.mjs +11 -0
  6. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  7. package/dist/lib/{browser/chunk-6KEHUEEZ.mjs → neutral/chunk-7SPMPHRS.mjs} +6 -5
  8. package/dist/lib/neutral/chunk-7SPMPHRS.mjs.map +7 -0
  9. package/dist/lib/{browser/chunk-LSUP47BZ.mjs → neutral/chunk-DXIWQFYO.mjs} +2 -4
  10. package/dist/lib/neutral/chunk-DXIWQFYO.mjs.map +7 -0
  11. package/dist/lib/neutral/chunk-EM2BV4PF.mjs +290 -0
  12. package/dist/lib/neutral/chunk-EM2BV4PF.mjs.map +7 -0
  13. package/dist/lib/neutral/chunk-GRJXLL4Z.mjs +25 -0
  14. package/dist/lib/neutral/chunk-GRJXLL4Z.mjs.map +7 -0
  15. package/dist/lib/neutral/chunk-V2OFO6PI.mjs +14 -0
  16. package/dist/lib/neutral/chunk-V2OFO6PI.mjs.map +7 -0
  17. package/dist/lib/{browser/chunk-56VV76WZ.mjs → neutral/components/index.mjs} +706 -356
  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 -1
  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 +1 -0
  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 -1
  48. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  49. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  50. package/dist/types/src/components/Chart/Chart.d.ts +1 -1
  51. package/dist/types/src/components/Chart/Chart.d.ts.map +1 -1
  52. package/dist/types/src/components/Chart/Chart.stories.d.ts +4 -1
  53. package/dist/types/src/components/Chart/Chart.stories.d.ts.map +1 -1
  54. package/dist/types/src/components/Globe/Globe.d.ts +1 -1
  55. package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
  56. package/dist/types/src/components/Globe/Globe.stories.d.ts +5 -2
  57. package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
  58. package/dist/types/src/components/Graph/CanvasForceGraph.d.ts +13 -0
  59. package/dist/types/src/components/Graph/CanvasForceGraph.d.ts.map +1 -0
  60. package/dist/types/src/components/Graph/{D3ForceGraph.stories.d.ts → CanvasForceGraph.stories.d.ts} +3 -7
  61. package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts.map +1 -0
  62. package/dist/types/src/components/Graph/ForceGraph.d.ts +12 -5
  63. package/dist/types/src/components/Graph/ForceGraph.d.ts.map +1 -1
  64. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts +3 -1
  65. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts.map +1 -1
  66. package/dist/types/src/components/Graph/{adapter.d.ts → graph-adapter.d.ts} +1 -1
  67. package/dist/types/src/components/Graph/graph-adapter.d.ts.map +1 -0
  68. package/dist/types/src/components/Graph/index.d.ts +1 -1
  69. package/dist/types/src/components/Graph/index.d.ts.map +1 -1
  70. package/dist/types/src/components/Lattice/Lattice.d.ts +20 -0
  71. package/dist/types/src/components/Lattice/Lattice.d.ts.map +1 -0
  72. package/dist/types/src/components/Lattice/Lattice.stories.d.ts +8 -0
  73. package/dist/types/src/components/Lattice/Lattice.stories.d.ts.map +1 -0
  74. package/dist/types/src/components/Lattice/index.d.ts +2 -0
  75. package/dist/types/src/components/Lattice/index.d.ts.map +1 -0
  76. package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts +21 -0
  77. package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts.map +1 -0
  78. package/dist/types/src/components/Tree/Tree.d.ts +20 -23
  79. package/dist/types/src/components/Tree/Tree.d.ts.map +1 -1
  80. package/dist/types/src/components/Tree/Tree.stories.d.ts +5 -12
  81. package/dist/types/src/components/Tree/Tree.stories.d.ts.map +1 -1
  82. package/dist/types/src/components/Tree/index.d.ts +2 -0
  83. package/dist/types/src/components/Tree/index.d.ts.map +1 -1
  84. package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts +37 -2
  85. package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts.map +1 -1
  86. package/dist/types/src/components/Tree/layout/RadialTree.d.ts +35 -2
  87. package/dist/types/src/components/Tree/layout/RadialTree.d.ts.map +1 -1
  88. package/dist/types/src/components/Tree/layout/TidyTree.d.ts +24 -2
  89. package/dist/types/src/components/Tree/layout/TidyTree.d.ts.map +1 -1
  90. package/dist/types/src/components/Tree/layout/hierarchy.d.ts +17 -0
  91. package/dist/types/src/components/Tree/layout/hierarchy.d.ts.map +1 -0
  92. package/dist/types/src/components/Tree/layout/index.d.ts +5 -4
  93. package/dist/types/src/components/Tree/layout/index.d.ts.map +1 -1
  94. package/dist/types/src/components/Tree/layout/slots.d.ts +7 -0
  95. package/dist/types/src/components/Tree/layout/slots.d.ts.map +1 -0
  96. package/dist/types/src/components/Tree/layout/useContainerSize.d.ts +15 -0
  97. package/dist/types/src/components/Tree/layout/useContainerSize.d.ts.map +1 -0
  98. package/dist/types/src/components/Tree/types/tree.d.ts +6 -6
  99. package/dist/types/src/components/Tree/types/tree.d.ts.map +1 -1
  100. package/dist/types/src/components/Tree/types/types.d.ts +14 -4
  101. package/dist/types/src/components/Tree/types/types.d.ts.map +1 -1
  102. package/dist/types/src/components/index.d.ts +1 -0
  103. package/dist/types/src/components/index.d.ts.map +1 -1
  104. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts +9 -0
  105. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts.map +1 -0
  106. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts +29 -0
  107. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts.map +1 -0
  108. package/dist/types/src/containers/ExplorerArticle/experimental.stories.d.ts +7 -0
  109. package/dist/types/src/containers/ExplorerArticle/experimental.stories.d.ts.map +1 -0
  110. package/dist/types/src/containers/ExplorerArticle/index.d.ts +2 -0
  111. package/dist/types/src/containers/ExplorerArticle/index.d.ts.map +1 -0
  112. package/dist/types/src/containers/index.d.ts +1 -1
  113. package/dist/types/src/containers/index.d.ts.map +1 -1
  114. package/dist/types/src/hooks/useGraphModel.d.ts +2 -2
  115. package/dist/types/src/hooks/useGraphModel.d.ts.map +1 -1
  116. package/dist/types/src/index.d.ts +1 -3
  117. package/dist/types/src/index.d.ts.map +1 -1
  118. package/dist/types/src/plugin.d.ts +3 -0
  119. package/dist/types/src/plugin.d.ts.map +1 -0
  120. package/dist/types/src/{components/Tree/testing → testing}/generator.d.ts +1 -1
  121. package/dist/types/src/testing/generator.d.ts.map +1 -0
  122. package/dist/types/src/testing/index.d.ts +4 -0
  123. package/dist/types/src/testing/index.d.ts.map +1 -0
  124. package/dist/types/src/testing/relations.d.ts +47 -0
  125. package/dist/types/src/testing/relations.d.ts.map +1 -0
  126. package/dist/types/src/translations.d.ts +28 -28
  127. package/dist/types/src/translations.d.ts.map +1 -1
  128. package/dist/types/src/types/Graph.d.ts +3 -4
  129. package/dist/types/src/types/Graph.d.ts.map +1 -1
  130. package/dist/types/src/util/index.d.ts +3 -0
  131. package/dist/types/src/util/index.d.ts.map +1 -0
  132. package/dist/types/src/util/node-color.d.ts +13 -0
  133. package/dist/types/src/util/node-color.d.ts.map +1 -0
  134. package/dist/types/src/{components → util}/plot.d.ts +1 -1
  135. package/dist/types/src/util/plot.d.ts.map +1 -0
  136. package/dist/types/tsconfig.tsbuildinfo +1 -1
  137. package/package.json +102 -56
  138. package/src/ExplorerPlugin.test.ts +26 -0
  139. package/src/ExplorerPlugin.tsx +7 -35
  140. package/src/capabilities/create-object.ts +36 -0
  141. package/src/capabilities/index.ts +4 -1
  142. package/src/capabilities/react-surface.tsx +32 -0
  143. package/src/components/Chart/Chart.stories.tsx +14 -21
  144. package/src/components/Chart/Chart.tsx +1 -1
  145. package/src/components/Globe/Globe.stories.tsx +17 -20
  146. package/src/components/Globe/Globe.tsx +1 -1
  147. package/src/components/Graph/CanvasForceGraph.stories.tsx +83 -0
  148. package/src/components/Graph/CanvasForceGraph.tsx +124 -0
  149. package/src/components/Graph/ForceGraph.stories.tsx +78 -42
  150. package/src/components/Graph/ForceGraph.tsx +104 -85
  151. package/src/components/Graph/index.ts +1 -1
  152. package/src/components/Lattice/Lattice.stories.tsx +90 -0
  153. package/src/components/Lattice/Lattice.tsx +182 -0
  154. package/src/components/Lattice/index.ts +5 -0
  155. package/src/components/Tree/EdgeBundling.stories.tsx +144 -0
  156. package/src/components/Tree/Tree.stories.tsx +19 -40
  157. package/src/components/Tree/Tree.tsx +69 -100
  158. package/src/components/Tree/index.ts +2 -0
  159. package/src/components/Tree/layout/HierarchicalEdgeBundling.tsx +296 -0
  160. package/src/components/Tree/layout/RadialTree.tsx +242 -0
  161. package/src/components/Tree/layout/TidyTree.tsx +246 -0
  162. package/src/components/Tree/layout/hierarchy.ts +32 -0
  163. package/src/components/Tree/layout/index.ts +5 -5
  164. package/src/components/Tree/layout/slots.ts +19 -0
  165. package/src/components/Tree/layout/useContainerSize.ts +43 -0
  166. package/src/components/Tree/types/tree.test.ts +4 -5
  167. package/src/components/Tree/types/tree.ts +9 -9
  168. package/src/components/Tree/types/types.ts +38 -29
  169. package/src/components/index.ts +1 -0
  170. package/src/containers/ExplorerArticle/ExplorerArticle.stories.tsx +136 -0
  171. package/src/containers/ExplorerArticle/ExplorerArticle.tsx +465 -0
  172. package/src/containers/ExplorerArticle/experimental.stories.tsx +446 -0
  173. package/src/containers/ExplorerArticle/index.ts +5 -0
  174. package/src/containers/index.ts +1 -1
  175. package/src/hooks/useGraphModel.ts +10 -6
  176. package/src/index.ts +1 -4
  177. package/src/meta.ts +1 -1
  178. package/src/plugin.ts +9 -0
  179. package/src/{components/Tree/testing → testing}/generator.ts +2 -2
  180. package/src/testing/index.ts +9 -0
  181. package/src/testing/relations.ts +192 -0
  182. package/src/translations.ts +14 -14
  183. package/src/types/ExplorerAction.ts +1 -1
  184. package/src/types/Graph.ts +2 -3
  185. package/src/typings.d.ts +8 -0
  186. package/src/util/index.ts +6 -0
  187. package/src/util/node-color.ts +23 -0
  188. package/src/{components → util}/plot.ts +16 -4
  189. package/dist/lib/browser/ExplorerContainer-H5RGY6AD.mjs +0 -48
  190. package/dist/lib/browser/ExplorerContainer-H5RGY6AD.mjs.map +0 -7
  191. package/dist/lib/browser/chunk-56VV76WZ.mjs.map +0 -7
  192. package/dist/lib/browser/chunk-6KEHUEEZ.mjs.map +0 -7
  193. package/dist/lib/browser/chunk-LSUP47BZ.mjs.map +0 -7
  194. package/dist/lib/browser/index.mjs +0 -107
  195. package/dist/lib/browser/index.mjs.map +0 -7
  196. package/dist/lib/browser/meta.json +0 -1
  197. package/dist/lib/browser/react-surface-JYGFP5ZN.mjs +0 -38
  198. package/dist/lib/browser/react-surface-JYGFP5ZN.mjs.map +0 -7
  199. package/dist/lib/node-esm/ExplorerContainer-KFHE5KU3.mjs +0 -49
  200. package/dist/lib/node-esm/ExplorerContainer-KFHE5KU3.mjs.map +0 -7
  201. package/dist/lib/node-esm/chunk-35JCF4SD.mjs +0 -11292
  202. package/dist/lib/node-esm/chunk-35JCF4SD.mjs.map +0 -7
  203. package/dist/lib/node-esm/chunk-EN3JZNEY.mjs +0 -26
  204. package/dist/lib/node-esm/chunk-EN3JZNEY.mjs.map +0 -7
  205. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  206. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
  207. package/dist/lib/node-esm/chunk-WSE2Z4OT.mjs +0 -72
  208. package/dist/lib/node-esm/chunk-WSE2Z4OT.mjs.map +0 -7
  209. package/dist/lib/node-esm/index.mjs +0 -108
  210. package/dist/lib/node-esm/index.mjs.map +0 -7
  211. package/dist/lib/node-esm/meta.json +0 -1
  212. package/dist/lib/node-esm/meta.mjs +0 -9
  213. package/dist/lib/node-esm/react-surface-HJEJL53N.mjs +0 -39
  214. package/dist/lib/node-esm/react-surface-HJEJL53N.mjs.map +0 -7
  215. package/dist/lib/node-esm/types/index.mjs +0 -11
  216. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  217. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  218. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  219. package/dist/types/src/components/Graph/D3ForceGraph.d.ts +0 -19
  220. package/dist/types/src/components/Graph/D3ForceGraph.d.ts.map +0 -1
  221. package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts.map +0 -1
  222. package/dist/types/src/components/Graph/adapter.d.ts.map +0 -1
  223. package/dist/types/src/components/Graph/testing.d.ts +0 -14
  224. package/dist/types/src/components/Graph/testing.d.ts.map +0 -1
  225. package/dist/types/src/components/Tree/testing/generator.d.ts.map +0 -1
  226. package/dist/types/src/components/Tree/testing/index.d.ts +0 -2
  227. package/dist/types/src/components/Tree/testing/index.d.ts.map +0 -1
  228. package/dist/types/src/components/plot.d.ts.map +0 -1
  229. package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts +0 -6
  230. package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts.map +0 -1
  231. package/dist/types/src/containers/ExplorerContainer/index.d.ts +0 -3
  232. package/dist/types/src/containers/ExplorerContainer/index.d.ts.map +0 -1
  233. package/src/capabilities/react-surface/index.ts +0 -7
  234. package/src/capabilities/react-surface/react-surface.tsx +0 -31
  235. package/src/components/Graph/D3ForceGraph.stories.tsx +0 -83
  236. package/src/components/Graph/D3ForceGraph.tsx +0 -109
  237. package/src/components/Graph/testing.ts +0 -58
  238. package/src/components/Tree/layout/HierarchicalEdgeBundling.ts +0 -162
  239. package/src/components/Tree/layout/RadialTree.ts +0 -94
  240. package/src/components/Tree/layout/TidyTree.ts +0 -101
  241. package/src/components/Tree/testing/index.ts +0 -5
  242. package/src/containers/ExplorerContainer/ExplorerContainer.tsx +0 -53
  243. package/src/containers/ExplorerContainer/index.ts +0 -7
  244. /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/ExplorerPlugin.mjs.map} +0 -0
  245. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  246. /package/dist/lib/{browser/meta.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  247. /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
  248. /package/dist/lib/{node-esm → neutral}/meta.mjs.map +0 -0
  249. /package/dist/lib/{node-esm → neutral}/types/index.mjs.map +0 -0
  250. /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
  251. /package/src/components/Graph/{adapter.ts → graph-adapter.ts} +0 -0
@@ -1,6 +1,6 @@
1
- declare namespace _default {
2
- let type: string;
3
- let features: {
1
+ declare const _default: {
2
+ type: string;
3
+ features: {
4
4
  type: string;
5
5
  properties: {
6
6
  pop_max: number;
@@ -12,6 +12,6 @@ declare namespace _default {
12
12
  coordinates: number[];
13
13
  };
14
14
  }[];
15
- }
15
+ };
16
16
  export default _default;
17
17
  //# sourceMappingURL=cities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cities.d.ts","sourceRoot":"","sources":["../../../data/cities.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"cities.d.ts","sourceRoot":"","sources":["../../../data/cities.js"],"names":[],"mappings":";;;;;YAUQ,OAAO;YACP,IAAI;YACJ,QAAQ;;;YAGR,IAAI;YACJ,WAAW"}
@@ -1,10 +1,9 @@
1
- declare namespace _default {
2
- let type: string;
3
- namespace objects {
4
- namespace countries {
5
- let type_1: string;
6
- export { type_1 as type };
7
- export let geometries: ({
1
+ declare const _default: {
2
+ type: string;
3
+ objects: {
4
+ countries: {
5
+ type: string;
6
+ geometries: ({
8
7
  type: string;
9
8
  arcs: number[][];
10
9
  id: string;
@@ -13,23 +12,21 @@ declare namespace _default {
13
12
  arcs: number[][][];
14
13
  id: string;
15
14
  })[];
16
- }
17
- namespace land {
18
- let type_2: string;
19
- export { type_2 as type };
20
- let geometries_1: {
15
+ };
16
+ land: {
17
+ type: string;
18
+ geometries: {
21
19
  type: string;
22
20
  arcs: number[][][];
23
21
  }[];
24
- export { geometries_1 as geometries };
25
- }
26
- }
27
- let arcs: number[][][];
28
- let bbox: number[];
29
- namespace transform {
30
- let scale: number[];
31
- let translate: number[];
32
- }
33
- }
22
+ };
23
+ };
24
+ arcs: number[][][];
25
+ bbox: number[];
26
+ transform: {
27
+ scale: number[];
28
+ translate: number[];
29
+ };
30
+ };
34
31
  export default _default;
35
32
  //# sourceMappingURL=countries-110m.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"countries-110m.d.ts","sourceRoot":"","sources":["../../../data/countries-110m.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"countries-110m.d.ts","sourceRoot":"","sources":["../../../data/countries-110m.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;QAi1UI,KAAK;QACL,SAAS"}
@@ -1,3 +1,4 @@
1
1
  import { Plugin } from '@dxos/app-framework';
2
2
  export declare const ExplorerPlugin: Plugin.PluginFactory<void>;
3
+ export default ExplorerPlugin;
3
4
  //# sourceMappingURL=ExplorerPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExplorerPlugin.d.ts","sourceRoot":"","sources":["../../../src/ExplorerPlugin.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAa7C,eAAO,MAAM,cAAc,4BA4B1B,CAAC"}
1
+ {"version":3,"file":"ExplorerPlugin.d.ts","sourceRoot":"","sources":["../../../src/ExplorerPlugin.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAQ7C,eAAO,MAAM,cAAc,4BAM1B,CAAC;eAEa,cAAc"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ExplorerPlugin.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExplorerPlugin.test.d.ts","sourceRoot":"","sources":["../../../src/ExplorerPlugin.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import * as Effect from 'effect/Effect';
2
+ import { Capability } from '@dxos/app-framework';
3
+ import { SpaceCapabilities } from '@dxos/plugin-space';
4
+ declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Readonly<{
5
+ id: string;
6
+ createObject: import("@dxos/plugin-space").CreateObject;
7
+ inputSchema?: import("effect/Schema").Schema.AnyNoContext;
8
+ customPanel?: import("react").ComponentType<SpaceCapabilities.CreateObjectCustomPanelProps>;
9
+ }>>>, never, never>;
10
+ export default _default;
11
+ //# sourceMappingURL=create-object.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-object.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/create-object.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAIjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,2 +1,9 @@
1
- export * from './react-surface';
1
+ import { Capability } from '@dxos/app-framework';
2
+ export declare const CreateObject: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<Readonly<{
3
+ id: string;
4
+ createObject: import("@dxos/plugin-space").CreateObject;
5
+ inputSchema?: import("effect/Schema").Schema.AnyNoContext;
6
+ customPanel?: import("react").ComponentType<import("@dxos/plugin-space").SpaceCapabilities.CreateObjectCustomPanelProps>;
7
+ }>>>, Error>;
8
+ export declare const ReactSurface: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("@dxos/app-framework/Capabilities").ReactSurface>>, Error>;
2
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,YAAY;;;;;YAAmE,CAAC;AAC7F,eAAO,MAAM,YAAY,iJAAmE,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type DotOptions } from '@observablehq/plot';
2
2
  import React from 'react';
3
- import { type Accessor, type Point } from '../plot';
3
+ import { type Accessor, type Point } from '../../util';
4
4
  export type CharProps = {
5
5
  items?: any[];
6
6
  accessor?: Accessor<Point>;
@@ -1 +1 @@
1
- {"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../../../src/components/Chart/Chart.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAoB,MAAM,OAAO,CAAC;AAGzC,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,KAAK,EAAiB,MAAM,SAAS,CAAC;AASnE,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,8BAAoD,SAAS,sBA6BlF,CAAC"}
1
+ {"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../../../src/components/Chart/Chart.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAoB,MAAM,OAAO,CAAC;AAGzC,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,KAAK,EAAiB,MAAM,YAAY,CAAC;AAStE,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,KAAK,iCAAwD,SAAS,sBA6BlF,CAAC"}
@@ -1,12 +1,15 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
1
2
  import React from 'react';
2
- export declare const Default: () => React.JSX.Element;
3
3
  declare const meta: {
4
4
  title: string;
5
5
  component: ({ items, accessor, options }: import("./Chart").CharProps) => React.JSX.Element;
6
+ render: () => React.JSX.Element;
6
7
  decorators: import("@storybook/react").Decorator[];
7
8
  parameters: {
8
9
  layout: string;
9
10
  };
10
11
  };
11
12
  export default meta;
13
+ type Story = StoryObj<typeof meta>;
14
+ export declare const Default: Story;
12
15
  //# sourceMappingURL=Chart.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chart.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Chart/Chart.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AA0B1B,eAAO,MAAM,OAAO,yBAA6C,CAAC;AAElE,QAAA,MAAM,IAAI;;;;;;;CAOoB,CAAC;AAE/B,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Chart.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Chart/Chart.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,QAAA,MAAM,IAAI;;;;;;QAMN,MAAM;;CAEoB,CAAC;eAEhB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { DotOptions } from '@observablehq/plot';
2
2
  import * as Plot from '@observablehq/plot';
3
3
  import React from 'react';
4
- import { type Accessor, type GeoLocation } from '../plot';
4
+ import { type Accessor, type GeoLocation } from '../../util';
5
5
  export type GlobeProps = {
6
6
  items?: any[];
7
7
  accessor?: Accessor<GeoLocation>;
@@ -1 +1 @@
1
- {"version":3,"file":"Globe.d.ts","sourceRoot":"","sources":["../../../../../src/components/Globe/Globe.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,IAAI,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAoB,MAAM,OAAO,CAAC;AAKzC,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAiB,MAAM,SAAS,CAAC;AAOzE,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC;IACjC,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,0CAAiF,UAAU,sBAsChH,CAAC"}
1
+ {"version":3,"file":"Globe.d.ts","sourceRoot":"","sources":["../../../../../src/components/Globe/Globe.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,IAAI,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAoB,MAAM,OAAO,CAAC;AAKzC,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAiB,MAAM,YAAY,CAAC;AAO5E,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC;IACjC,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,KAAK,6CAAqF,UAAU,sBAsChH,CAAC"}
@@ -1,12 +1,15 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
1
2
  import React from 'react';
2
3
  declare const meta: {
3
4
  title: string;
5
+ component: ({ items, accessor, projection, options }: import("./Globe").GlobeProps) => React.JSX.Element;
4
6
  decorators: import("@storybook/react").Decorator[];
5
7
  parameters: {
6
8
  layout: string;
7
9
  };
8
10
  };
9
11
  export default meta;
10
- export declare const Default: () => React.JSX.Element;
11
- export declare const Extended: () => React.JSX.Element;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ export declare const Extended: Story;
12
15
  //# sourceMappingURL=Globe.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Globe.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Globe/Globe.stories.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAoB,MAAM,OAAO,CAAC;AA0EzC,QAAA,MAAM,IAAI;;;;;;CAMM,CAAC;AAEjB,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,yBAAgE,CAAC;AAErF,eAAO,MAAM,QAAQ,yBAAiE,CAAC"}
1
+ {"version":3,"file":"Globe.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Globe/Globe.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAoB,MAAM,OAAO,CAAC;AAgEzC,QAAA,MAAM,IAAI;;;;;QAKN,MAAM;;CAEoB,CAAC;eAEhB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { type SpaceGraphModel } from '@dxos/schema';
3
+ export type CanvasForceGraphProps = {
4
+ model?: SpaceGraphModel;
5
+ match?: RegExp;
6
+ };
7
+ /**
8
+ * More performance optimized version of the ForceGraph.
9
+ */
10
+ export declare const CanvasForceGraph: React.ForwardRefExoticComponent<Omit<CanvasForceGraphProps, "className"> & {
11
+ classNames?: import("@dxos/ui-types").ClassNameValue;
12
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
13
+ //# sourceMappingURL=CanvasForceGraph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CanvasForceGraph.d.ts","sourceRoot":"","sources":["../../../../../src/components/Graph/CanvasForceGraph.tsx"],"names":[],"mappings":"AAMA,OAAO,KAQN,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAKpD,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;2HAqF5B,CAAC"}
@@ -2,13 +2,9 @@ import { type StoryObj } from '@storybook/react-vite';
2
2
  import React from 'react';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: React.ForwardRefExoticComponent<Omit<import("./D3ForceGraph").D3ForceGraphProps, "className"> & {
5
+ component: React.ForwardRefExoticComponent<Omit<import("./CanvasForceGraph").CanvasForceGraphProps, "className"> & {
6
6
  classNames?: import("@dxos/ui-types").ClassNameValue;
7
- } & {
8
- className?: string;
9
- children?: React.ReactNode;
10
- role?: string;
11
- } & React.RefAttributes<HTMLDivElement>>;
7
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
12
8
  render: () => React.JSX.Element;
13
9
  decorators: import("@storybook/react").Decorator[];
14
10
  parameters: {
@@ -18,4 +14,4 @@ declare const meta: {
18
14
  export default meta;
19
15
  type Story = StoryObj<typeof meta>;
20
16
  export declare const Default: Story;
21
- //# sourceMappingURL=D3ForceGraph.stories.d.ts.map
17
+ //# sourceMappingURL=CanvasForceGraph.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CanvasForceGraph.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Graph/CanvasForceGraph.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAkC1B,QAAA,MAAM,IAAI;;;;;;;;QAkCN,MAAM;;CAE+B,CAAC;eAE3B,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -1,8 +1,15 @@
1
- import { type FC } from 'react';
2
- import { type SpaceGraphModel } from '@dxos/schema';
1
+ import React from 'react';
2
+ import { SelectionModel } from '@dxos/graph';
3
+ import { type GraphProps } from '@dxos/react-ui-graph';
4
+ import { type SpaceGraphEdge, type SpaceGraphModel, type SpaceGraphNode } from '@dxos/schema';
5
+ import '@dxos/react-ui-graph/styles/graph.css';
3
6
  export type ForceGraphProps = {
4
7
  model?: SpaceGraphModel;
5
- match?: RegExp;
6
- };
7
- export declare const ForceGraph: FC<ForceGraphProps>;
8
+ grid?: boolean;
9
+ selection?: SelectionModel;
10
+ onInspect?: GraphProps<SpaceGraphNode, SpaceGraphEdge>['onInspect'];
11
+ } & Pick<GraphProps, 'drag'>;
12
+ export declare const ForceGraph: React.ForwardRefExoticComponent<Omit<ForceGraphProps, "className"> & {
13
+ classNames?: import("@dxos/ui-types").ClassNameValue;
14
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
8
15
  //# sourceMappingURL=ForceGraph.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ForceGraph.d.ts","sourceRoot":"","sources":["../../../../../src/components/Graph/ForceGraph.tsx"],"names":[],"mappings":"AAMA,OAAc,EAAE,KAAK,EAAE,EAA+B,MAAM,OAAO,CAAC;AAIpE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAIpD,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAwE1C,CAAC"}
1
+ {"version":3,"file":"ForceGraph.d.ts","sourceRoot":"","sources":["../../../../../src/components/Graph/ForceGraph.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAGjF,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAIL,KAAK,UAAU,EAGhB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9F,OAAO,uCAAuC,CAAC;AAI/C,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,SAAS,CAAC,EAAE,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC,WAAW,CAAC,CAAC;CACrE,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAE7B,eAAO,MAAM,UAAU;;2HAgFtB,CAAC"}
@@ -2,7 +2,9 @@ import { type StoryObj } from '@storybook/react-vite';
2
2
  import React from 'react';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: React.FC<import("./ForceGraph").ForceGraphProps>;
5
+ component: React.ForwardRefExoticComponent<Omit<import("./ForceGraph").ForceGraphProps, "className"> & {
6
+ classNames?: import("@dxos/ui-types").ClassNameValue;
7
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
6
8
  render: () => React.JSX.Element;
7
9
  decorators: import("@storybook/react").Decorator[];
8
10
  parameters: {
@@ -1 +1 @@
1
- {"version":3,"file":"ForceGraph.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Graph/ForceGraph.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAgDxC,QAAA,MAAM,IAAI;;;;;;;;CAuByB,CAAC;AAEpC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
1
+ {"version":3,"file":"ForceGraph.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Graph/ForceGraph.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAA+B,MAAM,OAAO,CAAC;AAoEpD,QAAA,MAAM,IAAI;;;;;;;;QAoCN,MAAM;;CAEyB,CAAC;eAErB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -21,4 +21,4 @@ export declare class GraphAdapter implements GraphData {
21
21
  get nodes(): GraphNode[];
22
22
  get links(): GraphLink[];
23
23
  }
24
- //# sourceMappingURL=adapter.d.ts.map
24
+ //# sourceMappingURL=graph-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph-adapter.d.ts","sourceRoot":"","sources":["../../../../../src/components/Graph/graph-adapter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,qBAAa,YAAa,YAAW,SAAS;IAIhC,OAAO,CAAC,QAAQ,CAAC,KAAK;IAHlC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmB;IAC1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmB;IAE1C,YAA6B,KAAK,EAAE,KAAK,CAAC,GAAG,EAmB5C;IAED,IAAI,KAAK,gBAER;IAED,IAAI,KAAK,gBAER;CACF"}
@@ -1,3 +1,3 @@
1
- export * from './D3ForceGraph';
1
+ export * from './CanvasForceGraph';
2
2
  export * from './ForceGraph';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Graph/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Graph/index.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { Obj } from '@dxos/echo';
3
+ import { type SpaceGraphNode } from '@dxos/schema';
4
+ import { type TreeNode } from '../Tree/types';
5
+ export type LatticeProps = {
6
+ /** Object nodes from the space graph (typically `model.graph.nodes` filtered to `type === 'object'`). */
7
+ nodes: SpaceGraphNode[];
8
+ /** Padding (in screen pixels) reserved around the lattice. */
9
+ padding?: number;
10
+ /** Mirrors the hover preview contract used by the other variants. */
11
+ onNodeHover?: (node: TreeNode<Obj.Unknown> | null, event?: MouseEvent) => void;
12
+ };
13
+ /**
14
+ * Renders objects as an SVG lattice that fits the container without scrolling.
15
+ * Each object is a rounded rect, colored by typename via the shared hue-hash used by every
16
+ * other variant. Cells are sorted by typename then label so objects of the same type cluster.
17
+ * Hover dispatches the standard preview event — there is no rendered label.
18
+ */
19
+ export declare const Lattice: ({ nodes, padding, onNodeHover }: LatticeProps) => React.JSX.Element;
20
+ //# sourceMappingURL=Lattice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Lattice.d.ts","sourceRoot":"","sources":["../../../../../src/components/Lattice/Lattice.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAInD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAI9C,MAAM,MAAM,YAAY,GAAG;IACzB,yGAAyG;IACzG,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CAChF,CAAC;AASF;;;;;GAKG;AACH,eAAO,MAAM,OAAO,oCAA0C,YAAY,sBAqDzE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+ declare const DefaultStory: () => React.JSX.Element;
4
+ declare const meta: Meta<typeof DefaultStory>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof DefaultStory>;
7
+ export declare const Default: Story;
8
+ //# sourceMappingURL=Lattice.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Lattice.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Lattice/Lattice.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAkB,MAAM,OAAO,CAAC;AA0BvC,QAAA,MAAM,YAAY,yBAWjB,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAqCnC,CAAC;eAEa,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3C,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Lattice';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Lattice/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+ import { type TreeComponentProps } from './Tree';
4
+ declare const meta: {
5
+ title: string;
6
+ component: any;
7
+ render: ({ variant, tension }: {
8
+ variant?: TreeComponentProps['variant'];
9
+ tension?: number;
10
+ }) => React.JSX.Element;
11
+ decorators: import("@storybook/react").Decorator[];
12
+ parameters: {
13
+ layout: string;
14
+ };
15
+ };
16
+ export default meta;
17
+ type Story = StoryObj<typeof meta>;
18
+ export declare const Default: Story;
19
+ export declare const Tidy: Story;
20
+ export declare const Radial: Story;
21
+ //# sourceMappingURL=EdgeBundling.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EdgeBundling.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/EdgeBundling.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAuC,MAAM,OAAO,CAAC;AAa5D,OAAO,EAAQ,KAAK,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAuEvD,QAAA,MAAM,IAAI;;eAEW,GAAG;mCAlE6B;QAAE,OAAO,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;;;QA6F9G,MAAM;;CAE2B,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAIlB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAIpB,CAAC"}
@@ -1,27 +1,24 @@
1
1
  import React from 'react';
2
- import { type Space } from '@dxos/client/echo';
2
+ import { type ThemedClassName } from '@dxos/react-ui';
3
+ import { type BundleEdge, type TreeLayoutSlots } from './layout';
4
+ import { type TreeNode } from './types';
3
5
  export type LayoutVariant = 'tidy' | 'radial' | 'edge';
4
- export type TreeLayoutSlots = {
5
- node?: string;
6
- path?: string;
7
- text?: string;
8
- };
9
- export type TreeOptions = {
10
- label: (d: any) => string;
11
- slots?: TreeLayoutSlots;
12
- radius?: number;
13
- width: number;
14
- height: number;
15
- margin?: number;
16
- padding?: number;
17
- r?: number;
18
- };
19
- export declare const defaultTreeLayoutSlots: TreeLayoutSlots;
20
- export type TreeComponentProps<N = unknown> = {
21
- space: Space;
22
- selected?: string;
6
+ export type TreeComponentProps = ThemedClassName<{
7
+ data: TreeNode;
8
+ /** Optional edges for the `edge` variant (hierarchical edge bundling). */
9
+ edges?: BundleEdge[];
23
10
  variant?: LayoutVariant;
24
- onNodeClick?: (node?: N) => void;
25
- };
26
- export declare const Tree: <N>({ space, selected, variant, onNodeClick }: TreeComponentProps<N>) => React.JSX.Element;
11
+ label?: (node: TreeNode) => string;
12
+ slots?: TreeLayoutSlots;
13
+ initialCollapsed?: Iterable<string>;
14
+ onNodeClick?: (node: TreeNode) => void;
15
+ onNodeHover?: (node: TreeNode | null, event?: MouseEvent) => void;
16
+ }>;
17
+ /**
18
+ * Tree visualization wrapping the three layout variants.
19
+ * - `tidy` — horizontal tidy tree (collapsible)
20
+ * - `radial` — radial tree (collapsible)
21
+ * - `edge` — hierarchical edge bundling (`edges` connect leaves)
22
+ */
23
+ export declare const Tree: ({ classNames, data, edges, variant, label, slots, initialCollapsed, onNodeClick, onNodeHover, }: TreeComponentProps) => React.JSX.Element;
27
24
  //# sourceMappingURL=Tree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/Tree.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAa/C,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAGvD,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,MAAM,CAAC;IAE1B,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eAIpC,CAAC;AAQF,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,OAAO,IAAI;IAC5C,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,WAAW,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;CAClC,CAAC;AAGF,eAAO,MAAM,IAAI,GAAI,CAAC,EAAG,2CAAoD,kBAAkB,CAAC,CAAC,CAAC,sBA+CjG,CAAC"}
1
+ {"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/Tree.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,KAAK,UAAU,EAAkD,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AACjH,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEvD,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC;IAC/C,IAAI,EAAE,QAAQ,CAAC;IACf,0EAA0E;IAC1E,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,MAAM,CAAC;IACnC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,gBAAgB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CACnE,CAAC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,IAAI,oGAUd,kBAAkB,sBAuCpB,CAAC"}
@@ -1,16 +1,9 @@
1
- import { type StoryObj } from '@storybook/react-vite';
2
- import React from 'react';
3
- declare const meta: {
4
- title: string;
5
- component: any;
6
- render: () => React.JSX.Element;
7
- decorators: import("@storybook/react").Decorator[];
8
- parameters: {
9
- layout: string;
10
- };
11
- };
1
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
2
+ import { type TreeComponentProps } from './Tree';
3
+ type StoryArgs = Pick<TreeComponentProps, 'variant'>;
4
+ declare const meta: Meta<StoryArgs>;
12
5
  export default meta;
13
- type Story = StoryObj<typeof meta>;
6
+ type Story = StoryObj<StoryArgs>;
14
7
  export declare const Tidy: Story;
15
8
  export declare const Radial: Story;
16
9
  export declare const Edge: Story;
@@ -1 +1 @@
1
- {"version":3,"file":"Tree.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/Tree.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAA8B,MAAM,OAAO,CAAC;AA0CnD,QAAA,MAAM,IAAI;;eAEW,GAAG;;;;;;CAMa,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,IAAI,EAAE,KAIlB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAIpB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAIlB,CAAC"}
1
+ {"version":3,"file":"Tree.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/Tree.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAOjE,OAAO,EAAQ,KAAK,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAKvD,KAAK,SAAS,GAAG,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;AAWrD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,SAAS,CAOzB,CAAC;eAEa,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;AAEjC,eAAO,MAAM,IAAI,EAAE,KAIlB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAIpB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAIlB,CAAC"}
@@ -1,2 +1,4 @@
1
1
  export * from './Tree';
2
+ export * from './layout';
3
+ export { type TreeNode, treeTypeToTreeNode } from './types';
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,KAAK,QAAQ,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
@@ -1,5 +1,40 @@
1
- import { type TreeOptions } from '../Tree';
1
+ import React from 'react';
2
+ import { type ThemedClassName } from '@dxos/react-ui';
2
3
  import { type TreeNode } from '../types';
3
- declare const HierarchicalEdgeBundling: (s: SVGSVGElement, data: TreeNode, options: TreeOptions) => void;
4
+ import { type TreeLayoutSlots } from './slots';
5
+ /** A directed edge between two leaves of the hierarchy, identified by node id. */
6
+ export type BundleEdge = {
7
+ source: string;
8
+ target: string;
9
+ kind?: string;
10
+ };
11
+ export type HierarchicalEdgeBundlingProps = ThemedClassName<{
12
+ /** Hierarchical data; leaves are the connectable entities. */
13
+ data: TreeNode;
14
+ /** Edges between leaves (by id). Bundled through the hierarchy. */
15
+ edges?: BundleEdge[];
16
+ /** Label accessor for leaf nodes. */
17
+ label?: (d: TreeNode) => string;
18
+ /** Padding (in screen pixels) reserved around the radial layout. */
19
+ padding?: number;
20
+ /** Bundling tension; 0 = straight, 1 = maximally bundled. */
21
+ tension?: number;
22
+ /** Leaf node circle radius (matches the cluster layout's `r`). */
23
+ r?: number;
24
+ slots?: TreeLayoutSlots;
25
+ /**
26
+ * Called when the user hovers a leaf node (with the event so callers can dispatch
27
+ * `DxAnchorActivate` for previews). Receives `null` on leave.
28
+ */
29
+ onNodeHover?: (node: TreeNode | null, event?: MouseEvent) => void;
30
+ }>;
31
+ /**
32
+ * Hierarchical edge bundling.
33
+ * https://observablehq.com/@d3/hierarchical-edge-bundling?intent=fork
34
+ *
35
+ * Leaves are placed on a circle, grouped by their parent in the hierarchy.
36
+ * Edges between leaves are drawn as bundled curves that route through their lowest common ancestor.
37
+ */
38
+ export declare const HierarchicalEdgeBundling: ({ classNames, data, edges, label, padding, tension, r, slots, onNodeHover, }: HierarchicalEdgeBundlingProps) => React.JSX.Element;
4
39
  export default HierarchicalEdgeBundling;
5
40
  //# sourceMappingURL=HierarchicalEdgeBundling.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchicalEdgeBundling.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/layout/HierarchicalEdgeBundling.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AASzC,QAAA,MAAM,wBAAwB,GAAI,GAAG,aAAa,EAAE,MAAM,QAAQ,EAAE,SAAS,WAAW,SAuFvF,CAAC;AAwDF,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"HierarchicalEdgeBundling.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/layout/HierarchicalEdgeBundling.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAG1D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAItD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,KAAK,eAAe,EAA0B,MAAM,SAAS,CAAC;AAKvE,kFAAkF;AAClF,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,eAAe,CAAC;IAC1D,8DAA8D;IAC9D,IAAI,EAAE,QAAQ,CAAC;IACf,mEAAmE;IACnE,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,qCAAqC;IACrC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,QAAQ,KAAK,MAAM,CAAC;IAChC,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CACnE,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,iFAUlC,6BAA6B,sBAuC/B,CAAC;eA+La,wBAAwB"}
@@ -1,4 +1,37 @@
1
- import { type TreeOptions } from '../Tree';
2
- declare const RadialTree: (s: SVGSVGElement, data: any, options: TreeOptions) => SVGSVGElement | null;
1
+ import React from 'react';
2
+ import { type ThemedClassName } from '@dxos/react-ui';
3
+ import { type TreeNode } from '../types';
4
+ import { type TreeLayoutSlots } from './slots';
5
+ export type RadialTreeProps = ThemedClassName<{
6
+ data: TreeNode;
7
+ label?: (d: TreeNode) => string;
8
+ slots?: TreeLayoutSlots;
9
+ /** Node radius. */
10
+ r?: number;
11
+ /** Optional padding (in screen pixels) reserved around the radial layout. */
12
+ padding?: number;
13
+ /** Initial set of collapsed node ids. */
14
+ initialCollapsed?: Iterable<string>;
15
+ /**
16
+ * Use `d3.cluster` (all leaves equidistant from center) instead of `d3.tree`.
17
+ * Matches https://observablehq.com/@d3/radial-cluster.
18
+ */
19
+ cluster?: boolean;
20
+ /** Notified when the user clicks a node. */
21
+ onNodeClick?: (node: TreeNode) => void;
22
+ /**
23
+ * Notified on pointerenter (and `null` on pointerleave) for nodes. Used to wire previews
24
+ * (dispatch `DxAnchorActivate`). The event target on enter is the hovered circle — dispatch
25
+ * from it so the preview anchors there.
26
+ */
27
+ onNodeHover?: (node: TreeNode | null, event?: MouseEvent) => void;
28
+ }>;
29
+ /**
30
+ * Radial tree layout based on the D3 reference component.
31
+ * https://observablehq.com/@d3/radial-tree-component
32
+ *
33
+ * Click a node with children to toggle collapse / expand.
34
+ */
35
+ export declare const RadialTree: ({ classNames, data, label, slots, r, padding, initialCollapsed, cluster, onNodeClick, onNodeHover, }: RadialTreeProps) => React.JSX.Element;
3
36
  export default RadialTree;
4
37
  //# sourceMappingURL=RadialTree.d.ts.map