@dxos/plugin-explorer 0.16.0-next-60712ab191a99ba90316cc4be753e9e11b17100a → 0.17.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/PLUGIN.mdl +25 -2
- package/dist/lib/ExplorerPlugin.mjs +126 -1
- package/dist/lib/ExplorerPlugin.mjs.map +1 -0
- package/dist/lib/ExplorerPlugin.node.mjs +88 -0
- package/dist/lib/ExplorerPlugin.node.mjs.map +1 -0
- package/dist/lib/ExplorerPlugin.workerd.mjs +88 -0
- package/dist/lib/ExplorerPlugin.workerd.mjs.map +1 -0
- package/dist/lib/chunk-ExplorerArticle.mjs +10 -8
- package/dist/lib/chunk-ExplorerArticle.mjs.map +1 -1
- package/dist/lib/chunk-ExplorerEvents.mjs +2 -2
- package/dist/lib/chunk-ExplorerEvents.mjs.map +1 -1
- package/dist/lib/chunk-Graph.mjs.map +1 -1
- package/dist/lib/chunk-NeighborhoodCompanion.mjs +2 -2
- package/dist/lib/chunk-NeighborhoodCompanion.mjs.map +1 -1
- package/dist/lib/chunk-PLUGIN.mjs +1 -1
- package/dist/lib/chunk-app-graph-builder.mjs +2 -2
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
- package/dist/lib/chunk-namespace.mjs +7 -0
- package/dist/lib/chunk-namespace.mjs.map +1 -0
- package/dist/lib/chunk-plugin-asset.mjs +15 -0
- package/dist/lib/chunk-plugin-asset.mjs.map +1 -0
- package/dist/lib/chunk-translations.mjs +10 -0
- package/dist/lib/chunk-translations.mjs.map +1 -0
- package/dist/lib/components.mjs +153 -20
- package/dist/lib/components.mjs.map +1 -1
- package/dist/lib/index.mjs +2 -2
- package/dist/lib/testing.mjs +1 -18
- package/dist/lib/testing.mjs.map +1 -1
- package/dist/lib/translations.mjs +2 -2
- package/dist/lib/translations.mjs.map +1 -1
- package/dist/types/dx.config.d.ts +19 -11
- package/dist/types/dx.config.d.ts.map +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +1 -1
- package/dist/types/src/capabilities/plugin-asset.d.ts +5 -0
- package/dist/types/src/capabilities/plugin-asset.d.ts.map +1 -0
- package/dist/types/src/capabilities/translations.d.ts +5 -0
- package/dist/types/src/capabilities/translations.d.ts.map +1 -0
- package/dist/types/src/components/Tree/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/components/Visualization/Visualization.d.ts +12 -0
- package/dist/types/src/components/Visualization/Visualization.d.ts.map +1 -1
- package/dist/types/src/components/Visualization/variants.d.ts +3 -1
- package/dist/types/src/components/Visualization/variants.d.ts.map +1 -1
- package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts +2 -2
- package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.d.ts.map +1 -1
- package/dist/types/src/containers/ExplorerArticle/ExplorerArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/NeighborhoodCompanion/NeighborhoodCompanion.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/namespace.d.ts +6 -0
- package/dist/types/src/namespace.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +0 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +7 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/ExplorerEvents.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +40 -3
- package/package.json +43 -57
- package/src/capabilities/app-graph-builder.ts +2 -2
- package/src/capabilities/plugin-asset.ts +23 -0
- package/src/capabilities/translations.ts +14 -0
- package/src/components/Tree/Tree.stories.tsx +6 -3
- package/src/components/Visualization/Visualization.tsx +198 -14
- package/src/components/Visualization/variants.ts +6 -5
- package/src/containers/ExplorerArticle/ExplorerArticle.stories.tsx +7 -1
- package/src/containers/ExplorerArticle/ExplorerArticle.tsx +13 -9
- package/src/containers/NeighborhoodCompanion/NeighborhoodCompanion.tsx +3 -2
- package/src/index.ts +1 -1
- package/src/namespace.ts +7 -0
- package/src/plugin.test.ts +6 -3
- package/src/testing/index.ts +0 -2
- package/src/translations.ts +3 -2
- package/src/types/ExplorerEvents.ts +2 -2
- package/dist/lib/capabilities.browser.mjs +0 -20
- package/dist/lib/capabilities.browser.mjs.map +0 -1
- package/dist/lib/capabilities.mjs +0 -20
- package/dist/lib/capabilities.mjs.map +0 -1
- package/dist/lib/capabilities.node.mjs +0 -14
- package/dist/lib/capabilities.node.mjs.map +0 -1
- package/dist/lib/capabilities.tauri.mjs +0 -20
- package/dist/lib/capabilities.tauri.mjs.map +0 -1
- package/dist/lib/capabilities.workerd.mjs +0 -14
- package/dist/lib/capabilities.workerd.mjs.map +0 -1
- package/dist/lib/chunk-ExplorerPlugin.mjs +0 -16
- package/dist/lib/chunk-ExplorerPlugin.mjs.map +0 -1
- package/dist/lib/meta.mjs +0 -45
- package/dist/lib/meta.mjs.map +0 -1
- package/dist/lib/plugin.mjs +0 -9
- package/dist/lib/plugin.mjs.map +0 -1
- package/dist/types/src/ExplorerPlugin.d.ts +0 -37
- package/dist/types/src/ExplorerPlugin.d.ts.map +0 -1
- package/dist/types/src/ExplorerPlugin.testing.d.ts +0 -40
- package/dist/types/src/ExplorerPlugin.testing.d.ts.map +0 -1
- package/dist/types/src/capabilities/gen/browser.d.ts +0 -7
- package/dist/types/src/capabilities/gen/browser.d.ts.map +0 -1
- package/dist/types/src/capabilities/gen/node.d.ts +0 -7
- package/dist/types/src/capabilities/gen/node.d.ts.map +0 -1
- package/dist/types/src/capabilities/gen/tauri.d.ts +0 -7
- package/dist/types/src/capabilities/gen/tauri.d.ts.map +0 -1
- package/dist/types/src/capabilities/gen/workerd.d.ts +0 -7
- package/dist/types/src/capabilities/gen/workerd.d.ts.map +0 -1
- package/dist/types/src/capabilities/index.d.ts +0 -7
- package/dist/types/src/capabilities/index.d.ts.map +0 -1
- package/dist/types/src/meta.d.ts +0 -33
- package/dist/types/src/meta.d.ts.map +0 -1
- package/dist/types/src/plugin.d.ts +0 -4
- package/dist/types/src/plugin.d.ts.map +0 -1
- package/src/ExplorerPlugin.testing.ts +0 -16
- package/src/ExplorerPlugin.ts +0 -15
- package/src/capabilities/gen/browser.ts +0 -30
- package/src/capabilities/gen/node.ts +0 -21
- package/src/capabilities/gen/tauri.ts +0 -30
- package/src/capabilities/gen/workerd.ts +0 -21
- package/src/capabilities/index.ts +0 -23
- package/src/meta.ts +0 -9
- package/src/plugin.tsx +0 -20
package/PLUGIN.mdl
CHANGED
|
@@ -22,6 +22,7 @@ Each extension is defined in the Appendix or resolved via its URI.
|
|
|
22
22
|
| `component` | `org.dxos.mdl.component@1.0` |
|
|
23
23
|
| `op` | `org.dxos.mdl.op@1.0` |
|
|
24
24
|
| `test` | `org.dxos.mdl.test@1.0` |
|
|
25
|
+
| `decision` | `org.dxos.mdl.decision@1.0` |
|
|
25
26
|
|
|
26
27
|
## Types
|
|
27
28
|
|
|
@@ -55,11 +56,11 @@ component ExplorerArticle
|
|
|
55
56
|
Renders one of four SVG layout variants and a toolbar for switching between them.
|
|
56
57
|
props:
|
|
57
58
|
role: article | section
|
|
58
|
-
subject: Ref<
|
|
59
|
+
subject: Ref<Graph>
|
|
59
60
|
attendableId?: string
|
|
60
61
|
state:
|
|
61
62
|
variant: ExplorerVariant # active layout; default force
|
|
62
|
-
filter?: Filter.Any # compiled from toolbar query input
|
|
63
|
+
filter?: Filter.Any # compiled from the Graph's saved query, then from toolbar query input
|
|
63
64
|
model?: SpaceGraphModel # live reactive graph built from db + filter
|
|
64
65
|
slots:
|
|
65
66
|
toolbar?: ReactNode # shown only when role === article
|
|
@@ -130,6 +131,7 @@ op buildFilter
|
|
|
130
131
|
|
|
131
132
|
```mdl
|
|
132
133
|
feat F-1: Graph Object
|
|
134
|
+
uses: [createGraph]
|
|
133
135
|
|
|
134
136
|
req F-1.1: A Graph object stores a name, a View ref, and a compiled QueryAST.
|
|
135
137
|
req F-1.2:
|
|
@@ -143,6 +145,7 @@ feat F-1: Graph Object
|
|
|
143
145
|
|
|
144
146
|
```mdl
|
|
145
147
|
feat F-2: Live Graph Model
|
|
148
|
+
uses: [buildFilter, ExplorerArticle]
|
|
146
149
|
|
|
147
150
|
req F-2.1:
|
|
148
151
|
when: ExplorerArticle mounts with a valid Graph subject
|
|
@@ -152,6 +155,10 @@ feat F-2: Live Graph Model
|
|
|
152
155
|
when: user types a query in the toolbar
|
|
153
156
|
then: op:buildFilter compiles the raw string; model.setFilter applied; SVG re-renders
|
|
154
157
|
|
|
158
|
+
req F-2.5:
|
|
159
|
+
when: ExplorerArticle opens a Graph whose query has a raw string
|
|
160
|
+
then: the toolbar shows that string and the graph shows only the objects it matches, until the user edits it
|
|
161
|
+
|
|
155
162
|
req F-2.3:
|
|
156
163
|
when: Graph is unmounted
|
|
157
164
|
then: SpaceGraphModel is closed and all subscriptions released
|
|
@@ -164,6 +171,7 @@ feat F-2: Live Graph Model
|
|
|
164
171
|
|
|
165
172
|
```mdl
|
|
166
173
|
feat F-3: Visualization Variants
|
|
174
|
+
uses: [Visualization]
|
|
167
175
|
|
|
168
176
|
req F-3.1:
|
|
169
177
|
when: variant tab is selected
|
|
@@ -321,7 +329,9 @@ test QA-1: Create a Graph and switch layout variants
|
|
|
321
329
|
`space.db.query(dxos.Filter.everything())` for the object named "QA Graph" and call
|
|
322
330
|
`org.dxos.operation.space.removeObjects` with that reference, rather than the test
|
|
323
331
|
guessing an id it was never given.
|
|
332
|
+
```
|
|
324
333
|
|
|
334
|
+
```mdl
|
|
325
335
|
test QA-2: Showcase clip
|
|
326
336
|
desc: |
|
|
327
337
|
The 10s showcase clip: Pan a graph of the space. Recorded light at 60 fps with no ident, captions or
|
|
@@ -343,6 +353,19 @@ test QA-2: Showcase clip
|
|
|
343
353
|
|
|
344
354
|
---
|
|
345
355
|
|
|
356
|
+
## Changelog
|
|
357
|
+
|
|
358
|
+
```mdl
|
|
359
|
+
decision D-1: ExplorerArticle opens a Graph on its saved raw query, shown in the toolbar, rather than on every object in the space.
|
|
360
|
+
date: 2026-11-06
|
|
361
|
+
by: agent:claude-code
|
|
362
|
+
for: user:wittjosiah
|
|
363
|
+
affects: [F-2.5]
|
|
364
|
+
why: A Graph stores a query, but the article ignored it and drew the whole space. The `/echo` graph demo shares its space with other demos' objects and needs its graph kept to companies and people.
|
|
365
|
+
rejected:
|
|
366
|
+
- Applying the saved query's AST when there is no raw string: graphs created in Composer store a match-nothing AST and no raw string, so they would open empty.
|
|
367
|
+
```
|
|
368
|
+
|
|
346
369
|
## Appendix: Extension Definitions
|
|
347
370
|
|
|
348
371
|
Extension block types used in this document are defined below using
|
|
@@ -1 +1,126 @@
|
|
|
1
|
-
|
|
1
|
+
import * as Plugin from "@dxos/app-framework/Plugin";
|
|
2
|
+
//#region dx.config.ts
|
|
3
|
+
var plugin = Plugin.fromManifest({
|
|
4
|
+
"plugin": {
|
|
5
|
+
"key": "org.dxos.plugin.explorer",
|
|
6
|
+
"name": "Explorer",
|
|
7
|
+
"author": "DXOS",
|
|
8
|
+
"description": "Explorer is an interactive hypergraph visualization plugin that reveals the relationships\nbetween objects stored in your DXOS workspace. Each Graph document is backed by a live\nECHO query and a View that you configure — Explorer keeps the visualization synchronized\nwith the database in real time so every peer immediately sees changes made by collaborators.\n\nThe plugin offers four switchable layout algorithms for the same data set: a physics-based\nforce-directed graph for freeform exploration, a radial cluster layout that groups objects\nby type around a central root, an edge-bundling layout that tames visual clutter on dense\ngraphs, and a lattice grid that arranges objects in a sorted matrix sorted by type and label.\nSwitching between layouts smoothly tweens node positions so spatial context is preserved.\n\nNodes are coloured by their ECHO object type, and hovering any node opens an anchor-card\npreview panel with the object's details without leaving the graph view.\nThe toolbar's query editor lets you filter the visible node set on the fly using\nthe same query syntax available across Composer.\n\nA new Graph document can be created from the object-creation dialog; Explorer automatically\nderives an initial View from the chosen type and persists both to ECHO so the graph is\nimmediately shareable and replicable across the space.",
|
|
9
|
+
"source": "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-explorer",
|
|
10
|
+
"icon": {
|
|
11
|
+
"key": "ph--graph--regular",
|
|
12
|
+
"hue": "green"
|
|
13
|
+
},
|
|
14
|
+
"spec": "PLUGIN.mdl",
|
|
15
|
+
"screenshots": [{ "dark": "https://media.dxos.network/plugin-details-explorer-dark.png" }],
|
|
16
|
+
"tags": ["alpha"]
|
|
17
|
+
},
|
|
18
|
+
"modules": [
|
|
19
|
+
{
|
|
20
|
+
"id": "AppGraphBuilder",
|
|
21
|
+
"url": "./src/capabilities/app-graph-builder.ts",
|
|
22
|
+
"activatesOn": { "id": "dxn:org.dxos.app-framework.event.idle" },
|
|
23
|
+
"requires": [],
|
|
24
|
+
"provides": [{
|
|
25
|
+
"identifier": "org.dxos.app-framework.capability.appGraphBuilder",
|
|
26
|
+
"arity": "multi"
|
|
27
|
+
}],
|
|
28
|
+
"environments": [
|
|
29
|
+
"browser",
|
|
30
|
+
"node",
|
|
31
|
+
"tauri",
|
|
32
|
+
"workerd"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "CreateObject",
|
|
37
|
+
"url": "./src/capabilities/create-object.ts",
|
|
38
|
+
"activatesOn": { "id": "dxn:org.dxos.plugin.space.event.createObjectRequested" },
|
|
39
|
+
"requires": [],
|
|
40
|
+
"provides": [{
|
|
41
|
+
"identifier": "org.dxos.plugin.space.capability.createObject",
|
|
42
|
+
"arity": "multi"
|
|
43
|
+
}]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "plugin-asset",
|
|
47
|
+
"url": "./src/capabilities/plugin-asset.ts",
|
|
48
|
+
"activatesOn": { "id": "dxn:org.dxos.app-framework.event.pluginAssetsRequested" },
|
|
49
|
+
"requires": [],
|
|
50
|
+
"provides": [{
|
|
51
|
+
"identifier": "org.dxos.app-framework.capability.pluginAsset",
|
|
52
|
+
"arity": "multi"
|
|
53
|
+
}],
|
|
54
|
+
"environments": ["browser", "tauri"]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "ReactSurface",
|
|
58
|
+
"url": "./src/capabilities/react-surface.ts",
|
|
59
|
+
"activatesOn": {
|
|
60
|
+
"type": "one-of",
|
|
61
|
+
"events": [{
|
|
62
|
+
"id": "dxn:org.dxos.app-framework.event.surfacesRequested",
|
|
63
|
+
"specifier": "org.dxos.role.article"
|
|
64
|
+
}, {
|
|
65
|
+
"id": "dxn:org.dxos.app-framework.event.surfacesRequested",
|
|
66
|
+
"specifier": "org.dxos.role.section"
|
|
67
|
+
}]
|
|
68
|
+
},
|
|
69
|
+
"requires": [],
|
|
70
|
+
"provides": [{
|
|
71
|
+
"identifier": "org.dxos.app-framework.capability.reactSurface",
|
|
72
|
+
"arity": "multi"
|
|
73
|
+
}],
|
|
74
|
+
"adapter": {
|
|
75
|
+
"url": "@dxos/app-toolkit/SurfaceAdapter",
|
|
76
|
+
"args": { "roles": ["org.dxos.role.article", "org.dxos.role.section"] }
|
|
77
|
+
},
|
|
78
|
+
"environments": ["browser", "tauri"]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "schema",
|
|
82
|
+
"url": "./src/capabilities/schema.ts",
|
|
83
|
+
"requires": [],
|
|
84
|
+
"provides": [{
|
|
85
|
+
"identifier": "org.dxos.app-framework.capability.schema",
|
|
86
|
+
"arity": "multi"
|
|
87
|
+
}],
|
|
88
|
+
"adapter": { "url": "@dxos/app-toolkit/SchemaAdapter" },
|
|
89
|
+
"environments": [
|
|
90
|
+
"browser",
|
|
91
|
+
"node",
|
|
92
|
+
"tauri",
|
|
93
|
+
"workerd"
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "translations",
|
|
98
|
+
"url": "./src/capabilities/translations.ts",
|
|
99
|
+
"requires": [],
|
|
100
|
+
"provides": [{
|
|
101
|
+
"identifier": "org.dxos.app-framework.capability.translations",
|
|
102
|
+
"arity": "multi"
|
|
103
|
+
}],
|
|
104
|
+
"environments": [
|
|
105
|
+
"browser",
|
|
106
|
+
"node",
|
|
107
|
+
"tauri",
|
|
108
|
+
"workerd"
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}, {
|
|
113
|
+
"./src/capabilities/app-graph-builder.ts": () => import("./chunk-app-graph-builder.mjs"),
|
|
114
|
+
"./src/capabilities/create-object.ts": () => import("./chunk-create-object.mjs"),
|
|
115
|
+
"./src/capabilities/plugin-asset.ts": () => import("./chunk-plugin-asset.mjs"),
|
|
116
|
+
"./src/capabilities/react-surface.ts": () => import("./chunk-react-surface.mjs"),
|
|
117
|
+
"@dxos/app-toolkit/SurfaceAdapter": () => import("@dxos/app-toolkit/SurfaceAdapter"),
|
|
118
|
+
"./src/capabilities/schema.ts": () => import("./chunk-schema.mjs"),
|
|
119
|
+
"@dxos/app-toolkit/SchemaAdapter": () => import("@dxos/app-toolkit/SchemaAdapter"),
|
|
120
|
+
"./src/capabilities/translations.ts": () => import("./chunk-translations.mjs")
|
|
121
|
+
});
|
|
122
|
+
var { meta, make } = plugin;
|
|
123
|
+
//#endregion
|
|
124
|
+
export { plugin as default, make, meta };
|
|
125
|
+
|
|
126
|
+
//# sourceMappingURL=ExplorerPlugin.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExplorerPlugin.mjs","names":[],"sources":["../../dx.config.ts"],"sourcesContent":["import * as Plugin from '@dxos/app-framework/Plugin';\nconst plugin = Plugin.fromManifest({\n \"plugin\": {\n \"key\": \"org.dxos.plugin.explorer\",\n \"name\": \"Explorer\",\n \"author\": \"DXOS\",\n \"description\": \"Explorer is an interactive hypergraph visualization plugin that reveals the relationships\\nbetween objects stored in your DXOS workspace. Each Graph document is backed by a live\\nECHO query and a View that you configure — Explorer keeps the visualization synchronized\\nwith the database in real time so every peer immediately sees changes made by collaborators.\\n\\nThe plugin offers four switchable layout algorithms for the same data set: a physics-based\\nforce-directed graph for freeform exploration, a radial cluster layout that groups objects\\nby type around a central root, an edge-bundling layout that tames visual clutter on dense\\ngraphs, and a lattice grid that arranges objects in a sorted matrix sorted by type and label.\\nSwitching between layouts smoothly tweens node positions so spatial context is preserved.\\n\\nNodes are coloured by their ECHO object type, and hovering any node opens an anchor-card\\npreview panel with the object's details without leaving the graph view.\\nThe toolbar's query editor lets you filter the visible node set on the fly using\\nthe same query syntax available across Composer.\\n\\nA new Graph document can be created from the object-creation dialog; Explorer automatically\\nderives an initial View from the chosen type and persists both to ECHO so the graph is\\nimmediately shareable and replicable across the space.\",\n \"source\": \"https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-explorer\",\n \"icon\": {\n \"key\": \"ph--graph--regular\",\n \"hue\": \"green\"\n },\n \"spec\": \"PLUGIN.mdl\",\n \"screenshots\": [\n {\n \"dark\": \"https://media.dxos.network/plugin-details-explorer-dark.png\"\n }\n ],\n \"tags\": [\n \"alpha\"\n ]\n },\n \"modules\": [\n {\n \"id\": \"AppGraphBuilder\",\n \"url\": \"./src/capabilities/app-graph-builder.ts\",\n \"activatesOn\": {\n \"id\": \"dxn:org.dxos.app-framework.event.idle\"\n },\n \"requires\": [],\n \"provides\": [\n {\n \"identifier\": \"org.dxos.app-framework.capability.appGraphBuilder\",\n \"arity\": \"multi\"\n }\n ],\n \"environments\": [\n \"browser\",\n \"node\",\n \"tauri\",\n \"workerd\"\n ]\n },\n {\n \"id\": \"CreateObject\",\n \"url\": \"./src/capabilities/create-object.ts\",\n \"activatesOn\": {\n \"id\": \"dxn:org.dxos.plugin.space.event.createObjectRequested\"\n },\n \"requires\": [],\n \"provides\": [\n {\n \"identifier\": \"org.dxos.plugin.space.capability.createObject\",\n \"arity\": \"multi\"\n }\n ]\n },\n {\n \"id\": \"plugin-asset\",\n \"url\": \"./src/capabilities/plugin-asset.ts\",\n \"activatesOn\": {\n \"id\": \"dxn:org.dxos.app-framework.event.pluginAssetsRequested\"\n },\n \"requires\": [],\n \"provides\": [\n {\n \"identifier\": \"org.dxos.app-framework.capability.pluginAsset\",\n \"arity\": \"multi\"\n }\n ],\n \"environments\": [\n \"browser\",\n \"tauri\"\n ]\n },\n {\n \"id\": \"ReactSurface\",\n \"url\": \"./src/capabilities/react-surface.ts\",\n \"activatesOn\": {\n \"type\": \"one-of\",\n \"events\": [\n {\n \"id\": \"dxn:org.dxos.app-framework.event.surfacesRequested\",\n \"specifier\": \"org.dxos.role.article\"\n },\n {\n \"id\": \"dxn:org.dxos.app-framework.event.surfacesRequested\",\n \"specifier\": \"org.dxos.role.section\"\n }\n ]\n },\n \"requires\": [],\n \"provides\": [\n {\n \"identifier\": \"org.dxos.app-framework.capability.reactSurface\",\n \"arity\": \"multi\"\n }\n ],\n \"adapter\": {\n \"url\": \"@dxos/app-toolkit/SurfaceAdapter\",\n \"args\": {\n \"roles\": [\n \"org.dxos.role.article\",\n \"org.dxos.role.section\"\n ]\n }\n },\n \"environments\": [\n \"browser\",\n \"tauri\"\n ]\n },\n {\n \"id\": \"schema\",\n \"url\": \"./src/capabilities/schema.ts\",\n \"requires\": [],\n \"provides\": [\n {\n \"identifier\": \"org.dxos.app-framework.capability.schema\",\n \"arity\": \"multi\"\n }\n ],\n \"adapter\": {\n \"url\": \"@dxos/app-toolkit/SchemaAdapter\"\n },\n \"environments\": [\n \"browser\",\n \"node\",\n \"tauri\",\n \"workerd\"\n ]\n },\n {\n \"id\": \"translations\",\n \"url\": \"./src/capabilities/translations.ts\",\n \"requires\": [],\n \"provides\": [\n {\n \"identifier\": \"org.dxos.app-framework.capability.translations\",\n \"arity\": \"multi\"\n }\n ],\n \"environments\": [\n \"browser\",\n \"node\",\n \"tauri\",\n \"workerd\"\n ]\n }\n ]\n}, {\"./src/capabilities/app-graph-builder.ts\": () => import(\"/__w/dxos/dxos/packages/plugins/plugin-explorer/src/capabilities/app-graph-builder.ts\"), \"./src/capabilities/create-object.ts\": () => import(\"/__w/dxos/dxos/packages/plugins/plugin-explorer/src/capabilities/create-object.ts\"), \"./src/capabilities/plugin-asset.ts\": () => import(\"/__w/dxos/dxos/packages/plugins/plugin-explorer/src/capabilities/plugin-asset.ts\"), \"./src/capabilities/react-surface.ts\": () => import(\"/__w/dxos/dxos/packages/plugins/plugin-explorer/src/capabilities/react-surface.ts\"), \"@dxos/app-toolkit/SurfaceAdapter\": () => import(\"@dxos/app-toolkit/SurfaceAdapter\"), \"./src/capabilities/schema.ts\": () => import(\"/__w/dxos/dxos/packages/plugins/plugin-explorer/src/capabilities/schema.ts\"), \"@dxos/app-toolkit/SchemaAdapter\": () => import(\"@dxos/app-toolkit/SchemaAdapter\"), \"./src/capabilities/translations.ts\": () => import(\"/__w/dxos/dxos/packages/plugins/plugin-explorer/src/capabilities/translations.ts\")});\nexport const { meta, make } = plugin;\nexport default plugin;"],"mappings":";;AACA,IAAM,SAAS,OAAO,aAAa;CACjC,UAAU;EACR,OAAO;EACP,QAAQ;EACR,UAAU;EACV,eAAe;EACf,UAAU;EACV,QAAQ;GACN,OAAO;GACP,OAAO;EACT;EACA,QAAQ;EACR,eAAe,CACb,EACE,QAAQ,8DACV,CACF;EACA,QAAQ,CACN,OACF;CACF;CACA,WAAW;EACT;GACE,MAAM;GACN,OAAO;GACP,eAAe,EACb,MAAM,wCACR;GACA,YAAY,CAAC;GACb,YAAY,CACV;IACE,cAAc;IACd,SAAS;GACX,CACF;GACA,gBAAgB;IACd;IACA;IACA;IACA;GACF;EACF;EACA;GACE,MAAM;GACN,OAAO;GACP,eAAe,EACb,MAAM,wDACR;GACA,YAAY,CAAC;GACb,YAAY,CACV;IACE,cAAc;IACd,SAAS;GACX,CACF;EACF;EACA;GACE,MAAM;GACN,OAAO;GACP,eAAe,EACb,MAAM,yDACR;GACA,YAAY,CAAC;GACb,YAAY,CACV;IACE,cAAc;IACd,SAAS;GACX,CACF;GACA,gBAAgB,CACd,WACA,OACF;EACF;EACA;GACE,MAAM;GACN,OAAO;GACP,eAAe;IACb,QAAQ;IACR,UAAU,CACR;KACE,MAAM;KACN,aAAa;IACf,GACA;KACE,MAAM;KACN,aAAa;IACf,CACF;GACF;GACA,YAAY,CAAC;GACb,YAAY,CACV;IACE,cAAc;IACd,SAAS;GACX,CACF;GACA,WAAW;IACT,OAAO;IACP,QAAQ,EACN,SAAS,CACP,yBACA,uBACF,EACF;GACF;GACA,gBAAgB,CACd,WACA,OACF;EACF;EACA;GACE,MAAM;GACN,OAAO;GACP,YAAY,CAAC;GACb,YAAY,CACV;IACE,cAAc;IACd,SAAS;GACX,CACF;GACA,WAAW,EACT,OAAO,kCACT;GACA,gBAAgB;IACd;IACA;IACA;IACA;GACF;EACF;EACA;GACE,MAAM;GACN,OAAO;GACP,YAAY,CAAC;GACb,YAAY,CACV;IACE,cAAc;IACd,SAAS;GACX,CACF;GACA,gBAAgB;IACd;IACA;IACA;IACA;GACF;EACF;CACF;AACF,GAAG;CAAC,iDAAiD,OAAO;CAA0F,6CAA6C,OAAO;CAAsF,4CAA4C,OAAO;CAAqF,6CAA6C,OAAO;CAAsF,0CAA0C,OAAO;CAAqC,sCAAsC,OAAO;CAA+E,yCAAyC,OAAO;CAAoC,4CAA4C,OAAO;AAAmF,CAAC;AAC/9B,IAAa,EAAE,MAAM,SAAS"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as Plugin from "@dxos/app-framework/Plugin";
|
|
2
|
+
//#region dx.config.ts?dx-env=node
|
|
3
|
+
var plugin = Plugin.fromManifest({
|
|
4
|
+
"plugin": {
|
|
5
|
+
"key": "org.dxos.plugin.explorer",
|
|
6
|
+
"name": "Explorer",
|
|
7
|
+
"author": "DXOS",
|
|
8
|
+
"description": "Explorer is an interactive hypergraph visualization plugin that reveals the relationships\nbetween objects stored in your DXOS workspace. Each Graph document is backed by a live\nECHO query and a View that you configure — Explorer keeps the visualization synchronized\nwith the database in real time so every peer immediately sees changes made by collaborators.\n\nThe plugin offers four switchable layout algorithms for the same data set: a physics-based\nforce-directed graph for freeform exploration, a radial cluster layout that groups objects\nby type around a central root, an edge-bundling layout that tames visual clutter on dense\ngraphs, and a lattice grid that arranges objects in a sorted matrix sorted by type and label.\nSwitching between layouts smoothly tweens node positions so spatial context is preserved.\n\nNodes are coloured by their ECHO object type, and hovering any node opens an anchor-card\npreview panel with the object's details without leaving the graph view.\nThe toolbar's query editor lets you filter the visible node set on the fly using\nthe same query syntax available across Composer.\n\nA new Graph document can be created from the object-creation dialog; Explorer automatically\nderives an initial View from the chosen type and persists both to ECHO so the graph is\nimmediately shareable and replicable across the space.",
|
|
9
|
+
"source": "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-explorer",
|
|
10
|
+
"icon": {
|
|
11
|
+
"key": "ph--graph--regular",
|
|
12
|
+
"hue": "green"
|
|
13
|
+
},
|
|
14
|
+
"spec": "PLUGIN.mdl",
|
|
15
|
+
"screenshots": [{ "dark": "https://media.dxos.network/plugin-details-explorer-dark.png" }],
|
|
16
|
+
"tags": ["alpha"]
|
|
17
|
+
},
|
|
18
|
+
"modules": [
|
|
19
|
+
{
|
|
20
|
+
"id": "AppGraphBuilder",
|
|
21
|
+
"url": "./src/capabilities/app-graph-builder.ts",
|
|
22
|
+
"activatesOn": { "id": "dxn:org.dxos.app-framework.event.idle" },
|
|
23
|
+
"requires": [],
|
|
24
|
+
"provides": [{
|
|
25
|
+
"identifier": "org.dxos.app-framework.capability.appGraphBuilder",
|
|
26
|
+
"arity": "multi"
|
|
27
|
+
}],
|
|
28
|
+
"environments": [
|
|
29
|
+
"browser",
|
|
30
|
+
"node",
|
|
31
|
+
"tauri",
|
|
32
|
+
"workerd"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "CreateObject",
|
|
37
|
+
"url": "./src/capabilities/create-object.ts",
|
|
38
|
+
"activatesOn": { "id": "dxn:org.dxos.plugin.space.event.createObjectRequested" },
|
|
39
|
+
"requires": [],
|
|
40
|
+
"provides": [{
|
|
41
|
+
"identifier": "org.dxos.plugin.space.capability.createObject",
|
|
42
|
+
"arity": "multi"
|
|
43
|
+
}]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "schema",
|
|
47
|
+
"url": "./src/capabilities/schema.ts",
|
|
48
|
+
"requires": [],
|
|
49
|
+
"provides": [{
|
|
50
|
+
"identifier": "org.dxos.app-framework.capability.schema",
|
|
51
|
+
"arity": "multi"
|
|
52
|
+
}],
|
|
53
|
+
"adapter": { "url": "@dxos/app-toolkit/SchemaAdapter" },
|
|
54
|
+
"environments": [
|
|
55
|
+
"browser",
|
|
56
|
+
"node",
|
|
57
|
+
"tauri",
|
|
58
|
+
"workerd"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "translations",
|
|
63
|
+
"url": "./src/capabilities/translations.ts",
|
|
64
|
+
"requires": [],
|
|
65
|
+
"provides": [{
|
|
66
|
+
"identifier": "org.dxos.app-framework.capability.translations",
|
|
67
|
+
"arity": "multi"
|
|
68
|
+
}],
|
|
69
|
+
"environments": [
|
|
70
|
+
"browser",
|
|
71
|
+
"node",
|
|
72
|
+
"tauri",
|
|
73
|
+
"workerd"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}, {
|
|
78
|
+
"./src/capabilities/app-graph-builder.ts": () => import("./chunk-app-graph-builder.mjs"),
|
|
79
|
+
"./src/capabilities/create-object.ts": () => import("./chunk-create-object.mjs"),
|
|
80
|
+
"./src/capabilities/schema.ts": () => import("./chunk-schema.mjs"),
|
|
81
|
+
"@dxos/app-toolkit/SchemaAdapter": () => import("@dxos/app-toolkit/SchemaAdapter"),
|
|
82
|
+
"./src/capabilities/translations.ts": () => import("./chunk-translations.mjs")
|
|
83
|
+
});
|
|
84
|
+
var { meta, make } = plugin;
|
|
85
|
+
//#endregion
|
|
86
|
+
export { plugin as default, make, meta };
|
|
87
|
+
|
|
88
|
+
//# sourceMappingURL=ExplorerPlugin.node.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExplorerPlugin.node.mjs","names":[],"sources":["../../dx.config.ts?dx-env=node"],"sourcesContent":["import * as Plugin from '@dxos/app-framework/Plugin';\nconst plugin = Plugin.fromManifest({\n \"plugin\": {\n \"key\": \"org.dxos.plugin.explorer\",\n \"name\": \"Explorer\",\n \"author\": \"DXOS\",\n \"description\": \"Explorer is an interactive hypergraph visualization plugin that reveals the relationships\\nbetween objects stored in your DXOS workspace. Each Graph document is backed by a live\\nECHO query and a View that you configure — Explorer keeps the visualization synchronized\\nwith the database in real time so every peer immediately sees changes made by collaborators.\\n\\nThe plugin offers four switchable layout algorithms for the same data set: a physics-based\\nforce-directed graph for freeform exploration, a radial cluster layout that groups objects\\nby type around a central root, an edge-bundling layout that tames visual clutter on dense\\ngraphs, and a lattice grid that arranges objects in a sorted matrix sorted by type and label.\\nSwitching between layouts smoothly tweens node positions so spatial context is preserved.\\n\\nNodes are coloured by their ECHO object type, and hovering any node opens an anchor-card\\npreview panel with the object's details without leaving the graph view.\\nThe toolbar's query editor lets you filter the visible node set on the fly using\\nthe same query syntax available across Composer.\\n\\nA new Graph document can be created from the object-creation dialog; Explorer automatically\\nderives an initial View from the chosen type and persists both to ECHO so the graph is\\nimmediately shareable and replicable across the space.\",\n \"source\": \"https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-explorer\",\n \"icon\": {\n \"key\": \"ph--graph--regular\",\n \"hue\": \"green\"\n },\n \"spec\": \"PLUGIN.mdl\",\n \"screenshots\": [\n {\n \"dark\": \"https://media.dxos.network/plugin-details-explorer-dark.png\"\n }\n ],\n \"tags\": [\n \"alpha\"\n ]\n },\n \"modules\": [\n {\n \"id\": \"AppGraphBuilder\",\n \"url\": \"./src/capabilities/app-graph-builder.ts\",\n \"activatesOn\": {\n \"id\": \"dxn:org.dxos.app-framework.event.idle\"\n },\n \"requires\": [],\n \"provides\": [\n {\n \"identifier\": \"org.dxos.app-framework.capability.appGraphBuilder\",\n \"arity\": \"multi\"\n }\n ],\n \"environments\": [\n \"browser\",\n \"node\",\n \"tauri\",\n \"workerd\"\n ]\n },\n {\n \"id\": \"CreateObject\",\n \"url\": \"./src/capabilities/create-object.ts\",\n \"activatesOn\": {\n \"id\": \"dxn:org.dxos.plugin.space.event.createObjectRequested\"\n },\n \"requires\": [],\n \"provides\": [\n {\n \"identifier\": \"org.dxos.plugin.space.capability.createObject\",\n \"arity\": \"multi\"\n }\n ]\n },\n {\n \"id\": \"schema\",\n \"url\": \"./src/capabilities/schema.ts\",\n \"requires\": [],\n \"provides\": [\n {\n \"identifier\": \"org.dxos.app-framework.capability.schema\",\n \"arity\": \"multi\"\n }\n ],\n \"adapter\": {\n \"url\": \"@dxos/app-toolkit/SchemaAdapter\"\n },\n \"environments\": [\n \"browser\",\n \"node\",\n \"tauri\",\n \"workerd\"\n ]\n },\n {\n \"id\": \"translations\",\n \"url\": \"./src/capabilities/translations.ts\",\n \"requires\": [],\n \"provides\": [\n {\n \"identifier\": \"org.dxos.app-framework.capability.translations\",\n \"arity\": \"multi\"\n }\n ],\n \"environments\": [\n \"browser\",\n \"node\",\n \"tauri\",\n \"workerd\"\n ]\n }\n ]\n}, {\"./src/capabilities/app-graph-builder.ts\": () => import(\"/__w/dxos/dxos/packages/plugins/plugin-explorer/src/capabilities/app-graph-builder.ts\"), \"./src/capabilities/create-object.ts\": () => import(\"/__w/dxos/dxos/packages/plugins/plugin-explorer/src/capabilities/create-object.ts\"), \"./src/capabilities/schema.ts\": () => import(\"/__w/dxos/dxos/packages/plugins/plugin-explorer/src/capabilities/schema.ts\"), \"@dxos/app-toolkit/SchemaAdapter\": () => import(\"@dxos/app-toolkit/SchemaAdapter\"), \"./src/capabilities/translations.ts\": () => import(\"/__w/dxos/dxos/packages/plugins/plugin-explorer/src/capabilities/translations.ts\")});\nexport const { meta, make } = plugin;\nexport default plugin;"],"mappings":";;AACA,IAAM,SAAS,OAAO,aAAa;CACjC,UAAU;EACR,OAAO;EACP,QAAQ;EACR,UAAU;EACV,eAAe;EACf,UAAU;EACV,QAAQ;GACN,OAAO;GACP,OAAO;EACT;EACA,QAAQ;EACR,eAAe,CACb,EACE,QAAQ,8DACV,CACF;EACA,QAAQ,CACN,OACF;CACF;CACA,WAAW;EACT;GACE,MAAM;GACN,OAAO;GACP,eAAe,EACb,MAAM,wCACR;GACA,YAAY,CAAC;GACb,YAAY,CACV;IACE,cAAc;IACd,SAAS;GACX,CACF;GACA,gBAAgB;IACd;IACA;IACA;IACA;GACF;EACF;EACA;GACE,MAAM;GACN,OAAO;GACP,eAAe,EACb,MAAM,wDACR;GACA,YAAY,CAAC;GACb,YAAY,CACV;IACE,cAAc;IACd,SAAS;GACX,CACF;EACF;EACA;GACE,MAAM;GACN,OAAO;GACP,YAAY,CAAC;GACb,YAAY,CACV;IACE,cAAc;IACd,SAAS;GACX,CACF;GACA,WAAW,EACT,OAAO,kCACT;GACA,gBAAgB;IACd;IACA;IACA;IACA;GACF;EACF;EACA;GACE,MAAM;GACN,OAAO;GACP,YAAY,CAAC;GACb,YAAY,CACV;IACE,cAAc;IACd,SAAS;GACX,CACF;GACA,gBAAgB;IACd;IACA;IACA;IACA;GACF;EACF;CACF;AACF,GAAG;CAAC,iDAAiD,OAAO;CAA0F,6CAA6C,OAAO;CAAsF,sCAAsC,OAAO;CAA+E,yCAAyC,OAAO;CAAoC,4CAA4C,OAAO;AAAmF,CAAC;AACvnB,IAAa,EAAE,MAAM,SAAS"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as Plugin from "@dxos/app-framework/Plugin";
|
|
2
|
+
//#region dx.config.ts?dx-env=workerd
|
|
3
|
+
var plugin = Plugin.fromManifest({
|
|
4
|
+
"plugin": {
|
|
5
|
+
"key": "org.dxos.plugin.explorer",
|
|
6
|
+
"name": "Explorer",
|
|
7
|
+
"author": "DXOS",
|
|
8
|
+
"description": "Explorer is an interactive hypergraph visualization plugin that reveals the relationships\nbetween objects stored in your DXOS workspace. Each Graph document is backed by a live\nECHO query and a View that you configure — Explorer keeps the visualization synchronized\nwith the database in real time so every peer immediately sees changes made by collaborators.\n\nThe plugin offers four switchable layout algorithms for the same data set: a physics-based\nforce-directed graph for freeform exploration, a radial cluster layout that groups objects\nby type around a central root, an edge-bundling layout that tames visual clutter on dense\ngraphs, and a lattice grid that arranges objects in a sorted matrix sorted by type and label.\nSwitching between layouts smoothly tweens node positions so spatial context is preserved.\n\nNodes are coloured by their ECHO object type, and hovering any node opens an anchor-card\npreview panel with the object's details without leaving the graph view.\nThe toolbar's query editor lets you filter the visible node set on the fly using\nthe same query syntax available across Composer.\n\nA new Graph document can be created from the object-creation dialog; Explorer automatically\nderives an initial View from the chosen type and persists both to ECHO so the graph is\nimmediately shareable and replicable across the space.",
|
|
9
|
+
"source": "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-explorer",
|
|
10
|
+
"icon": {
|
|
11
|
+
"key": "ph--graph--regular",
|
|
12
|
+
"hue": "green"
|
|
13
|
+
},
|
|
14
|
+
"spec": "PLUGIN.mdl",
|
|
15
|
+
"screenshots": [{ "dark": "https://media.dxos.network/plugin-details-explorer-dark.png" }],
|
|
16
|
+
"tags": ["alpha"]
|
|
17
|
+
},
|
|
18
|
+
"modules": [
|
|
19
|
+
{
|
|
20
|
+
"id": "AppGraphBuilder",
|
|
21
|
+
"url": "./src/capabilities/app-graph-builder.ts",
|
|
22
|
+
"activatesOn": { "id": "dxn:org.dxos.app-framework.event.idle" },
|
|
23
|
+
"requires": [],
|
|
24
|
+
"provides": [{
|
|
25
|
+
"identifier": "org.dxos.app-framework.capability.appGraphBuilder",
|
|
26
|
+
"arity": "multi"
|
|
27
|
+
}],
|
|
28
|
+
"environments": [
|
|
29
|
+
"browser",
|
|
30
|
+
"node",
|
|
31
|
+
"tauri",
|
|
32
|
+
"workerd"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "CreateObject",
|
|
37
|
+
"url": "./src/capabilities/create-object.ts",
|
|
38
|
+
"activatesOn": { "id": "dxn:org.dxos.plugin.space.event.createObjectRequested" },
|
|
39
|
+
"requires": [],
|
|
40
|
+
"provides": [{
|
|
41
|
+
"identifier": "org.dxos.plugin.space.capability.createObject",
|
|
42
|
+
"arity": "multi"
|
|
43
|
+
}]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "schema",
|
|
47
|
+
"url": "./src/capabilities/schema.ts",
|
|
48
|
+
"requires": [],
|
|
49
|
+
"provides": [{
|
|
50
|
+
"identifier": "org.dxos.app-framework.capability.schema",
|
|
51
|
+
"arity": "multi"
|
|
52
|
+
}],
|
|
53
|
+
"adapter": { "url": "@dxos/app-toolkit/SchemaAdapter" },
|
|
54
|
+
"environments": [
|
|
55
|
+
"browser",
|
|
56
|
+
"node",
|
|
57
|
+
"tauri",
|
|
58
|
+
"workerd"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "translations",
|
|
63
|
+
"url": "./src/capabilities/translations.ts",
|
|
64
|
+
"requires": [],
|
|
65
|
+
"provides": [{
|
|
66
|
+
"identifier": "org.dxos.app-framework.capability.translations",
|
|
67
|
+
"arity": "multi"
|
|
68
|
+
}],
|
|
69
|
+
"environments": [
|
|
70
|
+
"browser",
|
|
71
|
+
"node",
|
|
72
|
+
"tauri",
|
|
73
|
+
"workerd"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}, {
|
|
78
|
+
"./src/capabilities/app-graph-builder.ts": () => import("./chunk-app-graph-builder.mjs"),
|
|
79
|
+
"./src/capabilities/create-object.ts": () => import("./chunk-create-object.mjs"),
|
|
80
|
+
"./src/capabilities/schema.ts": () => import("./chunk-schema.mjs"),
|
|
81
|
+
"@dxos/app-toolkit/SchemaAdapter": () => import("@dxos/app-toolkit/SchemaAdapter"),
|
|
82
|
+
"./src/capabilities/translations.ts": () => import("./chunk-translations.mjs")
|
|
83
|
+
});
|
|
84
|
+
var { meta, make } = plugin;
|
|
85
|
+
//#endregion
|
|
86
|
+
export { plugin as default, make, meta };
|
|
87
|
+
|
|
88
|
+
//# sourceMappingURL=ExplorerPlugin.workerd.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExplorerPlugin.workerd.mjs","names":[],"sources":["../../dx.config.ts?dx-env=workerd"],"sourcesContent":["import * as Plugin from '@dxos/app-framework/Plugin';\nconst plugin = Plugin.fromManifest({\n \"plugin\": {\n \"key\": \"org.dxos.plugin.explorer\",\n \"name\": \"Explorer\",\n \"author\": \"DXOS\",\n \"description\": \"Explorer is an interactive hypergraph visualization plugin that reveals the relationships\\nbetween objects stored in your DXOS workspace. Each Graph document is backed by a live\\nECHO query and a View that you configure — Explorer keeps the visualization synchronized\\nwith the database in real time so every peer immediately sees changes made by collaborators.\\n\\nThe plugin offers four switchable layout algorithms for the same data set: a physics-based\\nforce-directed graph for freeform exploration, a radial cluster layout that groups objects\\nby type around a central root, an edge-bundling layout that tames visual clutter on dense\\ngraphs, and a lattice grid that arranges objects in a sorted matrix sorted by type and label.\\nSwitching between layouts smoothly tweens node positions so spatial context is preserved.\\n\\nNodes are coloured by their ECHO object type, and hovering any node opens an anchor-card\\npreview panel with the object's details without leaving the graph view.\\nThe toolbar's query editor lets you filter the visible node set on the fly using\\nthe same query syntax available across Composer.\\n\\nA new Graph document can be created from the object-creation dialog; Explorer automatically\\nderives an initial View from the chosen type and persists both to ECHO so the graph is\\nimmediately shareable and replicable across the space.\",\n \"source\": \"https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-explorer\",\n \"icon\": {\n \"key\": \"ph--graph--regular\",\n \"hue\": \"green\"\n },\n \"spec\": \"PLUGIN.mdl\",\n \"screenshots\": [\n {\n \"dark\": \"https://media.dxos.network/plugin-details-explorer-dark.png\"\n }\n ],\n \"tags\": [\n \"alpha\"\n ]\n },\n \"modules\": [\n {\n \"id\": \"AppGraphBuilder\",\n \"url\": \"./src/capabilities/app-graph-builder.ts\",\n \"activatesOn\": {\n \"id\": \"dxn:org.dxos.app-framework.event.idle\"\n },\n \"requires\": [],\n \"provides\": [\n {\n \"identifier\": \"org.dxos.app-framework.capability.appGraphBuilder\",\n \"arity\": \"multi\"\n }\n ],\n \"environments\": [\n \"browser\",\n \"node\",\n \"tauri\",\n \"workerd\"\n ]\n },\n {\n \"id\": \"CreateObject\",\n \"url\": \"./src/capabilities/create-object.ts\",\n \"activatesOn\": {\n \"id\": \"dxn:org.dxos.plugin.space.event.createObjectRequested\"\n },\n \"requires\": [],\n \"provides\": [\n {\n \"identifier\": \"org.dxos.plugin.space.capability.createObject\",\n \"arity\": \"multi\"\n }\n ]\n },\n {\n \"id\": \"schema\",\n \"url\": \"./src/capabilities/schema.ts\",\n \"requires\": [],\n \"provides\": [\n {\n \"identifier\": \"org.dxos.app-framework.capability.schema\",\n \"arity\": \"multi\"\n }\n ],\n \"adapter\": {\n \"url\": \"@dxos/app-toolkit/SchemaAdapter\"\n },\n \"environments\": [\n \"browser\",\n \"node\",\n \"tauri\",\n \"workerd\"\n ]\n },\n {\n \"id\": \"translations\",\n \"url\": \"./src/capabilities/translations.ts\",\n \"requires\": [],\n \"provides\": [\n {\n \"identifier\": \"org.dxos.app-framework.capability.translations\",\n \"arity\": \"multi\"\n }\n ],\n \"environments\": [\n \"browser\",\n \"node\",\n \"tauri\",\n \"workerd\"\n ]\n }\n ]\n}, {\"./src/capabilities/app-graph-builder.ts\": () => import(\"/__w/dxos/dxos/packages/plugins/plugin-explorer/src/capabilities/app-graph-builder.ts\"), \"./src/capabilities/create-object.ts\": () => import(\"/__w/dxos/dxos/packages/plugins/plugin-explorer/src/capabilities/create-object.ts\"), \"./src/capabilities/schema.ts\": () => import(\"/__w/dxos/dxos/packages/plugins/plugin-explorer/src/capabilities/schema.ts\"), \"@dxos/app-toolkit/SchemaAdapter\": () => import(\"@dxos/app-toolkit/SchemaAdapter\"), \"./src/capabilities/translations.ts\": () => import(\"/__w/dxos/dxos/packages/plugins/plugin-explorer/src/capabilities/translations.ts\")});\nexport const { meta, make } = plugin;\nexport default plugin;"],"mappings":";;AACA,IAAM,SAAS,OAAO,aAAa;CACjC,UAAU;EACR,OAAO;EACP,QAAQ;EACR,UAAU;EACV,eAAe;EACf,UAAU;EACV,QAAQ;GACN,OAAO;GACP,OAAO;EACT;EACA,QAAQ;EACR,eAAe,CACb,EACE,QAAQ,8DACV,CACF;EACA,QAAQ,CACN,OACF;CACF;CACA,WAAW;EACT;GACE,MAAM;GACN,OAAO;GACP,eAAe,EACb,MAAM,wCACR;GACA,YAAY,CAAC;GACb,YAAY,CACV;IACE,cAAc;IACd,SAAS;GACX,CACF;GACA,gBAAgB;IACd;IACA;IACA;IACA;GACF;EACF;EACA;GACE,MAAM;GACN,OAAO;GACP,eAAe,EACb,MAAM,wDACR;GACA,YAAY,CAAC;GACb,YAAY,CACV;IACE,cAAc;IACd,SAAS;GACX,CACF;EACF;EACA;GACE,MAAM;GACN,OAAO;GACP,YAAY,CAAC;GACb,YAAY,CACV;IACE,cAAc;IACd,SAAS;GACX,CACF;GACA,WAAW,EACT,OAAO,kCACT;GACA,gBAAgB;IACd;IACA;IACA;IACA;GACF;EACF;EACA;GACE,MAAM;GACN,OAAO;GACP,YAAY,CAAC;GACb,YAAY,CACV;IACE,cAAc;IACd,SAAS;GACX,CACF;GACA,gBAAgB;IACd;IACA;IACA;IACA;GACF;EACF;CACF;AACF,GAAG;CAAC,iDAAiD,OAAO;CAA0F,6CAA6C,OAAO;CAAsF,sCAAsC,OAAO;CAA+E,yCAAyC,OAAO;CAAoC,4CAA4C,OAAO;AAAmF,CAAC;AACvnB,IAAa,EAAE,MAAM,SAAS"}
|
|
@@ -5,7 +5,7 @@ import { Obj } from "@dxos/echo";
|
|
|
5
5
|
import "@dxos/react-ui-graph/styles/graph.css";
|
|
6
6
|
import * as AppSurface from "@dxos/app-toolkit/AppSurface";
|
|
7
7
|
import { useObject } from "@dxos/echo-react";
|
|
8
|
-
import { QueryEditor } from "@dxos/react-ui-query";
|
|
8
|
+
import { QueryEditor, useQueryBuilder } from "@dxos/react-ui-query";
|
|
9
9
|
import * as Panel from "@dxos/react-ui/Panel";
|
|
10
10
|
import * as ToggleGroup from "@dxos/react-ui/ToggleGroup";
|
|
11
11
|
import * as Toolbar from "@dxos/react-ui/Toolbar";
|
|
@@ -13,11 +13,12 @@ import { DxAnchorActivate } from "@dxos/ui-types";
|
|
|
13
13
|
import { VARIANTS, Visualization, isVariant } from "#components";
|
|
14
14
|
//#region src/containers/ExplorerArticle/ExplorerArticle.tsx
|
|
15
15
|
var ExplorerArticle = ({ role, subject, variant }) => {
|
|
16
|
-
const [
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
16
|
+
const [graph] = useObject(subject);
|
|
17
|
+
const saved = useQueryBuilder(graph?.query.raw);
|
|
18
|
+
const [edited, setEdited] = useState();
|
|
19
|
+
const db = graph && Obj.getDatabase(graph);
|
|
20
|
+
const model = useGraphModel(db, edited ? edited.filter : saved);
|
|
21
|
+
const handleFilterChange = useCallback(({ filter }) => setEdited({ filter }), []);
|
|
21
22
|
const [selected, setSelected] = useState(isVariant(variant) ? variant : "force");
|
|
22
23
|
useEffect(() => {
|
|
23
24
|
if (isVariant(variant)) setSelected(variant);
|
|
@@ -53,6 +54,7 @@ var ExplorerArticle = ({ role, subject, variant }) => {
|
|
|
53
54
|
role,
|
|
54
55
|
children: [showToolbar && /* @__PURE__ */ jsx(Panel.Header, { children: /* @__PURE__ */ jsxs(Toolbar.Root, { children: [/* @__PURE__ */ jsx(QueryEditor, {
|
|
55
56
|
db,
|
|
57
|
+
value: graph?.query.raw,
|
|
56
58
|
onFilterChange: handleFilterChange
|
|
57
59
|
}), /* @__PURE__ */ jsx(Toolbar.ToggleGroup, {
|
|
58
60
|
type: "single",
|
|
@@ -66,12 +68,12 @@ var ExplorerArticle = ({ role, subject, variant }) => {
|
|
|
66
68
|
}, value))
|
|
67
69
|
})] }) }), /* @__PURE__ */ jsx(Panel.Body, {
|
|
68
70
|
asChild: true,
|
|
69
|
-
children: /* @__PURE__ */
|
|
71
|
+
children: /* @__PURE__ */ jsxs(Visualization.Root, {
|
|
70
72
|
classNames: "dx-base-surface",
|
|
71
73
|
variant: selected,
|
|
72
74
|
model,
|
|
73
75
|
onSurfaceClick: handleDismiss,
|
|
74
|
-
children: /* @__PURE__ */ jsx(Visualization.Graph, { onNodeHover: handleHover })
|
|
76
|
+
children: [/* @__PURE__ */ jsx(Visualization.Graph, { onNodeHover: handleHover }), /* @__PURE__ */ jsx(Visualization.TypeFilter, {})]
|
|
75
77
|
})
|
|
76
78
|
})]
|
|
77
79
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-ExplorerArticle.mjs","names":[],"sources":["../../src/containers/ExplorerArticle/ExplorerArticle.tsx"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback, useEffect, useState } from 'react';\n\nimport * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport { type Filter, Obj
|
|
1
|
+
{"version":3,"file":"chunk-ExplorerArticle.mjs","names":[],"sources":["../../src/containers/ExplorerArticle/ExplorerArticle.tsx"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback, useEffect, useState } from 'react';\n\nimport * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport { type Filter, Obj } from '@dxos/echo';\nimport { useObject } from '@dxos/echo-react';\nimport { type TreeNode } from '@dxos/react-ui-graph';\nimport { QueryEditor, type QueryEditorProps, useQueryBuilder } from '@dxos/react-ui-query';\nimport * as Panel from '@dxos/react-ui/Panel';\nimport * as ToggleGroup from '@dxos/react-ui/ToggleGroup';\nimport * as Toolbar from '@dxos/react-ui/Toolbar';\nimport { DxAnchorActivate } from '@dxos/ui-types';\nimport '@dxos/react-ui-graph/styles/graph.css';\n\nimport { type ExplorerArticleVariant, VARIANTS, Visualization, isVariant } from '#components';\nimport { useGraphModel } from '#hooks';\nimport { type Graph } from '#types';\n\nexport type { ExplorerArticleVariant } from '#components';\n\nexport type ExplorerArticleProps = AppSurface.ObjectArticleProps<Graph.Graph>;\n\nexport const ExplorerArticle = ({ role, subject, variant }: ExplorerArticleProps) => {\n const [graph] = useObject(subject);\n // The graph opens on its saved query until the toolbar's query is edited.\n const saved = useQueryBuilder(graph?.query.raw);\n const [edited, setEdited] = useState<{ filter?: Filter.Any }>();\n\n const db = graph && Obj.getDatabase(graph);\n const model = useGraphModel(db, edited ? edited.filter : saved);\n\n const handleFilterChange = useCallback<NonNullable<QueryEditorProps['onFilterChange']>>(\n ({ filter }) => setEdited({ filter }),\n [],\n );\n\n const [selected, setSelected] = useState<ExplorerArticleVariant>(isVariant(variant) ? variant : 'force');\n useEffect(() => {\n if (isVariant(variant)) {\n setSelected(variant);\n }\n }, [variant]);\n\n const handleVariantChange = useCallback((value: string) => {\n if (isVariant(value)) {\n setSelected(value);\n }\n }, []);\n\n // Dismiss the preview popover. The eid/label/trigger fields are placeholders ignored on\n // `state: false`.\n const handleDismiss = useCallback(() => {\n document.defaultView?.dispatchEvent(\n new DxAnchorActivate({ eid: '', label: '', trigger: document.body, state: false }),\n );\n }, []);\n\n const handleHover = useCallback((node: TreeNode | null, event?: MouseEvent) => {\n // Pointer left the node/label: keep the popover open so it can be hovered/interacted with.\n // The popover is dismissed only on an explicit click on the component surface (handleDismiss).\n if (!node || !event) {\n return;\n }\n const obj = node.data;\n if (!obj || !Obj.isObject(obj)) {\n return;\n }\n const eid = Obj.getURI(obj);\n if (!eid) {\n return;\n }\n\n const target = event.target as HTMLElement;\n target.dispatchEvent(\n new DxAnchorActivate({\n eid,\n kind: 'card',\n trigger: target,\n label: Obj.getLabel(obj) ?? eid,\n }),\n );\n }, []);\n\n const showToolbar = role === AppSurface.Article.role;\n\n if (!db || !model) {\n return null;\n }\n\n return (\n <Panel.Root role={role}>\n {showToolbar && (\n <Panel.Header>\n <Toolbar.Root>\n <QueryEditor db={db} value={graph?.query.raw} onFilterChange={handleFilterChange} />\n <Toolbar.ToggleGroup type='single' value={selected} onValueChange={handleVariantChange}>\n {VARIANTS.map(({ value, icon, label }) => (\n <ToggleGroup.Item key={value} value={value} icon={icon} iconOnly label={label} />\n ))}\n </Toolbar.ToggleGroup>\n </Toolbar.Root>\n </Panel.Header>\n )}\n <Panel.Body asChild>\n <Visualization.Root\n classNames='dx-base-surface'\n variant={selected}\n model={model}\n onSurfaceClick={handleDismiss}\n >\n <Visualization.Graph onNodeHover={handleHover} />\n <Visualization.TypeFilter />\n </Visualization.Root>\n </Panel.Body>\n </Panel.Root>\n );\n};\n\nExplorerArticle.displayName = 'ExplorerArticle';\n"],"mappings":";;;;;;;;;;;;;;AAyBA,IAAa,mBAAmB,EAAE,MAAM,SAAS,cAAoC;CACnF,MAAM,CAAC,SAAS,UAAU,OAAO;CAEjC,MAAM,QAAQ,gBAAgB,OAAO,MAAM,GAAG;CAC9C,MAAM,CAAC,QAAQ,aAAa,SAAkC;CAE9D,MAAM,KAAK,SAAS,IAAI,YAAY,KAAK;CACzC,MAAM,QAAQ,cAAc,IAAI,SAAS,OAAO,SAAS,KAAK;CAE9D,MAAM,qBAAqB,aACxB,EAAE,aAAa,UAAU,EAAE,OAAO,CAAC,GACpC,CAAC,CACH;CAEA,MAAM,CAAC,UAAU,eAAe,SAAiC,UAAU,OAAO,IAAI,UAAU,OAAO;CACvG,gBAAgB;EACd,IAAI,UAAU,OAAO,GACnB,YAAY,OAAO;CAEvB,GAAG,CAAC,OAAO,CAAC;CAEZ,MAAM,sBAAsB,aAAa,UAAkB;EACzD,IAAI,UAAU,KAAK,GACjB,YAAY,KAAK;CAErB,GAAG,CAAC,CAAC;CAIL,MAAM,gBAAgB,kBAAkB;EACtC,SAAS,aAAa,cACpB,IAAI,iBAAiB;GAAE,KAAK;GAAI,OAAO;GAAI,SAAS,SAAS;GAAM,OAAO;EAAM,CAAC,CACnF;CACF,GAAG,CAAC,CAAC;CAEL,MAAM,cAAc,aAAa,MAAuB,UAAuB;EAG7E,IAAI,CAAC,QAAQ,CAAC,OACZ;EAEF,MAAM,MAAM,KAAK;EACjB,IAAI,CAAC,OAAO,CAAC,IAAI,SAAS,GAAG,GAC3B;EAEF,MAAM,MAAM,IAAI,OAAO,GAAG;EAC1B,IAAI,CAAC,KACH;EAGF,MAAM,SAAS,MAAM;EACrB,OAAO,cACL,IAAI,iBAAiB;GACnB;GACA,MAAM;GACN,SAAS;GACT,OAAO,IAAI,SAAS,GAAG,KAAK;EAC9B,CAAC,CACH;CACF,GAAG,CAAC,CAAC;CAEL,MAAM,cAAc,SAAS,WAAW,QAAQ;CAEhD,IAAI,CAAC,MAAM,CAAC,OACV,OAAO;CAGT,OACE,qBAAC,MAAM,MAAP;EAAkB;EAAlB,UAAA,CACG,eACC,oBAAC,MAAM,QAAP,EAAA,UACE,qBAAC,QAAQ,MAAT,EAAA,UAAA,CACE,oBAAC,aAAD;GAAiB;GAAI,OAAO,OAAO,MAAM;GAAK,gBAAgB;EAAqB,CAAA,GACnF,oBAAC,QAAQ,aAAT;GAAqB,MAAK;GAAS,OAAO;GAAU,eAAe;GAChE,UAAA,SAAS,KAAK,EAAE,OAAO,MAAM,YAC5B,oBAAC,YAAY,MAAb;IAAqC;IAAa;IAAM,UAAA;IAAgB;GAAQ,GAAzD,KAAyD,CACjF;EACkB,CAAA,CACT,EAAA,CAAA,EACF,CAAA,GAEhB,oBAAC,MAAM,MAAP;GAAY,SAAA;GACV,UAAA,qBAAC,cAAc,MAAf;IACE,YAAW;IACX,SAAS;IACF;IACP,gBAAgB;IAJlB,UAAA,CAME,oBAAC,cAAc,OAAf,EAAqB,aAAa,YAAc,CAAA,GAChD,oBAAC,cAAc,YAAf,CAA2B,CAAA,CACT;;EACV,CAAA,CACF;;AAEhB;AAEA,gBAAgB,cAAc"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { t as ExplorerNamespace } from "./chunk-namespace.mjs";
|
|
3
3
|
import * as ActivationEvent from "@dxos/app-framework/ActivationEvent";
|
|
4
4
|
//#region src/types/ExplorerEvents.ts
|
|
5
5
|
var ExplorerEvents_exports = /* @__PURE__ */ __exportAll({ Start: () => Start });
|
|
@@ -8,7 +8,7 @@ var ExplorerEvents_exports = /* @__PURE__ */ __exportAll({ Start: () => Start })
|
|
|
8
8
|
* contributions consumed by this feature) activate here. Fired on demand and by the
|
|
9
9
|
* host's idle trickle.
|
|
10
10
|
*/
|
|
11
|
-
var Start = ActivationEvent.pluginStart(
|
|
11
|
+
var Start = ActivationEvent.pluginStart(ExplorerNamespace.key);
|
|
12
12
|
//#endregion
|
|
13
13
|
export { Start as n, ExplorerEvents_exports as t };
|
|
14
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-ExplorerEvents.mjs","names":[],"sources":["../../src/types/ExplorerEvents.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as ActivationEvent from '@dxos/app-framework/ActivationEvent';\n\nimport {
|
|
1
|
+
{"version":3,"file":"chunk-ExplorerEvents.mjs","names":[],"sources":["../../src/types/ExplorerEvents.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as ActivationEvent from '@dxos/app-framework/ActivationEvent';\n\nimport { ExplorerNamespace } from '../namespace.ts';\n\n/**\n * The feature's start event: the plugin's start-gated modules (and cross-plugin\n * contributions consumed by this feature) activate here. Fired on demand and by the\n * host's idle trickle.\n */\nexport const Start = ActivationEvent.pluginStart(ExplorerNamespace.key);\n"],"mappings":";;;;;;;;;;AAeA,IAAa,QAAQ,gBAAgB,YAAY,kBAAkB,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-Graph.mjs","names":[],"sources":["../../src/components/Graph/graph-adapter.ts","../../src/components/Graph/CanvasForceGraph.tsx","../../src/components/Graph/ForceGraph.tsx"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as GraphEdge from '@dxos/graph/GraphEdge';\nimport * as GraphModel from '@dxos/graph/GraphModel';\nimport * as GraphNode from '@dxos/graph/GraphNode';\n\nexport type ForceNode = {\n id?: string;\n};\n\nexport type ForceLink = {\n source?: string;\n target?: string;\n};\n\nexport type GraphData = {\n nodes: ForceNode[];\n links: ForceLink[];\n};\n\n/**\n * Map common graph to force-graph format.\n */\nexport class GraphAdapter implements GraphData {\n private readonly _nodes: ForceNode[] = [];\n private readonly _links: ForceLink[] = [];\n\n constructor(private readonly graph: GraphModel.AnyData) {\n this._nodes = graph.nodes.map((node: GraphNode.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: GraphEdge.Any) => nodeIds.has(edge.source) && nodeIds.has(edge.target))\n .map((edge: GraphEdge.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","//\n// Copyright 2023 DXOS.org\n//\n\nimport { forceLink, forceManyBody } from 'd3';\nimport NativeForceGraph from 'force-graph';\nimport React, {\n type ComponentPropsWithoutRef,\n type Ref,\n RefObject,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { useResizeDetector } from 'react-resize-detector';\n\nimport * as Util from '@dxos/react-ui/Util';\nimport { type SpaceGraphModel } from '@dxos/schema';\n\nimport { GraphAdapter } from './graph-adapter.ts';\n\nexport type CanvasForceGraphProps = {\n model?: SpaceGraphModel;\n match?: RegExp;\n};\n\n/**\n * More performance optimized version of the ForceGraph.\n */\nexport const CanvasForceGraph = Util.composable<HTMLDivElement, CanvasForceGraphProps>(\n ({ model, match, onClick, ...props }, forwardedRef) => {\n const { ref: resizeRef, width, height } = useResizeDetector({ refreshRate: 200 });\n const setRef = useCallback(\n (node: HTMLDivElement | null) => {\n resizeRef(node);\n assignRef(forwardedRef, node);\n },\n [resizeRef, forwardedRef],\n );\n\n const rootRef = useRef<HTMLDivElement>(null);\n const forceGraph = useRef<NativeForceGraph>(null);\n\n const [data, setData] = useState<GraphAdapter>();\n useEffect(() => {\n return model?.subscribe((model) => setData(new GraphAdapter(model.graph)));\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(() => handleZoomToFit())\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]);\n\n const handleZoomToFit = () => {\n forceGraph.current?.zoomToFit(400, 40);\n };\n\n const handleClick = useCallback<NonNullable<ComponentPropsWithoutRef<'div'>['onClick']>>(\n (event) => {\n onClick?.(event);\n if (!event.defaultPrevented) {\n handleZoomToFit();\n }\n },\n [onClick],\n );\n\n return (\n <div {...Util.composableProps(props, { classNames: 'relative grow' })} onClick={handleClick} ref={setRef}>\n <div ref={rootRef} className='dx-cover' />\n </div>\n );\n },\n);\n\nconst assignRef = <T,>(ref: Ref<T> | undefined, value: T | null): void => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n (ref as RefObject<T | null>).current = value;\n }\n};\n","//\n// Copyright 2023 DXOS.org\n//\n\nimport { useAtomValue } from '@effect/atom-react/Hooks';\nimport * as Atom from 'effect/reactivity/Atom';\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Obj } from '@dxos/echo';\nimport * as SelectionModel from '@dxos/graph/SelectionModel';\nimport {\n type GraphController,\n GraphForceProjector,\n type GraphLayoutNode,\n type GraphProps,\n SVG,\n type SVGContext,\n} from '@dxos/react-ui-graph';\nimport * as Util from '@dxos/react-ui/Util';\nimport { type SpaceGraphEdge, type SpaceGraphModel, type SpaceGraphNode } from '@dxos/schema';\nimport { getHashStyles } from '@dxos/ui-theme';\nimport '@dxos/react-ui-graph/styles/graph.css';\n\nconst EMPTY_ATOM = Atom.make<{ nodes: SpaceGraphNode[]; edges: SpaceGraphEdge[] }>({ nodes: [], edges: [] });\n\nexport type ForceGraphProps = {\n model?: SpaceGraphModel;\n grid?: boolean;\n selection?: SelectionModel.SelectionModel;\n onInspect?: GraphProps<SpaceGraphNode, SpaceGraphEdge>['onInspect'];\n} & Pick<GraphProps, 'drag'>;\n\nexport const ForceGraph = Util.composable<HTMLDivElement, ForceGraphProps>(\n ({ model, selection: selectionProp, grid, drag, onInspect, ...props }, forwardedRef) => {\n // TODO(wittjosiah): This should go into Graph.tsx but for some reason doesn't work.\n useAtomValue(model?.graphAtom ?? EMPTY_ATOM);\n\n const graph = useRef<GraphController>(null);\n const selection = useMemo(() => selectionProp ?? new SelectionModel.SelectionModel(), [selectionProp]);\n useEffect(() => {\n const unsubscribe = selection.subscribe(() => graph.current?.repaint());\n return unsubscribe;\n }, [selection]);\n\n const svgRef = useRef<SVGContext>(null);\n const [projector, setProjector] = useState<GraphForceProjector>();\n useEffect(() => {\n if (svgRef.current) {\n setProjector(\n new GraphForceProjector(svgRef.current, {\n attributes: {\n // TODO(burdon): Check type (currently assumes Employee property).\n // Edge shouldn't contribute to force if it's not active.\n linkForce: (edge) => edge.data?.object?.active !== false,\n },\n forces: {\n point: {\n strength: 0.01,\n },\n },\n }),\n );\n }\n // SVG.Graph owns projector start/stop; nothing to clean up here.\n }, []);\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 <div {...Util.composableProps(props, { classNames: 'dx-expand' })} ref={forwardedRef}>\n <SVG.Root ref={svgRef}>\n <SVG.Markers />\n {grid && <SVG.Grid axis />}\n <SVG.Zoom extent={[1 / 2, 2]}>\n <SVG.Graph<SpaceGraphNode, SpaceGraphEdge>\n ref={graph}\n drag={drag}\n model={model}\n projector={projector}\n labels={{\n text: (node) => node.data?.data.label ?? node.id,\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 onInspect={onInspect}\n />\n </SVG.Zoom>\n </SVG.Root>\n </div>\n );\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;;;AAyBA,IAAa,eAAb,MAA+C;CAIhB;CAH7B,SAAuC,CAAC;CACxC,SAAuC,CAAC;CAExC,YAAY,OAA4C;EAA3B,KAAA,QAAA;EAC3B,KAAK,SAAS,MAAM,MAAM,KAAK,UAAyB;GACtD,IAAI,KAAK;GACT,MAAM,KAAK;GACX,MAAM,KAAK;EACb,EAAE;EAGF,MAAM,UAAU,IAAI,IAAI,KAAK,OAAO,KAAK,SAAS,KAAK,EAAE,CAAC;EAG1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ACA,SAAS,EACP,eAAe,UAAU,SAAS,KAAK,EAAE,EAC3C;OACF;MACF,EACF;MACA,UAAU;MACC;KACZ,CAAA;IACO,CAAA;GACF;;CACP,CAAA;AAET,CACF"}
|
|
1
|
+
{"version":3,"file":"chunk-Graph.mjs","names":[],"sources":["../../src/components/Graph/graph-adapter.ts","../../src/components/Graph/CanvasForceGraph.tsx","../../src/components/Graph/ForceGraph.tsx"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as GraphEdge from '@dxos/graph/GraphEdge';\nimport * as GraphModel from '@dxos/graph/GraphModel';\nimport * as GraphNode from '@dxos/graph/GraphNode';\n\nexport type ForceNode = {\n id?: string;\n};\n\nexport type ForceLink = {\n source?: string;\n target?: string;\n};\n\nexport type GraphData = {\n nodes: ForceNode[];\n links: ForceLink[];\n};\n\n/**\n * Map common graph to force-graph format.\n */\nexport class GraphAdapter implements GraphData {\n private readonly _nodes: ForceNode[] = [];\n private readonly _links: ForceLink[] = [];\n\n constructor(private readonly graph: GraphModel.AnyData) {\n this._nodes = graph.nodes.map((node: GraphNode.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: GraphEdge.Any) => nodeIds.has(edge.source) && nodeIds.has(edge.target))\n .map((edge: GraphEdge.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","//\n// Copyright 2023 DXOS.org\n//\n\nimport { forceLink, forceManyBody } from 'd3';\nimport NativeForceGraph from 'force-graph';\nimport React, {\n type ComponentPropsWithoutRef,\n type Ref,\n RefObject,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { useResizeDetector } from 'react-resize-detector';\n\nimport * as Util from '@dxos/react-ui/Util';\nimport { type SpaceGraphModel } from '@dxos/schema';\n\nimport { GraphAdapter } from './graph-adapter.ts';\n\nexport type CanvasForceGraphProps = {\n model?: SpaceGraphModel;\n match?: RegExp;\n};\n\n/**\n * More performance optimized version of the ForceGraph.\n */\nexport const CanvasForceGraph = Util.composable<HTMLDivElement, CanvasForceGraphProps>(\n ({ model, match, onClick, ...props }, forwardedRef) => {\n const { ref: resizeRef, width, height } = useResizeDetector({ refreshRate: 200 });\n const setRef = useCallback(\n (node: HTMLDivElement | null) => {\n resizeRef(node);\n assignRef(forwardedRef, node);\n },\n [resizeRef, forwardedRef],\n );\n\n const rootRef = useRef<HTMLDivElement>(null);\n const forceGraph = useRef<NativeForceGraph>(null);\n\n const [data, setData] = useState<GraphAdapter>();\n useEffect(() => {\n return model?.subscribe((model) => setData(new GraphAdapter(model.graph)));\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(() => handleZoomToFit())\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]);\n\n const handleZoomToFit = () => {\n forceGraph.current?.zoomToFit(400, 40);\n };\n\n const handleClick = useCallback<NonNullable<ComponentPropsWithoutRef<'div'>['onClick']>>(\n (event) => {\n onClick?.(event);\n if (!event.defaultPrevented) {\n handleZoomToFit();\n }\n },\n [onClick],\n );\n\n return (\n <div {...Util.composableProps(props, { classNames: 'relative grow' })} onClick={handleClick} ref={setRef}>\n <div ref={rootRef} className='dx-cover' />\n </div>\n );\n },\n);\n\nconst assignRef = <T,>(ref: Ref<T> | undefined, value: T | null): void => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n (ref as RefObject<T | null>).current = value;\n }\n};\n","//\n// Copyright 2023 DXOS.org\n//\n\nimport { useAtomValue } from '@effect/atom-react/Hooks';\nimport * as Atom from 'effect/reactivity/Atom';\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Obj } from '@dxos/echo';\nimport * as SelectionModel from '@dxos/graph/SelectionModel';\nimport {\n type GraphController,\n GraphForceProjector,\n type GraphLayoutNode,\n type GraphProps,\n SVG,\n type SVGContext,\n} from '@dxos/react-ui-graph';\nimport * as Util from '@dxos/react-ui/Util';\nimport { type SpaceGraphEdge, type SpaceGraphModel, type SpaceGraphNode } from '@dxos/schema';\nimport { getHashStyles } from '@dxos/ui-theme';\nimport '@dxos/react-ui-graph/styles/graph.css';\n\nconst EMPTY_ATOM = Atom.make<{ nodes: SpaceGraphNode[]; edges: SpaceGraphEdge[] }>({ nodes: [], edges: [] });\n\nexport type ForceGraphProps = {\n model?: SpaceGraphModel;\n grid?: boolean;\n selection?: SelectionModel.SelectionModel;\n onInspect?: GraphProps<SpaceGraphNode, SpaceGraphEdge>['onInspect'];\n} & Pick<GraphProps, 'drag'>;\n\nexport const ForceGraph = Util.composable<HTMLDivElement, ForceGraphProps>(\n ({ model, selection: selectionProp, grid, drag, onInspect, ...props }, forwardedRef) => {\n // TODO(wittjosiah): This should go into Graph.tsx but for some reason doesn't work.\n useAtomValue(model?.graphAtom ?? EMPTY_ATOM);\n\n const graph = useRef<GraphController>(null);\n const selection = useMemo(() => selectionProp ?? new SelectionModel.SelectionModel(), [selectionProp]);\n useEffect(() => {\n const unsubscribe = selection.subscribe(() => graph.current?.repaint());\n return unsubscribe;\n }, [selection]);\n\n const svgRef = useRef<SVGContext>(null);\n const [projector, setProjector] = useState<GraphForceProjector>();\n useEffect(() => {\n if (svgRef.current) {\n setProjector(\n new GraphForceProjector(svgRef.current, {\n attributes: {\n // TODO(burdon): Check type (currently assumes Employee property).\n // Edge shouldn't contribute to force if it's not active.\n linkForce: (edge) => edge.data?.object?.active !== false,\n },\n forces: {\n point: {\n strength: 0.01,\n },\n },\n }),\n );\n }\n // SVG.Graph owns projector start/stop; nothing to clean up here.\n }, []);\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 <div {...Util.composableProps(props, { classNames: 'dx-expand' })} ref={forwardedRef}>\n <SVG.Root ref={svgRef}>\n <SVG.Markers />\n {grid && <SVG.Grid axis />}\n <SVG.Zoom extent={[1 / 2, 2]}>\n <SVG.Graph<SpaceGraphNode, SpaceGraphEdge>\n ref={graph}\n drag={drag}\n model={model}\n projector={projector}\n labels={{\n text: (node) => node.data?.data.label ?? node.id,\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 onInspect={onInspect}\n />\n </SVG.Zoom>\n </SVG.Root>\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