@dxos/plugin-explorer 0.8.4-main.ae835ea → 0.8.4-main.bc2380dfbc

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 (234) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/neutral/ExplorerArticle-EW2MBCRK.mjs +141 -0
  3. package/dist/lib/neutral/ExplorerArticle-EW2MBCRK.mjs.map +7 -0
  4. package/dist/lib/neutral/ExplorerPlugin.mjs +10 -0
  5. package/dist/lib/neutral/capabilities/index.mjs +11 -0
  6. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  7. package/dist/lib/neutral/chunk-7SPMPHRS.mjs +72 -0
  8. package/dist/lib/neutral/chunk-7SPMPHRS.mjs.map +7 -0
  9. package/dist/lib/neutral/chunk-GRJXLL4Z.mjs +25 -0
  10. package/dist/lib/neutral/chunk-GRJXLL4Z.mjs.map +7 -0
  11. package/dist/lib/{browser/chunk-UBHZGWZQ.mjs → neutral/chunk-HPIS2WXY.mjs} +2 -2
  12. package/dist/lib/neutral/chunk-HPIS2WXY.mjs.map +7 -0
  13. package/dist/lib/{browser/chunk-CRN65FY3.mjs → neutral/components/index.mjs} +817 -288
  14. package/dist/lib/{node-esm/chunk-RSZFBKZM.mjs.map → neutral/components/index.mjs.map} +4 -4
  15. package/dist/lib/neutral/containers/index.mjs +9 -0
  16. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  17. package/dist/lib/neutral/create-object-F6TKVAGV.mjs +39 -0
  18. package/dist/lib/neutral/create-object-F6TKVAGV.mjs.map +7 -0
  19. package/dist/lib/neutral/hooks/index.mjs +45 -0
  20. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  21. package/dist/lib/neutral/index.mjs +14 -0
  22. package/dist/lib/neutral/meta.json +1 -0
  23. package/dist/lib/{browser → neutral}/meta.mjs +1 -1
  24. package/dist/lib/neutral/plugin.mjs +12 -0
  25. package/dist/lib/neutral/plugin.mjs.map +7 -0
  26. package/dist/lib/neutral/react-surface-APBW2VQG.mjs +26 -0
  27. package/dist/lib/neutral/react-surface-APBW2VQG.mjs.map +7 -0
  28. package/dist/lib/neutral/testing.mjs +8 -0
  29. package/dist/lib/neutral/translations.mjs +33 -0
  30. package/dist/lib/neutral/translations.mjs.map +7 -0
  31. package/dist/lib/{browser → neutral}/types/index.mjs +1 -2
  32. package/dist/types/data/cities.d.ts +4 -4
  33. package/dist/types/data/cities.d.ts.map +1 -1
  34. package/dist/types/data/countries-110m.d.ts +19 -22
  35. package/dist/types/data/countries-110m.d.ts.map +1 -1
  36. package/dist/types/src/ExplorerPlugin.d.ts +3 -1
  37. package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
  38. package/dist/types/src/ExplorerPlugin.test.d.ts +2 -0
  39. package/dist/types/src/ExplorerPlugin.test.d.ts.map +1 -0
  40. package/dist/types/src/capabilities/create-object.d.ts +11 -0
  41. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  42. package/dist/types/src/capabilities/index.d.ts +8 -2
  43. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  44. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  45. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  46. package/dist/types/src/components/Chart/Chart.d.ts.map +1 -1
  47. package/dist/types/src/components/Chart/Chart.stories.d.ts +4 -1
  48. package/dist/types/src/components/Chart/Chart.stories.d.ts.map +1 -1
  49. package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
  50. package/dist/types/src/components/Globe/Globe.stories.d.ts +5 -2
  51. package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
  52. package/dist/types/src/components/Graph/CanvasForceGraph.d.ts +13 -0
  53. package/dist/types/src/components/Graph/CanvasForceGraph.d.ts.map +1 -0
  54. package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts +17 -0
  55. package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts.map +1 -0
  56. package/dist/types/src/components/Graph/ForceGraph.d.ts +12 -5
  57. package/dist/types/src/components/Graph/ForceGraph.d.ts.map +1 -1
  58. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts +4 -2
  59. package/dist/types/src/components/Graph/ForceGraph.stories.d.ts.map +1 -1
  60. package/dist/types/src/components/Graph/{adapter.d.ts → graph-adapter.d.ts} +2 -2
  61. package/dist/types/src/components/Graph/graph-adapter.d.ts.map +1 -0
  62. package/dist/types/src/components/Graph/index.d.ts +1 -1
  63. package/dist/types/src/components/Graph/index.d.ts.map +1 -1
  64. package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts +21 -0
  65. package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts.map +1 -0
  66. package/dist/types/src/components/Tree/Tree.d.ts +20 -23
  67. package/dist/types/src/components/Tree/Tree.d.ts.map +1 -1
  68. package/dist/types/src/components/Tree/Tree.stories.d.ts +5 -12
  69. package/dist/types/src/components/Tree/Tree.stories.d.ts.map +1 -1
  70. package/dist/types/src/components/Tree/index.d.ts +3 -0
  71. package/dist/types/src/components/Tree/index.d.ts.map +1 -1
  72. package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts +35 -2
  73. package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts.map +1 -1
  74. package/dist/types/src/components/Tree/layout/RadialTree.d.ts +35 -2
  75. package/dist/types/src/components/Tree/layout/RadialTree.d.ts.map +1 -1
  76. package/dist/types/src/components/Tree/layout/TidyTree.d.ts +24 -2
  77. package/dist/types/src/components/Tree/layout/TidyTree.d.ts.map +1 -1
  78. package/dist/types/src/components/Tree/layout/hierarchy.d.ts +17 -0
  79. package/dist/types/src/components/Tree/layout/hierarchy.d.ts.map +1 -0
  80. package/dist/types/src/components/Tree/layout/index.d.ts +5 -4
  81. package/dist/types/src/components/Tree/layout/index.d.ts.map +1 -1
  82. package/dist/types/src/components/Tree/layout/slots.d.ts +7 -0
  83. package/dist/types/src/components/Tree/layout/slots.d.ts.map +1 -0
  84. package/dist/types/src/components/Tree/layout/useContainerSize.d.ts +15 -0
  85. package/dist/types/src/components/Tree/layout/useContainerSize.d.ts.map +1 -0
  86. package/dist/types/src/components/Tree/space-graph-adapter.d.ts +32 -0
  87. package/dist/types/src/components/Tree/space-graph-adapter.d.ts.map +1 -0
  88. package/dist/types/src/components/Tree/testing/generator.d.ts.map +1 -1
  89. package/dist/types/src/components/Tree/testing/index.d.ts +1 -0
  90. package/dist/types/src/components/Tree/testing/index.d.ts.map +1 -1
  91. package/dist/types/src/components/Tree/testing/relations.d.ts +47 -0
  92. package/dist/types/src/components/Tree/testing/relations.d.ts.map +1 -0
  93. package/dist/types/src/components/Tree/types/tree.d.ts +18 -16
  94. package/dist/types/src/components/Tree/types/tree.d.ts.map +1 -1
  95. package/dist/types/src/components/Tree/types/types.d.ts +14 -4
  96. package/dist/types/src/components/Tree/types/types.d.ts.map +1 -1
  97. package/dist/types/src/components/index.d.ts +0 -4
  98. package/dist/types/src/components/index.d.ts.map +1 -1
  99. package/dist/types/src/components/plot.d.ts.map +1 -1
  100. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts +8 -0
  101. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts.map +1 -0
  102. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts +24 -0
  103. package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts.map +1 -0
  104. package/dist/types/src/containers/ExplorerArticle/index.d.ts +2 -0
  105. package/dist/types/src/containers/ExplorerArticle/index.d.ts.map +1 -0
  106. package/dist/types/src/containers/index.d.ts +3 -0
  107. package/dist/types/src/containers/index.d.ts.map +1 -0
  108. package/dist/types/src/hooks/useGraphModel.d.ts +2 -2
  109. package/dist/types/src/hooks/useGraphModel.d.ts.map +1 -1
  110. package/dist/types/src/index.d.ts +1 -3
  111. package/dist/types/src/index.d.ts.map +1 -1
  112. package/dist/types/src/meta.d.ts +2 -2
  113. package/dist/types/src/meta.d.ts.map +1 -1
  114. package/dist/types/src/plugin.d.ts +3 -0
  115. package/dist/types/src/plugin.d.ts.map +1 -0
  116. package/dist/types/src/testing.d.ts +2 -0
  117. package/dist/types/src/testing.d.ts.map +1 -0
  118. package/dist/types/src/translations.d.ts +31 -22
  119. package/dist/types/src/translations.d.ts.map +1 -1
  120. package/dist/types/src/types/ExplorerAction.d.ts +1 -18
  121. package/dist/types/src/types/ExplorerAction.d.ts.map +1 -1
  122. package/dist/types/src/types/Graph.d.ts +14 -25
  123. package/dist/types/src/types/Graph.d.ts.map +1 -1
  124. package/dist/types/tsconfig.tsbuildinfo +1 -1
  125. package/package.json +113 -61
  126. package/src/ExplorerPlugin.test.ts +26 -0
  127. package/src/ExplorerPlugin.tsx +15 -56
  128. package/src/capabilities/create-object.ts +36 -0
  129. package/src/capabilities/index.ts +3 -3
  130. package/src/capabilities/react-surface.tsx +24 -19
  131. package/src/components/Chart/Chart.stories.tsx +16 -23
  132. package/src/components/Globe/Globe.stories.tsx +19 -22
  133. package/src/components/Graph/CanvasForceGraph.stories.tsx +83 -0
  134. package/src/components/Graph/CanvasForceGraph.tsx +124 -0
  135. package/src/components/Graph/ForceGraph.stories.tsx +79 -41
  136. package/src/components/Graph/ForceGraph.tsx +104 -85
  137. package/src/components/Graph/{adapter.ts → graph-adapter.ts} +14 -8
  138. package/src/components/Graph/index.ts +1 -1
  139. package/src/components/Tree/EdgeBundling.stories.tsx +144 -0
  140. package/src/components/Tree/Tree.stories.tsx +20 -38
  141. package/src/components/Tree/Tree.tsx +69 -95
  142. package/src/components/Tree/index.ts +3 -0
  143. package/src/components/Tree/layout/HierarchicalEdgeBundling.tsx +277 -0
  144. package/src/components/Tree/layout/RadialTree.tsx +237 -0
  145. package/src/components/Tree/layout/TidyTree.tsx +246 -0
  146. package/src/components/Tree/layout/hierarchy.ts +32 -0
  147. package/src/components/Tree/layout/index.ts +5 -5
  148. package/src/components/Tree/layout/slots.ts +19 -0
  149. package/src/components/Tree/layout/useContainerSize.ts +43 -0
  150. package/src/components/Tree/space-graph-adapter.ts +96 -0
  151. package/src/components/Tree/testing/generator.ts +4 -2
  152. package/src/components/Tree/testing/index.ts +1 -0
  153. package/src/components/Tree/testing/relations.ts +182 -0
  154. package/src/components/Tree/types/tree.test.ts +7 -6
  155. package/src/components/Tree/types/tree.ts +41 -20
  156. package/src/components/Tree/types/types.ts +38 -29
  157. package/src/components/index.ts +0 -4
  158. package/src/containers/ExplorerArticle/ExplorerArticle.stories.tsx +119 -0
  159. package/src/containers/ExplorerArticle/ExplorerArticle.tsx +153 -0
  160. package/src/containers/ExplorerArticle/index.ts +5 -0
  161. package/src/containers/index.ts +7 -0
  162. package/src/hooks/useGraphModel.ts +25 -14
  163. package/src/index.ts +1 -4
  164. package/src/meta.ts +3 -3
  165. package/src/plugin.ts +9 -0
  166. package/src/testing.ts +7 -0
  167. package/src/translations.ts +16 -13
  168. package/src/types/ExplorerAction.ts +10 -19
  169. package/src/types/Graph.ts +25 -22
  170. package/src/typings.d.ts +8 -0
  171. package/dist/lib/browser/ExplorerContainer-L5RVUJRL.mjs +0 -50
  172. package/dist/lib/browser/ExplorerContainer-L5RVUJRL.mjs.map +0 -7
  173. package/dist/lib/browser/chunk-2MKBRIUT.mjs +0 -31
  174. package/dist/lib/browser/chunk-2MKBRIUT.mjs.map +0 -7
  175. package/dist/lib/browser/chunk-6BVXZQPP.mjs +0 -188
  176. package/dist/lib/browser/chunk-6BVXZQPP.mjs.map +0 -7
  177. package/dist/lib/browser/chunk-BGNRYZUN.mjs +0 -79
  178. package/dist/lib/browser/chunk-BGNRYZUN.mjs.map +0 -7
  179. package/dist/lib/browser/chunk-CRN65FY3.mjs.map +0 -7
  180. package/dist/lib/browser/chunk-UBHZGWZQ.mjs.map +0 -7
  181. package/dist/lib/browser/index.mjs +0 -119
  182. package/dist/lib/browser/index.mjs.map +0 -7
  183. package/dist/lib/browser/intent-resolver-FX5H52QN.mjs +0 -31
  184. package/dist/lib/browser/intent-resolver-FX5H52QN.mjs.map +0 -7
  185. package/dist/lib/browser/meta.json +0 -1
  186. package/dist/lib/browser/react-surface-VS3ZFL2Y.mjs +0 -35
  187. package/dist/lib/browser/react-surface-VS3ZFL2Y.mjs.map +0 -7
  188. package/dist/lib/node-esm/ExplorerContainer-BBLPHH7K.mjs +0 -51
  189. package/dist/lib/node-esm/ExplorerContainer-BBLPHH7K.mjs.map +0 -7
  190. package/dist/lib/node-esm/chunk-3ODK27PU.mjs +0 -33
  191. package/dist/lib/node-esm/chunk-3ODK27PU.mjs.map +0 -7
  192. package/dist/lib/node-esm/chunk-CRSVAZNA.mjs +0 -190
  193. package/dist/lib/node-esm/chunk-CRSVAZNA.mjs.map +0 -7
  194. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  195. package/dist/lib/node-esm/chunk-RSZFBKZM.mjs +0 -11091
  196. package/dist/lib/node-esm/chunk-TQESRBUJ.mjs +0 -80
  197. package/dist/lib/node-esm/chunk-TQESRBUJ.mjs.map +0 -7
  198. package/dist/lib/node-esm/chunk-UXZM5VJB.mjs +0 -26
  199. package/dist/lib/node-esm/chunk-UXZM5VJB.mjs.map +0 -7
  200. package/dist/lib/node-esm/index.mjs +0 -120
  201. package/dist/lib/node-esm/index.mjs.map +0 -7
  202. package/dist/lib/node-esm/intent-resolver-RGBBXXYM.mjs +0 -32
  203. package/dist/lib/node-esm/intent-resolver-RGBBXXYM.mjs.map +0 -7
  204. package/dist/lib/node-esm/meta.json +0 -1
  205. package/dist/lib/node-esm/meta.mjs +0 -9
  206. package/dist/lib/node-esm/react-surface-SXPT2T37.mjs +0 -36
  207. package/dist/lib/node-esm/react-surface-SXPT2T37.mjs.map +0 -7
  208. package/dist/lib/node-esm/types/index.mjs +0 -12
  209. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  210. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  211. package/dist/types/src/components/ExplorerContainer.d.ts +0 -9
  212. package/dist/types/src/components/ExplorerContainer.d.ts.map +0 -1
  213. package/dist/types/src/components/Graph/D3ForceGraph.d.ts +0 -14
  214. package/dist/types/src/components/Graph/D3ForceGraph.d.ts.map +0 -1
  215. package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts +0 -15
  216. package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts.map +0 -1
  217. package/dist/types/src/components/Graph/adapter.d.ts.map +0 -1
  218. package/dist/types/src/components/Graph/testing.d.ts +0 -14
  219. package/dist/types/src/components/Graph/testing.d.ts.map +0 -1
  220. package/src/capabilities/intent-resolver.ts +0 -21
  221. package/src/components/ExplorerContainer.tsx +0 -54
  222. package/src/components/Graph/D3ForceGraph.stories.tsx +0 -77
  223. package/src/components/Graph/D3ForceGraph.tsx +0 -101
  224. package/src/components/Graph/testing.ts +0 -55
  225. package/src/components/Tree/layout/HierarchicalEdgeBundling.ts +0 -162
  226. package/src/components/Tree/layout/RadialTree.ts +0 -94
  227. package/src/components/Tree/layout/TidyTree.ts +0 -101
  228. /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/ExplorerPlugin.mjs.map} +0 -0
  229. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  230. /package/dist/lib/{browser/meta.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  231. /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
  232. /package/dist/lib/{node-esm → neutral}/meta.mjs.map +0 -0
  233. /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/testing.mjs.map} +0 -0
  234. /package/dist/lib/{node-esm → neutral}/types/index.mjs.map +0 -0
