@dxos/plugin-explorer 0.9.1-main.c7dcc2e112 → 0.10.0
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/dist/lib/neutral/ExplorerArticle-2WPXYTXV.mjs +101 -0
- package/dist/lib/neutral/ExplorerArticle-2WPXYTXV.mjs.map +7 -0
- package/dist/lib/neutral/ExplorerPlugin.mjs +1 -1
- package/dist/lib/neutral/NeighborhoodCompanion-WC6E3YE6.mjs +90 -0
- package/dist/lib/neutral/NeighborhoodCompanion-WC6E3YE6.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-L2TJ6GNR.mjs +37 -0
- package/dist/lib/neutral/app-graph-builder-L2TJ6GNR.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +4 -2
- package/dist/lib/neutral/capabilities/index.mjs.map +3 -3
- package/dist/lib/neutral/{chunk-JXYIG54N.mjs → chunk-4F6AT7RA.mjs} +4 -2
- package/dist/lib/neutral/chunk-4F6AT7RA.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-7XUDLV6E.mjs → chunk-EZ52JY7X.mjs} +34 -31
- package/dist/lib/neutral/chunk-EZ52JY7X.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-YBCHBVCJ.mjs → chunk-TTFPTHAQ.mjs} +8 -8
- package/dist/lib/neutral/chunk-TTFPTHAQ.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +430 -506
- package/dist/lib/neutral/components/index.mjs.map +4 -4
- package/dist/lib/neutral/containers/index.mjs +4 -2
- package/dist/lib/neutral/containers/index.mjs.map +3 -3
- package/dist/lib/neutral/{create-object-F6TKVAGV.mjs → create-object-WKIN3OB6.mjs} +3 -4
- package/dist/lib/neutral/{create-object-F6TKVAGV.mjs.map → create-object-WKIN3OB6.mjs.map} +3 -3
- package/dist/lib/neutral/hooks/index.mjs +64 -1
- package/dist/lib/neutral/hooks/index.mjs.map +4 -4
- package/dist/lib/neutral/index.mjs +1 -1
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/react-surface-EWPG5PUQ.mjs +39 -0
- package/dist/lib/neutral/react-surface-EWPG5PUQ.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +2 -2
- package/dist/lib/neutral/testing/index.mjs.map +2 -2
- package/dist/lib/neutral/translations.mjs +4 -1
- package/dist/lib/neutral/translations.mjs.map +2 -2
- package/dist/lib/neutral/types/index.mjs +1 -1
- package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +9 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +1 -7
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/components/Lattice/Lattice.d.ts +1 -1
- package/dist/types/src/components/Lattice/Lattice.d.ts.map +1 -1
- package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts +1 -1
- package/dist/types/src/components/Tree/EdgeBundling.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tree/Tree.stories.d.ts +1 -1
- package/dist/types/src/components/Tree/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tree/index.d.ts +1 -3
- package/dist/types/src/components/Tree/index.d.ts.map +1 -1
- package/dist/types/src/components/Tree/types/tree.d.ts +10 -27
- package/dist/types/src/components/Tree/types/tree.d.ts.map +1 -1
- package/dist/types/src/components/Tree/types/types.d.ts +1 -10
- package/dist/types/src/components/Tree/types/types.d.ts.map +1 -1
- package/dist/types/src/components/Visualization/Visualization.d.ts +39 -0
- package/dist/types/src/components/Visualization/Visualization.d.ts.map +1 -0
- package/dist/types/src/components/Visualization/Visualization.stories.d.ts +13 -0
- package/dist/types/src/components/Visualization/Visualization.stories.d.ts.map +1 -0
- package/dist/types/src/components/Visualization/index.d.ts +3 -0
- package/dist/types/src/components/Visualization/index.d.ts.map +1 -0
- package/dist/types/src/components/Visualization/variants.d.ts +53 -0
- package/dist/types/src/components/Visualization/variants.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts +1 -1
- package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts.map +1 -1
- package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts +2 -2
- package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/NeighborhoodCompanion/NeighborhoodCompanion.d.ts +14 -0
- package/dist/types/src/containers/NeighborhoodCompanion/NeighborhoodCompanion.d.ts.map +1 -0
- package/dist/types/src/containers/NeighborhoodCompanion/index.d.ts +2 -0
- package/dist/types/src/containers/NeighborhoodCompanion/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +1 -0
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useNeighborhoodModel.d.ts +14 -0
- package/dist/types/src/hooks/useNeighborhoodModel.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +4 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/testing/relations.d.ts +1 -2
- package/dist/types/src/testing/relations.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +6 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Graph.d.ts +6 -8
- package/dist/types/src/types/Graph.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +41 -37
- package/src/ExplorerPlugin.tsx +2 -1
- package/src/capabilities/app-graph-builder.ts +40 -0
- package/src/capabilities/create-object.ts +3 -2
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/react-surface.tsx +14 -4
- package/src/components/Lattice/Lattice.tsx +1 -2
- package/src/components/Tree/EdgeBundling.stories.tsx +5 -3
- package/src/components/Tree/Tree.stories.tsx +7 -2
- package/src/components/Tree/index.ts +3 -3
- package/src/components/Tree/types/tree.ts +6 -6
- package/src/components/Tree/types/types.ts +1 -11
- package/src/components/Visualization/Visualization.stories.tsx +104 -0
- package/src/components/Visualization/Visualization.tsx +209 -0
- package/src/components/Visualization/index.ts +6 -0
- package/src/components/Visualization/variants.ts +508 -0
- package/src/components/index.ts +1 -0
- package/src/containers/ExplorerArticle/ExplorerArticle.stories.tsx +3 -3
- package/src/containers/ExplorerArticle/ExplorerArticle.tsx +7 -8
- package/src/containers/NeighborhoodCompanion/NeighborhoodCompanion.tsx +102 -0
- package/src/containers/NeighborhoodCompanion/index.ts +5 -0
- package/src/containers/index.ts +1 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useNeighborhoodModel.ts +81 -0
- package/src/testing/relations.ts +1 -3
- package/src/translations.ts +3 -0
- package/src/types/Graph.ts +18 -20
- package/dist/lib/neutral/ExplorerArticle-MHEINWUL.mjs +0 -460
- package/dist/lib/neutral/ExplorerArticle-MHEINWUL.mjs.map +0 -7
- package/dist/lib/neutral/chunk-7XUDLV6E.mjs.map +0 -7
- package/dist/lib/neutral/chunk-IKHJV3Q4.mjs +0 -20
- package/dist/lib/neutral/chunk-IKHJV3Q4.mjs.map +0 -7
- package/dist/lib/neutral/chunk-JXYIG54N.mjs.map +0 -7
- package/dist/lib/neutral/chunk-YBCHBVCJ.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-APBW2VQG.mjs +0 -26
- package/dist/lib/neutral/react-surface-APBW2VQG.mjs.map +0 -7
- package/dist/types/src/components/Tree/Tree.d.ts +0 -24
- package/dist/types/src/components/Tree/Tree.d.ts.map +0 -1
- package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts +0 -40
- package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts.map +0 -1
- package/dist/types/src/components/Tree/layout/RadialTree.d.ts +0 -37
- package/dist/types/src/components/Tree/layout/RadialTree.d.ts.map +0 -1
- package/dist/types/src/components/Tree/layout/TidyTree.d.ts +0 -26
- package/dist/types/src/components/Tree/layout/TidyTree.d.ts.map +0 -1
- package/dist/types/src/components/Tree/layout/hierarchy.d.ts +0 -17
- package/dist/types/src/components/Tree/layout/hierarchy.d.ts.map +0 -1
- package/dist/types/src/components/Tree/layout/index.d.ts +0 -6
- package/dist/types/src/components/Tree/layout/index.d.ts.map +0 -1
- package/dist/types/src/components/Tree/layout/slots.d.ts +0 -7
- package/dist/types/src/components/Tree/layout/slots.d.ts.map +0 -1
- package/dist/types/src/components/Tree/layout/useContainerSize.d.ts +0 -15
- package/dist/types/src/components/Tree/layout/useContainerSize.d.ts.map +0 -1
- package/dist/types/src/containers/ExplorerArticle/Visualization.d.ts +0 -18
- package/dist/types/src/containers/ExplorerArticle/Visualization.d.ts.map +0 -1
- package/dist/types/src/containers/ExplorerArticle/variants.d.ts +0 -9
- package/dist/types/src/containers/ExplorerArticle/variants.d.ts.map +0 -1
- package/src/components/Tree/Tree.tsx +0 -81
- package/src/components/Tree/layout/HierarchicalEdgeBundling.tsx +0 -335
- package/src/components/Tree/layout/RadialTree.tsx +0 -242
- package/src/components/Tree/layout/TidyTree.tsx +0 -246
- package/src/components/Tree/layout/hierarchy.ts +0 -32
- package/src/components/Tree/layout/index.ts +0 -9
- package/src/components/Tree/layout/slots.ts +0 -19
- package/src/components/Tree/layout/useContainerSize.ts +0 -43
- package/src/containers/ExplorerArticle/Visualization.tsx +0 -523
- package/src/containers/ExplorerArticle/variants.ts +0 -47
|
@@ -2,8 +2,10 @@ import "../chunk-J5LGTIGS.mjs";
|
|
|
2
2
|
|
|
3
3
|
// src/containers/index.ts
|
|
4
4
|
import { lazy } from "react";
|
|
5
|
-
var ExplorerArticle = lazy(() => import("../ExplorerArticle-
|
|
5
|
+
var ExplorerArticle = lazy(() => import("../ExplorerArticle-2WPXYTXV.mjs"));
|
|
6
|
+
var NeighborhoodCompanion = lazy(() => import("../NeighborhoodCompanion-WC6E3YE6.mjs"));
|
|
6
7
|
export {
|
|
7
|
-
ExplorerArticle
|
|
8
|
+
ExplorerArticle,
|
|
9
|
+
NeighborhoodCompanion
|
|
8
10
|
};
|
|
9
11
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/containers/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport const ExplorerArticle: ComponentType<any> = lazy(() => import('./ExplorerArticle'));\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAA6BA,YAAY;AAElC,IAAMC,kBAAsCD,KAAK,MAAM,OAAO,iCAAA,CAAA;",
|
|
6
|
-
"names": ["lazy", "ExplorerArticle"]
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport const ExplorerArticle: ComponentType<any> = lazy(() => import('./ExplorerArticle'));\nexport const NeighborhoodCompanion: ComponentType<any> = lazy(() => import('./NeighborhoodCompanion'));\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAA6BA,YAAY;AAElC,IAAMC,kBAAsCD,KAAK,MAAM,OAAO,iCAAA,CAAA;AAC9D,IAAME,wBAA4CF,KAAK,MAAM,OAAO,uCAAA,CAAA;",
|
|
6
|
+
"names": ["lazy", "ExplorerArticle", "NeighborhoodCompanion"]
|
|
7
7
|
}
|
|
@@ -15,10 +15,10 @@ var create_object_default = Capability.makeModule(Effect.fnUntraced(function* ()
|
|
|
15
15
|
inputSchema: ExplorerAction.GraphProps,
|
|
16
16
|
createObject: (props, options) => Effect.gen(function* () {
|
|
17
17
|
const object = yield* Effect.promise(async () => {
|
|
18
|
-
const
|
|
18
|
+
const view = props.typename ? (await ViewModel.makeFromDatabase({
|
|
19
19
|
db: options.db,
|
|
20
20
|
typename: props.typename
|
|
21
|
-
});
|
|
21
|
+
})).view : void 0;
|
|
22
22
|
return Graph.make({
|
|
23
23
|
name: props.name,
|
|
24
24
|
view
|
|
@@ -27,7 +27,6 @@ var create_object_default = Capability.makeModule(Effect.fnUntraced(function* ()
|
|
|
27
27
|
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
28
28
|
object,
|
|
29
29
|
target: options.target,
|
|
30
|
-
hidden: true,
|
|
31
30
|
targetNodeId: options.targetNodeId
|
|
32
31
|
});
|
|
33
32
|
})
|
|
@@ -36,4 +35,4 @@ var create_object_default = Capability.makeModule(Effect.fnUntraced(function* ()
|
|
|
36
35
|
export {
|
|
37
36
|
create_object_default as default
|
|
38
37
|
};
|
|
39
|
-
//# sourceMappingURL=create-object-
|
|
38
|
+
//# sourceMappingURL=create-object-WKIN3OB6.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/capabilities/create-object.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { Type } from '@dxos/echo';\nimport { SpaceOperation } from '@dxos/plugin-space';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { ViewModel } from '@dxos/schema';\n\nimport { ExplorerAction, Graph } from '#types';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {\n id: Type.getTypename(Graph.Graph),\n inputSchema: ExplorerAction.GraphProps,\n createObject: (props, options) =>\n Effect.gen(function* () {\n const object = yield* Effect.promise(async () => {\n const
|
|
5
|
-
"mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,YAAY;AACrB,SAASC,sBAAsB;AAC/B,SAASC,yBAAyB;AAClC,SAASC,iBAAiB;AAE1B,SAASC,gBAAgBC,aAAa;AAEtC,IAAA,wBAAeP,WAAWQ,WACjBC,kBAAW,aAAA;AAChB,SAAOT,WAAWU,YAAYN,kBAAkBO,mBAAmB;IACjEC,IAAIV,KAAKW,YAAYN,MAAMA,KAAK;IAChCO,aAAaR,eAAeS;IAC5BC,cAAc,CAACC,OAAOC,YACbC,WAAI,aAAA;AACT,YAAMC,SAAS,OAAcC,eAAQ,YAAA;AACnC,
|
|
6
|
-
"names": ["Effect", "Capability", "Operation", "Type", "SpaceOperation", "SpaceCapabilities", "ViewModel", "ExplorerAction", "Graph", "makeModule", "fnUntraced", "contributes", "CreateObjectEntry", "id", "getTypename", "inputSchema", "GraphProps", "createObject", "props", "options", "gen", "object", "promise", "view", "makeFromDatabase", "db", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { Type } from '@dxos/echo';\nimport { SpaceOperation } from '@dxos/plugin-space';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { ViewModel } from '@dxos/schema';\n\nimport { ExplorerAction, Graph } from '#types';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {\n id: Type.getTypename(Graph.Graph),\n inputSchema: ExplorerAction.GraphProps,\n createObject: (props, options) =>\n Effect.gen(function* () {\n const object = yield* Effect.promise(async () => {\n const view = props.typename\n ? (await ViewModel.makeFromDatabase({ db: options.db, typename: props.typename })).view\n : undefined;\n return Graph.make({ name: props.name, view });\n });\n return yield* Operation.invoke(SpaceOperation.AddObject, {\n object,\n target: options.target,\n targetNodeId: options.targetNodeId,\n });\n }),\n });\n }),\n);\n"],
|
|
5
|
+
"mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,YAAY;AACrB,SAASC,sBAAsB;AAC/B,SAASC,yBAAyB;AAClC,SAASC,iBAAiB;AAE1B,SAASC,gBAAgBC,aAAa;AAEtC,IAAA,wBAAeP,WAAWQ,WACjBC,kBAAW,aAAA;AAChB,SAAOT,WAAWU,YAAYN,kBAAkBO,mBAAmB;IACjEC,IAAIV,KAAKW,YAAYN,MAAMA,KAAK;IAChCO,aAAaR,eAAeS;IAC5BC,cAAc,CAACC,OAAOC,YACbC,WAAI,aAAA;AACT,YAAMC,SAAS,OAAcC,eAAQ,YAAA;AACnC,cAAMC,OAAOL,MAAMM,YACd,MAAMlB,UAAUmB,iBAAiB;UAAEC,IAAIP,QAAQO;UAAIF,UAAUN,MAAMM;QAAS,CAAA,GAAID,OACjFI;AACJ,eAAOnB,MAAMoB,KAAK;UAAEC,MAAMX,MAAMW;UAAMN;QAAK,CAAA;MAC7C,CAAA;AACA,aAAO,OAAOrB,UAAU4B,OAAO1B,eAAe2B,WAAW;QACvDV;QACAW,QAAQb,QAAQa;QAChBC,cAAcd,QAAQc;MACxB,CAAA;IACF,CAAA;EACJ,CAAA;AACF,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "Capability", "Operation", "Type", "SpaceOperation", "SpaceCapabilities", "ViewModel", "ExplorerAction", "Graph", "makeModule", "fnUntraced", "contributes", "CreateObjectEntry", "id", "getTypename", "inputSchema", "GraphProps", "createObject", "props", "options", "gen", "object", "promise", "view", "typename", "makeFromDatabase", "db", "undefined", "make", "name", "invoke", "AddObject", "target", "targetNodeId"]
|
|
7
7
|
}
|
|
@@ -39,7 +39,70 @@ var useGraphModel = (db, filter, options, items) => {
|
|
|
39
39
|
]);
|
|
40
40
|
return model;
|
|
41
41
|
};
|
|
42
|
+
|
|
43
|
+
// src/hooks/useNeighborhoodModel.ts
|
|
44
|
+
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
45
|
+
import { Obj } from "@dxos/echo";
|
|
46
|
+
var DEFAULT_NEIGHBORHOOD_DEPTH = 2;
|
|
47
|
+
var useNeighborhoodModel = (object, depth = DEFAULT_NEIGHBORHOOD_DEPTH) => {
|
|
48
|
+
const db = object ? Obj.getDatabase(object) : void 0;
|
|
49
|
+
const fullModel = useGraphModel(db);
|
|
50
|
+
const [model, setModel] = useState2(void 0);
|
|
51
|
+
useEffect2(() => {
|
|
52
|
+
if (!fullModel || !object) {
|
|
53
|
+
setModel(void 0);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const recompute = () => setModel(buildNeighborhood(fullModel, object.id, depth));
|
|
57
|
+
recompute();
|
|
58
|
+
return fullModel.subscribe(recompute);
|
|
59
|
+
}, [
|
|
60
|
+
fullModel,
|
|
61
|
+
object?.id,
|
|
62
|
+
depth
|
|
63
|
+
]);
|
|
64
|
+
return model;
|
|
65
|
+
};
|
|
66
|
+
var buildNeighborhood = (fullModel, rootId, depth) => {
|
|
67
|
+
const { nodes, edges } = fullModel.graph;
|
|
68
|
+
const adjacency = /* @__PURE__ */ new Map();
|
|
69
|
+
const link = (from, to) => {
|
|
70
|
+
const list = adjacency.get(from) ?? [];
|
|
71
|
+
list.push(to);
|
|
72
|
+
adjacency.set(from, list);
|
|
73
|
+
};
|
|
74
|
+
for (const edge of edges) {
|
|
75
|
+
link(edge.source, edge.target);
|
|
76
|
+
link(edge.target, edge.source);
|
|
77
|
+
}
|
|
78
|
+
const included = /* @__PURE__ */ new Set([
|
|
79
|
+
rootId
|
|
80
|
+
]);
|
|
81
|
+
let frontier = [
|
|
82
|
+
rootId
|
|
83
|
+
];
|
|
84
|
+
for (let hop = 0; hop < depth && frontier.length; hop++) {
|
|
85
|
+
const next = [];
|
|
86
|
+
for (const id of frontier) {
|
|
87
|
+
for (const neighbour of adjacency.get(id) ?? []) {
|
|
88
|
+
if (!included.has(neighbour)) {
|
|
89
|
+
included.add(neighbour);
|
|
90
|
+
next.push(neighbour);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
frontier = next;
|
|
95
|
+
}
|
|
96
|
+
const subNodes = nodes.filter((node) => included.has(node.id));
|
|
97
|
+
const subEdges = edges.filter((edge) => included.has(edge.source) && included.has(edge.target));
|
|
98
|
+
return fullModel.copy({
|
|
99
|
+
nodes: subNodes,
|
|
100
|
+
edges: subEdges
|
|
101
|
+
});
|
|
102
|
+
};
|
|
42
103
|
export {
|
|
43
|
-
|
|
104
|
+
DEFAULT_NEIGHBORHOOD_DEPTH,
|
|
105
|
+
useGraphModel,
|
|
106
|
+
useNeighborhoodModel
|
|
44
107
|
};
|
|
45
108
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/hooks/useGraphModel.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\nimport { Capabilities } from '@dxos/app-framework';\nimport { useCapability } from '@dxos/app-framework/ui';\nimport { type Database, type Entity, type Filter } from '@dxos/echo';\nimport { SpaceGraphModel, type SpaceGraphModelOptions } from '@dxos/schema';\n\n// TODO(burdon): Factor out.\nexport const useGraphModel = (\n db: Database.Database | undefined,\n filter?: Filter.Any | undefined,\n options?: SpaceGraphModelOptions,\n items?: readonly Entity.Unknown[],\n): SpaceGraphModel | undefined => {\n const registry = useCapability(Capabilities.AtomRegistry);\n const [model, setModel] = useState<SpaceGraphModel | undefined>(undefined);\n\n useEffect(() => {\n if (!db) {\n setModel(undefined);\n return;\n }\n\n const newModel = new SpaceGraphModel(registry);\n void newModel.open(db);\n setModel(newModel);\n\n return () => {\n setModel(undefined);\n void newModel.close();\n };\n }, [db, registry]);\n\n useEffect(() => {\n model?.setFilter(filter).setOptions(options);\n }, [model, filter, options]);\n\n useEffect(() => {\n model?.setItems(items);\n }, [model, items]);\n\n return model;\n};\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,WAAWC,gBAAgB;AAEpC,SAASC,oBAAoB;AAC7B,SAASC,qBAAqB;AAE9B,SAASC,uBAAoD;AAGtD,IAAMC,gBAAgB,CAC3BC,IACAC,QACAC,SACAC,UAAAA;AAEA,QAAMC,WAAWP,cAAcD,aAAaS,YAAY;AACxD,QAAM,CAACC,OAAOC,QAAAA,IAAYZ,SAAsCa,MAAAA;AAEhEd,YAAU,MAAA;AACR,QAAI,CAACM,IAAI;AACPO,eAASC,MAAAA;AACT;IACF;AAEA,UAAMC,WAAW,IAAIX,gBAAgBM,QAAAA;AACrC,SAAKK,SAASC,KAAKV,EAAAA;AACnBO,aAASE,QAAAA;AAET,WAAO,MAAA;AACLF,eAASC,MAAAA;AACT,WAAKC,SAASE,MAAK;IACrB;EACF,GAAG;IAACX;IAAII;GAAS;AAEjBV,YAAU,MAAA;AACRY,WAAOM,UAAUX,MAAAA,EAAQY,WAAWX,OAAAA;EACtC,GAAG;IAACI;IAAOL;IAAQC;GAAQ;AAE3BR,YAAU,MAAA;AACRY,WAAOQ,SAASX,KAAAA;EAClB,GAAG;IAACG;IAAOH;GAAM;AAEjB,SAAOG;AACT;",
|
|
6
|
-
"names": ["useEffect", "useState", "Capabilities", "useCapability", "SpaceGraphModel", "useGraphModel", "db", "filter", "options", "items", "registry", "AtomRegistry", "model", "setModel", "undefined", "newModel", "open", "close", "setFilter", "setOptions", "setItems"]
|
|
3
|
+
"sources": ["../../../../src/hooks/useGraphModel.ts", "../../../../src/hooks/useNeighborhoodModel.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\nimport { Capabilities } from '@dxos/app-framework';\nimport { useCapability } from '@dxos/app-framework/ui';\nimport { type Database, type Entity, type Filter } from '@dxos/echo';\nimport { SpaceGraphModel, type SpaceGraphModelOptions } from '@dxos/schema';\n\n// TODO(burdon): Factor out.\nexport const useGraphModel = (\n db: Database.Database | undefined,\n filter?: Filter.Any | undefined,\n options?: SpaceGraphModelOptions,\n items?: readonly Entity.Unknown[],\n): SpaceGraphModel | undefined => {\n const registry = useCapability(Capabilities.AtomRegistry);\n const [model, setModel] = useState<SpaceGraphModel | undefined>(undefined);\n\n useEffect(() => {\n if (!db) {\n setModel(undefined);\n return;\n }\n\n const newModel = new SpaceGraphModel(registry);\n void newModel.open(db);\n setModel(newModel);\n\n return () => {\n setModel(undefined);\n void newModel.close();\n };\n }, [db, registry]);\n\n useEffect(() => {\n model?.setFilter(filter).setOptions(options);\n }, [model, filter, options]);\n\n useEffect(() => {\n model?.setItems(items);\n }, [model, items]);\n\n return model;\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\nimport { Obj } from '@dxos/echo';\nimport { type SpaceGraphEdge, type SpaceGraphModel, type SpaceGraphNode } from '@dxos/schema';\n\nimport { useGraphModel } from './useGraphModel';\n\n/** Default traversal depth (hops) for the neighborhood graph. */\nexport const DEFAULT_NEIGHBORHOOD_DEPTH = 2;\n\n/**\n * Builds an ego graph around `object`: the n-hop neighbourhood reached by following refs and\n * relations from the active node. The full space graph is materialised (reactively) and then\n * narrowed to the nodes within `depth` hops, keeping only edges whose endpoints both survive.\n *\n * NOTE: Derives the subgraph from the whole-space model — the same cost the main explorer pays.\n * A direct ECHO traversal that loads only the reachable objects is a future optimisation.\n */\nexport const useNeighborhoodModel = (\n object: Obj.Unknown | undefined,\n depth = DEFAULT_NEIGHBORHOOD_DEPTH,\n): SpaceGraphModel | undefined => {\n const db = object ? Obj.getDatabase(object) : undefined;\n const fullModel = useGraphModel(db);\n const [model, setModel] = useState<SpaceGraphModel | undefined>(undefined);\n\n useEffect(() => {\n if (!fullModel || !object) {\n setModel(undefined);\n return;\n }\n\n const recompute = () => setModel(buildNeighborhood(fullModel, object.id, depth));\n recompute();\n return fullModel.subscribe(recompute);\n }, [fullModel, object?.id, depth]);\n\n return model;\n};\n\n/**\n * Narrow the full graph to the BFS neighbourhood of `rootId` within `depth` hops (edges treated as\n * undirected so the neighbourhood reads as graph distance regardless of ref/relation direction).\n */\nconst buildNeighborhood = (fullModel: SpaceGraphModel, rootId: string, depth: number): SpaceGraphModel => {\n const { nodes, edges } = fullModel.graph;\n\n const adjacency = new Map<string, string[]>();\n const link = (from: string, to: string) => {\n const list = adjacency.get(from) ?? [];\n list.push(to);\n adjacency.set(from, list);\n };\n for (const edge of edges) {\n link(edge.source, edge.target);\n link(edge.target, edge.source);\n }\n\n const included = new Set<string>([rootId]);\n let frontier = [rootId];\n for (let hop = 0; hop < depth && frontier.length; hop++) {\n const next: string[] = [];\n for (const id of frontier) {\n for (const neighbour of adjacency.get(id) ?? []) {\n if (!included.has(neighbour)) {\n included.add(neighbour);\n next.push(neighbour);\n }\n }\n }\n frontier = next;\n }\n\n const subNodes = nodes.filter((node: SpaceGraphNode) => included.has(node.id));\n const subEdges = edges.filter((edge: SpaceGraphEdge) => included.has(edge.source) && included.has(edge.target));\n return fullModel.copy({ nodes: subNodes, edges: subEdges });\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["useEffect", "useState", "Capabilities", "useCapability", "SpaceGraphModel", "useGraphModel", "db", "filter", "options", "items", "registry", "AtomRegistry", "model", "setModel", "undefined", "newModel", "open", "close", "setFilter", "setOptions", "setItems", "useEffect", "useState", "Obj", "DEFAULT_NEIGHBORHOOD_DEPTH", "useNeighborhoodModel", "object", "depth", "db", "Obj", "getDatabase", "undefined", "fullModel", "useGraphModel", "model", "setModel", "useState", "useEffect", "recompute", "buildNeighborhood", "id", "subscribe", "rootId", "nodes", "edges", "graph", "adjacency", "Map", "link", "from", "to", "list", "get", "push", "set", "edge", "source", "target", "included", "Set", "frontier", "hop", "length", "next", "neighbour", "has", "add", "subNodes", "filter", "node", "subEdges", "copy"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"dx.config.ts":{"bytes":5464,"imports":[{"path":"@dxos/app-framework/config","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/meta.ts":{"bytes":799,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dx.config.ts","kind":"import-statement","original":"../dx.config"}],"format":"esm"},"src/types/ExplorerAction.ts":{"bytes":2116,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true}],"format":"esm"},"src/types/Graph.ts":{"bytes":4825,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/Annotation","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":610,"imports":[{"path":"src/types/ExplorerAction.ts","kind":"import-statement","original":"./ExplorerAction"},{"path":"src/types/Graph.ts","kind":"import-statement","original":"./Graph"}],"format":"esm"},"src/index.ts":{"bytes":449,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-explorer/PLUGIN.mdl":{"bytes":10512,"imports":[]},"src/ExplorerPlugin.tsx":{"bytes":3628,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-explorer/PLUGIN.mdl","kind":"import-statement","original":"../PLUGIN.mdl?raw"}],"format":"esm"},"src/capabilities/create-object.ts":{"bytes":4859,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":3709,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"#containers","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1130,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/create-object.ts","kind":"dynamic-import","original":"./create-object"},{"path":"src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/util/node-color.ts":{"bytes":2624,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/util/plot.ts":{"bytes":1374,"imports":[],"format":"esm"},"src/util/index.ts":{"bytes":458,"imports":[{"path":"src/util/node-color.ts","kind":"import-statement","original":"./node-color"},{"path":"src/util/plot.ts","kind":"import-statement","original":"./plot"}],"format":"esm"},"src/components/Chart/Chart.tsx":{"bytes":4719,"imports":[{"path":"@observablehq/plot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"src/util/index.ts","kind":"import-statement","original":"../../util"}],"format":"esm"},"src/components/Chart/index.ts":{"bytes":369,"imports":[{"path":"src/components/Chart/Chart.tsx","kind":"import-statement","original":"./Chart"}],"format":"esm"},"data/countries-110m.js":{"bytes":187226,"imports":[],"format":"esm"},"src/components/Globe/Globe.tsx":{"bytes":7283,"imports":[{"path":"@observablehq/plot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"topojson-client","kind":"import-statement","external":true},{"path":"data/countries-110m.js","kind":"import-statement","original":"../../../data/countries-110m.js"},{"path":"src/util/index.ts","kind":"import-statement","original":"../../util"}],"format":"esm"},"src/components/Globe/index.ts":{"bytes":369,"imports":[{"path":"src/components/Globe/Globe.tsx","kind":"import-statement","original":"./Globe"}],"format":"esm"},"src/components/Graph/graph-adapter.ts":{"bytes":4073,"imports":[],"format":"esm"},"src/components/Graph/CanvasForceGraph.tsx":{"bytes":12816,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"force-graph","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"src/components/Graph/graph-adapter.ts","kind":"import-statement","original":"./graph-adapter"}],"format":"esm"},"src/components/Graph/ForceGraph.tsx":{"bytes":12153,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph/styles/graph.css","kind":"import-statement","external":true}],"format":"esm"},"src/components/Graph/index.ts":{"bytes":490,"imports":[{"path":"src/components/Graph/CanvasForceGraph.tsx","kind":"import-statement","original":"./CanvasForceGraph"},{"path":"src/components/Graph/ForceGraph.tsx","kind":"import-statement","original":"./ForceGraph"}],"format":"esm"},"src/components/Tree/layout/useContainerSize.ts":{"bytes":5144,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/components/Lattice/Lattice.tsx":{"bytes":19160,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"src/util/node-color.ts","kind":"import-statement","original":"../../util/node-color"},{"path":"src/components/Tree/layout/useContainerSize.ts","kind":"import-statement","original":"../Tree/layout/useContainerSize"}],"format":"esm"},"src/components/Lattice/index.ts":{"bytes":375,"imports":[{"path":"src/components/Lattice/Lattice.tsx","kind":"import-statement","original":"./Lattice"}],"format":"esm"},"src/components/Tree/layout/slots.ts":{"bytes":2263,"imports":[],"format":"esm"},"src/components/Tree/layout/HierarchicalEdgeBundling.tsx":{"bytes":33701,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/util/node-color.ts","kind":"import-statement","original":"../../../util/node-color"},{"path":"src/components/Tree/layout/slots.ts","kind":"import-statement","original":"./slots"},{"path":"src/components/Tree/layout/useContainerSize.ts","kind":"import-statement","original":"./useContainerSize"}],"format":"esm"},"src/components/Tree/layout/hierarchy.ts":{"bytes":3401,"imports":[{"path":"d3","kind":"import-statement","external":true}],"format":"esm"},"src/components/Tree/layout/RadialTree.tsx":{"bytes":25201,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/util/node-color.ts","kind":"import-statement","original":"../../../util/node-color"},{"path":"src/components/Tree/layout/hierarchy.ts","kind":"import-statement","original":"./hierarchy"},{"path":"src/components/Tree/layout/slots.ts","kind":"import-statement","original":"./slots"},{"path":"src/components/Tree/layout/useContainerSize.ts","kind":"import-statement","original":"./useContainerSize"}],"format":"esm"},"src/components/Tree/layout/TidyTree.tsx":{"bytes":24597,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/Tree/layout/hierarchy.ts","kind":"import-statement","original":"./hierarchy"},{"path":"src/components/Tree/layout/slots.ts","kind":"import-statement","original":"./slots"},{"path":"src/components/Tree/layout/useContainerSize.ts","kind":"import-statement","original":"./useContainerSize"}],"format":"esm"},"src/components/Tree/layout/index.ts":{"bytes":768,"imports":[{"path":"src/components/Tree/layout/HierarchicalEdgeBundling.tsx","kind":"import-statement","original":"./HierarchicalEdgeBundling"},{"path":"src/components/Tree/layout/RadialTree.tsx","kind":"import-statement","original":"./RadialTree"},{"path":"src/components/Tree/layout/TidyTree.tsx","kind":"import-statement","original":"./TidyTree"},{"path":"src/components/Tree/layout/hierarchy.ts","kind":"import-statement","original":"./hierarchy"},{"path":"src/components/Tree/layout/slots.ts","kind":"import-statement","original":"./slots"}],"format":"esm"},"src/components/Tree/Tree.tsx":{"bytes":6327,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/components/Tree/layout/index.ts","kind":"import-statement","original":"./layout"}],"format":"esm"},"src/components/Tree/types/tree.ts":{"bytes":27806,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/testing","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/components/Tree/types/types.ts":{"bytes":3987,"imports":[],"format":"esm"},"src/components/Tree/types/index.ts":{"bytes":449,"imports":[{"path":"src/components/Tree/types/tree.ts","kind":"import-statement","original":"./tree"},{"path":"src/components/Tree/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/components/Tree/index.ts":{"bytes":644,"imports":[{"path":"src/components/Tree/Tree.tsx","kind":"import-statement","original":"./Tree"},{"path":"src/components/Tree/layout/index.ts","kind":"import-statement","original":"./layout"},{"path":"src/components/Tree/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/components/index.ts":{"bytes":694,"imports":[{"path":"src/components/Chart/index.ts","kind":"import-statement","original":"./Chart"},{"path":"src/components/Globe/index.ts","kind":"import-statement","original":"./Globe"},{"path":"src/components/Graph/index.ts","kind":"import-statement","original":"./Graph"},{"path":"src/components/Lattice/index.ts","kind":"import-statement","original":"./Lattice"},{"path":"src/components/Tree/index.ts","kind":"import-statement","original":"./Tree"}],"format":"esm"},"src/containers/ExplorerArticle/variants.ts":{"bytes":3213,"imports":[],"format":"esm"},"src/containers/ExplorerArticle/Visualization.tsx":{"bytes":62075,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/util/index.ts","kind":"import-statement","original":"../../util"}],"format":"esm"},"src/containers/ExplorerArticle/ExplorerArticle.tsx":{"bytes":13043,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-query","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-components","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph/styles/graph.css","kind":"import-statement","external":true},{"path":"#hooks","kind":"import-statement","external":true},{"path":"src/containers/ExplorerArticle/variants.ts","kind":"import-statement","original":"./variants"},{"path":"src/containers/ExplorerArticle/Visualization.tsx","kind":"import-statement","original":"./Visualization"}],"format":"esm"},"src/containers/ExplorerArticle/index.ts":{"bytes":524,"imports":[{"path":"src/containers/ExplorerArticle/ExplorerArticle.tsx","kind":"import-statement","original":"./ExplorerArticle"}],"format":"esm"},"src/containers/index.ts":{"bytes":720,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/containers/ExplorerArticle/index.ts","kind":"dynamic-import","original":"./ExplorerArticle"}],"format":"esm"},"src/hooks/useGraphModel.ts":{"bytes":4086,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/index.ts":{"bytes":389,"imports":[{"path":"src/hooks/useGraphModel.ts","kind":"import-statement","original":"./useGraphModel"}],"format":"esm"},"src/plugin.ts":{"bytes":865,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"#plugin","kind":"dynamic-import","external":true}],"format":"esm"},"src/testing/generator.ts":{"bytes":5095,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/components/Tree/types/index.ts","kind":"import-statement","original":"../components/Tree/types"}],"format":"esm"},"src/testing/relations.ts":{"bytes":13018,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/schema/testing","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"format":"esm"},"src/testing/index.ts":{"bytes":827,"imports":[{"path":"src/ExplorerPlugin.tsx","kind":"import-statement","original":"../ExplorerPlugin"},{"path":"src/testing/generator.ts","kind":"import-statement","original":"./generator"},{"path":"src/testing/relations.ts","kind":"import-statement","original":"./relations"}],"format":"esm"},"src/translations.ts":{"bytes":3289,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-components/translations","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/neutral/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9474},"dist/lib/neutral/testing/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-JXYIG54N.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-7XUDLV6E.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/schema/testing","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"exports":["ExplorerPlugin","buildOrgHierarchy","connectionsToEdges","createTree","generateConnectedOrgs"],"entryPoint":"src/testing/index.ts","inputs":{"src/testing/index.ts":{"bytesInOutput":0},"src/testing/generator.ts":{"bytesInOutput":1006},"src/testing/relations.ts":{"bytesInOutput":2485}},"bytes":3833},"dist/lib/neutral/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1592},"dist/lib/neutral/translations.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-components/translations","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":850}},"bytes":974},"dist/lib/neutral/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/types/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-YBCHBVCJ.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["ExplorerAction","Graph"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":231},"dist/lib/neutral/create-object-F6TKVAGV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2465},"dist/lib/neutral/create-object-F6TKVAGV.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/create-object.ts","inputs":{"src/capabilities/create-object.ts":{"bytesInOutput":1158}},"bytes":1326},"dist/lib/neutral/react-surface-APBW2VQG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1907},"dist/lib/neutral/react-surface-APBW2VQG.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"#containers","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":906}},"bytes":1075},"dist/lib/neutral/ExplorerArticle-MHEINWUL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":40271},"dist/lib/neutral/ExplorerArticle-MHEINWUL.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-IKHJV3Q4.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-query","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-components","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph/styles/graph.css","kind":"import-statement","external":true},{"path":"#hooks","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/ExplorerArticle/index.ts","inputs":{"src/containers/ExplorerArticle/ExplorerArticle.tsx":{"bytesInOutput":2996},"src/containers/ExplorerArticle/variants.ts":{"bytesInOutput":721},"src/containers/ExplorerArticle/Visualization.tsx":{"bytesInOutput":11546},"src/containers/ExplorerArticle/index.ts":{"bytesInOutput":0}},"bytes":15662},"dist/lib/neutral/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-YBCHBVCJ.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-C56B464A.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["ExplorerAction","Graph","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":284},"dist/lib/neutral/chunk-YBCHBVCJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3587},"dist/lib/neutral/chunk-YBCHBVCJ.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/Annotation","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"exports":["ExplorerAction_exports","Graph_exports"],"inputs":{"src/types/ExplorerAction.ts":{"bytesInOutput":574},"src/types/index.ts":{"bytesInOutput":0},"src/types/Graph.ts":{"bytesInOutput":1056}},"bytes":1835},"dist/lib/neutral/ExplorerPlugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/ExplorerPlugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-JXYIG54N.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["ExplorerPlugin","default"],"entryPoint":"src/ExplorerPlugin.tsx","inputs":{},"bytes":224},"dist/lib/neutral/chunk-JXYIG54N.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13260},"dist/lib/neutral/chunk-JXYIG54N.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["ExplorerPlugin","ExplorerPlugin_default"],"inputs":{"src/ExplorerPlugin.tsx":{"bytesInOutput":775},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-explorer/PLUGIN.mdl":{"bytesInOutput":11240}},"bytes":12242},"dist/lib/neutral/capabilities/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":602},"dist/lib/neutral/capabilities/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/neutral/create-object-F6TKVAGV.mjs","kind":"dynamic-import"},{"path":"dist/lib/neutral/react-surface-APBW2VQG.mjs","kind":"dynamic-import"}],"exports":["CreateObject","ReactSurface"],"entryPoint":"src/capabilities/index.ts","inputs":{"src/capabilities/index.ts":{"bytesInOutput":248}},"bytes":388},"dist/lib/neutral/components/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":530145},"dist/lib/neutral/components/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-7XUDLV6E.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-IKHJV3Q4.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@observablehq/plot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@observablehq/plot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"topojson-client","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"force-graph","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph/styles/graph.css","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"exports":["CanvasForceGraph","Chart","ForceGraph","Globe","HierarchicalEdgeBundling","Lattice","RadialTree","TidyTree","Tree","buildHierarchy","defaultTreeLayoutSlots","isCollapsed","isLeaf","treeTypeToTreeNode"],"entryPoint":"src/components/index.ts","inputs":{"src/components/Chart/Chart.tsx":{"bytesInOutput":1031},"src/components/Chart/index.ts":{"bytesInOutput":0},"src/components/index.ts":{"bytesInOutput":0},"src/components/Globe/Globe.tsx":{"bytesInOutput":1707},"data/countries-110m.js":{"bytesInOutput":188376},"src/components/Globe/index.ts":{"bytesInOutput":0},"src/components/Graph/CanvasForceGraph.tsx":{"bytesInOutput":2568},"src/components/Graph/graph-adapter.ts":{"bytesInOutput":619},"src/components/Graph/index.ts":{"bytesInOutput":0},"src/components/Graph/ForceGraph.tsx":{"bytesInOutput":2788},"src/components/Lattice/Lattice.tsx":{"bytesInOutput":3651},"src/components/Tree/layout/useContainerSize.ts":{"bytesInOutput":871},"src/components/Lattice/index.ts":{"bytesInOutput":0},"src/components/Tree/Tree.tsx":{"bytesInOutput":1069},"src/components/Tree/layout/HierarchicalEdgeBundling.tsx":{"bytesInOutput":6566},"src/components/Tree/layout/slots.ts":{"bytesInOutput":668},"src/components/Tree/layout/index.ts":{"bytesInOutput":0},"src/components/Tree/layout/RadialTree.tsx":{"bytesInOutput":5009},"src/components/Tree/layout/hierarchy.ts":{"bytesInOutput":420},"src/components/Tree/layout/TidyTree.tsx":{"bytesInOutput":4855},"src/components/Tree/index.ts":{"bytesInOutput":0}},"bytes":221476},"dist/lib/neutral/chunk-7XUDLV6E.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15055},"dist/lib/neutral/chunk-7XUDLV6E.mjs":{"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/testing","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"exports":["Tree","treeTypeToTreeNode"],"inputs":{"src/components/Tree/types/types.ts":{"bytesInOutput":609},"src/components/Tree/types/tree.ts":{"bytesInOutput":6676},"src/components/Tree/types/index.ts":{"bytesInOutput":0}},"bytes":7447},"dist/lib/neutral/chunk-IKHJV3Q4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2073},"dist/lib/neutral/chunk-IKHJV3Q4.mjs":{"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"exports":["createAdapter","getNodeFillForObject"],"inputs":{"src/util/node-color.ts":{"bytesInOutput":292},"src/util/plot.ts":{"bytesInOutput":133},"src/util/index.ts":{"bytesInOutput":0}},"bytes":569},"dist/lib/neutral/containers/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":407},"dist/lib/neutral/containers/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"dist/lib/neutral/ExplorerArticle-MHEINWUL.mjs","kind":"dynamic-import"}],"exports":["ExplorerArticle"],"entryPoint":"src/containers/index.ts","inputs":{"src/containers/index.ts":{"bytesInOutput":107}},"bytes":232},"dist/lib/neutral/hooks/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2277},"dist/lib/neutral/hooks/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"exports":["useGraphModel"],"entryPoint":"src/hooks/index.ts","inputs":{"src/hooks/useGraphModel.ts":{"bytesInOutput":877},"src/hooks/index.ts":{"bytesInOutput":0}},"bytes":1003},"dist/lib/neutral/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/meta.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-C56B464A.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/meta.ts","inputs":{},"bytes":131},"dist/lib/neutral/plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":446},"dist/lib/neutral/plugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-C56B464A.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#plugin","kind":"dynamic-import","external":true}],"exports":["ExplorerPlugin"],"entryPoint":"src/plugin.ts","inputs":{"src/plugin.ts":{"bytesInOutput":111}},"bytes":272},"dist/lib/neutral/chunk-C56B464A.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2811},"dist/lib/neutral/chunk-C56B464A.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/config","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":102},"dx.config.ts":{"bytesInOutput":1957}},"bytes":2171},"dist/lib/neutral/chunk-J5LGTIGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/chunk-J5LGTIGS.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":235}}}
|
|
1
|
+
{"inputs":{"dx.config.ts":{"bytes":5464,"imports":[{"path":"@dxos/app-framework/config","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/meta.ts":{"bytes":799,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dx.config.ts","kind":"import-statement","original":"../dx.config"}],"format":"esm"},"src/types/ExplorerAction.ts":{"bytes":2116,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true}],"format":"esm"},"src/types/Graph.ts":{"bytes":4679,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/Annotation","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":610,"imports":[{"path":"src/types/ExplorerAction.ts","kind":"import-statement","original":"./ExplorerAction"},{"path":"src/types/Graph.ts","kind":"import-statement","original":"./Graph"}],"format":"esm"},"src/index.ts":{"bytes":449,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-explorer/PLUGIN.mdl":{"bytes":10512,"imports":[]},"src/ExplorerPlugin.tsx":{"bytes":3941,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-explorer/PLUGIN.mdl","kind":"import-statement","original":"../PLUGIN.mdl?raw"}],"format":"esm"},"src/capabilities/app-graph-builder.ts":{"bytes":4868,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/create-object.ts":{"bytes":4941,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":5454,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"#containers","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1492,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/app-graph-builder.ts","kind":"dynamic-import","original":"./app-graph-builder"},{"path":"src/capabilities/create-object.ts","kind":"dynamic-import","original":"./create-object"},{"path":"src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/util/node-color.ts":{"bytes":2624,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/util/plot.ts":{"bytes":1374,"imports":[],"format":"esm"},"src/util/index.ts":{"bytes":458,"imports":[{"path":"src/util/node-color.ts","kind":"import-statement","original":"./node-color"},{"path":"src/util/plot.ts","kind":"import-statement","original":"./plot"}],"format":"esm"},"src/components/Chart/Chart.tsx":{"bytes":4719,"imports":[{"path":"@observablehq/plot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"src/util/index.ts","kind":"import-statement","original":"../../util"}],"format":"esm"},"src/components/Chart/index.ts":{"bytes":369,"imports":[{"path":"src/components/Chart/Chart.tsx","kind":"import-statement","original":"./Chart"}],"format":"esm"},"data/countries-110m.js":{"bytes":187226,"imports":[],"format":"esm"},"src/components/Globe/Globe.tsx":{"bytes":7283,"imports":[{"path":"@observablehq/plot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"topojson-client","kind":"import-statement","external":true},{"path":"data/countries-110m.js","kind":"import-statement","original":"../../../data/countries-110m.js"},{"path":"src/util/index.ts","kind":"import-statement","original":"../../util"}],"format":"esm"},"src/components/Globe/index.ts":{"bytes":369,"imports":[{"path":"src/components/Globe/Globe.tsx","kind":"import-statement","original":"./Globe"}],"format":"esm"},"src/components/Graph/graph-adapter.ts":{"bytes":4073,"imports":[],"format":"esm"},"src/components/Graph/CanvasForceGraph.tsx":{"bytes":12816,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"force-graph","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"src/components/Graph/graph-adapter.ts","kind":"import-statement","original":"./graph-adapter"}],"format":"esm"},"src/components/Graph/ForceGraph.tsx":{"bytes":12153,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph/styles/graph.css","kind":"import-statement","external":true}],"format":"esm"},"src/components/Graph/index.ts":{"bytes":490,"imports":[{"path":"src/components/Graph/CanvasForceGraph.tsx","kind":"import-statement","original":"./CanvasForceGraph"},{"path":"src/components/Graph/ForceGraph.tsx","kind":"import-statement","original":"./ForceGraph"}],"format":"esm"},"src/components/Lattice/Lattice.tsx":{"bytes":19089,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph","kind":"import-statement","external":true},{"path":"src/util/node-color.ts","kind":"import-statement","original":"../../util/node-color"}],"format":"esm"},"src/components/Lattice/index.ts":{"bytes":375,"imports":[{"path":"src/components/Lattice/Lattice.tsx","kind":"import-statement","original":"./Lattice"}],"format":"esm"},"src/components/Tree/types/tree.ts":{"bytes":27746,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/testing","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/components/Tree/types/types.ts":{"bytes":3659,"imports":[],"format":"esm"},"src/components/Tree/types/index.ts":{"bytes":449,"imports":[{"path":"src/components/Tree/types/tree.ts","kind":"import-statement","original":"./tree"},{"path":"src/components/Tree/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/components/Tree/index.ts":{"bytes":852,"imports":[{"path":"src/components/Tree/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/components/Visualization/variants.ts":{"bytes":61137,"imports":[{"path":"d3","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph","kind":"import-statement","external":true},{"path":"src/util/index.ts","kind":"import-statement","original":"../../util"}],"format":"esm"},"src/components/Visualization/Visualization.tsx":{"bytes":21712,"imports":[{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph","kind":"import-statement","external":true},{"path":"src/components/Visualization/variants.ts","kind":"import-statement","original":"./variants"}],"format":"esm"},"src/components/Visualization/index.ts":{"bytes":477,"imports":[{"path":"src/components/Visualization/Visualization.tsx","kind":"import-statement","original":"./Visualization"},{"path":"src/components/Visualization/variants.ts","kind":"import-statement","original":"./variants"}],"format":"esm"},"src/components/index.ts":{"bytes":799,"imports":[{"path":"src/components/Chart/index.ts","kind":"import-statement","original":"./Chart"},{"path":"src/components/Globe/index.ts","kind":"import-statement","original":"./Globe"},{"path":"src/components/Graph/index.ts","kind":"import-statement","original":"./Graph"},{"path":"src/components/Lattice/index.ts","kind":"import-statement","original":"./Lattice"},{"path":"src/components/Tree/index.ts","kind":"import-statement","original":"./Tree"},{"path":"src/components/Visualization/index.ts","kind":"import-statement","original":"./Visualization"}],"format":"esm"},"src/containers/ExplorerArticle/ExplorerArticle.tsx":{"bytes":13159,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-query","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-components","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph/styles/graph.css","kind":"import-statement","external":true},{"path":"#components","kind":"import-statement","external":true},{"path":"#hooks","kind":"import-statement","external":true}],"format":"esm"},"src/containers/ExplorerArticle/index.ts":{"bytes":524,"imports":[{"path":"src/containers/ExplorerArticle/ExplorerArticle.tsx","kind":"import-statement","original":"./ExplorerArticle"}],"format":"esm"},"src/containers/NeighborhoodCompanion/NeighborhoodCompanion.tsx":{"bytes":11695,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph/styles/graph.css","kind":"import-statement","external":true},{"path":"#components","kind":"import-statement","external":true},{"path":"#hooks","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/containers/NeighborhoodCompanion/index.ts":{"bytes":560,"imports":[{"path":"src/containers/NeighborhoodCompanion/NeighborhoodCompanion.tsx","kind":"import-statement","original":"./NeighborhoodCompanion"}],"format":"esm"},"src/containers/index.ts":{"bytes":1046,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/containers/ExplorerArticle/index.ts","kind":"dynamic-import","original":"./ExplorerArticle"},{"path":"src/containers/NeighborhoodCompanion/index.ts","kind":"dynamic-import","original":"./NeighborhoodCompanion"}],"format":"esm"},"src/hooks/useGraphModel.ts":{"bytes":4086,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/useNeighborhoodModel.ts":{"bytes":9467,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"src/hooks/useGraphModel.ts","kind":"import-statement","original":"./useGraphModel"}],"format":"esm"},"src/hooks/index.ts":{"bytes":509,"imports":[{"path":"src/hooks/useGraphModel.ts","kind":"import-statement","original":"./useGraphModel"},{"path":"src/hooks/useNeighborhoodModel.ts","kind":"import-statement","original":"./useNeighborhoodModel"}],"format":"esm"},"src/plugin.ts":{"bytes":865,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"#plugin","kind":"dynamic-import","external":true}],"format":"esm"},"src/testing/generator.ts":{"bytes":5095,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/components/Tree/types/index.ts","kind":"import-statement","original":"../components/Tree/types"}],"format":"esm"},"src/testing/relations.ts":{"bytes":12950,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/schema/testing","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"format":"esm"},"src/testing/index.ts":{"bytes":827,"imports":[{"path":"src/ExplorerPlugin.tsx","kind":"import-statement","original":"../ExplorerPlugin"},{"path":"src/testing/generator.ts","kind":"import-statement","original":"./generator"},{"path":"src/testing/relations.ts","kind":"import-statement","original":"./relations"}],"format":"esm"},"src/translations.ts":{"bytes":3697,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-components/translations","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/neutral/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9423},"dist/lib/neutral/testing/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-4F6AT7RA.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-EZ52JY7X.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/schema/testing","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"exports":["ExplorerPlugin","buildOrgHierarchy","connectionsToEdges","createTree","generateConnectedOrgs"],"entryPoint":"src/testing/index.ts","inputs":{"src/testing/index.ts":{"bytesInOutput":0},"src/testing/generator.ts":{"bytesInOutput":1006},"src/testing/relations.ts":{"bytesInOutput":2485}},"bytes":3833},"dist/lib/neutral/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1774},"dist/lib/neutral/translations.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-components/translations","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":990}},"bytes":1114},"dist/lib/neutral/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/types/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-TTFPTHAQ.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["ExplorerAction","Graph"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":231},"dist/lib/neutral/app-graph-builder-L2TJ6GNR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2385},"dist/lib/neutral/app-graph-builder-L2TJ6GNR.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/app-graph-builder.ts","inputs":{"src/capabilities/app-graph-builder.ts":{"bytesInOutput":1074}},"bytes":1254},"dist/lib/neutral/create-object-WKIN3OB6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2506},"dist/lib/neutral/create-object-WKIN3OB6.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/create-object.ts","inputs":{"src/capabilities/create-object.ts":{"bytesInOutput":1165}},"bytes":1333},"dist/lib/neutral/react-surface-EWPG5PUQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2713},"dist/lib/neutral/react-surface-EWPG5PUQ.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"#containers","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":1399}},"bytes":1568},"dist/lib/neutral/ExplorerArticle-2WPXYTXV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7037},"dist/lib/neutral/ExplorerArticle-2WPXYTXV.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-query","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-components","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph/styles/graph.css","kind":"import-statement","external":true},{"path":"#components","kind":"import-statement","external":true},{"path":"#hooks","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/ExplorerArticle/index.ts","inputs":{"src/containers/ExplorerArticle/ExplorerArticle.tsx":{"bytesInOutput":3046},"src/containers/ExplorerArticle/index.ts":{"bytesInOutput":0}},"bytes":3227},"dist/lib/neutral/NeighborhoodCompanion-WC6E3YE6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6245},"dist/lib/neutral/NeighborhoodCompanion-WC6E3YE6.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph/styles/graph.css","kind":"import-statement","external":true},{"path":"#components","kind":"import-statement","external":true},{"path":"#hooks","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/NeighborhoodCompanion/index.ts","inputs":{"src/containers/NeighborhoodCompanion/NeighborhoodCompanion.tsx":{"bytesInOutput":2566},"src/containers/NeighborhoodCompanion/index.ts":{"bytesInOutput":0}},"bytes":2771},"dist/lib/neutral/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-TTFPTHAQ.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-C56B464A.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["ExplorerAction","Graph","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":284},"dist/lib/neutral/chunk-TTFPTHAQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3473},"dist/lib/neutral/chunk-TTFPTHAQ.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/Annotation","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"exports":["ExplorerAction_exports","Graph_exports"],"inputs":{"src/types/ExplorerAction.ts":{"bytesInOutput":574},"src/types/index.ts":{"bytesInOutput":0},"src/types/Graph.ts":{"bytesInOutput":1074}},"bytes":1853},"dist/lib/neutral/ExplorerPlugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/ExplorerPlugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-4F6AT7RA.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["ExplorerPlugin","default"],"entryPoint":"src/ExplorerPlugin.tsx","inputs":{},"bytes":224},"dist/lib/neutral/chunk-4F6AT7RA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13451},"dist/lib/neutral/chunk-4F6AT7RA.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["ExplorerPlugin","ExplorerPlugin_default"],"inputs":{"src/ExplorerPlugin.tsx":{"bytesInOutput":854},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-explorer/PLUGIN.mdl":{"bytesInOutput":11240}},"bytes":12321},"dist/lib/neutral/capabilities/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":785},"dist/lib/neutral/capabilities/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/neutral/app-graph-builder-L2TJ6GNR.mjs","kind":"dynamic-import"},{"path":"dist/lib/neutral/create-object-WKIN3OB6.mjs","kind":"dynamic-import"},{"path":"dist/lib/neutral/react-surface-EWPG5PUQ.mjs","kind":"dynamic-import"}],"exports":["AppGraphBuilder","CreateObject","ReactSurface"],"entryPoint":"src/capabilities/index.ts","inputs":{"src/capabilities/index.ts":{"bytesInOutput":357}},"bytes":516},"dist/lib/neutral/components/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":521040},"dist/lib/neutral/components/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-EZ52JY7X.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@observablehq/plot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@observablehq/plot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"topojson-client","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"force-graph","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-resize-detector","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/graph","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph/styles/graph.css","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-graph","kind":"import-statement","external":true}],"exports":["CanvasForceGraph","Chart","ForceGraph","Globe","Lattice","Tree","TreeNodeType","TreeType","VARIANTS","Visualization","getVariant","isVariant","treeTypeToTreeNode"],"entryPoint":"src/components/index.ts","inputs":{"src/components/Chart/Chart.tsx":{"bytesInOutput":1031},"src/util/node-color.ts":{"bytesInOutput":292},"src/util/index.ts":{"bytesInOutput":0},"src/util/plot.ts":{"bytesInOutput":133},"src/components/Chart/index.ts":{"bytesInOutput":0},"src/components/index.ts":{"bytesInOutput":0},"src/components/Globe/Globe.tsx":{"bytesInOutput":1707},"data/countries-110m.js":{"bytesInOutput":188376},"src/components/Globe/index.ts":{"bytesInOutput":0},"src/components/Graph/CanvasForceGraph.tsx":{"bytesInOutput":2568},"src/components/Graph/graph-adapter.ts":{"bytesInOutput":619},"src/components/Graph/index.ts":{"bytesInOutput":0},"src/components/Graph/ForceGraph.tsx":{"bytesInOutput":2797},"src/components/Lattice/Lattice.tsx":{"bytesInOutput":3708},"src/components/Lattice/index.ts":{"bytesInOutput":0},"src/components/Tree/index.ts":{"bytesInOutput":0},"src/components/Visualization/Visualization.tsx":{"bytesInOutput":3761},"src/components/Visualization/variants.ts":{"bytesInOutput":12501},"src/components/Visualization/index.ts":{"bytesInOutput":0}},"bytes":218421},"dist/lib/neutral/chunk-EZ52JY7X.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":14834},"dist/lib/neutral/chunk-EZ52JY7X.mjs":{"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/testing","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"exports":["Tree","TreeNodeType","TreeType","treeTypeToTreeNode"],"inputs":{"src/components/Tree/types/tree.ts":{"bytesInOutput":6689},"src/components/Tree/types/types.ts":{"bytesInOutput":609},"src/components/Tree/types/index.ts":{"bytesInOutput":0}},"bytes":7488},"dist/lib/neutral/containers/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":583},"dist/lib/neutral/containers/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"dist/lib/neutral/ExplorerArticle-2WPXYTXV.mjs","kind":"dynamic-import"},{"path":"dist/lib/neutral/NeighborhoodCompanion-WC6E3YE6.mjs","kind":"dynamic-import"}],"exports":["ExplorerArticle","NeighborhoodCompanion"],"entryPoint":"src/containers/index.ts","inputs":{"src/containers/index.ts":{"bytesInOutput":196}},"bytes":346},"dist/lib/neutral/hooks/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7217},"dist/lib/neutral/hooks/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["DEFAULT_NEIGHBORHOOD_DEPTH","useGraphModel","useNeighborhoodModel"],"entryPoint":"src/hooks/index.ts","inputs":{"src/hooks/useGraphModel.ts":{"bytesInOutput":877},"src/hooks/index.ts":{"bytesInOutput":0},"src/hooks/useNeighborhoodModel.ts":{"bytesInOutput":1727}},"bytes":2822},"dist/lib/neutral/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/meta.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-C56B464A.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/meta.ts","inputs":{},"bytes":131},"dist/lib/neutral/plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":446},"dist/lib/neutral/plugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-C56B464A.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#plugin","kind":"dynamic-import","external":true}],"exports":["ExplorerPlugin"],"entryPoint":"src/plugin.ts","inputs":{"src/plugin.ts":{"bytesInOutput":111}},"bytes":272},"dist/lib/neutral/chunk-C56B464A.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2811},"dist/lib/neutral/chunk-C56B464A.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/config","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":102},"dx.config.ts":{"bytesInOutput":1957}},"bytes":2171},"dist/lib/neutral/chunk-J5LGTIGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/chunk-J5LGTIGS.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":235}}}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/capabilities/react-surface.tsx
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
7
|
+
import { Surface } from "@dxos/app-framework/ui";
|
|
8
|
+
import { AppSurface } from "@dxos/app-toolkit/ui";
|
|
9
|
+
import { ExplorerArticle, NeighborhoodCompanion } from "#containers";
|
|
10
|
+
import { Graph } from "#types";
|
|
11
|
+
var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Capabilities.ReactSurface, [
|
|
12
|
+
Surface.create({
|
|
13
|
+
id: "article",
|
|
14
|
+
// TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
|
|
15
|
+
filter: AppSurface.oneOf(AppSurface.object(AppSurface.Article, Graph.Graph), AppSurface.object(AppSurface.Section, Graph.Graph)),
|
|
16
|
+
component: ({ data, role }) => {
|
|
17
|
+
return /* @__PURE__ */ React.createElement(ExplorerArticle, {
|
|
18
|
+
role,
|
|
19
|
+
subject: data.subject,
|
|
20
|
+
attendableId: data.attendableId
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}),
|
|
24
|
+
// Neighborhood companion offered on any ECHO object; `companionTo` is the active node.
|
|
25
|
+
Surface.create({
|
|
26
|
+
id: "neighborhood",
|
|
27
|
+
filter: AppSurface.allOf(AppSurface.literal(AppSurface.Article, "neighborhood"), AppSurface.companion(AppSurface.Article)),
|
|
28
|
+
component: ({ data, role }) => {
|
|
29
|
+
return /* @__PURE__ */ React.createElement(NeighborhoodCompanion, {
|
|
30
|
+
role,
|
|
31
|
+
subject: data.companionTo
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
])));
|
|
36
|
+
export {
|
|
37
|
+
react_surface_default as default
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=react-surface-EWPG5PUQ.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/ui';\nimport { AppSurface } from '@dxos/app-toolkit/ui';\n\nimport { ExplorerArticle, NeighborhoodCompanion } from '#containers';\nimport { Graph } from '#types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Capabilities.ReactSurface, [\n Surface.create({\n id: 'article',\n // TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.\n filter: AppSurface.oneOf(\n AppSurface.object(AppSurface.Article, Graph.Graph),\n AppSurface.object(AppSurface.Section, Graph.Graph),\n ),\n component: ({ data, role }) => {\n return <ExplorerArticle role={role} subject={data.subject} attendableId={data.attendableId} />;\n },\n }),\n // Neighborhood companion offered on any ECHO object; `companionTo` is the active node.\n Surface.create({\n id: 'neighborhood',\n filter: AppSurface.allOf(\n AppSurface.literal(AppSurface.Article, 'neighborhood'),\n AppSurface.companion(AppSurface.Article),\n ),\n component: ({ data, role }) => {\n return <NeighborhoodCompanion role={role} subject={data.companionTo} />;\n },\n }),\n ]),\n ),\n);\n"],
|
|
5
|
+
"mappings": ";;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,eAAe;AACxB,SAASC,kBAAkB;AAE3B,SAASC,iBAAiBC,6BAA6B;AACvD,SAASC,aAAa;AAEtB,IAAA,wBAAeL,WAAWM,WAAW,MAC5BC,eACLP,WAAWQ,YAAYT,aAAaU,cAAc;EAChDR,QAAQS,OAAO;IACbC,IAAI;;IAEJC,QAAQV,WAAWW,MACjBX,WAAWY,OAAOZ,WAAWa,SAASV,MAAMA,KAAK,GACjDH,WAAWY,OAAOZ,WAAWc,SAASX,MAAMA,KAAK,CAAA;IAEnDY,WAAW,CAAC,EAAEC,MAAMC,KAAI,MAAE;AACxB,aAAO,sBAAA,cAAChB,iBAAAA;QAAgBgB;QAAYC,SAASF,KAAKE;QAASC,cAAcH,KAAKG;;IAChF;EACF,CAAA;;EAEApB,QAAQS,OAAO;IACbC,IAAI;IACJC,QAAQV,WAAWoB,MACjBpB,WAAWqB,QAAQrB,WAAWa,SAAS,cAAA,GACvCb,WAAWsB,UAAUtB,WAAWa,OAAO,CAAA;IAEzCE,WAAW,CAAC,EAAEC,MAAMC,KAAI,MAAE;AACxB,aAAO,sBAAA,cAACf,uBAAAA;QAAsBe;QAAYC,SAASF,KAAKO;;IAC1D;EACF,CAAA;CACD,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "React", "Capabilities", "Capability", "Surface", "AppSurface", "ExplorerArticle", "NeighborhoodCompanion", "Graph", "makeModule", "succeed", "contributes", "ReactSurface", "create", "id", "filter", "oneOf", "object", "Article", "Section", "component", "data", "role", "subject", "attendableId", "allOf", "literal", "companion", "companionTo"]
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/testing/generator.ts", "../../../../src/testing/relations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Key, Obj } from '@dxos/echo';\nimport { range } from '@dxos/util';\n\nimport { Tree, type TreeNodeType } from '../components/Tree/types';\n\ntype NumberOrNumberArray = number | number[];\n\nconst random = (min: number, max: number) => Math.floor(Math.random() * (max - min + 1)) + min;\n\n/**\n * Create hierarchical tree.\n */\nexport const createTree = (spec: NumberOrNumberArray[] = [], createText?: () => string): Tree => {\n const tree = new Tree();\n Obj.update(tree.tree, () => {\n tree.root.data = { text: 'root' };\n });\n\n const createNodes = (parent: TreeNodeType, spec: NumberOrNumberArray = 0): TreeNodeType[] => {\n const count = Array.isArray(spec) ? random(spec[0], spec[1]) : spec;\n return range(count, (i) => ({\n id: Key.EntityId.random(),\n children: [],\n data: {\n text: createText?.() ?? [parent.data.text, i + 1].join('.'),\n },\n }));\n };\n\n const createChildNodes = (parent: TreeNodeType, [count = 0, ...rest]: NumberOrNumberArray[]): TreeNodeType => {\n const nodes = createNodes(parent, count);\n nodes.forEach((n) => tree.addNode(parent, n));\n if (rest.length) {\n for (const node of nodes) {\n createChildNodes(node, rest);\n }\n }\n\n return parent;\n };\n\n createChildNodes(tree.root, spec);\n return tree;\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { type Space } from '@dxos/client/echo';\nimport { Obj, Query, Relation } from '@dxos/echo';\nimport {\n type RelationSpec,\n type TypeSpec,\n type ValueGenerator,\n createObjectFactory,\n createRelationFactory,\n} from '@dxos/schema/testing';\nimport { HasConnection, Organization, Person } from '@dxos/types';\n\
|
|
5
|
-
"mappings": ";;;;;;;;;AAIA,SAASA,KAAKC,WAAW;AACzB,SAASC,aAAa;AAMtB,IAAMC,SAAS,CAACC,KAAaC,QAAgBC,KAAKC,MAAMD,KAAKH,OAAM,KAAME,MAAMD,MAAM,EAAA,IAAMA;AAKpF,IAAMI,aAAa,CAACC,OAA8B,CAAA,GAAIC,eAAAA;AAC3D,QAAMC,OAAO,IAAIC,KAAAA;AACjBC,MAAIC,OAAOH,KAAKA,MAAM,MAAA;AACpBA,SAAKI,KAAKC,OAAO;MAAEC,MAAM;IAAO;EAClC,CAAA;AAEA,QAAMC,cAAc,CAACC,QAAsBV,QAA4B,MAAC;AACtE,UAAMW,QAAQC,MAAMC,QAAQb,KAAAA,IAAQN,OAAOM,MAAK,CAAA,GAAIA,MAAK,CAAA,CAAE,IAAIA;AAC/D,WAAOc,MAAMH,OAAO,CAACI,OAAO;MAC1BC,IAAIC,IAAIC,SAASxB,OAAM;MACvByB,UAAU,CAAA;MACVZ,MAAM;QACJC,MAAMP,aAAAA,KAAkB;UAACS,OAAOH,KAAKC;UAAMO,IAAI;UAAGK,KAAK,GAAA;MACzD;IACF,EAAA;EACF;AAEA,QAAMC,mBAAmB,CAACX,QAAsB,CAACC,QAAQ,GAAMW,OAAAA,MAA4B;AACzF,UAAMC,QAAQd,YAAYC,QAAQC,KAAAA;AAClCY,UAAMC,QAAQ,CAACC,MAAMvB,KAAKwB,QAAQhB,QAAQe,CAAAA,CAAAA;AAC1C,QAAIH,KAAKK,QAAQ;AACf,iBAAWC,QAAQL,OAAO;AACxBF,yBAAiBO,MAAMN,IAAAA;MACzB;IACF;AAEA,WAAOZ;EACT;AAEAW,mBAAiBnB,KAAKI,MAAMN,IAAAA;AAC5B,SAAOE;AACT;;;AC1CA,SAAc2B,OAAOC,gBAAgB;
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Key, Obj } from '@dxos/echo';\nimport { range } from '@dxos/util';\n\nimport { Tree, type TreeNodeType } from '../components/Tree/types';\n\ntype NumberOrNumberArray = number | number[];\n\nconst random = (min: number, max: number) => Math.floor(Math.random() * (max - min + 1)) + min;\n\n/**\n * Create hierarchical tree.\n */\nexport const createTree = (spec: NumberOrNumberArray[] = [], createText?: () => string): Tree => {\n const tree = new Tree();\n Obj.update(tree.tree, () => {\n tree.root.data = { text: 'root' };\n });\n\n const createNodes = (parent: TreeNodeType, spec: NumberOrNumberArray = 0): TreeNodeType[] => {\n const count = Array.isArray(spec) ? random(spec[0], spec[1]) : spec;\n return range(count, (i) => ({\n id: Key.EntityId.random(),\n children: [],\n data: {\n text: createText?.() ?? [parent.data.text, i + 1].join('.'),\n },\n }));\n };\n\n const createChildNodes = (parent: TreeNodeType, [count = 0, ...rest]: NumberOrNumberArray[]): TreeNodeType => {\n const nodes = createNodes(parent, count);\n nodes.forEach((n) => tree.addNode(parent, n));\n if (rest.length) {\n for (const node of nodes) {\n createChildNodes(node, rest);\n }\n }\n\n return parent;\n };\n\n createChildNodes(tree.root, spec);\n return tree;\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { type Space } from '@dxos/client/echo';\nimport { Obj, Query, Relation } from '@dxos/echo';\nimport { type BundleEdge, type TreeNode } from '@dxos/react-ui-graph';\nimport {\n type RelationSpec,\n type TypeSpec,\n type ValueGenerator,\n createObjectFactory,\n createRelationFactory,\n} from '@dxos/schema/testing';\nimport { HasConnection, Organization, Person } from '@dxos/types';\n\nconst SECTORS = ['Technology', 'Finance', 'Research', 'Media'];\nconst CONNECTION_KINDS = ['partner', 'investor', 'vendor', 'customer'];\n\nexport type ConnectedOrgsResult = {\n organizations: Obj.Any[];\n people: Obj.Any[];\n connections: Obj.Any[];\n};\n\nexport type ConnectedOrgsOptions = {\n organizationCount?: number;\n personCount?: number;\n connectionCount?: number;\n};\n\n/**\n * Populate a space with Organizations, People, and HasConnection relations between organizations.\n * Uses `createObjectFactory` to generate Org/Person properties from their `GeneratorAnnotation`s,\n * then `createRelationFactory` to wire HasConnection relations (Org→Org) between them, spreading\n * the connections across the available kinds.\n */\nexport const generateConnectedOrgs = async (\n space: Space,\n generator: ValueGenerator,\n { organizationCount = 12, personCount = 24, connectionCount = 18 }: ConnectedOrgsOptions = {},\n): Promise<ConnectedOrgsResult> => {\n const specs: TypeSpec[] = [\n { type: Organization.Organization, count: organizationCount },\n // Person has a Ref to Organization — generator fills it from objects already in db.\n { type: Person.Person, count: personCount },\n ];\n\n await createObjectFactory(space.db, generator)(specs);\n\n // Distribute the requested connections evenly across the connection kinds.\n const relationSpecs: RelationSpec[] = CONNECTION_KINDS.map((kind, index) => ({\n type: HasConnection.HasConnection,\n count:\n Math.floor(connectionCount / CONNECTION_KINDS.length) +\n (index < connectionCount % CONNECTION_KINDS.length ? 1 : 0),\n data: { kind },\n }));\n const connections = await createRelationFactory(space.db, generator)(relationSpecs);\n\n const organizations = await space.db.query(Query.type(Organization.Organization)).run();\n const people = await space.db.query(Query.type(Person.Person)).run();\n return { organizations, people, connections };\n};\n\n/**\n * Build a TreeNode hierarchy: Root → Sector → Organization (leaf).\n * Organizations are deterministically bucketed into `SECTORS` so the demo has visible groups.\n */\nexport const buildOrgHierarchy = (organizations: Obj.Any[], sectors: readonly string[] = SECTORS): TreeNode => {\n // Avoid modulo-by-zero / missing-bucket crashes when the caller passes an empty sectors list.\n const activeSectors = sectors.length > 0 ? sectors : ['Uncategorized'];\n const buckets = new Map<string, TreeNode[]>();\n for (const sector of activeSectors) {\n buckets.set(sector, []);\n }\n for (let i = 0; i < organizations.length; i++) {\n const org = organizations[i] as any;\n const sector = activeSectors[i % activeSectors.length];\n buckets.get(sector)!.push({\n id: org.id,\n label: org.name ?? org.id.slice(0, 6),\n });\n }\n\n return {\n id: 'root',\n label: 'Organizations',\n children: activeSectors.map((sector) => ({\n id: `sector:${sector}`,\n label: sector,\n children: buckets.get(sector) ?? [],\n })),\n };\n};\n\n/**\n * Convert HasConnection relations into bundle edges between organization ids.\n */\nexport const connectionsToEdges = (connections: Obj.Any[]): BundleEdge[] => {\n return connections\n .map((relation): BundleEdge | undefined => {\n const source = Relation.getSource(relation as any) as any;\n const target = Relation.getTarget(relation as any) as any;\n if (!source?.id || !target?.id) {\n return undefined;\n }\n return {\n source: source.id,\n target: target.id,\n kind: (relation as any).kind,\n };\n })\n .filter((e): e is BundleEdge => Boolean(e));\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,SAASA,KAAKC,WAAW;AACzB,SAASC,aAAa;AAMtB,IAAMC,SAAS,CAACC,KAAaC,QAAgBC,KAAKC,MAAMD,KAAKH,OAAM,KAAME,MAAMD,MAAM,EAAA,IAAMA;AAKpF,IAAMI,aAAa,CAACC,OAA8B,CAAA,GAAIC,eAAAA;AAC3D,QAAMC,OAAO,IAAIC,KAAAA;AACjBC,MAAIC,OAAOH,KAAKA,MAAM,MAAA;AACpBA,SAAKI,KAAKC,OAAO;MAAEC,MAAM;IAAO;EAClC,CAAA;AAEA,QAAMC,cAAc,CAACC,QAAsBV,QAA4B,MAAC;AACtE,UAAMW,QAAQC,MAAMC,QAAQb,KAAAA,IAAQN,OAAOM,MAAK,CAAA,GAAIA,MAAK,CAAA,CAAE,IAAIA;AAC/D,WAAOc,MAAMH,OAAO,CAACI,OAAO;MAC1BC,IAAIC,IAAIC,SAASxB,OAAM;MACvByB,UAAU,CAAA;MACVZ,MAAM;QACJC,MAAMP,aAAAA,KAAkB;UAACS,OAAOH,KAAKC;UAAMO,IAAI;UAAGK,KAAK,GAAA;MACzD;IACF,EAAA;EACF;AAEA,QAAMC,mBAAmB,CAACX,QAAsB,CAACC,QAAQ,GAAMW,OAAAA,MAA4B;AACzF,UAAMC,QAAQd,YAAYC,QAAQC,KAAAA;AAClCY,UAAMC,QAAQ,CAACC,MAAMvB,KAAKwB,QAAQhB,QAAQe,CAAAA,CAAAA;AAC1C,QAAIH,KAAKK,QAAQ;AACf,iBAAWC,QAAQL,OAAO;AACxBF,yBAAiBO,MAAMN,IAAAA;MACzB;IACF;AAEA,WAAOZ;EACT;AAEAW,mBAAiBnB,KAAKI,MAAMN,IAAAA;AAC5B,SAAOE;AACT;;;AC1CA,SAAc2B,OAAOC,gBAAgB;AAErC,SAIEC,qBACAC,6BACK;AACP,SAASC,eAAeC,cAAcC,cAAc;AAEpD,IAAMC,UAAU;EAAC;EAAc;EAAW;EAAY;;AACtD,IAAMC,mBAAmB;EAAC;EAAW;EAAY;EAAU;;AAoBpD,IAAMC,wBAAwB,OACnCC,OACAC,WACA,EAAEC,oBAAoB,IAAIC,cAAc,IAAIC,kBAAkB,GAAE,IAA2B,CAAC,MAAC;AAE7F,QAAMC,QAAoB;IACxB;MAAEC,MAAMX,aAAaA;MAAcY,OAAOL;IAAkB;;IAE5D;MAAEI,MAAMV,OAAOA;MAAQW,OAAOJ;IAAY;;AAG5C,QAAMX,oBAAoBQ,MAAMQ,IAAIP,SAAAA,EAAWI,KAAAA;AAG/C,QAAMI,gBAAgCX,iBAAiBY,IAAI,CAACC,MAAMC,WAAW;IAC3EN,MAAMZ,cAAcA;IACpBa,OACEM,KAAKC,MAAMV,kBAAkBN,iBAAiBiB,MAAM,KACnDH,QAAQR,kBAAkBN,iBAAiBiB,SAAS,IAAI;IAC3DC,MAAM;MAAEL;IAAK;EACf,EAAA;AACA,QAAMM,cAAc,MAAMxB,sBAAsBO,MAAMQ,IAAIP,SAAAA,EAAWQ,aAAAA;AAErE,QAAMS,gBAAgB,MAAMlB,MAAMQ,GAAGW,MAAM7B,MAAMgB,KAAKX,aAAaA,YAAY,CAAA,EAAGyB,IAAG;AACrF,QAAMC,SAAS,MAAMrB,MAAMQ,GAAGW,MAAM7B,MAAMgB,KAAKV,OAAOA,MAAM,CAAA,EAAGwB,IAAG;AAClE,SAAO;IAAEF;IAAeG;IAAQJ;EAAY;AAC9C;AAMO,IAAMK,oBAAoB,CAACJ,eAA0BK,UAA6B1B,YAAO;AAE9F,QAAM2B,gBAAgBD,QAAQR,SAAS,IAAIQ,UAAU;IAAC;;AACtD,QAAME,UAAU,oBAAIC,IAAAA;AACpB,aAAWC,UAAUH,eAAe;AAClCC,YAAQG,IAAID,QAAQ,CAAA,CAAE;EACxB;AACA,WAASE,IAAI,GAAGA,IAAIX,cAAcH,QAAQc,KAAK;AAC7C,UAAMC,MAAMZ,cAAcW,CAAAA;AAC1B,UAAMF,SAASH,cAAcK,IAAIL,cAAcT,MAAM;AACrDU,YAAQM,IAAIJ,MAAAA,EAASK,KAAK;MACxBC,IAAIH,IAAIG;MACRC,OAAOJ,IAAIK,QAAQL,IAAIG,GAAGG,MAAM,GAAG,CAAA;IACrC,CAAA;EACF;AAEA,SAAO;IACLH,IAAI;IACJC,OAAO;IACPG,UAAUb,cAAcd,IAAI,CAACiB,YAAY;MACvCM,IAAI,UAAUN,MAAAA;MACdO,OAAOP;MACPU,UAAUZ,QAAQM,IAAIJ,MAAAA,KAAW,CAAA;IACnC,EAAA;EACF;AACF;AAKO,IAAMW,qBAAqB,CAACrB,gBAAAA;AACjC,SAAOA,YACJP,IAAI,CAAC6B,aAAAA;AACJ,UAAMC,SAASjD,SAASkD,UAAUF,QAAAA;AAClC,UAAMG,SAASnD,SAASoD,UAAUJ,QAAAA;AAClC,QAAI,CAACC,QAAQP,MAAM,CAACS,QAAQT,IAAI;AAC9B,aAAOW;IACT;AACA,WAAO;MACLJ,QAAQA,OAAOP;MACfS,QAAQA,OAAOT;MACftB,MAAO4B,SAAiB5B;IAC1B;EACF,CAAA,EACCkC,OAAO,CAACC,MAAuBC,QAAQD,CAAAA,CAAAA;AAC5C;",
|
|
6
6
|
"names": ["Key", "Obj", "range", "random", "min", "max", "Math", "floor", "createTree", "spec", "createText", "tree", "Tree", "Obj", "update", "root", "data", "text", "createNodes", "parent", "count", "Array", "isArray", "range", "i", "id", "Key", "EntityId", "children", "join", "createChildNodes", "rest", "nodes", "forEach", "n", "addNode", "length", "node", "Query", "Relation", "createObjectFactory", "createRelationFactory", "HasConnection", "Organization", "Person", "SECTORS", "CONNECTION_KINDS", "generateConnectedOrgs", "space", "generator", "organizationCount", "personCount", "connectionCount", "specs", "type", "count", "db", "relationSpecs", "map", "kind", "index", "Math", "floor", "length", "data", "connections", "organizations", "query", "run", "people", "buildOrgHierarchy", "sectors", "activeSectors", "buckets", "Map", "sector", "set", "i", "org", "get", "push", "id", "label", "name", "slice", "children", "connectionsToEdges", "relation", "source", "getSource", "target", "getTarget", "undefined", "filter", "e", "Boolean"]
|
|
7
7
|
}
|
|
@@ -21,7 +21,10 @@ var translations = [
|
|
|
21
21
|
},
|
|
22
22
|
[meta.profile.key]: {
|
|
23
23
|
"plugin.name": "Explorer",
|
|
24
|
-
"object-title.label": "Title"
|
|
24
|
+
"object-title.label": "Title",
|
|
25
|
+
"neighborhood-companion.label": "Graph",
|
|
26
|
+
"depth.label_one": "{{count}} hop",
|
|
27
|
+
"depth.label_other": "{{count}} hops"
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
30
|
},
|