@dxos/plugin-explorer 0.8.4-main.3eb6e50203 → 0.8.4-main.3fbcb4aa9b
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/ExplorerContainer-5TOK2ZEY.mjs +40 -0
- package/dist/lib/neutral/ExplorerContainer-5TOK2ZEY.mjs.map +7 -0
- package/dist/lib/neutral/ExplorerPlugin.mjs +26 -0
- package/dist/lib/neutral/ExplorerPlugin.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +11 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/{browser/chunk-HIFLWHXR.mjs → neutral/chunk-5X5ATGCS.mjs} +14 -24
- package/dist/lib/neutral/chunk-5X5ATGCS.mjs.map +7 -0
- package/dist/lib/{browser/chunk-YNQF4CPY.mjs → neutral/chunk-HPIS2WXY.mjs} +2 -2
- package/dist/lib/{browser/chunk-YNQF4CPY.mjs.map → neutral/chunk-HPIS2WXY.mjs.map} +3 -3
- package/dist/lib/{browser/chunk-JZSBQYJQ.mjs → neutral/components/index.mjs} +217 -19
- package/dist/lib/{node-esm/chunk-K5BYG7BW.mjs.map → neutral/components/index.mjs.map} +4 -4
- package/dist/lib/neutral/containers/index.mjs +9 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-object-F6TKVAGV.mjs +39 -0
- package/dist/lib/neutral/create-object-F6TKVAGV.mjs.map +7 -0
- package/dist/lib/{browser/chunk-KIXHZZ2C.mjs → neutral/hooks/index.mjs} +18 -13
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +14 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/{browser → neutral}/meta.mjs +1 -1
- package/dist/lib/neutral/plugin.mjs +12 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-U3JEY7V7.mjs +26 -0
- package/dist/lib/neutral/react-surface-U3JEY7V7.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +33 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/types/index.mjs +1 -1
- package/dist/types/data/cities.d.ts +4 -4
- package/dist/types/data/cities.d.ts.map +1 -1
- package/dist/types/data/countries-110m.d.ts +19 -22
- package/dist/types/data/countries-110m.d.ts.map +1 -1
- package/dist/types/src/ExplorerPlugin.d.ts +1 -0
- package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
- package/dist/types/src/ExplorerPlugin.test.d.ts +2 -0
- package/dist/types/src/ExplorerPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +11 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +8 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/components/Chart/Chart.d.ts.map +1 -1
- package/dist/types/src/components/Chart/Chart.stories.d.ts +4 -1
- package/dist/types/src/components/Chart/Chart.stories.d.ts.map +1 -1
- package/dist/types/src/components/Globe/Globe.d.ts.map +1 -1
- package/dist/types/src/components/Globe/Globe.stories.d.ts +5 -2
- package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
- package/dist/types/src/components/Graph/CanvasForceGraph.d.ts +13 -0
- package/dist/types/src/components/Graph/CanvasForceGraph.d.ts.map +1 -0
- package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts +17 -0
- package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts.map +1 -0
- package/dist/types/src/components/Graph/ForceGraph.d.ts +12 -5
- package/dist/types/src/components/Graph/ForceGraph.d.ts.map +1 -1
- package/dist/types/src/components/Graph/ForceGraph.stories.d.ts +4 -2
- package/dist/types/src/components/Graph/ForceGraph.stories.d.ts.map +1 -1
- package/dist/types/src/components/Graph/{adapter.d.ts → graph-adapter.d.ts} +1 -1
- package/dist/types/src/components/Graph/graph-adapter.d.ts.map +1 -0
- package/dist/types/src/components/Graph/index.d.ts +1 -1
- package/dist/types/src/components/Graph/index.d.ts.map +1 -1
- package/dist/types/src/components/Graph/testing.d.ts.map +1 -1
- package/dist/types/src/components/Tree/Tree.d.ts.map +1 -1
- package/dist/types/src/components/Tree/Tree.stories.d.ts +5 -1
- package/dist/types/src/components/Tree/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts.map +1 -1
- package/dist/types/src/components/Tree/layout/RadialTree.d.ts.map +1 -1
- package/dist/types/src/components/Tree/layout/TidyTree.d.ts.map +1 -1
- package/dist/types/src/components/Tree/testing/generator.d.ts.map +1 -1
- package/dist/types/src/components/Tree/types/tree.d.ts +7 -7
- package/dist/types/src/components/Tree/types/tree.d.ts.map +1 -1
- package/dist/types/src/components/Tree/types/types.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/plot.d.ts.map +1 -1
- package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts +6 -0
- package/dist/types/src/containers/ExplorerContainer/ExplorerContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ExplorerContainer/index.d.ts +2 -0
- package/dist/types/src/containers/ExplorerContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +3 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useGraphModel.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +3 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +28 -26
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/ExplorerAction.d.ts.map +1 -1
- package/dist/types/src/types/Graph.d.ts +3 -10
- package/dist/types/src/types/Graph.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +98 -57
- package/src/ExplorerPlugin.test.ts +26 -0
- package/src/ExplorerPlugin.tsx +7 -24
- package/src/capabilities/create-object.ts +36 -0
- package/src/capabilities/index.ts +4 -1
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +10 -9
- package/src/components/Chart/Chart.stories.tsx +15 -22
- package/src/components/Globe/Globe.stories.tsx +18 -21
- package/src/components/Graph/CanvasForceGraph.stories.tsx +83 -0
- package/src/components/Graph/CanvasForceGraph.tsx +124 -0
- package/src/components/Graph/ForceGraph.stories.tsx +76 -44
- package/src/components/Graph/ForceGraph.tsx +104 -85
- package/src/components/Graph/index.ts +1 -1
- package/src/components/Tree/Tree.stories.tsx +44 -37
- package/src/components/Tree/testing/generator.ts +1 -1
- package/src/components/Tree/types/tree.test.ts +3 -4
- package/src/components/Tree/types/tree.ts +15 -15
- package/src/components/index.ts +0 -4
- package/src/{components → containers/ExplorerContainer}/ExplorerContainer.tsx +18 -19
- package/src/containers/ExplorerContainer/index.ts +5 -0
- package/src/containers/index.ts +7 -0
- package/src/hooks/useGraphModel.ts +14 -10
- package/src/index.ts +1 -4
- package/src/meta.ts +1 -1
- package/src/plugin.ts +9 -0
- package/src/translations.ts +14 -13
- package/src/types/ExplorerAction.ts +1 -2
- package/src/types/Graph.ts +11 -24
- package/src/typings.d.ts +8 -0
- package/dist/lib/browser/ExplorerContainer-46BHUF6R.mjs +0 -45
- package/dist/lib/browser/ExplorerContainer-46BHUF6R.mjs.map +0 -7
- package/dist/lib/browser/chunk-HIFLWHXR.mjs.map +0 -7
- package/dist/lib/browser/chunk-JZSBQYJQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-KIXHZZ2C.mjs.map +0 -7
- package/dist/lib/browser/chunk-MGBT2ZFU.mjs +0 -177
- package/dist/lib/browser/chunk-MGBT2ZFU.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -101
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-TPQAT5EI.mjs +0 -36
- package/dist/lib/browser/react-surface-TPQAT5EI.mjs.map +0 -7
- package/dist/lib/node-esm/ExplorerContainer-OZNG47QB.mjs +0 -46
- package/dist/lib/node-esm/ExplorerContainer-OZNG47QB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3OE6TBJI.mjs +0 -84
- package/dist/lib/node-esm/chunk-3OE6TBJI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ASRWO2N5.mjs +0 -37
- package/dist/lib/node-esm/chunk-ASRWO2N5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DK77RB6M.mjs +0 -26
- package/dist/lib/node-esm/chunk-DK77RB6M.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-K5BYG7BW.mjs +0 -11078
- package/dist/lib/node-esm/chunk-YWJBDETV.mjs +0 -179
- package/dist/lib/node-esm/chunk-YWJBDETV.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -102
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/meta.mjs +0 -9
- package/dist/lib/node-esm/meta.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-CYHGJJDU.mjs +0 -37
- package/dist/lib/node-esm/react-surface-CYHGJJDU.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -11
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/components/ExplorerContainer.d.ts +0 -7
- package/dist/types/src/components/ExplorerContainer.d.ts.map +0 -1
- package/dist/types/src/components/Graph/D3ForceGraph.d.ts +0 -14
- package/dist/types/src/components/Graph/D3ForceGraph.d.ts.map +0 -1
- package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts +0 -15
- package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts.map +0 -1
- package/dist/types/src/components/Graph/adapter.d.ts.map +0 -1
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/components/Graph/D3ForceGraph.stories.tsx +0 -83
- package/src/components/Graph/D3ForceGraph.tsx +0 -101
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
- /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/meta.mjs.map +0 -0
- /package/dist/lib/{node-esm → neutral}/types/index.mjs.map +0 -0
- /package/src/components/Graph/{adapter.ts → graph-adapter.ts} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
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 Filter, type Queue, type Space } from '@dxos/client/echo';\nimport { SpaceGraphModel, type SpaceGraphModelOptions } from '@dxos/schema';\n\n// TODO(burdon): Factor out.\nexport const useGraphModel = (\n space: Space | undefined,\n filter?: Filter.Any | undefined,\n options?: SpaceGraphModelOptions,\n queue?: Queue,\n): SpaceGraphModel | undefined => {\n const registry = useCapability(Capabilities.AtomRegistry);\n const [model, setModel] = useState<SpaceGraphModel | undefined>(undefined);\n useEffect(() => {\n if (!space) {\n void model?.close();\n setModel(undefined);\n return;\n }\n\n // TODO(burdon): Does this need to be a dependency?\n if (!model || model.queue !== queue) {\n const model = new SpaceGraphModel(registry).setFilter(filter).setOptions(options);\n void model.open(space.db, queue);\n setModel(model);\n } else {\n model.setFilter(filter).setOptions(options);\n }\n }, [space, filter, options, queue, registry]);\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,OACAC,QACAC,SACAC,UAAAA;AAEA,QAAMC,WAAWC,cAAcC,aAAaC,YAAY;AACxD,QAAM,CAACC,OAAOC,QAAAA,IAAYC,SAAsCC,MAAAA;AAChEC,YAAU,MAAA;AACR,QAAI,CAACZ,OAAO;AACV,WAAKQ,OAAOK,MAAAA;AACZJ,eAASE,MAAAA;AACT;IACF;AAGA,QAAI,CAACH,SAASA,MAAML,UAAUA,OAAO;AACnC,YAAMK,SAAQ,IAAIM,gBAAgBV,QAAAA,EAAUW,UAAUd,MAAAA,EAAQe,WAAWd,OAAAA;AACzE,WAAKM,OAAMS,KAAKjB,MAAMkB,IAAIf,KAAAA;AAC1BM,eAASD,MAAAA;IACX,OAAO;AACLA,YAAMO,UAAUd,MAAAA,EAAQe,WAAWd,OAAAA;IACrC;EACF,GAAG;IAACF;IAAOC;IAAQC;IAASC;IAAOC;GAAS;AAE5C,SAAOI;AACT;",
|
|
6
|
-
"names": ["useEffect", "useState", "Capabilities", "useCapability", "SpaceGraphModel", "useGraphModel", "space", "filter", "options", "queue", "registry", "useCapability", "Capabilities", "AtomRegistry", "model", "setModel", "useState", "undefined", "useEffect", "close", "SpaceGraphModel", "setFilter", "setOptions", "open", "db"]
|
|
7
|
-
}
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
// src/components/Graph/D3ForceGraph.tsx
|
|
2
|
-
import React, { useCallback, useEffect, useMemo, useRef } from "react";
|
|
3
|
-
import { Obj } from "@dxos/echo";
|
|
4
|
-
import { SelectionModel } from "@dxos/graph";
|
|
5
|
-
import { GraphForceProjector, SVG } from "@dxos/react-ui-graph";
|
|
6
|
-
import { getHashStyles } from "@dxos/ui-theme";
|
|
7
|
-
import "@dxos/react-ui-graph/styles/graph.css";
|
|
8
|
-
var D3ForceGraph = ({ classNames, model, selection: _selection, grid, ...props }) => {
|
|
9
|
-
const context = useRef(null);
|
|
10
|
-
const projector = useMemo(() => {
|
|
11
|
-
if (context.current) {
|
|
12
|
-
return new GraphForceProjector(context.current, {
|
|
13
|
-
attributes: {
|
|
14
|
-
linkForce: (edge) => {
|
|
15
|
-
return edge.data?.object?.active !== false;
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
forces: {
|
|
19
|
-
point: {
|
|
20
|
-
strength: 0.01
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}, [
|
|
26
|
-
context.current
|
|
27
|
-
]);
|
|
28
|
-
const graph = useRef(null);
|
|
29
|
-
const selection = useMemo(() => _selection ?? new SelectionModel(), [
|
|
30
|
-
_selection
|
|
31
|
-
]);
|
|
32
|
-
useEffect(() => selection.subscribe(() => graph.current?.repaint()), [
|
|
33
|
-
selection
|
|
34
|
-
]);
|
|
35
|
-
const handleSelect = useCallback((node) => {
|
|
36
|
-
if (selection.contains(node.id)) {
|
|
37
|
-
selection.remove(node.id);
|
|
38
|
-
} else {
|
|
39
|
-
selection.add(node.id);
|
|
40
|
-
}
|
|
41
|
-
}, [
|
|
42
|
-
selection
|
|
43
|
-
]);
|
|
44
|
-
return /* @__PURE__ */ React.createElement(SVG.Root, {
|
|
45
|
-
ref: context,
|
|
46
|
-
classNames
|
|
47
|
-
}, /* @__PURE__ */ React.createElement(SVG.Markers, null), grid && /* @__PURE__ */ React.createElement(SVG.Grid, {
|
|
48
|
-
axis: true
|
|
49
|
-
}), /* @__PURE__ */ React.createElement(SVG.Zoom, {
|
|
50
|
-
extent: [
|
|
51
|
-
1 / 2,
|
|
52
|
-
2
|
|
53
|
-
]
|
|
54
|
-
}, /* @__PURE__ */ React.createElement(SVG.Graph, {
|
|
55
|
-
...props,
|
|
56
|
-
ref: graph,
|
|
57
|
-
model,
|
|
58
|
-
projector,
|
|
59
|
-
labels: {
|
|
60
|
-
text: (node) => {
|
|
61
|
-
return node.data?.data.label ?? node.id;
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
attributes: {
|
|
65
|
-
node: (node) => {
|
|
66
|
-
const obj = node.data?.data.object;
|
|
67
|
-
return {
|
|
68
|
-
data: {
|
|
69
|
-
color: getHashStyles(obj && Obj.getTypename(obj))?.hue
|
|
70
|
-
},
|
|
71
|
-
classes: {
|
|
72
|
-
"dx-selected": selection.contains(node.id)
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
onSelect: handleSelect
|
|
78
|
-
})));
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
// src/components/Graph/ForceGraph.tsx
|
|
82
|
-
import { forceLink, forceManyBody } from "d3";
|
|
83
|
-
import NativeForceGraph from "force-graph";
|
|
84
|
-
import React2, { useEffect as useEffect2, useRef as useRef2, useState } from "react";
|
|
85
|
-
import { useResizeDetector } from "react-resize-detector";
|
|
86
|
-
import { filterObjectsSync } from "@dxos/plugin-search";
|
|
87
|
-
|
|
88
|
-
// src/components/Graph/adapter.ts
|
|
89
|
-
var GraphAdapter = class {
|
|
90
|
-
graph;
|
|
91
|
-
_nodes = [];
|
|
92
|
-
_links = [];
|
|
93
|
-
constructor(graph) {
|
|
94
|
-
this.graph = graph;
|
|
95
|
-
this._nodes = graph.nodes.map((node) => ({
|
|
96
|
-
id: node.id,
|
|
97
|
-
type: node.type,
|
|
98
|
-
data: node.data
|
|
99
|
-
}));
|
|
100
|
-
const nodeIds = new Set(this._nodes.map((node) => node.id));
|
|
101
|
-
this._links = graph.edges.filter((edge) => nodeIds.has(edge.source) && nodeIds.has(edge.target)).map((edge) => ({
|
|
102
|
-
type: edge.type,
|
|
103
|
-
source: edge.source,
|
|
104
|
-
target: edge.target,
|
|
105
|
-
data: edge.data
|
|
106
|
-
}));
|
|
107
|
-
}
|
|
108
|
-
get nodes() {
|
|
109
|
-
return this._nodes;
|
|
110
|
-
}
|
|
111
|
-
get links() {
|
|
112
|
-
return this._links;
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
// src/components/Graph/ForceGraph.tsx
|
|
117
|
-
var ForceGraph = ({ model, match }) => {
|
|
118
|
-
const { ref, width, height } = useResizeDetector({
|
|
119
|
-
refreshRate: 200
|
|
120
|
-
});
|
|
121
|
-
const rootRef = useRef2(null);
|
|
122
|
-
const forceGraph = useRef2(null);
|
|
123
|
-
const filteredRef = useRef2([]);
|
|
124
|
-
filteredRef.current = filterObjectsSync(model?.objects ?? [], match);
|
|
125
|
-
const [data, setData] = useState();
|
|
126
|
-
useEffect2(() => {
|
|
127
|
-
return model?.subscribe((model2) => {
|
|
128
|
-
setData(new GraphAdapter(model2.graph));
|
|
129
|
-
});
|
|
130
|
-
}, [
|
|
131
|
-
model
|
|
132
|
-
]);
|
|
133
|
-
useEffect2(() => {
|
|
134
|
-
if (rootRef.current) {
|
|
135
|
-
forceGraph.current = new NativeForceGraph(rootRef.current).nodeRelSize(6).nodeLabel((node) => node.type === "schema" ? node.data.typename : node.data.label ?? node.id).nodeAutoColorBy((node) => node.type === "schema" ? "schema" : node.data.typename).linkAutoColorBy((link) => link.type);
|
|
136
|
-
}
|
|
137
|
-
return () => {
|
|
138
|
-
forceGraph.current?.pauseAnimation().graphData({
|
|
139
|
-
nodes: [],
|
|
140
|
-
links: []
|
|
141
|
-
});
|
|
142
|
-
forceGraph.current = null;
|
|
143
|
-
};
|
|
144
|
-
}, []);
|
|
145
|
-
useEffect2(() => {
|
|
146
|
-
if (!data || !width || !height || !forceGraph.current) {
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
forceGraph.current.pauseAnimation().width(width).height(height).onEngineStop(() => {
|
|
150
|
-
handleZoomToFit();
|
|
151
|
-
}).onNodeClick((node) => {
|
|
152
|
-
forceGraph.current?.emitParticle(node);
|
|
153
|
-
}).d3Force("link", forceLink().distance(160).strength(0.5)).d3Force("charge", forceManyBody().strength(-30)).graphData(data).warmupTicks(100).cooldownTime(1e3).resumeAnimation();
|
|
154
|
-
}, [
|
|
155
|
-
data,
|
|
156
|
-
width,
|
|
157
|
-
height,
|
|
158
|
-
forceGraph.current
|
|
159
|
-
]);
|
|
160
|
-
const handleZoomToFit = () => {
|
|
161
|
-
forceGraph.current?.zoomToFit(400, 40);
|
|
162
|
-
};
|
|
163
|
-
return /* @__PURE__ */ React2.createElement("div", {
|
|
164
|
-
ref,
|
|
165
|
-
className: "relative grow",
|
|
166
|
-
onClick: handleZoomToFit
|
|
167
|
-
}, /* @__PURE__ */ React2.createElement("div", {
|
|
168
|
-
ref: rootRef,
|
|
169
|
-
className: "absolute inset-0"
|
|
170
|
-
}));
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
export {
|
|
174
|
-
D3ForceGraph,
|
|
175
|
-
ForceGraph
|
|
176
|
-
};
|
|
177
|
-
//# sourceMappingURL=chunk-MGBT2ZFU.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/Graph/D3ForceGraph.tsx", "../../../src/components/Graph/ForceGraph.tsx", "../../../src/components/Graph/adapter.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport { Obj } from '@dxos/echo';\nimport { SelectionModel } from '@dxos/graph';\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport {\n type GraphController,\n GraphForceProjector,\n type GraphLayoutNode,\n type GraphProps,\n SVG,\n type SVGContext,\n} from '@dxos/react-ui-graph';\nimport { type SpaceGraphEdge, type SpaceGraphModel, type SpaceGraphNode } from '@dxos/schema';\nimport { getHashStyles } from '@dxos/ui-theme';\n\nimport '@dxos/react-ui-graph/styles/graph.css';\n\nexport type D3ForceGraphProps = ThemedClassName<\n {\n model?: SpaceGraphModel;\n match?: RegExp;\n selection?: SelectionModel;\n grid?: boolean;\n } & Pick<GraphProps, 'drag'>\n>;\n\nexport const D3ForceGraph = ({ classNames, model, selection: _selection, grid, ...props }: D3ForceGraphProps) => {\n const context = useRef<SVGContext>(null);\n const projector = useMemo<GraphForceProjector | undefined>(() => {\n if (context.current) {\n return new GraphForceProjector(context.current, {\n attributes: {\n linkForce: (edge) => {\n // TODO(burdon): Check type (currently assumes Employee property).\n // Edge shouldn't contribute to force if it's not active.\n return edge.data?.object?.active !== false;\n },\n },\n forces: {\n point: {\n strength: 0.01,\n },\n },\n });\n }\n }, [context.current]);\n\n const graph = useRef<GraphController>(null);\n const selection = useMemo(() => _selection ?? new SelectionModel(), [_selection]);\n useEffect(() => selection.subscribe(() => graph.current?.repaint()), [selection]);\n\n const handleSelect = useCallback<NonNullable<GraphProps['onSelect']>>(\n (node) => {\n if (selection.contains(node.id)) {\n selection.remove(node.id);\n } else {\n selection.add(node.id);\n }\n },\n [selection],\n );\n\n return (\n <SVG.Root ref={context} classNames={classNames}>\n <SVG.Markers />\n {grid && <SVG.Grid axis />}\n <SVG.Zoom extent={[1 / 2, 2]}>\n <SVG.Graph<SpaceGraphNode, SpaceGraphEdge>\n {...props}\n ref={graph}\n model={model}\n projector={projector}\n labels={{\n text: (node) => {\n return node.data?.data.label ?? node.id;\n },\n }}\n attributes={{\n node: (node: GraphLayoutNode<SpaceGraphNode>) => {\n const obj = node.data?.data.object;\n return {\n data: {\n color: getHashStyles(obj && Obj.getTypename(obj))?.hue,\n },\n classes: {\n 'dx-selected': selection.contains(node.id),\n },\n };\n },\n }}\n onSelect={handleSelect}\n />\n </SVG.Zoom>\n </SVG.Root>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { forceLink, forceManyBody } from 'd3';\nimport NativeForceGraph from 'force-graph';\nimport React, { type FC, useEffect, useRef, useState } from 'react';\nimport { useResizeDetector } from 'react-resize-detector';\n\nimport { type SearchResult, filterObjectsSync } from '@dxos/plugin-search';\nimport { type SpaceGraphModel } from '@dxos/schema';\n\nimport { GraphAdapter } from './adapter';\n\nexport type ForceGraphProps = {\n model?: SpaceGraphModel;\n match?: RegExp;\n};\n\nexport const ForceGraph: FC<ForceGraphProps> = ({ model, match }) => {\n const { ref, width, height } = useResizeDetector({ refreshRate: 200 });\n const rootRef = useRef<HTMLDivElement>(null);\n const forceGraph = useRef<NativeForceGraph>(null);\n\n const filteredRef = useRef<SearchResult[]>([]);\n filteredRef.current = filterObjectsSync(model?.objects ?? [], match);\n\n const [data, setData] = useState<GraphAdapter>();\n useEffect(() => {\n return model?.subscribe((model) => {\n setData(new GraphAdapter(model.graph));\n });\n }, [model]);\n\n useEffect(() => {\n if (rootRef.current) {\n // https://github.com/vasturiano/force-graph\n // https://github.com/vasturiano/3d-force-graph\n forceGraph.current = new NativeForceGraph(rootRef.current)\n // https://github.com/vasturiano/force-graph?tab=readme-ov-file#node-styling\n .nodeRelSize(6)\n .nodeLabel((node: any) => (node.type === 'schema' ? node.data.typename : (node.data.label ?? node.id)))\n .nodeAutoColorBy((node: any) => (node.type === 'schema' ? 'schema' : node.data.typename))\n\n // https://github.com/vasturiano/force-graph?tab=readme-ov-file#link-styling\n .linkAutoColorBy((link: any) => link.type);\n }\n\n return () => {\n forceGraph.current?.pauseAnimation().graphData({ nodes: [], links: [] });\n forceGraph.current = null;\n };\n }, []);\n\n useEffect(() => {\n if (!data || !width || !height || !forceGraph.current) {\n return;\n }\n\n // https://github.com/vasturiano/force-graph?tab=readme-ov-file#container-layout\n forceGraph.current\n .pauseAnimation()\n .width(width)\n .height(height)\n .onEngineStop(() => {\n handleZoomToFit();\n })\n .onNodeClick((node: any) => {\n forceGraph.current?.emitParticle(node);\n })\n\n // https://github.com/vasturiano/force-graph?tab=readme-ov-file#force-engine-d3-force-configuration\n // .d3Force('center', forceCenter().strength(0.9))\n .d3Force('link', forceLink().distance(160).strength(0.5))\n .d3Force('charge', forceManyBody().strength(-30))\n\n .graphData(data)\n .warmupTicks(100)\n .cooldownTime(1_000)\n .resumeAnimation();\n }, [data, width, height, forceGraph.current]);\n\n const handleZoomToFit = () => {\n forceGraph.current?.zoomToFit(400, 40);\n };\n\n return (\n <div ref={ref} className='relative grow' onClick={handleZoomToFit}>\n <div ref={rootRef} className='absolute inset-0' />\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Graph } from '@dxos/graph';\n\nexport type GraphNode = {\n id?: string;\n};\n\nexport type GraphLink = {\n source?: string;\n target?: string;\n};\n\nexport type GraphData = {\n nodes: GraphNode[];\n links: GraphLink[];\n};\n\n/**\n * Map common graph to force-graph format.\n */\nexport class GraphAdapter implements GraphData {\n private readonly _nodes: GraphNode[] = [];\n private readonly _links: GraphLink[] = [];\n\n constructor(private readonly graph: Graph.Any) {\n this._nodes = graph.nodes.map((node: Graph.Node.Any) => ({\n id: node.id,\n type: node.type,\n data: node.data,\n }));\n\n // Build a set of node IDs for efficient lookup.\n const nodeIds = new Set(this._nodes.map((node) => node.id));\n\n // Filter out edges where source or target node doesn't exist.\n this._links = graph.edges\n .filter((edge: Graph.Edge.Any) => nodeIds.has(edge.source) && nodeIds.has(edge.target))\n .map((edge: Graph.Edge.Any) => ({\n type: edge.type,\n source: edge.source,\n target: edge.target,\n data: edge.data,\n }));\n }\n\n get nodes() {\n return this._nodes;\n }\n\n get links() {\n return this._links;\n }\n}\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["React", "useCallback", "useEffect", "useMemo", "useRef", "Obj", "SelectionModel", "GraphForceProjector", "SVG", "getHashStyles", "D3ForceGraph", "classNames", "model", "selection", "_selection", "grid", "props", "context", "useRef", "projector", "useMemo", "current", "GraphForceProjector", "attributes", "linkForce", "edge", "data", "object", "active", "forces", "point", "strength", "graph", "SelectionModel", "useEffect", "subscribe", "repaint", "handleSelect", "useCallback", "node", "contains", "id", "remove", "add", "SVG", "Root", "ref", "Markers", "Grid", "axis", "Zoom", "extent", "Graph", "labels", "text", "label", "obj", "color", "getHashStyles", "Obj", "getTypename", "hue", "classes", "onSelect", "forceLink", "forceManyBody", "NativeForceGraph", "React", "useEffect", "useRef", "useState", "useResizeDetector", "filterObjectsSync", "GraphAdapter", "_nodes", "_links", "graph", "nodes", "map", "node", "id", "type", "data", "nodeIds", "Set", "edges", "filter", "edge", "has", "source", "target", "links", "ForceGraph", "model", "match", "ref", "width", "height", "useResizeDetector", "refreshRate", "rootRef", "useRef", "forceGraph", "filteredRef", "current", "filterObjectsSync", "objects", "data", "setData", "useState", "useEffect", "subscribe", "GraphAdapter", "graph", "NativeForceGraph", "nodeRelSize", "nodeLabel", "node", "type", "typename", "label", "id", "nodeAutoColorBy", "linkAutoColorBy", "link", "pauseAnimation", "graphData", "nodes", "links", "onEngineStop", "handleZoomToFit", "onNodeClick", "emitParticle", "d3Force", "forceLink", "distance", "strength", "forceManyBody", "warmupTicks", "cooldownTime", "resumeAnimation", "zoomToFit", "React", "div", "className", "onClick"]
|
|
7
|
-
}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useGraphModel
|
|
3
|
-
} from "./chunk-KIXHZZ2C.mjs";
|
|
4
|
-
import {
|
|
5
|
-
Chart,
|
|
6
|
-
ExplorerContainer,
|
|
7
|
-
Globe,
|
|
8
|
-
Tree,
|
|
9
|
-
defaultTreeLayoutSlots
|
|
10
|
-
} from "./chunk-JZSBQYJQ.mjs";
|
|
11
|
-
import {
|
|
12
|
-
meta
|
|
13
|
-
} from "./chunk-YNQF4CPY.mjs";
|
|
14
|
-
import {
|
|
15
|
-
ExplorerAction_exports,
|
|
16
|
-
Graph_exports
|
|
17
|
-
} from "./chunk-HIFLWHXR.mjs";
|
|
18
|
-
import {
|
|
19
|
-
D3ForceGraph,
|
|
20
|
-
ForceGraph
|
|
21
|
-
} from "./chunk-MGBT2ZFU.mjs";
|
|
22
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
23
|
-
|
|
24
|
-
// src/ExplorerPlugin.tsx
|
|
25
|
-
import * as Effect from "effect/Effect";
|
|
26
|
-
import { Plugin } from "@dxos/app-framework";
|
|
27
|
-
import { AppPlugin } from "@dxos/app-toolkit";
|
|
28
|
-
import { Type as Type2 } from "@dxos/echo";
|
|
29
|
-
import { View } from "@dxos/schema";
|
|
30
|
-
|
|
31
|
-
// src/capabilities/react-surface/index.ts
|
|
32
|
-
import { Capability } from "@dxos/app-framework";
|
|
33
|
-
var ReactSurface = Capability.lazy("ReactSurface", () => import("./react-surface-TPQAT5EI.mjs"));
|
|
34
|
-
|
|
35
|
-
// src/translations.ts
|
|
36
|
-
import { Type } from "@dxos/echo";
|
|
37
|
-
import { translations as componentsTranslations } from "@dxos/react-ui-components";
|
|
38
|
-
var translations = [
|
|
39
|
-
{
|
|
40
|
-
"en-US": {
|
|
41
|
-
[Type.getTypename(Graph_exports.Graph)]: {
|
|
42
|
-
"typename label": "Explorer",
|
|
43
|
-
"typename label_zero": "Explorers",
|
|
44
|
-
"typename label_one": "Explorer",
|
|
45
|
-
"typename label_other": "Explorers",
|
|
46
|
-
"object name placeholder": "New explorer",
|
|
47
|
-
"rename object label": "Rename explorer",
|
|
48
|
-
"delete object label": "Delete explorer",
|
|
49
|
-
"object deleted label": "Explorer deleted"
|
|
50
|
-
},
|
|
51
|
-
[meta.id]: {
|
|
52
|
-
"plugin name": "Explorer",
|
|
53
|
-
"object title label": "Title"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
...componentsTranslations
|
|
58
|
-
];
|
|
59
|
-
|
|
60
|
-
// src/ExplorerPlugin.tsx
|
|
61
|
-
var ExplorerPlugin = Plugin.define(meta).pipe(AppPlugin.addMetadataModule({
|
|
62
|
-
metadata: {
|
|
63
|
-
id: Type2.getTypename(Graph_exports.Graph),
|
|
64
|
-
metadata: {
|
|
65
|
-
icon: "ph--graph--regular",
|
|
66
|
-
iconHue: "green",
|
|
67
|
-
inputSchema: ExplorerAction_exports.GraphProps,
|
|
68
|
-
createObject: (props, { db }) => Effect.promise(async () => {
|
|
69
|
-
const { view } = await View.makeFromDatabase({
|
|
70
|
-
db,
|
|
71
|
-
typename: props.typename
|
|
72
|
-
});
|
|
73
|
-
return Graph_exports.make({
|
|
74
|
-
name: props.name,
|
|
75
|
-
view
|
|
76
|
-
});
|
|
77
|
-
})
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}), AppPlugin.addSchemaModule({
|
|
81
|
-
schema: [
|
|
82
|
-
Graph_exports.Graph
|
|
83
|
-
]
|
|
84
|
-
}), AppPlugin.addSurfaceModule({
|
|
85
|
-
activate: ReactSurface
|
|
86
|
-
}), AppPlugin.addTranslationsModule({
|
|
87
|
-
translations
|
|
88
|
-
}), Plugin.make);
|
|
89
|
-
export {
|
|
90
|
-
Chart,
|
|
91
|
-
D3ForceGraph,
|
|
92
|
-
ExplorerContainer,
|
|
93
|
-
ExplorerPlugin,
|
|
94
|
-
ForceGraph,
|
|
95
|
-
Globe,
|
|
96
|
-
Tree,
|
|
97
|
-
defaultTreeLayoutSlots,
|
|
98
|
-
meta,
|
|
99
|
-
useGraphModel
|
|
100
|
-
};
|
|
101
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/ExplorerPlugin.tsx", "../../../src/capabilities/react-surface/index.ts", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Type } from '@dxos/echo';\nimport { type CreateObject } from '@dxos/plugin-space/types';\nimport { View } from '@dxos/schema';\n\nimport { ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\nimport { ExplorerAction, Graph } from './types';\n\nexport const ExplorerPlugin = Plugin.define(meta).pipe(\n AppPlugin.addMetadataModule({\n metadata: {\n id: Type.getTypename(Graph.Graph),\n metadata: {\n icon: 'ph--graph--regular',\n iconHue: 'green',\n inputSchema: ExplorerAction.GraphProps,\n createObject: ((props, { db }) =>\n Effect.promise(async () => {\n const { view } = await View.makeFromDatabase({ db, typename: props.typename });\n return Graph.make({ name: props.name, view });\n })) satisfies CreateObject,\n },\n },\n }),\n AppPlugin.addSchemaModule({ schema: [Graph.Graph] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Type } from '@dxos/echo';\nimport { type Resource } from '@dxos/react-ui';\nimport { translations as componentsTranslations } from '@dxos/react-ui-components';\n\nimport { meta } from './meta';\nimport { Graph } from './types';\n\nexport const translations = [\n {\n 'en-US': {\n [Type.getTypename(Graph.Graph)]: {\n 'typename label': 'Explorer',\n 'typename label_zero': 'Explorers',\n 'typename label_one': 'Explorer',\n 'typename label_other': 'Explorers',\n 'object name placeholder': 'New explorer',\n 'rename object label': 'Rename explorer',\n 'delete object label': 'Delete explorer',\n 'object deleted label': 'Explorer deleted',\n },\n [meta.id]: {\n 'plugin name': 'Explorer',\n 'object title label': 'Title',\n },\n },\n },\n ...componentsTranslations,\n] as const satisfies Resource[];\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,QAAAA,aAAY;AAErB,SAASC,YAAY;;;ACNrB,SAASC,kBAAkB;AAEpB,IAAMC,eAAeC,WAAWC,KAAK,gBAAgB,MAAM,OAAO,8BAAA,CAAA;;;ACFzE,SAASC,YAAY;AAErB,SAASC,gBAAgBC,8BAA8B;AAKhD,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,KAAKC,YAAYC,cAAMA,KAAK,CAAA,GAAI;QAC/B,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;QAC3B,uBAAuB;QACvB,uBAAuB;QACvB,wBAAwB;MAC1B;MACA,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,sBAAsB;MACxB;IACF;EACF;KACGC;;;;AFbE,IAAMC,iBAAiBC,OAAOC,OAAOC,IAAAA,EAAMC,KAChDC,UAAUC,kBAAkB;EAC1BC,UAAU;IACRC,IAAIC,MAAKC,YAAYC,cAAMA,KAAK;IAChCJ,UAAU;MACRK,MAAM;MACNC,SAAS;MACTC,aAAaC,uBAAeC;MAC5BC,cAAe,CAACC,OAAO,EAAEC,GAAE,MAClBC,eAAQ,YAAA;AACb,cAAM,EAAEC,KAAI,IAAK,MAAMC,KAAKC,iBAAiB;UAAEJ;UAAIK,UAAUN,MAAMM;QAAS,CAAA;AAC5E,eAAOb,cAAMc,KAAK;UAAEC,MAAMR,MAAMQ;UAAML;QAAK,CAAA;MAC7C,CAAA;IACJ;EACF;AACF,CAAA,GACAhB,UAAUsB,gBAAgB;EAAEC,QAAQ;IAACjB,cAAMA;;AAAO,CAAA,GAClDN,UAAUwB,iBAAiB;EAAEC,UAAUC;AAAa,CAAA,GACpD1B,UAAU2B,sBAAsB;EAAEC;AAAa,CAAA,GAC/ChC,OAAOwB,IAAI;",
|
|
6
|
-
"names": ["Effect", "Plugin", "AppPlugin", "Type", "View", "Capability", "ReactSurface", "Capability", "lazy", "Type", "translations", "componentsTranslations", "translations", "Type", "getTypename", "Graph", "meta", "id", "componentsTranslations", "ExplorerPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addMetadataModule", "metadata", "id", "Type", "getTypename", "Graph", "icon", "iconHue", "inputSchema", "ExplorerAction", "GraphProps", "createObject", "props", "db", "promise", "view", "View", "makeFromDatabase", "typename", "make", "name", "addSchemaModule", "schema", "addSurfaceModule", "activate", "ReactSurface", "addTranslationsModule", "translations"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"inputs":{"src/components/plot.ts":{"bytes":1407,"imports":[],"format":"esm"},"src/components/Chart/Chart.tsx":{"bytes":4817,"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/components/plot.ts","kind":"import-statement","original":"../plot"}],"format":"esm"},"src/components/Chart/index.ts":{"bytes":469,"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":7377,"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/components/plot.ts","kind":"import-statement","original":"../plot"}],"format":"esm"},"src/components/Globe/index.ts":{"bytes":469,"imports":[{"path":"src/components/Globe/Globe.tsx","kind":"import-statement","original":"./Globe"}],"format":"esm"},"src/components/Graph/D3ForceGraph.tsx":{"bytes":9907,"imports":[{"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-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/adapter.ts":{"bytes":4167,"imports":[],"format":"esm"},"src/components/Graph/ForceGraph.tsx":{"bytes":10625,"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/plugin-search","kind":"import-statement","external":true},{"path":"src/components/Graph/adapter.ts","kind":"import-statement","original":"./adapter"}],"format":"esm"},"src/components/Graph/index.ts":{"bytes":582,"imports":[{"path":"src/components/Graph/D3ForceGraph.tsx","kind":"import-statement","original":"./D3ForceGraph"},{"path":"src/components/Graph/ForceGraph.tsx","kind":"import-statement","original":"./ForceGraph"}],"format":"esm"},"src/components/Tree/layout/HierarchicalEdgeBundling.ts":{"bytes":17479,"imports":[{"path":"d3","kind":"import-statement","external":true}],"format":"esm"},"src/components/Tree/layout/RadialTree.ts":{"bytes":8705,"imports":[{"path":"d3","kind":"import-statement","external":true}],"format":"esm"},"src/components/Tree/layout/TidyTree.ts":{"bytes":9207,"imports":[{"path":"d3","kind":"import-statement","external":true}],"format":"esm"},"src/components/Tree/layout/index.ts":{"bytes":1094,"imports":[{"path":"src/components/Tree/layout/HierarchicalEdgeBundling.ts","kind":"import-statement","original":"./HierarchicalEdgeBundling"},{"path":"src/components/Tree/layout/RadialTree.ts","kind":"import-statement","original":"./RadialTree"},{"path":"src/components/Tree/layout/TidyTree.ts","kind":"import-statement","original":"./TidyTree"}],"format":"esm"},"src/components/Tree/types/tree.ts":{"bytes":28143,"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":3319,"imports":[],"format":"esm"},"src/components/Tree/types/index.ts":{"bytes":554,"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/Tree.tsx":{"bytes":9947,"imports":[{"path":"@effect-atom/atom-react","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":"@dxos/schema","kind":"import-statement","external":true},{"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/Tree/index.ts":{"bytes":467,"imports":[{"path":"src/components/Tree/Tree.tsx","kind":"import-statement","original":"./Tree"}],"format":"esm"},"src/hooks/useGraphModel.ts":{"bytes":4162,"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":482,"imports":[{"path":"src/hooks/useGraphModel.ts","kind":"import-statement","original":"./useGraphModel"}],"format":"esm"},"src/components/ExplorerContainer.tsx":{"bytes":5572,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-query","kind":"import-statement","external":true},{"path":"@dxos/plugin-search","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":"src/hooks/index.ts","kind":"import-statement","original":"../hooks"},{"path":"src/components/Graph/index.ts","kind":"import-statement","original":"./Graph"}],"format":"esm"},"src/components/index.ts":{"bytes":1153,"imports":[{"path":"react","kind":"import-statement","external":true},{"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/Tree/index.ts","kind":"import-statement","original":"./Tree"},{"path":"src/components/ExplorerContainer.tsx","kind":"dynamic-import","original":"./ExplorerContainer"}],"format":"esm"},"src/meta.ts":{"bytes":2213,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/types/ExplorerAction.ts":{"bytes":2382,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"format":"esm"},"src/types/Graph.ts":{"bytes":5668,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":703,"imports":[{"path":"src/types/ExplorerAction.ts","kind":"import-statement","original":"./ExplorerAction"},{"path":"src/types/Graph.ts","kind":"import-statement","original":"./Graph"}],"format":"esm"},"src/capabilities/react-surface/react-surface.tsx":{"bytes":3529,"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/echo","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../../components"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"../../types"}],"format":"esm"},"src/capabilities/react-surface/index.ts":{"bytes":912,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/react-surface/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":489,"imports":[{"path":"src/capabilities/react-surface/index.ts","kind":"import-statement","original":"./react-surface"}],"format":"esm"},"src/translations.ts":{"bytes":3171,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-components","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/ExplorerPlugin.tsx":{"bytes":5000,"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/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/index.ts":{"bytes":732,"imports":[{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/ExplorerPlugin.tsx","kind":"import-statement","original":"./ExplorerPlugin"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4323},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-KIXHZZ2C.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-JZSBQYJQ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-YNQF4CPY.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-HIFLWHXR.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-MGBT2ZFU.mjs","kind":"import-statement"},{"path":"dist/lib/browser/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/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/react-surface-TPQAT5EI.mjs","kind":"dynamic-import"},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-components","kind":"import-statement","external":true}],"exports":["Chart","D3ForceGraph","ExplorerContainer","ExplorerPlugin","ForceGraph","Globe","Tree","defaultTreeLayoutSlots","meta","useGraphModel"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/ExplorerPlugin.tsx":{"bytesInOutput":976},"src/capabilities/react-surface/index.ts":{"bytesInOutput":148},"src/capabilities/index.ts":{"bytesInOutput":0},"src/translations.ts":{"bytesInOutput":730}},"bytes":2565},"dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/meta.mjs":{"imports":[{"path":"dist/lib/browser/chunk-YNQF4CPY.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/meta.ts","inputs":{},"bytes":131},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-HIFLWHXR.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["ExplorerAction","Graph"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":231},"dist/lib/browser/ExplorerContainer-46BHUF6R.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3102},"dist/lib/browser/ExplorerContainer-46BHUF6R.mjs":{"imports":[{"path":"dist/lib/browser/chunk-KIXHZZ2C.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-MGBT2ZFU.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-query","kind":"import-statement","external":true},{"path":"@dxos/plugin-search","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}],"exports":["default"],"entryPoint":"src/components/ExplorerContainer.tsx","inputs":{"src/components/ExplorerContainer.tsx":{"bytesInOutput":1234}},"bytes":1524},"dist/lib/browser/chunk-KIXHZZ2C.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2282},"dist/lib/browser/chunk-KIXHZZ2C.mjs":{"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}],"exports":["useGraphModel"],"inputs":{"src/hooks/useGraphModel.ts":{"bytesInOutput":834},"src/hooks/index.ts":{"bytesInOutput":0}},"bytes":937},"dist/lib/browser/react-surface-TPQAT5EI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1781},"dist/lib/browser/react-surface-TPQAT5EI.mjs":{"imports":[{"path":"dist/lib/browser/chunk-JZSBQYJQ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-YNQF4CPY.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-HIFLWHXR.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-MGBT2ZFU.mjs","kind":"import-statement"},{"path":"dist/lib/browser/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/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface/react-surface.tsx","inputs":{"src/capabilities/react-surface/react-surface.tsx":{"bytesInOutput":659}},"bytes":1036},"dist/lib/browser/chunk-JZSBQYJQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":483773},"dist/lib/browser/chunk-JZSBQYJQ.mjs":{"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":"@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":"@effect-atom/atom-react","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":"@dxos/schema","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"path":"d3","kind":"import-statement","external":true},{"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},{"path":"react","kind":"import-statement","external":true},{"path":"dist/lib/browser/ExplorerContainer-46BHUF6R.mjs","kind":"dynamic-import"}],"exports":["Chart","ExplorerContainer","Globe","Tree","defaultTreeLayoutSlots"],"inputs":{"src/components/Chart/Chart.tsx":{"bytesInOutput":1031},"src/components/plot.ts":{"bytesInOutput":133},"src/components/Globe/Globe.tsx":{"bytesInOutput":1707},"data/countries-110m.js":{"bytesInOutput":188376},"src/components/Tree/Tree.tsx":{"bytesInOutput":2082},"src/components/Tree/layout/HierarchicalEdgeBundling.ts":{"bytesInOutput":2167},"src/components/Tree/layout/RadialTree.ts":{"bytesInOutput":1355},"src/components/Tree/layout/TidyTree.ts":{"bytesInOutput":1596},"src/components/Tree/types/tree.ts":{"bytesInOutput":687},"src/components/Tree/types/index.ts":{"bytesInOutput":0},"src/components/Tree/types/types.ts":{"bytesInOutput":82},"src/components/index.ts":{"bytesInOutput":110},"src/components/Chart/index.ts":{"bytesInOutput":0},"src/components/Globe/index.ts":{"bytesInOutput":0},"src/components/Tree/index.ts":{"bytesInOutput":0}},"bytes":199966},"dist/lib/browser/chunk-YNQF4CPY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1048},"dist/lib/browser/chunk-YNQF4CPY.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":570}},"bytes":649},"dist/lib/browser/chunk-HIFLWHXR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4132},"dist/lib/browser/chunk-HIFLWHXR.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"exports":["ExplorerAction_exports","Graph_exports"],"inputs":{"src/types/ExplorerAction.ts":{"bytesInOutput":624},"src/types/index.ts":{"bytesInOutput":0},"src/types/Graph.ts":{"bytesInOutput":1275}},"bytes":2104},"dist/lib/browser/chunk-MGBT2ZFU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13045},"dist/lib/browser/chunk-MGBT2ZFU.mjs":{"imports":[{"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-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":"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/plugin-search","kind":"import-statement","external":true}],"exports":["D3ForceGraph","ForceGraph"],"inputs":{"src/components/Graph/D3ForceGraph.tsx":{"bytesInOutput":2113},"src/components/Graph/ForceGraph.tsx":{"bytesInOutput":2154},"src/components/Graph/adapter.ts":{"bytesInOutput":619},"src/components/Graph/index.ts":{"bytesInOutput":0}},"bytes":5129},"dist/lib/browser/chunk-J5LGTIGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/chunk-J5LGTIGS.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":235}}}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ExplorerContainer
|
|
3
|
-
} from "./chunk-JZSBQYJQ.mjs";
|
|
4
|
-
import {
|
|
5
|
-
meta
|
|
6
|
-
} from "./chunk-YNQF4CPY.mjs";
|
|
7
|
-
import {
|
|
8
|
-
Graph_exports
|
|
9
|
-
} from "./chunk-HIFLWHXR.mjs";
|
|
10
|
-
import "./chunk-MGBT2ZFU.mjs";
|
|
11
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
12
|
-
|
|
13
|
-
// src/capabilities/react-surface/react-surface.tsx
|
|
14
|
-
import * as Effect from "effect/Effect";
|
|
15
|
-
import React from "react";
|
|
16
|
-
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
17
|
-
import { Surface } from "@dxos/app-framework/ui";
|
|
18
|
-
import { Obj } from "@dxos/echo";
|
|
19
|
-
var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Capabilities.ReactSurface, Surface.create({
|
|
20
|
-
id: `${meta.id}/article`,
|
|
21
|
-
role: [
|
|
22
|
-
"article",
|
|
23
|
-
"section"
|
|
24
|
-
],
|
|
25
|
-
filter: (data) => Obj.instanceOf(Graph_exports.Graph, data.subject),
|
|
26
|
-
component: ({ data, role }) => {
|
|
27
|
-
return /* @__PURE__ */ React.createElement(ExplorerContainer, {
|
|
28
|
-
role,
|
|
29
|
-
subject: data.subject
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
}))));
|
|
33
|
-
export {
|
|
34
|
-
react_surface_default as default
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=react-surface-TPQAT5EI.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface/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 { Obj } from '@dxos/echo';\nimport { type View } from '@dxos/schema';\n\nimport { ExplorerContainer } from '../../components';\nimport { meta } from '../../meta';\nimport { Graph } from '../../types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(\n Capabilities.ReactSurface,\n Surface.create({\n id: `${meta.id}/article`,\n role: ['article', 'section'],\n filter: (data): data is { subject: View.View } => Obj.instanceOf(Graph.Graph, data.subject),\n component: ({ data, role }) => {\n return <ExplorerContainer role={role} subject={data.subject} />;\n },\n }),\n ),\n ),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,eAAe;AACxB,SAASC,WAAW;AAOpB,IAAA,wBAAeC,WAAWC,WAAW,MAC5BC,eACLF,WAAWG,YACTC,aAAaC,cACbC,QAAQC,OAAO;EACbC,IAAI,GAAGC,KAAKD,EAAE;EACdE,MAAM;IAAC;IAAW;;EAClBC,QAAQ,CAACC,SAAyCC,IAAIC,WAAWC,cAAMA,OAAOH,KAAKI,OAAO;EAC1FC,WAAW,CAAC,EAAEL,MAAMF,KAAI,MAAE;AACxB,WAAO,sBAAA,cAACQ,mBAAAA;MAAkBR;MAAYM,SAASJ,KAAKI;;EACtD;AACF,CAAA,CAAA,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "React", "Capabilities", "Capability", "Surface", "Obj", "Capability", "makeModule", "succeed", "contributes", "Capabilities", "ReactSurface", "Surface", "create", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "Graph", "subject", "component", "ExplorerContainer"]
|
|
7
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
useGraphModel
|
|
4
|
-
} from "./chunk-ASRWO2N5.mjs";
|
|
5
|
-
import {
|
|
6
|
-
D3ForceGraph
|
|
7
|
-
} from "./chunk-YWJBDETV.mjs";
|
|
8
|
-
import "./chunk-HSLMI22Q.mjs";
|
|
9
|
-
|
|
10
|
-
// src/components/ExplorerContainer.tsx
|
|
11
|
-
import React, { useCallback, useMemo, useState } from "react";
|
|
12
|
-
import { QueryBuilder } from "@dxos/echo-query";
|
|
13
|
-
import { useGlobalSearch } from "@dxos/plugin-search";
|
|
14
|
-
import { getSpace, useObject } from "@dxos/react-client/echo";
|
|
15
|
-
import { Layout, Toolbar } from "@dxos/react-ui";
|
|
16
|
-
import { QueryEditor } from "@dxos/react-ui-components";
|
|
17
|
-
var ExplorerContainer = ({ role, subject: view }) => {
|
|
18
|
-
useObject(view);
|
|
19
|
-
const space = view && getSpace(view);
|
|
20
|
-
const [filter, setFilter] = useState();
|
|
21
|
-
const model = useGraphModel(space, filter);
|
|
22
|
-
const { match } = useGlobalSearch();
|
|
23
|
-
const builder = useMemo(() => new QueryBuilder(), []);
|
|
24
|
-
const handleChange = useCallback((value) => {
|
|
25
|
-
setFilter(builder.build(value).filter);
|
|
26
|
-
}, []);
|
|
27
|
-
const showToolbar = role === "article";
|
|
28
|
-
if (!space || !model) {
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
return /* @__PURE__ */ React.createElement(Layout.Main, {
|
|
32
|
-
role,
|
|
33
|
-
toolbar: showToolbar
|
|
34
|
-
}, showToolbar && /* @__PURE__ */ React.createElement(Toolbar.Root, null, /* @__PURE__ */ React.createElement(QueryEditor, {
|
|
35
|
-
db: space.db,
|
|
36
|
-
onChange: handleChange
|
|
37
|
-
})), /* @__PURE__ */ React.createElement(D3ForceGraph, {
|
|
38
|
-
model,
|
|
39
|
-
match
|
|
40
|
-
}));
|
|
41
|
-
};
|
|
42
|
-
var ExplorerContainer_default = ExplorerContainer;
|
|
43
|
-
export {
|
|
44
|
-
ExplorerContainer_default as default
|
|
45
|
-
};
|
|
46
|
-
//# sourceMappingURL=ExplorerContainer-OZNG47QB.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/ExplorerContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback, useMemo, useState } from 'react';\n\nimport { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';\nimport { type Filter } from '@dxos/echo';\nimport { QueryBuilder } from '@dxos/echo-query';\nimport { useGlobalSearch } from '@dxos/plugin-search';\nimport { getSpace, useObject } from '@dxos/react-client/echo';\nimport { Layout, Toolbar } from '@dxos/react-ui';\nimport { QueryEditor, type QueryEditorProps } from '@dxos/react-ui-components';\nimport { type View } from '@dxos/schema';\n\nimport { useGraphModel } from '../hooks';\n\nimport { D3ForceGraph } from './Graph';\n\nexport type ExplorerContainerProps = SurfaceComponentProps<View.View>;\n\nconst ExplorerContainer = ({ role, subject: view }: ExplorerContainerProps) => {\n useObject(view);\n const space = view && getSpace(view);\n const [filter, setFilter] = useState<Filter.Any>();\n const model = useGraphModel(space, filter);\n const { match } = useGlobalSearch();\n\n const builder = useMemo(() => new QueryBuilder(), []);\n const handleChange = useCallback<NonNullable<QueryEditorProps['onChange']>>((value) => {\n setFilter(builder.build(value).filter);\n }, []);\n\n const showToolbar = role === 'article';\n\n if (!space || !model) {\n return null;\n }\n\n return (\n <Layout.Main role={role} toolbar={showToolbar}>\n {showToolbar && (\n <Toolbar.Root>\n <QueryEditor db={space.db} onChange={handleChange} />\n </Toolbar.Root>\n )}\n <D3ForceGraph model={model} match={match} />\n </Layout.Main>\n );\n};\n\nexport default ExplorerContainer;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;AAIA,OAAOA,SAASC,aAAaC,SAASC,gBAAgB;AAItD,SAASC,oBAAoB;AAC7B,SAASC,uBAAuB;AAChC,SAASC,UAAUC,iBAAiB;AACpC,SAASC,QAAQC,eAAe;AAChC,SAASC,mBAA0C;AASnD,IAAMC,oBAAoB,CAAC,EAAEC,MAAMC,SAASC,KAAI,MAA0B;AACxEC,YAAUD,IAAAA;AACV,QAAME,QAAQF,QAAQG,SAASH,IAAAA;AAC/B,QAAM,CAACI,QAAQC,SAAAA,IAAaC,SAAAA;AAC5B,QAAMC,QAAQC,cAAcN,OAAOE,MAAAA;AACnC,QAAM,EAAEK,MAAK,IAAKC,gBAAAA;AAElB,QAAMC,UAAUC,QAAQ,MAAM,IAAIC,aAAAA,GAAgB,CAAA,CAAE;AACpD,QAAMC,eAAeC,YAAuD,CAACC,UAAAA;AAC3EX,cAAUM,QAAQM,MAAMD,KAAAA,EAAOZ,MAAM;EACvC,GAAG,CAAA,CAAE;AAEL,QAAMc,cAAcpB,SAAS;AAE7B,MAAI,CAACI,SAAS,CAACK,OAAO;AACpB,WAAO;EACT;AAEA,SACE,sBAAA,cAACY,OAAOC,MAAI;IAACtB;IAAYuB,SAASH;KAC/BA,eACC,sBAAA,cAACI,QAAQC,MAAI,MACX,sBAAA,cAACC,aAAAA;IAAYC,IAAIvB,MAAMuB;IAAIC,UAAUZ;OAGzC,sBAAA,cAACa,cAAAA;IAAapB;IAAcE;;AAGlC;AAEA,IAAA,4BAAeZ;",
|
|
6
|
-
"names": ["React", "useCallback", "useMemo", "useState", "QueryBuilder", "useGlobalSearch", "getSpace", "useObject", "Layout", "Toolbar", "QueryEditor", "ExplorerContainer", "role", "subject", "view", "useObject", "space", "getSpace", "filter", "setFilter", "useState", "model", "useGraphModel", "match", "useGlobalSearch", "builder", "useMemo", "QueryBuilder", "handleChange", "useCallback", "value", "build", "showToolbar", "Layout", "Main", "toolbar", "Toolbar", "Root", "QueryEditor", "db", "onChange", "D3ForceGraph"]
|
|
7
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
__export
|
|
4
|
-
} from "./chunk-HSLMI22Q.mjs";
|
|
5
|
-
|
|
6
|
-
// src/types/ExplorerAction.ts
|
|
7
|
-
var ExplorerAction_exports = {};
|
|
8
|
-
__export(ExplorerAction_exports, {
|
|
9
|
-
GraphProps: () => GraphProps
|
|
10
|
-
});
|
|
11
|
-
import * as Schema from "effect/Schema";
|
|
12
|
-
import { TypeInputOptionsAnnotation } from "@dxos/plugin-space/types";
|
|
13
|
-
var GraphProps = Schema.Struct({
|
|
14
|
-
name: Schema.optional(Schema.String),
|
|
15
|
-
// TODO(wittjosiah): This should be a query input instead.
|
|
16
|
-
typename: Schema.String.pipe(Schema.annotations({
|
|
17
|
-
title: "Select type"
|
|
18
|
-
}), TypeInputOptionsAnnotation.set({
|
|
19
|
-
location: [
|
|
20
|
-
"database",
|
|
21
|
-
"runtime"
|
|
22
|
-
],
|
|
23
|
-
kind: [
|
|
24
|
-
"user"
|
|
25
|
-
],
|
|
26
|
-
registered: [
|
|
27
|
-
"registered"
|
|
28
|
-
]
|
|
29
|
-
}), Schema.optional)
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// src/types/Graph.ts
|
|
33
|
-
var Graph_exports = {};
|
|
34
|
-
__export(Graph_exports, {
|
|
35
|
-
Graph: () => Graph,
|
|
36
|
-
GraphV1: () => GraphV1,
|
|
37
|
-
make: () => make
|
|
38
|
-
});
|
|
39
|
-
import * as Schema2 from "effect/Schema";
|
|
40
|
-
import { Filter, Obj, Query, QueryAST, Ref, Type } from "@dxos/echo";
|
|
41
|
-
import { FormInputAnnotation, LabelAnnotation } from "@dxos/echo/internal";
|
|
42
|
-
import { View, ViewAnnotation } from "@dxos/schema";
|
|
43
|
-
var GraphSchema = Schema2.Struct({
|
|
44
|
-
name: Schema2.optional(Schema2.String),
|
|
45
|
-
view: Type.Ref(View.View).pipe(FormInputAnnotation.set(false)),
|
|
46
|
-
query: Schema2.Struct({
|
|
47
|
-
raw: Schema2.optional(Schema2.String),
|
|
48
|
-
ast: QueryAST.Query
|
|
49
|
-
}).pipe(FormInputAnnotation.set(false))
|
|
50
|
-
}).pipe(Type.object({
|
|
51
|
-
typename: "dxos.org/type/Graph",
|
|
52
|
-
version: "0.2.0"
|
|
53
|
-
}), LabelAnnotation.set([
|
|
54
|
-
"name"
|
|
55
|
-
]), ViewAnnotation.set(true));
|
|
56
|
-
var Graph = GraphSchema;
|
|
57
|
-
var make = ({ name, query = {
|
|
58
|
-
raw: "",
|
|
59
|
-
ast: Query.select(Filter.nothing()).ast
|
|
60
|
-
}, view }) => {
|
|
61
|
-
return Obj.make(Graph, {
|
|
62
|
-
name,
|
|
63
|
-
view: Ref.make(view),
|
|
64
|
-
query
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
var GraphV1 = Schema2.Struct({
|
|
68
|
-
name: Schema2.optional(Schema2.String),
|
|
69
|
-
query: Schema2.Struct({
|
|
70
|
-
raw: Schema2.optional(Schema2.String),
|
|
71
|
-
ast: QueryAST.Query
|
|
72
|
-
})
|
|
73
|
-
}).pipe(Type.object({
|
|
74
|
-
typename: "dxos.org/type/Graph",
|
|
75
|
-
version: "0.1.0"
|
|
76
|
-
}), LabelAnnotation.set([
|
|
77
|
-
"name"
|
|
78
|
-
]));
|
|
79
|
-
|
|
80
|
-
export {
|
|
81
|
-
ExplorerAction_exports,
|
|
82
|
-
Graph_exports
|
|
83
|
-
};
|
|
84
|
-
//# sourceMappingURL=chunk-3OE6TBJI.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/ExplorerAction.ts", "../../../src/types/Graph.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { TypeInputOptionsAnnotation } from '@dxos/plugin-space/types';\n\nexport const GraphProps = Schema.Struct({\n name: Schema.optional(Schema.String),\n // TODO(wittjosiah): This should be a query input instead.\n typename: Schema.String.pipe(\n Schema.annotations({ title: 'Select type' }),\n TypeInputOptionsAnnotation.set({\n location: ['database', 'runtime'],\n kind: ['user'],\n registered: ['registered'],\n }),\n Schema.optional,\n ),\n});\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Filter, Obj, Query, QueryAST, Ref, Type } from '@dxos/echo';\nimport { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';\nimport { View, ViewAnnotation } from '@dxos/schema';\n\nconst GraphSchema = Schema.Struct({\n name: Schema.optional(Schema.String),\n\n view: Type.Ref(View.View).pipe(FormInputAnnotation.set(false)),\n\n query: Schema.Struct({\n raw: Schema.optional(Schema.String),\n ast: QueryAST.Query,\n }).pipe(FormInputAnnotation.set(false)),\n}).pipe(\n Type.object({\n typename: 'dxos.org/type/Graph',\n version: '0.2.0',\n }),\n LabelAnnotation.set(['name']),\n ViewAnnotation.set(true),\n);\nexport interface Graph extends Schema.Schema.Type<typeof GraphSchema> {}\nexport const Graph: Type.Obj<Graph> = GraphSchema as any;\n\ntype MakeProps = Omit<Partial<Obj.MakeProps<typeof Graph>>, 'view'> & {\n view: View.View;\n};\n\n/**\n * Make a graph as a view of a data set.\n */\nexport const make = ({\n name,\n query = { raw: '', ast: Query.select(Filter.nothing()).ast },\n view,\n}: MakeProps): Graph => {\n return Obj.make(Graph, { name, view: Ref.make(view), query });\n};\n\n//\n// V1\n//\n\nexport const GraphV1 = Schema.Struct({\n name: Schema.optional(Schema.String),\n query: Schema.Struct({\n raw: Schema.optional(Schema.String),\n ast: QueryAST.Query,\n }),\n}).pipe(\n Type.object({\n typename: 'dxos.org/type/Graph',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;AAAA;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kCAAkC;AAEpC,IAAMC,aAAoBC,cAAO;EACtCC,MAAaC,gBAAgBC,aAAM;;EAEnCC,UAAiBD,cAAOE,KACfC,mBAAY;IAAEC,OAAO;EAAc,CAAA,GAC1CC,2BAA2BC,IAAI;IAC7BC,UAAU;MAAC;MAAY;;IACvBC,MAAM;MAAC;;IACPC,YAAY;MAAC;;EACf,CAAA,GACOV,eAAQ;AAEnB,CAAA;;;ACpBA;;;;;;AAIA,YAAYW,aAAY;AAExB,SAASC,QAAQC,KAAKC,OAAOC,UAAUC,KAAKC,YAAY;AACxD,SAASC,qBAAqBC,uBAAuB;AACrD,SAASC,MAAMC,sBAAsB;AAErC,IAAMC,cAAqBC,eAAO;EAChCC,MAAaC,iBAAgBC,cAAM;EAEnCC,MAAMC,KAAKC,IAAIC,KAAKA,IAAI,EAAEC,KAAKC,oBAAoBC,IAAI,KAAA,CAAA;EAEvDC,OAAcX,eAAO;IACnBY,KAAYV,iBAAgBC,cAAM;IAClCU,KAAKC,SAASC;EAChB,CAAA,EAAGP,KAAKC,oBAAoBC,IAAI,KAAA,CAAA;AAClC,CAAA,EAAGF,KACDH,KAAKW,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,gBAAgBT,IAAI;EAAC;CAAO,GAC5BU,eAAeV,IAAI,IAAA,CAAA;AAGd,IAAMW,QAAyBtB;AAS/B,IAAMuB,OAAO,CAAC,EACnBrB,MACAU,QAAQ;EAAEC,KAAK;EAAIC,KAAKE,MAAMQ,OAAOC,OAAOC,QAAO,CAAA,EAAIZ;AAAI,GAC3DT,KAAI,MACM;AACV,SAAOsB,IAAIJ,KAAKD,OAAO;IAAEpB;IAAMG,MAAME,IAAIgB,KAAKlB,IAAAA;IAAOO;EAAM,CAAA;AAC7D;AAMO,IAAMgB,UAAiB3B,eAAO;EACnCC,MAAaC,iBAAgBC,cAAM;EACnCQ,OAAcX,eAAO;IACnBY,KAAYV,iBAAgBC,cAAM;IAClCU,KAAKC,SAASC;EAChB,CAAA;AACF,CAAA,EAAGP,KACDH,KAAKW,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,gBAAgBT,IAAI;EAAC;CAAO,CAAA;",
|
|
6
|
-
"names": ["Schema", "TypeInputOptionsAnnotation", "GraphProps", "Struct", "name", "optional", "String", "typename", "pipe", "annotations", "title", "TypeInputOptionsAnnotation", "set", "location", "kind", "registered", "Schema", "Filter", "Obj", "Query", "QueryAST", "Ref", "Type", "FormInputAnnotation", "LabelAnnotation", "View", "ViewAnnotation", "GraphSchema", "Struct", "name", "optional", "String", "view", "Type", "Ref", "View", "pipe", "FormInputAnnotation", "set", "query", "raw", "ast", "QueryAST", "Query", "object", "typename", "version", "LabelAnnotation", "ViewAnnotation", "Graph", "make", "select", "Filter", "nothing", "Obj", "GraphV1"]
|
|
7
|
-
}
|