@@ -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"}
@@ -0,0 +1,17 @@
1
+ import { type StoryObj } from '@storybook/react-vite';
2
+ import React from 'react';
3
+ declare const meta: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<Omit<import("./CanvasForceGraph").CanvasForceGraphProps, "className"> & {
6
+ classNames?: import("@dxos/ui-types").ClassNameValue;
7
+ } & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
8
+ render: () => React.JSX.Element;
9
+ decorators: import("@storybook/react").Decorator[];
10
+ parameters: {
11
+ layout: string;
12
+ };
13
+ };
14
+ export default meta;
15
+ type Story = StoryObj<typeof meta>;
16
+ export declare const Default: Story;
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,8 +2,10 @@ 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>;
6
- render: (args: unknown) => React.JSX.Element;
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>>;
8
+ render: () => React.JSX.Element;
7
9
  decorators: import("@storybook/react").Decorator[];
8
10
  parameters: {
9
11
  layout: string;
@@ -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;AA4CxC,QAAA,MAAM,IAAI;;;;;;;;CAqByB,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;AAgEpD,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"}
@@ -17,8 +17,8 @@ export declare class GraphAdapter implements GraphData {
17
17
  private readonly graph;
18
18
  private readonly _nodes;
19
19
  private readonly _links;
20
- constructor(graph: Graph);
20
+ constructor(graph: Graph.Any);
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,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":"AAIA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,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,sBA2CjG,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;AAuCnD,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,5 @@
1
1
  export * from './Tree';
2
+ export * from './layout';
3
+ export * from './space-graph-adapter';
4
+ export { type TreeNode, treeTypeToTreeNode } from './types';
2
5
  //# 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,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,KAAK,QAAQ,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
@@ -1,5 +1,38 @@
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
+ slots?: TreeLayoutSlots;
23
+ /**
24
+ * Called when the user hovers a leaf node (with the event so callers can dispatch
25
+ * `DxAnchorActivate` for previews). Receives `null` on leave.
26
+ */
27
+ onNodeHover?: (node: TreeNode | null, event?: MouseEvent) => void;
28
+ }>;
29
+ /**
30
+ * Hierarchical edge bundling.
31
+ * https://observablehq.com/@d3/hierarchical-edge-bundling?intent=fork
32
+ *
33
+ * Leaves are placed on a circle, grouped by their parent in the hierarchy.
34
+ * Edges between leaves are drawn as bundled curves that route through their lowest common ancestor.
35
+ */
36
+ export declare const HierarchicalEdgeBundling: ({ classNames, data, edges, label, padding, tension, slots, onNodeHover, }: HierarchicalEdgeBundlingProps) => React.JSX.Element;
4
37
  export default HierarchicalEdgeBundling;
5
38
  //# 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;AAE1D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,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,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,8EASlC,6BAA6B,sBAsC/B,CAAC;eAkLa,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
@@ -1 +1 @@
1
- {"version":3,"file":"RadialTree.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/layout/RadialTree.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAK3C,QAAA,MAAM,UAAU,GAAI,GAAG,aAAa,EAAE,MAAM,GAAG,EAAE,SAAS,WAAW,yBA+EpE,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"RadialTree.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/layout/RadialTree.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,KAAK,eAAe,EAA0B,MAAM,SAAS,CAAC;AAKvE,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC;IAC5C,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,QAAQ,KAAK,MAAM,CAAC;IAChC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,mBAAmB;IACnB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACpC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvC;;;;OAIG;IACH,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,UAAU,yGAWpB,eAAe,sBA6DjB,CAAC;eAmHa,UAAU"}
@@ -1,4 +1,26 @@
1
- import { type TreeOptions } from '../Tree';
2
- declare const TidyTree: (s: SVGSVGElement, data: any, options: TreeOptions) => void;
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 TidyTreeProps = ThemedClassName<{
6
+ data: TreeNode;
7
+ label?: (d: TreeNode) => string;
8
+ slots?: TreeLayoutSlots;
9
+ /** Node radius. */
10
+ r?: number;
11
+ /** Margin in screen pixels reserved around the layout. */
12
+ margin?: number;
13
+ /** Initial set of collapsed node ids. */
14
+ initialCollapsed?: Iterable<string>;
15
+ /** Notified when the user clicks a node. */
16
+ onNodeClick?: (node: TreeNode) => void;
17
+ }>;
18
+ /**
19
+ * Tidy (horizontal) tree layout based on the D3 reference component.
20
+ * https://observablehq.com/@d3/tree-component
21
+ *
22
+ * Click a node with children to toggle collapse / expand.
23
+ */
24
+ export declare const TidyTree: ({ classNames, data, label, slots, r, margin, initialCollapsed, onNodeClick, }: TidyTreeProps) => React.JSX.Element;
3
25
  export default TidyTree;
4
26
  //# sourceMappingURL=TidyTree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TidyTree.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/layout/TidyTree.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C,QAAA,MAAM,QAAQ,GAAI,GAAG,aAAa,EAAE,MAAM,GAAG,EAAE,SAAS,WAAW,SAuFlE,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"TidyTree.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/layout/TidyTree.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,KAAK,eAAe,EAA0B,MAAM,SAAS,CAAC;AAKvE,MAAM,MAAM,aAAa,GAAG,eAAe,CAAC;IAC1C,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,QAAQ,KAAK,MAAM,CAAC;IAChC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,mBAAmB;IACnB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACpC,4CAA4C;IAC5C,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CACxC,CAAC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,kFASlB,aAAa,sBA0Df,CAAC;eA4Ia,QAAQ"}
@@ -0,0 +1,17 @@
1
+ import { type HierarchyNode } from 'd3';
2
+ import { type TreeNode } from '../types';
3
+ /**
4
+ * Build a d3 hierarchy from a TreeNode, pruning children of nodes whose ids are in `collapsed`.
5
+ * Nodes that have children but are collapsed retain their identity in the hierarchy and can be
6
+ * distinguished by `node._children` (the original list).
7
+ */
8
+ export declare const buildHierarchy: (data: TreeNode, collapsed?: Set<string>) => HierarchyNode<TreeNode>;
9
+ /**
10
+ * True when the node has children that have been hidden via collapse.
11
+ */
12
+ export declare const isCollapsed: (data: TreeNode, collapsed: Set<string>) => boolean;
13
+ /**
14
+ * True when the node has no children at all (a real leaf, not a collapsed branch).
15
+ */
16
+ export declare const isLeaf: (data: TreeNode) => boolean;
17
+ //# sourceMappingURL=hierarchy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hierarchy.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/layout/hierarchy.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAA4B,MAAM,IAAI,CAAC;AAElE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,cAAc,SAAU,QAAQ,cAAa,GAAG,CAAC,MAAM,CAAC,KAAe,aAAa,CAAC,QAAQ,CAOzG,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,SAAU,QAAQ,aAAa,GAAG,CAAC,MAAM,CAAC,KAAG,OACX,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,MAAM,SAAU,QAAQ,KAAG,OAAiC,CAAC"}
@@ -1,5 +1,6 @@
1
- import HierarchicalEdgeBundling from './HierarchicalEdgeBundling';
2
- import RadialTree from './RadialTree';
3
- import TidyTree from './TidyTree';
4
- export { HierarchicalEdgeBundling, RadialTree, TidyTree };
1
+ export * from './HierarchicalEdgeBundling';
2
+ export * from './RadialTree';
3
+ export * from './TidyTree';
4
+ export * from './hierarchy';
5
+ export * from './slots';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/layout/index.ts"],"names":[],"mappings":"AAIA,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,EAAE,wBAAwB,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/layout/index.ts"],"names":[],"mappings":"AAIA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,7 @@
1
+ export type TreeLayoutSlots = {
2
+ node?: string;
3
+ path?: string;
4
+ text?: string;
5
+ };
6
+ export declare const defaultTreeLayoutSlots: TreeLayoutSlots;
7
+ //# sourceMappingURL=slots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/layout/slots.ts"],"names":[],"mappings":"AAIA,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,eAAO,MAAM,sBAAsB,EAAE,eAQpC,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Track an element's content-box size via ResizeObserver.
3
+ * Returns the most recently observed `{ width, height }` plus a callback ref to attach to the element.
4
+ *
5
+ * Why not `react-resize-detector` directly: its `targetRef` API doesn't pick up a ref whose
6
+ * `.current` is set later than the hook runs, and the returned-`ref` API forces the consumer to
7
+ * forward a callback ref through their own component — which is awkward for class refs.
8
+ * This hook returns a setter so the consumer assigns it directly to `<div ref={setRef}>`.
9
+ */
10
+ export declare const useContainerSize: () => {
11
+ setRef: (el: HTMLDivElement | null) => void;
12
+ width: number;
13
+ height: number;
14
+ };
15
+ //# sourceMappingURL=useContainerSize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useContainerSize.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/layout/useContainerSize.ts"],"names":[],"mappings":"AAMA;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,QAAO;IAClC,MAAM,EAAE,CAAC,EAAE,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAwBhB,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { Obj } from '@dxos/echo';
2
+ import { type SpaceGraphModel } from '@dxos/schema';
3
+ import { type BundleEdge } from './layout';
4
+ import { type TreeNode } from './types';
5
+ export type SpaceGraphHierarchy = {
6
+ /** Hierarchy where leaves carry the underlying ECHO object on `node.data`. */
7
+ tree: TreeNode<Obj.Unknown>;
8
+ /** Edges between leaf objects derived from relations and refs in the graph. */
9
+ edges: BundleEdge[];
10
+ };
11
+ export type SpaceGraphHierarchyOptions = {
12
+ rootLabel?: string;
13
+ rootId?: string;
14
+ };
15
+ /**
16
+ * Convert a {@link SpaceGraphModel} graph into a hierarchy suitable for the cluster / bundling layouts:
17
+ *
18
+ * Root (db)
19
+ * ├── Schema A
20
+ * │ ├── Object a1
21
+ * │ └── Object a2
22
+ * └── Schema B
23
+ * └── Object b1
24
+ *
25
+ * Leaves are ECHO objects. Their schema typename is the intermediate group.
26
+ * `rootLabel` is shown on the root node (typically the database name or "Space").
27
+ *
28
+ * `edges` exposes object-to-object edges (relations + refs) so the bundling
29
+ * layout can route bundled curves between leaves through their common ancestor.
30
+ */
31
+ export declare const spaceGraphToHierarchy: (model: SpaceGraphModel, { rootLabel, rootId }?: SpaceGraphHierarchyOptions) => SpaceGraphHierarchy;
32
+ //# sourceMappingURL=space-graph-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"space-graph-adapter.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/space-graph-adapter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAuB,KAAK,eAAe,EAAuB,MAAM,cAAc,CAAC;AAE9F,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AASxC,MAAM,MAAM,mBAAmB,GAAG;IAChC,8EAA8E;IAC9E,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC5B,+EAA+E;IAC/E,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB,UACzB,eAAe,0BACwB,0BAA0B,KACvE,mBAyCF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/testing/generator.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,IAAI,EAAqB,MAAM,UAAU,CAAC;AAEnD,KAAK,mBAAmB,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;AAI7C;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,OAAM,mBAAmB,EAAO,EAAE,aAAa,MAAM,MAAM,KAAG,IA6BxF,CAAC"}
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/testing/generator.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,IAAI,EAAqB,MAAM,UAAU,CAAC;AAEnD,KAAK,mBAAmB,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;AAI7C;;GAEG;AACH,eAAO,MAAM,UAAU,UAAU,mBAAmB,EAAE,eAAoB,MAAM,MAAM,KAAG,IA+BxF,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from './generator';
2
+ export * from './relations';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { type Space } from '@dxos/client/echo';
2
+ import { Obj } from '@dxos/echo';
3
+ import { type TypeSpec, type ValueGenerator } from '@dxos/schema/testing';
4
+ import { type BundleEdge } from '../layout';
5
+ import { type TreeNode } from '../types';
6
+ export type ConnectedOrgsResult = {
7
+ organizations: Obj.Any[];
8
+ people: Obj.Any[];
9
+ connections: Obj.Any[];
10
+ };
11
+ export type ConnectedOrgsOptions = {
12
+ organizationCount?: number;
13
+ personCount?: number;
14
+ connectionCount?: number;
15
+ };
16
+ /**
17
+ * Populate a space with Organizations, People, and HasConnection relations between organizations.
18
+ * Uses `createObjectFactory` to generate Org/Person properties from their `GeneratorAnnotation`s,
19
+ * then layers manual HasConnection relations on top — the connection schema is fixed
20
+ * (Org→Org) so it isn't a fit for the generator's reference inference.
21
+ */
22
+ export declare const generateConnectedOrgs: (space: Space, generator: ValueGenerator, { organizationCount, personCount, connectionCount }?: ConnectedOrgsOptions) => Promise<ConnectedOrgsResult>;
23
+ /**
24
+ * Build a TreeNode hierarchy: Root → Sector → Organization (leaf).
25
+ * Organizations are deterministically bucketed into `SECTORS` so the demo has visible groups.
26
+ */
27
+ export declare const buildOrgHierarchy: (organizations: Obj.Any[], sectors?: readonly string[]) => TreeNode;
28
+ export type GenerateOptions = {
29
+ spec?: TypeSpec[];
30
+ relations?: {
31
+ count: number;
32
+ kind: string;
33
+ };
34
+ };
35
+ /**
36
+ * Populate a space with a mixed dataset (Orgs, Pipelines, People) plus
37
+ * `HasRelationship` edges between random pairs of People.
38
+ *
39
+ * Used by the force-directed and canvas-force graph stories that want a
40
+ * heterogeneous typed dataset without caring about the precise shape of relations.
41
+ */
42
+ export declare const generate: (space: Space, generator: ValueGenerator, { spec, relations }?: GenerateOptions) => Promise<void>;
43
+ /**
44
+ * Convert HasConnection relations into bundle edges between organization ids.
45
+ */
46
+ export declare const connectionsToEdges: (connections: Obj.Any[]) => BundleEdge[];
47
+ //# sourceMappingURL=relations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relations.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/testing/relations.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,GAAG,EAAmB,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAuB,MAAM,sBAAsB,CAAC;AAI/F,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAOzC,MAAM,MAAM,mBAAmB,GAAG;IAChC,aAAa,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;IACzB,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;IAClB,WAAW,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,UACzB,KAAK,aACD,cAAc,wDAC2C,oBAAoB,KACvF,OAAO,CAAC,mBAAmB,CAqC7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,kBAAmB,GAAG,CAAC,GAAG,EAAE,YAAW,SAAS,MAAM,EAAE,KAAa,QAyBlG,CAAC;AAQF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH,CAAC;AAOF;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,UACZ,KAAK,aACD,cAAc,wBAC8C,eAAe,kBAsBvF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,gBAAiB,GAAG,CAAC,GAAG,EAAE,KAAG,UAAU,EAerE,CAAC"}
@@ -1,28 +1,30 @@
1
1
  import * as Schema from 'effect/Schema';
2
- import { Key, Type } from '@dxos/echo';
2
+ import { Key, Ref, Type } from '@dxos/echo';
3
3
  export declare const TreeNodeType: Schema.mutable<Schema.Struct<{
4
4
  id: import("@dxos/keys").ObjectIdClass;
5
5
  children: Schema.mutable<Schema.Array$<import("@dxos/keys").ObjectIdClass>>;
6
6
  data: Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
7
- ref: Schema.optional<Type.ref<Schema.Schema<Type.Expando, {
8
- [x: string]: any;
9
- id: string;
10
- }, never>>>;
7
+ ref: Schema.optional<Ref.RefSchema<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
8
+ readonly [x: string]: any;
9
+ }>>;
11
10
  }>>;
12
11
  export interface TreeNodeType extends Schema.Schema.Type<typeof TreeNodeType> {
13
12
  }
14
- export declare const TreeType: Type.obj<Schema.Struct<{
15
- root: import("@dxos/keys").ObjectIdClass;
16
- nodes: Schema.mutable<Schema.Record$<import("@dxos/keys").ObjectIdClass, Schema.mutable<Schema.Struct<{
17
- id: import("@dxos/keys").ObjectIdClass;
18
- children: Schema.mutable<Schema.Array$<import("@dxos/keys").ObjectIdClass>>;
19
- data: Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
20
- ref: Schema.optional<Type.ref<Schema.Schema<Type.Expando, {
21
- [x: string]: any;
13
+ export declare const TreeType: Type.Obj<{
14
+ readonly root: string;
15
+ readonly nodes: {
16
+ [x: string]: {
22
17
  id: string;
23
- }, never>>>;
24
- }>>>>;
25
- }>>;
18
+ children: string[];
19
+ data: {
20
+ [x: string]: any;
21
+ };
22
+ ref?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
23
+ readonly [x: string]: any;
24
+ }> | undefined;
25
+ };
26
+ };
27
+ }, Schema.Struct.Fields>;
26
28
  export interface TreeType extends Schema.Schema.Type<typeof TreeType> {
27
29
  }
28
30
  /**