@dxos/plugin-explorer 0.8.4-main.f9ba587 → 0.8.4-main.fcc0d83b33
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/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +11323 -92
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +21 -5
- package/dist/lib/browser/meta.mjs.map +4 -4
- package/dist/lib/browser/translations.mjs +33 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +68 -6
- package/dist/lib/browser/types/index.mjs.map +4 -4
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +11323 -92
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/meta.mjs +21 -5
- package/dist/lib/node-esm/meta.mjs.map +4 -4
- package/dist/lib/node-esm/translations.mjs +34 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +68 -6
- package/dist/lib/node-esm/types/index.mjs.map +4 -4
- 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 +2 -1
- package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/Chart/Chart.d.ts.map +1 -1
- package/dist/types/src/components/Chart/Chart.stories.d.ts +8 -4
- 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 +8 -4
- package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
- package/dist/types/src/components/Graph/D3ForceGraph.d.ts +6 -5
- package/dist/types/src/components/Graph/D3ForceGraph.d.ts.map +1 -1
- package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts +15 -4
- package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts.map +1 -1
- package/dist/types/src/components/Graph/ForceGraph.stories.d.ts +13 -4
- package/dist/types/src/components/Graph/ForceGraph.stories.d.ts.map +1 -1
- package/dist/types/src/components/Graph/adapter.d.ts +1 -1
- package/dist/types/src/components/Graph/adapter.d.ts.map +1 -1
- package/dist/types/src/components/Graph/testing.d.ts +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 +13 -16
- 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 +19 -17
- package/dist/types/src/components/Tree/types/tree.d.ts.map +1 -1
- package/dist/types/src/components/Tree/types/types.d.ts +1 -1
- package/dist/types/src/components/Tree/types/types.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -4
- 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 +2 -2
- package/dist/types/src/hooks/useGraphModel.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +34 -11
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/ExplorerAction.d.ts +6 -0
- package/dist/types/src/types/ExplorerAction.d.ts.map +1 -0
- package/dist/types/src/types/Graph.d.ts +23 -0
- package/dist/types/src/types/Graph.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +69 -54
- package/src/ExplorerPlugin.tsx +43 -54
- package/src/capabilities/index.ts +2 -3
- package/src/capabilities/react-surface.tsx +24 -15
- package/src/components/Chart/Chart.stories.tsx +9 -8
- package/src/components/Chart/Chart.tsx +1 -1
- package/src/components/Globe/Globe.stories.tsx +13 -12
- package/src/components/Globe/Globe.tsx +1 -1
- package/src/components/Graph/D3ForceGraph.stories.tsx +47 -28
- package/src/components/Graph/D3ForceGraph.tsx +83 -76
- package/src/components/Graph/ForceGraph.stories.tsx +47 -28
- package/src/components/Graph/ForceGraph.tsx +5 -5
- package/src/components/Graph/adapter.ts +14 -8
- package/src/components/Graph/testing.ts +13 -10
- package/src/components/Tree/Tree.stories.tsx +34 -25
- package/src/components/Tree/Tree.tsx +11 -6
- package/src/components/Tree/testing/generator.ts +4 -2
- package/src/components/Tree/types/tree.test.ts +9 -7
- package/src/components/Tree/types/tree.ts +42 -21
- package/src/components/Tree/types/types.ts +1 -1
- package/src/components/index.ts +0 -4
- package/src/containers/ExplorerContainer/ExplorerContainer.tsx +53 -0
- package/src/containers/ExplorerContainer/index.ts +5 -0
- package/src/containers/index.ts +7 -0
- package/src/hooks/useGraphModel.ts +19 -11
- package/src/index.ts +0 -1
- package/src/meta.ts +9 -6
- package/src/translations.ts +17 -10
- package/src/types/ExplorerAction.ts +20 -0
- package/src/types/Graph.ts +49 -0
- package/src/types/index.ts +2 -2
- package/src/typings.d.ts +8 -0
- package/dist/lib/browser/ExplorerContainer-WYPM7YXU.mjs +0 -37
- package/dist/lib/browser/ExplorerContainer-WYPM7YXU.mjs.map +0 -7
- package/dist/lib/browser/chunk-4UVJNXCE.mjs +0 -11329
- package/dist/lib/browser/chunk-4UVJNXCE.mjs.map +0 -7
- package/dist/lib/browser/chunk-EF4BFHTI.mjs +0 -38
- package/dist/lib/browser/chunk-EF4BFHTI.mjs.map +0 -7
- package/dist/lib/browser/chunk-OAOY7SHY.mjs +0 -30
- package/dist/lib/browser/chunk-OAOY7SHY.mjs.map +0 -7
- package/dist/lib/browser/chunk-UL5EDJPE.mjs +0 -21
- package/dist/lib/browser/chunk-UL5EDJPE.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZZX52LNU.mjs +0 -187
- package/dist/lib/browser/chunk-ZZX52LNU.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-XH2UO2FM.mjs +0 -24
- package/dist/lib/browser/intent-resolver-XH2UO2FM.mjs.map +0 -7
- package/dist/lib/browser/react-surface-5ENPAK3V.mjs +0 -31
- package/dist/lib/browser/react-surface-5ENPAK3V.mjs.map +0 -7
- package/dist/lib/node-esm/ExplorerContainer-S5GL733T.mjs +0 -38
- package/dist/lib/node-esm/ExplorerContainer-S5GL733T.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6M6W7DKH.mjs +0 -189
- package/dist/lib/node-esm/chunk-6M6W7DKH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HCV3J2HM.mjs +0 -11331
- package/dist/lib/node-esm/chunk-HCV3J2HM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PIAXA43R.mjs +0 -23
- package/dist/lib/node-esm/chunk-PIAXA43R.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PPBUWC7F.mjs +0 -32
- package/dist/lib/node-esm/chunk-PPBUWC7F.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VKCOKQRG.mjs +0 -39
- package/dist/lib/node-esm/chunk-VKCOKQRG.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-AGBBNA67.mjs +0 -25
- package/dist/lib/node-esm/intent-resolver-AGBBNA67.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-4MDNPYQ6.mjs +0 -32
- package/dist/lib/node-esm/react-surface-4MDNPYQ6.mjs.map +0 -7
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/ExplorerContainer.d.ts +0 -9
- package/dist/types/src/components/ExplorerContainer.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -12
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/dist/types/src/types/types.d.ts +0 -18
- package/dist/types/src/types/types.d.ts.map +0 -1
- package/src/capabilities/intent-resolver.ts +0 -19
- package/src/components/ExplorerContainer.tsx +0 -36
- package/src/types/schema.ts +0 -16
- package/src/types/types.ts +0 -21
package/package.json
CHANGED
|
@@ -1,100 +1,115 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-explorer",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.fcc0d83b33",
|
|
4
4
|
"description": "Braneframe data visualization plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
7
11
|
"license": "MIT",
|
|
8
12
|
"author": "DXOS.org",
|
|
9
13
|
"sideEffects": true,
|
|
10
14
|
"type": "module",
|
|
15
|
+
"imports": {
|
|
16
|
+
"#capabilities": "./src/capabilities/index.ts",
|
|
17
|
+
"#components": "./src/components/index.ts",
|
|
18
|
+
"#containers": "./src/containers/index.ts",
|
|
19
|
+
"#hooks": "./src/hooks/index.ts",
|
|
20
|
+
"#meta": "./src/meta.ts",
|
|
21
|
+
"#translations": "./src/translations.ts",
|
|
22
|
+
"#types": "./src/types/index.ts"
|
|
23
|
+
},
|
|
11
24
|
"exports": {
|
|
12
25
|
".": {
|
|
13
|
-
"
|
|
26
|
+
"source": "./src/index.ts",
|
|
14
27
|
"browser": "./dist/lib/browser/index.mjs",
|
|
15
|
-
"node": "./dist/lib/node-esm/index.mjs"
|
|
28
|
+
"node": "./dist/lib/node-esm/index.mjs",
|
|
29
|
+
"types": "./dist/types/src/index.d.ts"
|
|
16
30
|
},
|
|
17
31
|
"./meta": {
|
|
18
|
-
"
|
|
32
|
+
"source": "./src/meta.ts",
|
|
19
33
|
"browser": "./dist/lib/browser/meta.mjs",
|
|
20
|
-
"node": "./dist/lib/node-esm/meta.mjs"
|
|
34
|
+
"node": "./dist/lib/node-esm/meta.mjs",
|
|
35
|
+
"types": "./dist/types/src/meta.d.ts"
|
|
36
|
+
},
|
|
37
|
+
"./translations": {
|
|
38
|
+
"source": "./src/translations.ts",
|
|
39
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
40
|
+
"browser": "./dist/lib/browser/translations.mjs",
|
|
41
|
+
"node": "./dist/lib/node-esm/translations.mjs"
|
|
21
42
|
},
|
|
22
43
|
"./types": {
|
|
23
|
-
"
|
|
44
|
+
"source": "./src/types/index.ts",
|
|
24
45
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
25
|
-
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
46
|
+
"node": "./dist/lib/node-esm/types/index.mjs",
|
|
47
|
+
"types": "./dist/types/src/types/index.d.ts"
|
|
26
48
|
}
|
|
27
49
|
},
|
|
28
50
|
"types": "dist/types/src/index.d.ts",
|
|
29
|
-
"typesVersions": {
|
|
30
|
-
"*": {
|
|
31
|
-
"meta": [
|
|
32
|
-
"dist/types/src/meta.d.ts"
|
|
33
|
-
],
|
|
34
|
-
"types": [
|
|
35
|
-
"dist/types/src/types/index.d.ts"
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
51
|
"files": [
|
|
40
52
|
"dist",
|
|
41
53
|
"src"
|
|
42
54
|
],
|
|
43
55
|
"dependencies": {
|
|
44
56
|
"3d-force-graph": "^1.76.1",
|
|
57
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
45
58
|
"@observablehq/plot": "^0.6.11",
|
|
46
|
-
"@preact-signals/safe-react": "^0.9.0",
|
|
47
|
-
"@preact/signals-core": "^1.9.0",
|
|
48
59
|
"d3": "^7.9.0",
|
|
49
|
-
"effect": "3.
|
|
60
|
+
"effect": "3.20.0",
|
|
50
61
|
"force-graph": "^1.49.4",
|
|
51
62
|
"lodash.defaultsdeep": "^4.6.1",
|
|
52
63
|
"react-resize-detector": "^11.0.1",
|
|
53
64
|
"three": "^0.178.0",
|
|
54
65
|
"topojson-client": "^3.1.0",
|
|
55
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/echo": "0.8.4-main.
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/plugin-
|
|
66
|
-
"@dxos/plugin-search": "0.8.4-main.
|
|
67
|
-
"@dxos/plugin-space": "0.8.4-main.
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/react-
|
|
70
|
-
"@dxos/react-ui-
|
|
71
|
-
"@dxos/react-ui-
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
66
|
+
"@dxos/app-framework": "0.8.4-main.fcc0d83b33",
|
|
67
|
+
"@dxos/app-toolkit": "0.8.4-main.fcc0d83b33",
|
|
68
|
+
"@dxos/async": "0.8.4-main.fcc0d83b33",
|
|
69
|
+
"@dxos/echo": "0.8.4-main.fcc0d83b33",
|
|
70
|
+
"@dxos/client": "0.8.4-main.fcc0d83b33",
|
|
71
|
+
"@dxos/compute": "0.8.4-main.fcc0d83b33",
|
|
72
|
+
"@dxos/echo-query": "0.8.4-main.fcc0d83b33",
|
|
73
|
+
"@dxos/invariant": "0.8.4-main.fcc0d83b33",
|
|
74
|
+
"@dxos/graph": "0.8.4-main.fcc0d83b33",
|
|
75
|
+
"@dxos/log": "0.8.4-main.fcc0d83b33",
|
|
76
|
+
"@dxos/plugin-graph": "0.8.4-main.fcc0d83b33",
|
|
77
|
+
"@dxos/plugin-search": "0.8.4-main.fcc0d83b33",
|
|
78
|
+
"@dxos/plugin-space": "0.8.4-main.fcc0d83b33",
|
|
79
|
+
"@dxos/plugin-client": "0.8.4-main.fcc0d83b33",
|
|
80
|
+
"@dxos/react-client": "0.8.4-main.fcc0d83b33",
|
|
81
|
+
"@dxos/react-ui-attention": "0.8.4-main.fcc0d83b33",
|
|
82
|
+
"@dxos/react-ui-components": "0.8.4-main.fcc0d83b33",
|
|
83
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.fcc0d83b33",
|
|
84
|
+
"@dxos/react-ui-stack": "0.8.4-main.fcc0d83b33",
|
|
85
|
+
"@dxos/react-ui-graph": "0.8.4-main.fcc0d83b33",
|
|
86
|
+
"@dxos/types": "0.8.4-main.fcc0d83b33",
|
|
87
|
+
"@dxos/schema": "0.8.4-main.fcc0d83b33",
|
|
88
|
+
"@dxos/util": "0.8.4-main.fcc0d83b33"
|
|
74
89
|
},
|
|
75
90
|
"devDependencies": {
|
|
76
91
|
"@types/d3": "^7.4.3",
|
|
77
92
|
"@types/d3-hierarchy": "^3.1.6",
|
|
78
93
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
79
|
-
"@types/react": "~
|
|
80
|
-
"@types/react-dom": "~
|
|
94
|
+
"@types/react": "~19.2.7",
|
|
95
|
+
"@types/react-dom": "~19.2.3",
|
|
81
96
|
"@types/topojson-client": "^3.1.4",
|
|
82
97
|
"@types/topojson-specification": "^1.0.5",
|
|
83
|
-
"react": "~
|
|
84
|
-
"react-dom": "~
|
|
85
|
-
"vite": "
|
|
86
|
-
"@dxos/echo-generator": "0.8.4-main.
|
|
87
|
-
"@dxos/random": "0.8.4-main.
|
|
88
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
89
|
-
"@dxos/
|
|
90
|
-
"@dxos/
|
|
98
|
+
"react": "~19.2.3",
|
|
99
|
+
"react-dom": "~19.2.3",
|
|
100
|
+
"vite": "^8.0.10",
|
|
101
|
+
"@dxos/echo-generator": "0.8.4-main.fcc0d83b33",
|
|
102
|
+
"@dxos/random": "0.8.4-main.fcc0d83b33",
|
|
103
|
+
"@dxos/react-ui": "0.8.4-main.fcc0d83b33",
|
|
104
|
+
"@dxos/storybook-utils": "0.8.4-main.fcc0d83b33",
|
|
105
|
+
"@dxos/ui-theme": "0.8.4-main.fcc0d83b33"
|
|
91
106
|
},
|
|
92
107
|
"peerDependencies": {
|
|
93
|
-
"effect": "
|
|
94
|
-
"react": "~
|
|
95
|
-
"react-dom": "~
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/react-ui
|
|
108
|
+
"effect": "3.20.0",
|
|
109
|
+
"react": "~19.2.3",
|
|
110
|
+
"react-dom": "~19.2.3",
|
|
111
|
+
"@dxos/ui-theme": "0.8.4-main.fcc0d83b33",
|
|
112
|
+
"@dxos/react-ui": "0.8.4-main.fcc0d83b33"
|
|
98
113
|
},
|
|
99
114
|
"publishConfig": {
|
|
100
115
|
"access": "public"
|
package/src/ExplorerPlugin.tsx
CHANGED
|
@@ -2,59 +2,48 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
8
|
-
import { defineObjectForm } from '@dxos/plugin-space/types';
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Option from 'effect/Option';
|
|
9
7
|
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
8
|
+
import { Plugin } from '@dxos/app-framework';
|
|
9
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
11
|
+
import { Annotation, Type } from '@dxos/echo';
|
|
12
|
+
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
13
|
+
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
14
|
+
import { ViewModel } from '@dxos/schema';
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
id:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}),
|
|
50
|
-
defineModule({
|
|
51
|
-
id: `${meta.id}/module/react-surface`,
|
|
52
|
-
activatesOn: Events.SetupReactSurface,
|
|
53
|
-
activate: ReactSurface,
|
|
54
|
-
}),
|
|
55
|
-
defineModule({
|
|
56
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
57
|
-
activatesOn: Events.SetupIntentResolver,
|
|
58
|
-
activate: IntentResolver,
|
|
59
|
-
}),
|
|
60
|
-
]);
|
|
16
|
+
import { ReactSurface } from '#capabilities';
|
|
17
|
+
import { meta } from '#meta';
|
|
18
|
+
import { translations } from '#translations';
|
|
19
|
+
import { ExplorerAction, Graph } from '#types';
|
|
20
|
+
|
|
21
|
+
export const ExplorerPlugin = Plugin.define(meta).pipe(
|
|
22
|
+
AppPlugin.addMetadataModule({
|
|
23
|
+
metadata: {
|
|
24
|
+
id: Type.getTypename(Graph.Graph),
|
|
25
|
+
metadata: {
|
|
26
|
+
icon: Annotation.IconAnnotation.get(Graph.Graph).pipe(Option.getOrThrow).icon,
|
|
27
|
+
iconHue: Annotation.IconAnnotation.get(Graph.Graph).pipe(Option.getOrThrow).hue ?? 'white',
|
|
28
|
+
inputSchema: ExplorerAction.GraphProps,
|
|
29
|
+
createObject: ((props, options) =>
|
|
30
|
+
Effect.gen(function* () {
|
|
31
|
+
const object = yield* Effect.promise(async () => {
|
|
32
|
+
const { view } = await ViewModel.makeFromDatabase({ db: options.db, typename: props.typename });
|
|
33
|
+
return Graph.make({ name: props.name, view });
|
|
34
|
+
});
|
|
35
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
36
|
+
object,
|
|
37
|
+
target: options.target,
|
|
38
|
+
hidden: true,
|
|
39
|
+
targetNodeId: options.targetNodeId,
|
|
40
|
+
});
|
|
41
|
+
})) satisfies CreateObject,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
}),
|
|
45
|
+
AppPlugin.addSchemaModule({ schema: [Graph.Graph] }),
|
|
46
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
47
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
48
|
+
Plugin.make,
|
|
49
|
+
);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
-
export const
|
|
8
|
-
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
7
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
@@ -2,22 +2,31 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
5
6
|
import React from 'react';
|
|
6
7
|
|
|
7
|
-
import { Capabilities,
|
|
8
|
-
import {
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
9
11
|
|
|
10
|
-
import { ExplorerContainer } from '
|
|
11
|
-
import {
|
|
12
|
-
import { ViewType } from '../types';
|
|
12
|
+
import { ExplorerContainer } from '#containers';
|
|
13
|
+
import { Graph } from '#types';
|
|
13
14
|
|
|
14
|
-
export default () =>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
export default Capability.makeModule(() =>
|
|
16
|
+
Effect.succeed(
|
|
17
|
+
Capability.contributes(
|
|
18
|
+
Capabilities.ReactSurface,
|
|
19
|
+
Surface.create({
|
|
20
|
+
id: 'article',
|
|
21
|
+
// TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
|
|
22
|
+
filter: AppSurface.oneOf(
|
|
23
|
+
AppSurface.object(AppSurface.Article, Graph.Graph),
|
|
24
|
+
AppSurface.object(AppSurface.Section, Graph.Graph),
|
|
25
|
+
),
|
|
26
|
+
component: ({ data, role }) => {
|
|
27
|
+
return <ExplorerContainer role={role} subject={data.subject} attendableId={data.attendableId} />;
|
|
28
|
+
},
|
|
29
|
+
}),
|
|
30
|
+
),
|
|
31
|
+
),
|
|
32
|
+
);
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
10
8
|
import { ClientRepeater } from '@dxos/react-client/testing';
|
|
11
|
-
import { withLayout, withTheme } from '@dxos/
|
|
9
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
12
10
|
|
|
13
|
-
import { Chart } from './Chart';
|
|
14
11
|
import CitiesData from '../../../data/cities.js';
|
|
12
|
+
import { Chart } from './Chart';
|
|
15
13
|
|
|
16
14
|
// TODO(burdon): Generate data with geo lat/lng.
|
|
17
15
|
// TODO(burdon): How to provide geo service via agent?
|
|
@@ -32,10 +30,13 @@ const Story = () => {
|
|
|
32
30
|
// TODO(burdon): Change to decorator.
|
|
33
31
|
export const Default = () => <ClientRepeater component={Story} />;
|
|
34
32
|
|
|
35
|
-
const meta
|
|
36
|
-
title: 'plugins/plugin-explorer/Chart',
|
|
33
|
+
const meta = {
|
|
34
|
+
title: 'plugins/plugin-explorer/components/Chart',
|
|
37
35
|
component: Chart,
|
|
38
|
-
decorators: [withTheme, withLayout(
|
|
39
|
-
|
|
36
|
+
decorators: [withTheme(), withLayout()],
|
|
37
|
+
parameters: {
|
|
38
|
+
layout: 'fullscreen',
|
|
39
|
+
},
|
|
40
|
+
} satisfies Meta<typeof Chart>;
|
|
40
41
|
|
|
41
42
|
export default meta;
|
|
@@ -7,7 +7,7 @@ import { type DotOptions } from '@observablehq/plot';
|
|
|
7
7
|
import React, { useEffect } from 'react';
|
|
8
8
|
import { useResizeDetector } from 'react-resize-detector';
|
|
9
9
|
|
|
10
|
-
import { type Accessor,
|
|
10
|
+
import { type Accessor, type Point, createAdapter } from '../plot';
|
|
11
11
|
|
|
12
12
|
const defaultOptions: DotOptions = {
|
|
13
13
|
r: 4,
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
6
|
-
|
|
7
|
-
import { plot, sphere, geo, graticule, dot } from '@observablehq/plot';
|
|
5
|
+
import { dot, geo, graticule, plot, sphere } from '@observablehq/plot';
|
|
8
6
|
import { type Meta } from '@storybook/react-vite';
|
|
9
7
|
import { geoCircle } from 'd3';
|
|
10
8
|
import React, { useEffect } from 'react';
|
|
@@ -12,11 +10,11 @@ import { useResizeDetector } from 'react-resize-detector';
|
|
|
12
10
|
import { feature } from 'topojson-client';
|
|
13
11
|
|
|
14
12
|
import { ClientRepeater } from '@dxos/react-client/testing';
|
|
15
|
-
import { withLayout, withTheme } from '@dxos/
|
|
13
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
16
14
|
|
|
17
|
-
import { Globe } from './Globe';
|
|
18
15
|
import CitiesData from '../../../data/cities.js';
|
|
19
16
|
import CountriesData from '../../../data/countries-110m.js';
|
|
17
|
+
import { Globe } from './Globe';
|
|
20
18
|
|
|
21
19
|
// TODO(burdon): Generate data with geo lat/lng.
|
|
22
20
|
// TODO(burdon): How to provide geo service via agent?
|
|
@@ -80,13 +78,16 @@ const ExtendedStory = () => {
|
|
|
80
78
|
return <div ref={containerRef} className='grow p-8' />;
|
|
81
79
|
};
|
|
82
80
|
|
|
83
|
-
|
|
81
|
+
const meta = {
|
|
82
|
+
title: 'plugins/plugin-explorer/components/Globe',
|
|
83
|
+
decorators: [withTheme(), withLayout()],
|
|
84
|
+
parameters: {
|
|
85
|
+
layout: 'fullscreen',
|
|
86
|
+
},
|
|
87
|
+
} satisfies Meta;
|
|
84
88
|
|
|
85
|
-
export
|
|
89
|
+
export default meta;
|
|
86
90
|
|
|
87
|
-
const
|
|
88
|
-
title: 'plugins/plugin-explorer/Globe',
|
|
89
|
-
decorators: [withTheme, withLayout({ fullscreen: true })],
|
|
90
|
-
};
|
|
91
|
+
export const Default = () => <ClientRepeater component={DefaultStory} createSpace />;
|
|
91
92
|
|
|
92
|
-
export
|
|
93
|
+
export const Extended = () => <ClientRepeater component={ExtendedStory} createSpace />;
|
|
@@ -9,7 +9,7 @@ import { useResizeDetector } from 'react-resize-detector';
|
|
|
9
9
|
import * as topojson from 'topojson-client';
|
|
10
10
|
|
|
11
11
|
import CountriesData from '../../../data/countries-110m.js';
|
|
12
|
-
import { type Accessor,
|
|
12
|
+
import { type Accessor, type GeoLocation, createAdapter } from '../plot';
|
|
13
13
|
|
|
14
14
|
const defaultOptions: DotOptions = {
|
|
15
15
|
r: 4,
|
|
@@ -2,63 +2,82 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React, { useState } from 'react';
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
import { Obj } from '@dxos/echo';
|
|
11
|
-
import { faker } from '@dxos/random';
|
|
8
|
+
import { Type } from '@dxos/echo';
|
|
9
|
+
import { View } from '@dxos/echo';
|
|
10
|
+
import { random } from '@dxos/random';
|
|
12
11
|
import { useClient } from '@dxos/react-client';
|
|
13
12
|
import { type Space } from '@dxos/react-client/echo';
|
|
14
13
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
15
|
-
import {
|
|
14
|
+
import { useAsyncEffect } from '@dxos/react-ui';
|
|
15
|
+
import { Loading, withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
16
|
+
import { ViewModel } from '@dxos/schema';
|
|
16
17
|
import { type ValueGenerator } from '@dxos/schema/testing';
|
|
17
|
-
import {
|
|
18
|
+
import { withRegistry } from '@dxos/storybook-utils';
|
|
19
|
+
import { HasRelationship, Organization, Person, Pipeline } from '@dxos/types';
|
|
20
|
+
|
|
21
|
+
import { useGraphModel } from '#hooks';
|
|
22
|
+
import { Graph } from '#types';
|
|
18
23
|
|
|
19
24
|
import { D3ForceGraph } from './D3ForceGraph';
|
|
20
25
|
import { generate } from './testing';
|
|
21
|
-
import { useGraphModel } from '../../hooks';
|
|
22
|
-
import { ViewType } from '../../types';
|
|
23
26
|
|
|
24
|
-
const generator =
|
|
27
|
+
const generator = random as any as ValueGenerator;
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
random.seed(1);
|
|
27
30
|
|
|
28
31
|
const DefaultStory = () => {
|
|
29
32
|
const client = useClient();
|
|
30
33
|
const [space, setSpace] = useState<Space>();
|
|
31
|
-
const [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
const [graph, setGraph] = useState<Graph.Graph>();
|
|
35
|
+
|
|
36
|
+
useAsyncEffect(async () => {
|
|
37
|
+
const space = client.spaces.get()[0];
|
|
34
38
|
void generate(space, generator);
|
|
35
|
-
const view =
|
|
39
|
+
const { view } = await ViewModel.makeFromDatabase({ db: space.db, typename: Type.getTypename(Graph.Graph) });
|
|
40
|
+
const graph = Graph.make({ name: 'Test', view });
|
|
41
|
+
space.db.add(graph);
|
|
36
42
|
setSpace(space);
|
|
37
|
-
|
|
38
|
-
}, []);
|
|
43
|
+
setGraph(graph);
|
|
44
|
+
}, [client]);
|
|
39
45
|
|
|
40
46
|
const model = useGraphModel(space);
|
|
41
|
-
if (!model || !space || !
|
|
42
|
-
return
|
|
47
|
+
if (!model || !space || !graph) {
|
|
48
|
+
return <Loading data={{ model: !!model, space: !!space, graph: !!graph }} />;
|
|
43
49
|
}
|
|
44
50
|
|
|
45
51
|
return <D3ForceGraph model={model} />;
|
|
46
52
|
};
|
|
47
53
|
|
|
48
|
-
const meta
|
|
49
|
-
title: 'plugins/plugin-explorer/D3ForceGraph',
|
|
54
|
+
const meta = {
|
|
55
|
+
title: 'plugins/plugin-explorer/components/D3ForceGraph',
|
|
50
56
|
component: D3ForceGraph,
|
|
51
|
-
render:
|
|
57
|
+
render: DefaultStory,
|
|
52
58
|
decorators: [
|
|
59
|
+
withRegistry,
|
|
60
|
+
withTheme(),
|
|
61
|
+
withLayout(),
|
|
53
62
|
withClientProvider({
|
|
54
63
|
createSpace: true,
|
|
55
|
-
types: [
|
|
64
|
+
types: [
|
|
65
|
+
Graph.Graph,
|
|
66
|
+
View.View,
|
|
67
|
+
Organization.Organization,
|
|
68
|
+
Pipeline.Pipeline,
|
|
69
|
+
Person.Person,
|
|
70
|
+
HasRelationship.HasRelationship,
|
|
71
|
+
],
|
|
56
72
|
}),
|
|
57
|
-
withTheme,
|
|
58
|
-
withLayout({ fullscreen: true }),
|
|
59
73
|
],
|
|
60
|
-
|
|
74
|
+
parameters: {
|
|
75
|
+
layout: 'fullscreen',
|
|
76
|
+
},
|
|
77
|
+
} satisfies Meta<typeof D3ForceGraph>;
|
|
61
78
|
|
|
62
79
|
export default meta;
|
|
63
80
|
|
|
64
|
-
|
|
81
|
+
type Story = StoryObj<typeof meta>;
|
|
82
|
+
|
|
83
|
+
export const Default: Story = {};
|