@dxos/plugin-explorer 0.8.4-main.406dc2a → 0.8.4-main.43cb759274
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +102 -5
- package/PLUGIN.mdl +340 -0
- package/dist/lib/neutral/ExplorerArticle-4I7PNGDC.mjs +459 -0
- package/dist/lib/neutral/ExplorerArticle-4I7PNGDC.mjs.map +7 -0
- package/dist/lib/neutral/ExplorerPlugin.mjs +10 -0
- package/dist/lib/neutral/capabilities/index.mjs +11 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-3D7BYXOR.mjs +37 -0
- package/dist/lib/neutral/chunk-3D7BYXOR.mjs.map +7 -0
- package/dist/lib/neutral/chunk-42BYLQQA.mjs +42 -0
- package/dist/lib/neutral/chunk-42BYLQQA.mjs.map +7 -0
- package/dist/lib/neutral/chunk-7XUDLV6E.mjs +287 -0
- package/dist/lib/neutral/chunk-7XUDLV6E.mjs.map +7 -0
- package/dist/lib/neutral/chunk-HI324IB4.mjs +69 -0
- package/dist/lib/neutral/chunk-HI324IB4.mjs.map +7 -0
- package/dist/lib/neutral/chunk-IKHJV3Q4.mjs +20 -0
- package/dist/lib/neutral/chunk-IKHJV3Q4.mjs.map +7 -0
- package/dist/lib/{browser/chunk-MOM5KCKC.mjs → neutral/components/index.mjs} +882 -556
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +9 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-object-F6TKVAGV.mjs +39 -0
- package/dist/lib/neutral/create-object-F6TKVAGV.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +45 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +14 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/{browser → neutral}/meta.mjs +1 -1
- package/dist/lib/neutral/plugin.mjs +12 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-APBW2VQG.mjs +26 -0
- package/dist/lib/neutral/react-surface-APBW2VQG.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +139 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +33 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/types/index.mjs +1 -2
- package/dist/types/data/cities.d.ts +4 -4
- package/dist/types/data/cities.d.ts.map +1 -1
- package/dist/types/data/countries-110m.d.ts +19 -22
- package/dist/types/data/countries-110m.d.ts.map +1 -1
- package/dist/types/src/ExplorerPlugin.d.ts +3 -1
- package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
- package/dist/types/src/ExplorerPlugin.test.d.ts +2 -0
- package/dist/types/src/ExplorerPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +11 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +8 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/Chart/Chart.d.ts +1 -1
- package/dist/types/src/components/Chart/Chart.d.ts.map +1 -1
- package/dist/types/src/components/Chart/Chart.stories.d.ts +4 -1
- package/dist/types/src/components/Chart/Chart.stories.d.ts.map +1 -1
- package/dist/types/src/components/Globe/Globe.d.ts +1 -1
- package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
- package/dist/types/src/components/Globe/Globe.stories.d.ts +5 -2
- package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
- package/dist/types/src/components/Graph/CanvasForceGraph.d.ts +13 -0
- package/dist/types/src/components/Graph/CanvasForceGraph.d.ts.map +1 -0
- package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts +17 -0
- package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts.map +1 -0
- package/dist/types/src/components/Graph/ForceGraph.d.ts +12 -5
- package/dist/types/src/components/Graph/ForceGraph.d.ts.map +1 -1
- package/dist/types/src/components/Graph/ForceGraph.stories.d.ts +4 -2
- package/dist/types/src/components/Graph/ForceGraph.stories.d.ts.map +1 -1
- package/dist/types/src/components/Graph/{adapter.d.ts → graph-adapter.d.ts} +2 -2
- package/dist/types/src/components/Graph/graph-adapter.d.ts.map +1 -0
- package/dist/types/src/components/Graph/index.d.ts +1 -1
- package/dist/types/src/components/Graph/index.d.ts.map +1 -1
- package/dist/types/src/components/Lattice/Lattice.d.ts +20 -0
- package/dist/types/src/components/Lattice/Lattice.d.ts.map +1 -0
- package/dist/types/src/components/Lattice/Lattice.stories.d.ts +8 -0
- package/dist/types/src/components/Lattice/Lattice.stories.d.ts.map +1 -0
- package/dist/types/src/components/Lattice/index.d.ts +2 -0
- package/dist/types/src/components/Lattice/index.d.ts.map +1 -0
- package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts +21 -0
- package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts.map +1 -0
- package/dist/types/src/components/Tree/Tree.d.ts +20 -23
- package/dist/types/src/components/Tree/Tree.d.ts.map +1 -1
- package/dist/types/src/components/Tree/Tree.stories.d.ts +5 -12
- package/dist/types/src/components/Tree/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tree/index.d.ts +2 -0
- package/dist/types/src/components/Tree/index.d.ts.map +1 -1
- package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts +37 -2
- package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts.map +1 -1
- package/dist/types/src/components/Tree/layout/RadialTree.d.ts +35 -2
- package/dist/types/src/components/Tree/layout/RadialTree.d.ts.map +1 -1
- package/dist/types/src/components/Tree/layout/TidyTree.d.ts +24 -2
- package/dist/types/src/components/Tree/layout/TidyTree.d.ts.map +1 -1
- package/dist/types/src/components/Tree/layout/hierarchy.d.ts +17 -0
- package/dist/types/src/components/Tree/layout/hierarchy.d.ts.map +1 -0
- package/dist/types/src/components/Tree/layout/index.d.ts +5 -4
- package/dist/types/src/components/Tree/layout/index.d.ts.map +1 -1
- package/dist/types/src/components/Tree/layout/slots.d.ts +7 -0
- package/dist/types/src/components/Tree/layout/slots.d.ts.map +1 -0
- package/dist/types/src/components/Tree/layout/useContainerSize.d.ts +15 -0
- package/dist/types/src/components/Tree/layout/useContainerSize.d.ts.map +1 -0
- package/dist/types/src/components/Tree/types/tree.d.ts +50 -27
- package/dist/types/src/components/Tree/types/tree.d.ts.map +1 -1
- package/dist/types/src/components/Tree/types/types.d.ts +14 -4
- package/dist/types/src/components/Tree/types/types.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts +8 -0
- package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts.map +1 -0
- package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts +15 -0
- package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ExplorerArticle/Visualization.d.ts +18 -0
- package/dist/types/src/containers/ExplorerArticle/Visualization.d.ts.map +1 -0
- package/dist/types/src/containers/ExplorerArticle/index.d.ts +2 -0
- package/dist/types/src/containers/ExplorerArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ExplorerArticle/variants.d.ts +9 -0
- package/dist/types/src/containers/ExplorerArticle/variants.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +3 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useGraphModel.d.ts +2 -2
- package/dist/types/src/hooks/useGraphModel.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +3 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/{components/Tree/testing → testing}/generator.d.ts +1 -1
- package/dist/types/src/testing/generator.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +4 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/relations.d.ts +32 -0
- package/dist/types/src/testing/relations.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +31 -22
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/ExplorerAction.d.ts +1 -18
- package/dist/types/src/types/ExplorerAction.d.ts.map +1 -1
- package/dist/types/src/types/Graph.d.ts +14 -25
- package/dist/types/src/types/Graph.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +3 -0
- package/dist/types/src/util/index.d.ts.map +1 -0
- package/dist/types/src/util/node-color.d.ts +13 -0
- package/dist/types/src/util/node-color.d.ts.map +1 -0
- package/dist/types/src/{components → util}/plot.d.ts +1 -1
- package/dist/types/src/util/plot.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +113 -65
- package/src/ExplorerPlugin.test.ts +26 -0
- package/src/ExplorerPlugin.tsx +20 -54
- package/src/capabilities/create-object.ts +36 -0
- package/src/capabilities/index.ts +3 -3
- package/src/capabilities/react-surface.tsx +24 -19
- package/src/components/Chart/Chart.stories.tsx +16 -23
- package/src/components/Chart/Chart.tsx +1 -1
- package/src/components/Globe/Globe.stories.tsx +19 -22
- package/src/components/Globe/Globe.tsx +1 -1
- package/src/components/Graph/CanvasForceGraph.stories.tsx +97 -0
- package/src/components/Graph/CanvasForceGraph.tsx +124 -0
- package/src/components/Graph/ForceGraph.stories.tsx +98 -42
- package/src/components/Graph/ForceGraph.tsx +105 -85
- package/src/components/Graph/{adapter.ts → graph-adapter.ts} +14 -8
- package/src/components/Graph/index.ts +1 -1
- package/src/components/Lattice/Lattice.stories.tsx +104 -0
- package/src/components/Lattice/Lattice.tsx +182 -0
- package/src/components/Lattice/index.ts +5 -0
- package/src/components/Tree/EdgeBundling.stories.tsx +144 -0
- package/src/components/Tree/Tree.stories.tsx +20 -38
- package/src/components/Tree/Tree.tsx +69 -95
- package/src/components/Tree/index.ts +2 -0
- package/src/components/Tree/layout/HierarchicalEdgeBundling.tsx +335 -0
- package/src/components/Tree/layout/RadialTree.tsx +242 -0
- package/src/components/Tree/layout/TidyTree.tsx +246 -0
- package/src/components/Tree/layout/hierarchy.ts +32 -0
- package/src/components/Tree/layout/index.ts +5 -5
- package/src/components/Tree/layout/slots.ts +19 -0
- package/src/components/Tree/layout/useContainerSize.ts +43 -0
- package/src/components/Tree/types/tree.test.ts +8 -7
- package/src/components/Tree/types/tree.ts +51 -35
- package/src/components/Tree/types/types.ts +38 -29
- package/src/components/index.ts +1 -4
- package/src/containers/ExplorerArticle/ExplorerArticle.stories.tsx +152 -0
- package/src/containers/ExplorerArticle/ExplorerArticle.tsx +120 -0
- package/src/containers/ExplorerArticle/Visualization.tsx +523 -0
- package/src/containers/ExplorerArticle/index.ts +5 -0
- package/src/containers/ExplorerArticle/variants.ts +47 -0
- package/src/containers/index.ts +7 -0
- package/src/hooks/useGraphModel.ts +25 -14
- package/src/index.ts +1 -4
- package/src/meta.ts +30 -6
- package/src/plugin.ts +9 -0
- package/src/{components/Tree/testing → testing}/generator.ts +6 -4
- package/src/testing/index.ts +9 -0
- package/src/testing/relations.ts +117 -0
- package/src/translations.ts +16 -13
- package/src/types/ExplorerAction.ts +10 -19
- package/src/types/Graph.ts +20 -24
- package/src/typings.d.ts +8 -0
- package/src/util/index.ts +6 -0
- package/src/util/node-color.ts +23 -0
- package/src/{components → util}/plot.ts +16 -4
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/ExplorerContainer-6SHZJ6AK.mjs +0 -50
- package/dist/lib/browser/ExplorerContainer-6SHZJ6AK.mjs.map +0 -7
- package/dist/lib/browser/chunk-2DGFNLRO.mjs +0 -19
- package/dist/lib/browser/chunk-2DGFNLRO.mjs.map +0 -7
- package/dist/lib/browser/chunk-2MKBRIUT.mjs +0 -31
- package/dist/lib/browser/chunk-2MKBRIUT.mjs.map +0 -7
- package/dist/lib/browser/chunk-BZ65T5M3.mjs +0 -79
- package/dist/lib/browser/chunk-BZ65T5M3.mjs.map +0 -7
- package/dist/lib/browser/chunk-MOM5KCKC.mjs.map +0 -7
- package/dist/lib/browser/chunk-NXGP6NTP.mjs +0 -203
- package/dist/lib/browser/chunk-NXGP6NTP.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -118
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-K57C3LIX.mjs +0 -31
- package/dist/lib/browser/intent-resolver-K57C3LIX.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-OPBND5W3.mjs +0 -35
- package/dist/lib/browser/react-surface-OPBND5W3.mjs.map +0 -7
- package/dist/lib/node-esm/ExplorerContainer-FRTDXZI5.mjs +0 -51
- package/dist/lib/node-esm/ExplorerContainer-FRTDXZI5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3ODK27PU.mjs +0 -33
- package/dist/lib/node-esm/chunk-3ODK27PU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6JACZE7E.mjs +0 -205
- package/dist/lib/node-esm/chunk-6JACZE7E.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ES6AOMCY.mjs +0 -80
- package/dist/lib/node-esm/chunk-ES6AOMCY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PX6LHR2N.mjs +0 -21
- package/dist/lib/node-esm/chunk-PX6LHR2N.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZCV4U7LT.mjs +0 -11343
- package/dist/lib/node-esm/chunk-ZCV4U7LT.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -119
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-BLPPTTEY.mjs +0 -32
- package/dist/lib/node-esm/intent-resolver-BLPPTTEY.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/meta.mjs +0 -9
- package/dist/lib/node-esm/react-surface-HCKQSHKJ.mjs +0 -36
- package/dist/lib/node-esm/react-surface-HCKQSHKJ.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -12
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/ExplorerContainer.d.ts +0 -9
- package/dist/types/src/components/ExplorerContainer.d.ts.map +0 -1
- package/dist/types/src/components/Graph/D3ForceGraph.d.ts +0 -14
- package/dist/types/src/components/Graph/D3ForceGraph.d.ts.map +0 -1
- package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts +0 -15
- package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts.map +0 -1
- package/dist/types/src/components/Graph/adapter.d.ts.map +0 -1
- package/dist/types/src/components/Graph/testing.d.ts +0 -14
- package/dist/types/src/components/Graph/testing.d.ts.map +0 -1
- package/dist/types/src/components/Tree/testing/generator.d.ts.map +0 -1
- package/dist/types/src/components/Tree/testing/index.d.ts +0 -2
- package/dist/types/src/components/Tree/testing/index.d.ts.map +0 -1
- package/dist/types/src/components/plot.d.ts.map +0 -1
- package/src/capabilities/intent-resolver.ts +0 -21
- package/src/components/ExplorerContainer.tsx +0 -54
- package/src/components/Graph/D3ForceGraph.stories.tsx +0 -77
- package/src/components/Graph/D3ForceGraph.tsx +0 -101
- package/src/components/Graph/testing.ts +0 -55
- package/src/components/Tree/layout/HierarchicalEdgeBundling.ts +0 -162
- package/src/components/Tree/layout/RadialTree.ts +0 -94
- package/src/components/Tree/layout/TidyTree.ts +0 -101
- package/src/components/Tree/testing/index.ts +0 -5
- /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/ExplorerPlugin.mjs.map} +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser/meta.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm → neutral}/meta.mjs.map +0 -0
- /package/dist/lib/{node-esm → neutral}/types/index.mjs.map +0 -0
|
@@ -1,4 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
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.
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
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,
|
|
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 @@
|
|
|
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"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import * as Schema from 'effect/Schema';
|
|
2
|
-
import { Key, Type } from '@dxos/echo';
|
|
2
|
+
import { Key, Obj, Ref, Type } from '@dxos/echo';
|
|
3
3
|
export declare const TreeNodeType: Schema.mutable<Schema.Struct<{
|
|
4
|
-
id: import("@dxos/keys").
|
|
5
|
-
children: Schema.mutable<Schema.Array$<import("@dxos/keys").
|
|
4
|
+
id: import("@dxos/keys").EntityIdClass;
|
|
5
|
+
children: Schema.mutable<Schema.Array$<import("@dxos/keys").EntityIdClass>>;
|
|
6
6
|
data: Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
|
|
7
|
-
ref: Schema.optional<
|
|
8
|
-
[x: string]: any;
|
|
9
|
-
|
|
10
|
-
}, never>>>;
|
|
7
|
+
ref: Schema.optional<Ref.RefSchema<{
|
|
8
|
+
readonly [x: string]: any;
|
|
9
|
+
} & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>>;
|
|
11
10
|
}>>;
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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;
|
|
11
|
+
export type TreeNodeType = Schema.Schema.Type<typeof TreeNodeType>;
|
|
12
|
+
export declare const TreeType: Type.Obj<{
|
|
13
|
+
readonly root: string;
|
|
14
|
+
readonly nodes: {
|
|
15
|
+
[x: string]: {
|
|
22
16
|
id: string;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
children: string[];
|
|
18
|
+
data: {
|
|
19
|
+
[x: string]: any;
|
|
20
|
+
};
|
|
21
|
+
ref?: import("@dxos/echo/internal").Ref<{
|
|
22
|
+
readonly [x: string]: any;
|
|
23
|
+
} & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown> | undefined;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}, Schema.Struct.Fields>;
|
|
27
|
+
export type TreeType = Type.InstanceType<typeof TreeType>;
|
|
28
28
|
/**
|
|
29
29
|
* Wrapper object for tree.
|
|
30
30
|
*/
|
|
@@ -32,14 +32,37 @@ export declare class Tree {
|
|
|
32
32
|
static create: () => TreeType;
|
|
33
33
|
private _tree;
|
|
34
34
|
constructor(tree?: TreeType);
|
|
35
|
-
get tree():
|
|
35
|
+
get tree(): {
|
|
36
|
+
readonly root: string;
|
|
37
|
+
readonly nodes: {
|
|
38
|
+
[x: string]: {
|
|
39
|
+
id: string;
|
|
40
|
+
children: string[];
|
|
41
|
+
data: {
|
|
42
|
+
[x: string]: any;
|
|
43
|
+
};
|
|
44
|
+
ref?: import("@dxos/echo/internal").Ref<{
|
|
45
|
+
readonly [x: string]: any;
|
|
46
|
+
} & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown> | undefined;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
} & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object>;
|
|
36
50
|
get size(): number;
|
|
37
|
-
get root():
|
|
51
|
+
get root(): {
|
|
52
|
+
id: string;
|
|
53
|
+
children: string[];
|
|
54
|
+
data: {
|
|
55
|
+
[x: string]: any;
|
|
56
|
+
};
|
|
57
|
+
ref?: import("@dxos/echo/internal").Ref<{
|
|
58
|
+
readonly [x: string]: any;
|
|
59
|
+
} & import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown> | undefined;
|
|
60
|
+
};
|
|
38
61
|
/**
|
|
39
62
|
* Recursively traverse the tree until the callback returns a value.
|
|
40
63
|
*/
|
|
41
|
-
tranverse<T>(callback: (node: TreeNodeType, depth: number) => T | void, root?: Key.
|
|
42
|
-
getNode(id: Key.
|
|
64
|
+
tranverse<T>(callback: (node: TreeNodeType, depth: number) => T | void, root?: Key.EntityId, depth?: number): T | void;
|
|
65
|
+
getNode(id: Key.EntityId): TreeNodeType;
|
|
43
66
|
/**
|
|
44
67
|
* Get the children of a node.
|
|
45
68
|
*/
|
|
@@ -71,7 +94,7 @@ export declare class Tree {
|
|
|
71
94
|
/**
|
|
72
95
|
* Delete node.
|
|
73
96
|
*/
|
|
74
|
-
deleteNode(parent: TreeNodeType, id: Key.
|
|
97
|
+
deleteNode(parent: TreeNodeType, id: Key.EntityId): TreeNodeType | undefined;
|
|
75
98
|
/**
|
|
76
99
|
* Move child node.
|
|
77
100
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/types/tree.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/types/tree.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAO,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAMtD,eAAO,MAAM,YAAY;;;;;;;GAKF,CAAC;AAExB,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC,CAAC;AAEnE,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;wBAG4C,CAAC;AAElE,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE1D;;GAEG;AACH,qBAAa,IAAI;IACf,MAAM,CAAC,MAAM,QAAO,QAAQ,CAY1B;IAEF,OAAO,CAAC,KAAK,CAAW;IAExB,YAAY,IAAI,CAAC,EAAE,QAAQ,EAE1B;IAED,IAAI,IAAI;;;;;;;;;;;;;;4FAEP;IAGD,IAAI,IAAI,WAEP;IAED,IAAI,IAAI;;;;;;;;;MAEP;IAMD;;OAEG;IACH,SAAS,CAAC,CAAC,EACT,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,IAAI,EACzD,IAAI,GAAE,GAAG,CAAC,QAA0B,EACpC,KAAK,SAAI,GACR,CAAC,GAAG,IAAI,CAaV;IAED,OAAO,CAAC,EAAE,EAAE,GAAG,CAAC,QAAQ,GAAG,YAAY,CAItC;IAED;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC,CAErD;IAED;;OAEG;IACH,SAAS,CAAC,IAAI,EAAE,YAAY,GAAG,YAAY,GAAG,IAAI,CAQjD;IAED;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,UAAO,GAAG,YAAY,GAAG,SAAS,CAiBzE;IAED;;OAEG;IACH,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,UAAO,GAAG,YAAY,GAAG,SAAS,CAe7E;IAED;;OAEG;IACH,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,YAAY,GAAG,SAAS,CAQ9D;IAMD;;OAEG;IACH,KAAK,IAAI,IAAI,CAQZ;IAED;;OAEG;IACH,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,YAAY,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,YAAY,CAY/E;IAED;;OAEG;IACH,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,GAAG,CAAC,QAAQ,GAAG,YAAY,GAAG,SAAS,CAiB3E;IAED;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAa1E;IAED;;OAEG;IACH,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAgBnC;IAED;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CA6BrC;CACF"}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
1
|
+
import { type Key } from '@dxos/echo';
|
|
2
|
+
import { type TreeType } from './tree';
|
|
3
|
+
/**
|
|
4
|
+
* In-memory tree shape used by the d3 layouts.
|
|
5
|
+
* `data` carries through to layout callbacks (e.g. hover/inspect) — typically an ECHO object on leaves.
|
|
6
|
+
*/
|
|
7
|
+
export type TreeNode<TData = unknown> = {
|
|
3
8
|
id: string;
|
|
4
9
|
label?: string;
|
|
5
|
-
|
|
10
|
+
data?: TData;
|
|
11
|
+
children?: TreeNode<TData>[];
|
|
6
12
|
};
|
|
7
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Convert an ECHO `TreeType` (id-keyed node map) into a nested `TreeNode` hierarchy.
|
|
15
|
+
* Returns `undefined` if the root id is missing — the tree is then incomplete and shouldn't render.
|
|
16
|
+
*/
|
|
17
|
+
export declare const treeTypeToTreeNode: (tree: TreeType, rootId?: Key.EntityId, visited?: Set<string>) => TreeNode | undefined;
|
|
8
18
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Tree/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEvC;;;GAGG;AACH,MAAM,MAAM,QAAQ,CAAC,KAAK,GAAG,OAAO,IAAI;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,SACvB,QAAQ,WACN,GAAG,CAAC,QAAQ,YACX,GAAG,CAAC,MAAM,CAAC,KACnB,QAAQ,GAAG,SAkBb,CAAC"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
export declare const ExplorerContainer: import("react").LazyExoticComponent<({ role, view }: {
|
|
2
|
-
role: string;
|
|
3
|
-
view: import("@dxos/schema").View;
|
|
4
|
-
}) => import("react").JSX.Element | null>;
|
|
5
1
|
export * from './Chart';
|
|
6
2
|
export * from './Globe';
|
|
7
3
|
export * from './Graph';
|
|
4
|
+
export * from './Lattice';
|
|
8
5
|
export * from './Tree';
|
|
9
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
3
|
+
import { type View } from '@dxos/echo';
|
|
4
|
+
import '@dxos/react-ui-graph/styles/graph.css';
|
|
5
|
+
export type { ExplorerArticleVariant } from './variants';
|
|
6
|
+
export type ExplorerArticleProps = AppSurface.ObjectArticleProps<View.View>;
|
|
7
|
+
export declare const ExplorerArticle: ({ role, subject, variant }: ExplorerArticleProps) => React.JSX.Element | null;
|
|
8
|
+
//# sourceMappingURL=ExplorerArticle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExplorerArticle.d.ts","sourceRoot":"","sources":["../../../../../src/containers/ExplorerArticle/ExplorerArticle.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAoB,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAKzD,OAAO,uCAAuC,CAAC;AAQ/C,YAAY,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAE5E,eAAO,MAAM,eAAe,+BAAgC,oBAAoB,6BA+F/E,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { type ExplorerArticleVariant } from './ExplorerArticle';
|
|
3
|
+
type DefaultStoryProps = {
|
|
4
|
+
variant: ExplorerArticleVariant;
|
|
5
|
+
};
|
|
6
|
+
declare const meta: Meta<DefaultStoryProps>;
|
|
7
|
+
export default meta;
|
|
8
|
+
type Story = StoryObj<typeof meta>;
|
|
9
|
+
export declare const Force: Story;
|
|
10
|
+
export declare const Cluster: Story;
|
|
11
|
+
export declare const Bundle: Story;
|
|
12
|
+
export declare const Plexus: Story;
|
|
13
|
+
export declare const Lattice: Story;
|
|
14
|
+
export declare const Swarm: Story;
|
|
15
|
+
//# sourceMappingURL=ExplorerArticle.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExplorerArticle.stories.d.ts","sourceRoot":"","sources":["../../../../../src/containers/ExplorerArticle/ExplorerArticle.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAiBjE,OAAO,EAAmB,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAMjF,KAAK,iBAAiB,GAAG;IAAE,OAAO,EAAE,sBAAsB,CAAA;CAAE,CAAC;AAY7D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAwEjC,CAAC;eAEa,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,KAAK,EAAE,KAInB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAIpB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAIpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAInB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ThemedClassName } from '@dxos/react-ui';
|
|
3
|
+
import { type SpaceGraphModel } from '@dxos/schema';
|
|
4
|
+
import { type TreeNode } from '#components';
|
|
5
|
+
import { type ExplorerArticleVariant } from './variants';
|
|
6
|
+
export type VisualizationProps = ThemedClassName<{
|
|
7
|
+
debug?: boolean;
|
|
8
|
+
variant: ExplorerArticleVariant;
|
|
9
|
+
model: SpaceGraphModel;
|
|
10
|
+
onNodeHover?: (node: TreeNode | null, event?: MouseEvent) => void;
|
|
11
|
+
/** Called when the user clicks the visualization surface (e.g. to dismiss a node preview). */
|
|
12
|
+
onSurfaceClick?: () => void;
|
|
13
|
+
}>;
|
|
14
|
+
/**
|
|
15
|
+
* Renders the active visualization variant.
|
|
16
|
+
*/
|
|
17
|
+
export declare const Visualization: ({ classNames, debug, variant, model, onNodeHover, onSurfaceClick, }: VisualizationProps) => React.JSX.Element;
|
|
18
|
+
//# sourceMappingURL=Visualization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Visualization.d.ts","sourceRoot":"","sources":["../../../../../src/containers/ExplorerArticle/Visualization.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAGjF,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AA0BtD,OAAO,EAAuB,KAAK,eAAe,EAAuB,MAAM,cAAc,CAAC;AAG9F,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC;IAC/C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,sBAAsB,CAAC;IAChC,KAAK,EAAE,eAAe,CAAC;IACvB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAClE,8FAA8F;IAC9F,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa,wEAOvB,kBAAkB,sBAiHpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/containers/ExplorerArticle/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Visualization variants exposed by `ExplorerArticle`. */
|
|
2
|
+
export type ExplorerArticleVariant = 'force' | 'cluster' | 'bundle' | 'lattice' | 'swarm' | 'plexus';
|
|
3
|
+
export declare const VARIANTS: {
|
|
4
|
+
value: ExplorerArticleVariant;
|
|
5
|
+
icon: string;
|
|
6
|
+
label: string;
|
|
7
|
+
}[];
|
|
8
|
+
export declare const isVariant: (value: unknown) => value is ExplorerArticleVariant;
|
|
9
|
+
//# sourceMappingURL=variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../../../src/containers/ExplorerArticle/variants.ts"],"names":[],"mappings":"AAIA,2DAA2D;AAC3D,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErG,eAAO,MAAM,QAAQ,EAAE;IAAE,KAAK,EAAE,sBAAsB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EA+BpF,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,OAAO,KAAG,KAAK,IAAI,sBAMhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/containers/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAQ,MAAM,OAAO,CAAC;AAEjD,eAAO,MAAM,eAAe,EAAE,aAAa,CAAC,GAAG,CAA2C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Database, type Entity, type Filter } from '@dxos/echo';
|
|
2
2
|
import { SpaceGraphModel, type SpaceGraphModelOptions } from '@dxos/schema';
|
|
3
|
-
export declare const useGraphModel: (
|
|
3
|
+
export declare const useGraphModel: (db: Database.Database | undefined, filter?: Filter.Any | undefined, options?: SpaceGraphModelOptions, items?: readonly Entity.Unknown[]) => SpaceGraphModel | undefined;
|
|
4
4
|
//# sourceMappingURL=useGraphModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGraphModel.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useGraphModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useGraphModel.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useGraphModel.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAG5E,eAAO,MAAM,aAAa,OACpB,QAAQ,CAAC,QAAQ,GAAG,SAAS,WACxB,MAAM,CAAC,GAAG,GAAG,SAAS,YACrB,sBAAsB,UACxB,SAAS,MAAM,CAAC,OAAO,EAAE,KAChC,eAAe,GAAG,SA6BpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const meta:
|
|
1
|
+
import { Plugin } from '@dxos/app-framework';
|
|
2
|
+
export declare const meta: Plugin.Meta;
|
|
3
3
|
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,eAAO,MAAM,IAAI,aA8Bf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,eAAO,MAAM,cAAc,4BAA6C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../src/testing/generator.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,IAAI,EAAqB,MAAM,0BAA0B,CAAC;AAEnE,KAAK,mBAAmB,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;AAI7C;;GAEG;AACH,eAAO,MAAM,UAAU,UAAU,mBAAmB,EAAE,eAAoB,MAAM,MAAM,KAAG,IA+BxF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAKA,cAAc,mBAAmB,CAAC;AAElC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type Space } from '@dxos/client/echo';
|
|
2
|
+
import { Obj } from '@dxos/echo';
|
|
3
|
+
import { type ValueGenerator } from '@dxos/schema/testing';
|
|
4
|
+
import { type BundleEdge } from '../components/Tree/layout';
|
|
5
|
+
import { type TreeNode } from '../components/Tree/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 `createRelationFactory` to wire HasConnection relations (Org→Org) between them, spreading
|
|
20
|
+
* the connections across the available kinds.
|
|
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
|
+
/**
|
|
29
|
+
* Convert HasConnection relations into bundle edges between organization ids.
|
|
30
|
+
*/
|
|
31
|
+
export declare const connectionsToEdges: (connections: Obj.Any[]) => BundleEdge[];
|
|
32
|
+
//# sourceMappingURL=relations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relations.d.ts","sourceRoot":"","sources":["../../../../src/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,EAGL,KAAK,cAAc,EAGpB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAKzD,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,CAsB7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,kBAAmB,GAAG,CAAC,GAAG,EAAE,YAAW,SAAS,MAAM,EAAE,KAAa,QAyBlG,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,gBAAiB,GAAG,CAAC,GAAG,EAAE,KAAG,UAAU,EAerE,CAAC"}
|
|
@@ -1,31 +1,40 @@
|
|
|
1
|
-
import { meta } from './meta';
|
|
2
|
-
import { Graph } from './types';
|
|
3
1
|
export declare const translations: [{
|
|
4
2
|
readonly 'en-US': {
|
|
5
|
-
readonly [
|
|
6
|
-
readonly 'typename
|
|
7
|
-
readonly 'typename
|
|
8
|
-
readonly 'typename
|
|
9
|
-
readonly 'typename
|
|
10
|
-
readonly 'object
|
|
11
|
-
readonly '
|
|
12
|
-
readonly '
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
readonly 'plugin
|
|
16
|
-
readonly 'object
|
|
3
|
+
readonly [x: string]: {
|
|
4
|
+
readonly 'typename.label': 'Explorer';
|
|
5
|
+
readonly 'typename.label_zero': 'Explorers';
|
|
6
|
+
readonly 'typename.label_one': 'Explorer';
|
|
7
|
+
readonly 'typename.label_other': 'Explorers';
|
|
8
|
+
readonly 'object-name.placeholder': 'New explorer';
|
|
9
|
+
readonly 'add-object.label': 'Add explorer';
|
|
10
|
+
readonly 'rename-object.label': 'Rename explorer';
|
|
11
|
+
readonly 'delete-object.label': 'Delete explorer';
|
|
12
|
+
readonly 'object-deleted.label': 'Explorer deleted';
|
|
13
|
+
readonly 'plugin.name'?: undefined;
|
|
14
|
+
readonly 'object-title.label'?: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
readonly 'typename.label'?: undefined;
|
|
17
|
+
readonly 'typename.label_zero'?: undefined;
|
|
18
|
+
readonly 'typename.label_one'?: undefined;
|
|
19
|
+
readonly 'typename.label_other'?: undefined;
|
|
20
|
+
readonly 'object-name.placeholder'?: undefined;
|
|
21
|
+
readonly 'add-object.label'?: undefined;
|
|
22
|
+
readonly 'rename-object.label'?: undefined;
|
|
23
|
+
readonly 'delete-object.label'?: undefined;
|
|
24
|
+
readonly 'object-deleted.label'?: undefined;
|
|
25
|
+
readonly 'plugin.name': 'Explorer';
|
|
26
|
+
readonly 'object-title.label': 'Title';
|
|
17
27
|
};
|
|
18
28
|
};
|
|
19
29
|
}, {
|
|
20
30
|
readonly 'en-US': {
|
|
21
|
-
readonly "react-ui-components": {
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
readonly
|
|
28
|
-
readonly "picker tag placeholder": "Tag";
|
|
31
|
+
readonly "@dxos/react-ui-components": {
|
|
32
|
+
readonly 'no-commits.message': 'No events yet';
|
|
33
|
+
readonly 'query-editor.placeholder': 'Enter query (e.g., "#tag", "type")';
|
|
34
|
+
readonly 'picker-select.label': 'Select';
|
|
35
|
+
readonly 'picker-none.label': 'None';
|
|
36
|
+
readonly 'picker-type.placeholder': 'Type';
|
|
37
|
+
readonly 'picker-tag.placeholder': 'Tag';
|
|
29
38
|
};
|
|
30
39
|
};
|
|
31
40
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,YAAY;;;uCAIC,UAAU;4CACL,WAAW;2CACZ,UAAU;6CACR,WAAW;gDACR,cAAc;yCACrB,cAAc;4CACX,iBAAiB;4CACjB,iBAAiB;6CAChB,kBAAkB;;;;;;;;;;;;;oCAG3B,UAAU;2CACH,OAAO;;;;;;;;;;;;;;EAKN,CAAC"}
|
|
@@ -1,23 +1,6 @@
|
|
|
1
1
|
import * as Schema from 'effect/Schema';
|
|
2
|
-
import { DataType } from '@dxos/schema';
|
|
3
2
|
export declare const GraphProps: Schema.Struct<{
|
|
4
3
|
name: Schema.optional<typeof Schema.String>;
|
|
5
|
-
typename: Schema.SchemaClass<string, string, never
|
|
4
|
+
typename: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
6
5
|
}>;
|
|
7
|
-
declare const CreateGraph_base: Schema.TaggedClass<CreateGraph, `${string}/create-graph`, {
|
|
8
|
-
readonly _tag: Schema.tag<`${string}/create-graph`>;
|
|
9
|
-
} & {
|
|
10
|
-
input: Schema.extend<Schema.Struct<{
|
|
11
|
-
space: Schema.Schema<import("@dxos/client-protocol").Space, import("@dxos/client-protocol").Space, never>;
|
|
12
|
-
}>, Schema.Struct<{
|
|
13
|
-
name: Schema.optional<typeof Schema.String>;
|
|
14
|
-
typename: Schema.SchemaClass<string, string, never>;
|
|
15
|
-
}>>;
|
|
16
|
-
output: Schema.Struct<{
|
|
17
|
-
object: Schema.Schema<DataType.View, import("@dxos/schema").ViewEncoded, never>;
|
|
18
|
-
}>;
|
|
19
|
-
}>;
|
|
20
|
-
export declare class CreateGraph extends CreateGraph_base {
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
23
6
|
//# sourceMappingURL=ExplorerAction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExplorerAction.d.ts","sourceRoot":"","sources":["../../../../src/types/ExplorerAction.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ExplorerAction.d.ts","sourceRoot":"","sources":["../../../../src/types/ExplorerAction.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,eAAO,MAAM,UAAU;;;EAWrB,CAAC"}
|