@dxos/plugin-explorer 0.8.3 → 0.8.4-main.03d5cd7b56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/neutral/ExplorerContainer-5TOK2ZEY.mjs +40 -0
- package/dist/lib/neutral/ExplorerContainer-5TOK2ZEY.mjs.map +7 -0
- package/dist/lib/neutral/ExplorerPlugin.mjs +26 -0
- package/dist/lib/neutral/ExplorerPlugin.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +11 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-5X5ATGCS.mjs +73 -0
- package/dist/lib/neutral/chunk-5X5ATGCS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-HPIS2WXY.mjs +24 -0
- package/dist/lib/neutral/chunk-HPIS2WXY.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/{browser/chunk-JRKQNHS6.mjs → neutral/components/index.mjs} +357 -412
- package/dist/lib/{node-esm/chunk-IUFYOE44.mjs.map → neutral/components/index.mjs.map} +4 -4
- package/dist/lib/neutral/containers/index.mjs +9 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-object-F6TKVAGV.mjs +39 -0
- package/dist/lib/neutral/create-object-F6TKVAGV.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +40 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +14 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/{browser → neutral}/meta.mjs +2 -3
- package/dist/lib/neutral/plugin.mjs +12 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-U3JEY7V7.mjs +26 -0
- package/dist/lib/neutral/react-surface-U3JEY7V7.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +33 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +10 -0
- package/dist/types/data/cities.d.ts +4 -4
- package/dist/types/data/cities.d.ts.map +1 -1
- package/dist/types/data/countries-110m.d.ts +19 -22
- package/dist/types/data/countries-110m.d.ts.map +1 -1
- package/dist/types/src/ExplorerPlugin.d.ts +3 -1
- package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
- package/dist/types/src/ExplorerPlugin.test.d.ts +2 -0
- package/dist/types/src/ExplorerPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +11 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +8 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/Chart/Chart.d.ts.map +1 -1
- package/dist/types/src/components/Chart/Chart.stories.d.ts +12 -5
- 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 +12 -5
- package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -1
- package/dist/types/src/components/Graph/CanvasForceGraph.d.ts +13 -0
- package/dist/types/src/components/Graph/CanvasForceGraph.d.ts.map +1 -0
- package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts +17 -0
- package/dist/types/src/components/Graph/CanvasForceGraph.stories.d.ts.map +1 -0
- package/dist/types/src/components/Graph/ForceGraph.d.ts +12 -5
- package/dist/types/src/components/Graph/ForceGraph.d.ts.map +1 -1
- package/dist/types/src/components/Graph/ForceGraph.stories.d.ts +15 -4
- package/dist/types/src/components/Graph/ForceGraph.stories.d.ts.map +1 -1
- package/dist/types/src/components/Graph/{adapter.d.ts → graph-adapter.d.ts} +2 -2
- package/dist/types/src/components/Graph/graph-adapter.d.ts.map +1 -0
- package/dist/types/src/components/Graph/index.d.ts +1 -1
- package/dist/types/src/components/Graph/index.d.ts.map +1 -1
- package/dist/types/src/components/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 +16 -15
- 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 +1 -3
- 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/plugin.d.ts +3 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +36 -22
- 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 +111 -53
- package/src/ExplorerPlugin.test.ts +26 -0
- package/src/ExplorerPlugin.tsx +15 -54
- package/src/capabilities/create-object.ts +36 -0
- package/src/capabilities/index.ts +3 -3
- package/src/capabilities/react-surface.tsx +24 -15
- package/src/components/Chart/Chart.stories.tsx +22 -27
- package/src/components/Chart/Chart.tsx +1 -1
- package/src/components/Globe/Globe.stories.tsx +25 -26
- package/src/components/Globe/Globe.tsx +1 -1
- package/src/components/Graph/CanvasForceGraph.stories.tsx +83 -0
- package/src/components/Graph/CanvasForceGraph.tsx +124 -0
- package/src/components/Graph/ForceGraph.stories.tsx +90 -39
- package/src/components/Graph/ForceGraph.tsx +104 -85
- package/src/components/Graph/{adapter.ts → graph-adapter.ts} +14 -8
- package/src/components/Graph/index.ts +1 -1
- package/src/components/Graph/testing.ts +13 -10
- package/src/components/Tree/Tree.stories.tsx +57 -43
- 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 +51 -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 +1 -4
- package/src/meta.ts +9 -6
- package/src/plugin.ts +9 -0
- package/src/translations.ts +20 -13
- 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-DXL34I3F.mjs +0 -37
- package/dist/lib/browser/ExplorerContainer-DXL34I3F.mjs.map +0 -7
- package/dist/lib/browser/chunk-73YTQHOT.mjs +0 -38
- package/dist/lib/browser/chunk-73YTQHOT.mjs.map +0 -7
- package/dist/lib/browser/chunk-JRKQNHS6.mjs.map +0 -7
- package/dist/lib/browser/chunk-OBAFAA5V.mjs +0 -21
- package/dist/lib/browser/chunk-OBAFAA5V.mjs.map +0 -7
- package/dist/lib/browser/chunk-SLB2F5AO.mjs +0 -30
- package/dist/lib/browser/chunk-SLB2F5AO.mjs.map +0 -7
- package/dist/lib/browser/chunk-Z5BGAHLD.mjs +0 -187
- package/dist/lib/browser/chunk-Z5BGAHLD.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -111
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-JZKYVFQJ.mjs +0 -24
- package/dist/lib/browser/intent-resolver-JZKYVFQJ.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-IAEP2GBT.mjs +0 -31
- package/dist/lib/browser/react-surface-IAEP2GBT.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -10
- package/dist/lib/node/ExplorerContainer-VUXH55VV.cjs +0 -61
- package/dist/lib/node/ExplorerContainer-VUXH55VV.cjs.map +0 -7
- package/dist/lib/node/chunk-4T4LCT5R.cjs +0 -52
- package/dist/lib/node/chunk-4T4LCT5R.cjs.map +0 -7
- package/dist/lib/node/chunk-BCDVG2CH.cjs +0 -44
- package/dist/lib/node/chunk-BCDVG2CH.cjs.map +0 -7
- package/dist/lib/node/chunk-MLRYW4WQ.cjs +0 -56
- package/dist/lib/node/chunk-MLRYW4WQ.cjs.map +0 -7
- package/dist/lib/node/chunk-SVU4VMYX.cjs +0 -11339
- package/dist/lib/node/chunk-SVU4VMYX.cjs.map +0 -7
- package/dist/lib/node/chunk-TY543HPV.cjs +0 -214
- package/dist/lib/node/chunk-TY543HPV.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -130
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-G2MFNIXA.cjs +0 -39
- package/dist/lib/node/intent-resolver-G2MFNIXA.cjs.map +0 -7
- package/dist/lib/node/meta.cjs +0 -31
- package/dist/lib/node/meta.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-surface-UJD5RGRZ.cjs +0 -53
- package/dist/lib/node/react-surface-UJD5RGRZ.cjs.map +0 -7
- package/dist/lib/node/types/index.cjs +0 -32
- package/dist/lib/node/types/index.cjs.map +0 -7
- package/dist/lib/node-esm/ExplorerContainer-MFE7PXF4.mjs +0 -38
- package/dist/lib/node-esm/ExplorerContainer-MFE7PXF4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3CMBLK6W.mjs +0 -23
- package/dist/lib/node-esm/chunk-3CMBLK6W.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AE7VHUJM.mjs +0 -189
- package/dist/lib/node-esm/chunk-AE7VHUJM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IUFYOE44.mjs +0 -11331
- package/dist/lib/node-esm/chunk-N6VEANUZ.mjs +0 -39
- package/dist/lib/node-esm/chunk-N6VEANUZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VSORIAHH.mjs +0 -32
- package/dist/lib/node-esm/chunk-VSORIAHH.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -112
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-7G6ZKM6E.mjs +0 -25
- package/dist/lib/node-esm/intent-resolver-7G6ZKM6E.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/meta.mjs +0 -10
- package/dist/lib/node-esm/react-surface-XBH3WZDL.mjs +0 -32
- package/dist/lib/node-esm/react-surface-XBH3WZDL.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -11
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/ExplorerContainer.d.ts +0 -9
- package/dist/types/src/components/ExplorerContainer.d.ts.map +0 -1
- package/dist/types/src/components/Graph/D3ForceGraph.d.ts +0 -14
- package/dist/types/src/components/Graph/D3ForceGraph.d.ts.map +0 -1
- package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts +0 -6
- package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts.map +0 -1
- package/dist/types/src/components/Graph/adapter.d.ts.map +0 -1
- package/dist/types/src/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/components/Graph/D3ForceGraph.stories.tsx +0 -64
- package/src/components/Graph/D3ForceGraph.tsx +0 -101
- package/src/types/schema.ts +0 -16
- package/src/types/types.ts +0 -21
- /package/dist/lib/{browser/meta.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm → neutral}/meta.mjs.map +0 -0
- /package/dist/lib/{node-esm → neutral}/types/index.mjs.map +0 -0
package/package.json
CHANGED
|
@@ -1,93 +1,151 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-explorer",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4-main.03d5cd7b56",
|
|
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": {
|
|
17
|
+
"source": "./src/capabilities/index.ts",
|
|
18
|
+
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
19
|
+
"default": "./dist/lib/neutral/capabilities/index.mjs"
|
|
20
|
+
},
|
|
21
|
+
"#components": {
|
|
22
|
+
"source": "./src/components/index.ts",
|
|
23
|
+
"types": "./dist/types/src/components/index.d.ts",
|
|
24
|
+
"default": "./dist/lib/neutral/components/index.mjs"
|
|
25
|
+
},
|
|
26
|
+
"#containers": {
|
|
27
|
+
"source": "./src/containers/index.ts",
|
|
28
|
+
"types": "./dist/types/src/containers/index.d.ts",
|
|
29
|
+
"default": "./dist/lib/neutral/containers/index.mjs"
|
|
30
|
+
},
|
|
31
|
+
"#hooks": {
|
|
32
|
+
"source": "./src/hooks/index.ts",
|
|
33
|
+
"types": "./dist/types/src/hooks/index.d.ts",
|
|
34
|
+
"default": "./dist/lib/neutral/hooks/index.mjs"
|
|
35
|
+
},
|
|
36
|
+
"#meta": {
|
|
37
|
+
"source": "./src/meta.ts",
|
|
38
|
+
"types": "./dist/types/src/meta.d.ts",
|
|
39
|
+
"default": "./dist/lib/neutral/meta.mjs"
|
|
40
|
+
},
|
|
41
|
+
"#plugin": {
|
|
42
|
+
"source": "./src/ExplorerPlugin.tsx",
|
|
43
|
+
"types": "./dist/types/src/ExplorerPlugin.d.ts",
|
|
44
|
+
"default": "./dist/lib/neutral/ExplorerPlugin.mjs"
|
|
45
|
+
},
|
|
46
|
+
"#translations": {
|
|
47
|
+
"source": "./src/translations.ts",
|
|
48
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
49
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
50
|
+
},
|
|
51
|
+
"#types": {
|
|
52
|
+
"source": "./src/types/index.ts",
|
|
53
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
54
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
11
57
|
"exports": {
|
|
12
58
|
".": {
|
|
59
|
+
"source": "./src/index.ts",
|
|
13
60
|
"types": "./dist/types/src/index.d.ts",
|
|
14
|
-
"
|
|
15
|
-
"node": "./dist/lib/node-esm/index.mjs"
|
|
61
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
16
62
|
},
|
|
17
|
-
"./
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
63
|
+
"./components": {
|
|
64
|
+
"source": "./src/components/index.ts",
|
|
65
|
+
"types": "./dist/types/src/components/index.d.ts",
|
|
66
|
+
"default": "./dist/lib/neutral/components/index.mjs"
|
|
67
|
+
},
|
|
68
|
+
"./hooks": {
|
|
69
|
+
"source": "./src/hooks/index.ts",
|
|
70
|
+
"types": "./dist/types/src/hooks/index.d.ts",
|
|
71
|
+
"default": "./dist/lib/neutral/hooks/index.mjs"
|
|
72
|
+
},
|
|
73
|
+
"./plugin": {
|
|
74
|
+
"source": "./src/plugin.ts",
|
|
75
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
76
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
77
|
+
},
|
|
78
|
+
"./translations": {
|
|
79
|
+
"source": "./src/translations.ts",
|
|
80
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
81
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
21
82
|
}
|
|
22
83
|
},
|
|
23
84
|
"types": "dist/types/src/index.d.ts",
|
|
24
|
-
"typesVersions": {
|
|
25
|
-
"*": {
|
|
26
|
-
"types": [
|
|
27
|
-
"dist/types/src/types/index.d.ts"
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
85
|
"files": [
|
|
32
86
|
"dist",
|
|
33
87
|
"src"
|
|
34
88
|
],
|
|
35
89
|
"dependencies": {
|
|
36
90
|
"3d-force-graph": "^1.76.1",
|
|
91
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
37
92
|
"@observablehq/plot": "^0.6.11",
|
|
38
|
-
"@preact-signals/safe-react": "^0.9.0",
|
|
39
|
-
"@preact/signals-core": "^1.9.0",
|
|
40
93
|
"d3": "^7.9.0",
|
|
41
|
-
"effect": "
|
|
94
|
+
"effect": "3.20.0",
|
|
42
95
|
"force-graph": "^1.49.4",
|
|
43
96
|
"lodash.defaultsdeep": "^4.6.1",
|
|
44
97
|
"react-resize-detector": "^11.0.1",
|
|
98
|
+
"three": "^0.178.0",
|
|
45
99
|
"topojson-client": "^3.1.0",
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/app-
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/graph": "0.8.
|
|
52
|
-
"@dxos/invariant": "0.8.
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/plugin-
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/plugin-space": "0.8.
|
|
59
|
-
"@dxos/react-client": "0.8.
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/react-ui-
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/react-ui-
|
|
100
|
+
"@dxos/app-framework": "0.8.4-main.03d5cd7b56",
|
|
101
|
+
"@dxos/app-toolkit": "0.8.4-main.03d5cd7b56",
|
|
102
|
+
"@dxos/async": "0.8.4-main.03d5cd7b56",
|
|
103
|
+
"@dxos/client": "0.8.4-main.03d5cd7b56",
|
|
104
|
+
"@dxos/compute": "0.8.4-main.03d5cd7b56",
|
|
105
|
+
"@dxos/graph": "0.8.4-main.03d5cd7b56",
|
|
106
|
+
"@dxos/invariant": "0.8.4-main.03d5cd7b56",
|
|
107
|
+
"@dxos/echo": "0.8.4-main.03d5cd7b56",
|
|
108
|
+
"@dxos/log": "0.8.4-main.03d5cd7b56",
|
|
109
|
+
"@dxos/plugin-search": "0.8.4-main.03d5cd7b56",
|
|
110
|
+
"@dxos/plugin-client": "0.8.4-main.03d5cd7b56",
|
|
111
|
+
"@dxos/echo-query": "0.8.4-main.03d5cd7b56",
|
|
112
|
+
"@dxos/plugin-space": "0.8.4-main.03d5cd7b56",
|
|
113
|
+
"@dxos/react-client": "0.8.4-main.03d5cd7b56",
|
|
114
|
+
"@dxos/plugin-graph": "0.8.4-main.03d5cd7b56",
|
|
115
|
+
"@dxos/react-ui-attention": "0.8.4-main.03d5cd7b56",
|
|
116
|
+
"@dxos/react-ui-components": "0.8.4-main.03d5cd7b56",
|
|
117
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.03d5cd7b56",
|
|
118
|
+
"@dxos/react-ui-graph": "0.8.4-main.03d5cd7b56",
|
|
119
|
+
"@dxos/react-ui-stack": "0.8.4-main.03d5cd7b56",
|
|
120
|
+
"@dxos/schema": "0.8.4-main.03d5cd7b56",
|
|
121
|
+
"@dxos/types": "0.8.4-main.03d5cd7b56",
|
|
122
|
+
"@dxos/util": "0.8.4-main.03d5cd7b56"
|
|
65
123
|
},
|
|
66
124
|
"devDependencies": {
|
|
67
|
-
"@phosphor-icons/react": "^2.1.5",
|
|
68
125
|
"@types/d3": "^7.4.3",
|
|
69
126
|
"@types/d3-hierarchy": "^3.1.6",
|
|
70
127
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
71
|
-
"@types/react": "~
|
|
72
|
-
"@types/react-dom": "~
|
|
128
|
+
"@types/react": "~19.2.7",
|
|
129
|
+
"@types/react-dom": "~19.2.3",
|
|
73
130
|
"@types/topojson-client": "^3.1.4",
|
|
74
131
|
"@types/topojson-specification": "^1.0.5",
|
|
75
|
-
"react": "~
|
|
76
|
-
"react-dom": "~
|
|
77
|
-
"vite": "
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/
|
|
132
|
+
"react": "~19.2.3",
|
|
133
|
+
"react-dom": "~19.2.3",
|
|
134
|
+
"vite": "^8.0.10",
|
|
135
|
+
"@dxos/echo-generator": "0.8.4-main.03d5cd7b56",
|
|
136
|
+
"@dxos/plugin-preview": "0.8.4-main.03d5cd7b56",
|
|
137
|
+
"@dxos/plugin-testing": "0.8.4-main.03d5cd7b56",
|
|
138
|
+
"@dxos/react-ui": "0.8.4-main.03d5cd7b56",
|
|
139
|
+
"@dxos/random": "0.8.4-main.03d5cd7b56",
|
|
140
|
+
"@dxos/ui-theme": "0.8.4-main.03d5cd7b56",
|
|
141
|
+
"@dxos/storybook-utils": "0.8.4-main.03d5cd7b56"
|
|
83
142
|
},
|
|
84
143
|
"peerDependencies": {
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"react": "~
|
|
88
|
-
"react-
|
|
89
|
-
"@dxos/
|
|
90
|
-
"@dxos/react-ui": "0.8.3"
|
|
144
|
+
"effect": "3.20.0",
|
|
145
|
+
"react": "~19.2.3",
|
|
146
|
+
"react-dom": "~19.2.3",
|
|
147
|
+
"@dxos/react-ui": "0.8.4-main.03d5cd7b56",
|
|
148
|
+
"@dxos/ui-theme": "0.8.4-main.03d5cd7b56"
|
|
91
149
|
},
|
|
92
150
|
"publishConfig": {
|
|
93
151
|
"access": "public"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { ClientPlugin } from '@dxos/plugin-client/plugin';
|
|
8
|
+
import { createComposerTestApp } from '@dxos/plugin-testing/harness';
|
|
9
|
+
|
|
10
|
+
import { ExplorerPlugin } from '#plugin';
|
|
11
|
+
|
|
12
|
+
import { meta } from './meta';
|
|
13
|
+
|
|
14
|
+
const moduleId = (name: string) => `${meta.id}.module.${name}`;
|
|
15
|
+
|
|
16
|
+
describe('ExplorerPlugin', () => {
|
|
17
|
+
test('modules activate on the expected events', async ({ expect }) => {
|
|
18
|
+
await using harness = await createComposerTestApp({
|
|
19
|
+
plugins: [ClientPlugin({}), ExplorerPlugin()],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
expect(harness.manager.getActive()).toEqual(
|
|
23
|
+
expect.arrayContaining([moduleId('CreateObject'), moduleId('schema'), moduleId('ReactSurface')]),
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
});
|
package/src/ExplorerPlugin.tsx
CHANGED
|
@@ -2,59 +2,20 @@
|
|
|
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 { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
9
7
|
|
|
10
|
-
import {
|
|
11
|
-
import { meta } from '
|
|
12
|
-
import translations from '
|
|
13
|
-
import {
|
|
8
|
+
import { CreateObject, ReactSurface } from '#capabilities';
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { translations } from '#translations';
|
|
11
|
+
import { Graph } from '#types';
|
|
14
12
|
|
|
15
|
-
export const ExplorerPlugin = ()
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
activatesOn: Events.SetupMetadata,
|
|
25
|
-
activate: () =>
|
|
26
|
-
contributes(Capabilities.Metadata, {
|
|
27
|
-
id: ViewType.typename,
|
|
28
|
-
metadata: {
|
|
29
|
-
icon: 'ph--graph--regular',
|
|
30
|
-
},
|
|
31
|
-
}),
|
|
32
|
-
}),
|
|
33
|
-
defineModule({
|
|
34
|
-
id: `${meta.id}/module/object-form`,
|
|
35
|
-
activatesOn: ClientEvents.SetupSchema,
|
|
36
|
-
activate: () =>
|
|
37
|
-
contributes(
|
|
38
|
-
SpaceCapabilities.ObjectForm,
|
|
39
|
-
defineObjectForm({
|
|
40
|
-
objectSchema: ViewType,
|
|
41
|
-
getIntent: () => createIntent(ExplorerAction.Create),
|
|
42
|
-
}),
|
|
43
|
-
),
|
|
44
|
-
}),
|
|
45
|
-
defineModule({
|
|
46
|
-
id: `${meta.id}/module/schema`,
|
|
47
|
-
activatesOn: ClientEvents.SetupSchema,
|
|
48
|
-
activate: () => contributes(ClientCapabilities.Schema, [ViewType]),
|
|
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
|
-
]);
|
|
13
|
+
export const ExplorerPlugin = Plugin.define(meta).pipe(
|
|
14
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
15
|
+
AppPlugin.addSchemaModule({ schema: [Graph.Graph] }),
|
|
16
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
17
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
18
|
+
Plugin.make,
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
export default ExplorerPlugin;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
import { Type } from '@dxos/echo';
|
|
10
|
+
import { SpaceOperation } from '@dxos/plugin-space';
|
|
11
|
+
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
12
|
+
import { ViewModel } from '@dxos/schema';
|
|
13
|
+
|
|
14
|
+
import { ExplorerAction, Graph } from '#types';
|
|
15
|
+
|
|
16
|
+
export default Capability.makeModule(
|
|
17
|
+
Effect.fnUntraced(function* () {
|
|
18
|
+
return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
19
|
+
id: Type.getTypename(Graph.Graph),
|
|
20
|
+
inputSchema: ExplorerAction.GraphProps,
|
|
21
|
+
createObject: (props, options) =>
|
|
22
|
+
Effect.gen(function* () {
|
|
23
|
+
const object = yield* Effect.promise(async () => {
|
|
24
|
+
const { view } = await ViewModel.makeFromDatabase({ db: options.db, typename: props.typename });
|
|
25
|
+
return Graph.make({ name: props.name, view });
|
|
26
|
+
});
|
|
27
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
28
|
+
object,
|
|
29
|
+
target: options.target,
|
|
30
|
+
hidden: true,
|
|
31
|
+
targetNodeId: options.targetNodeId,
|
|
32
|
+
});
|
|
33
|
+
}),
|
|
34
|
+
});
|
|
35
|
+
}),
|
|
36
|
+
);
|
|
@@ -2,7 +2,7 @@
|
|
|
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 CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
8
|
+
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,40 +2,35 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
6
|
-
|
|
7
|
-
import { type Meta } from '@storybook/react';
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
10
|
-
import {
|
|
11
|
-
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
8
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
12
9
|
|
|
13
|
-
import { Chart } from './Chart';
|
|
14
10
|
import CitiesData from '../../../data/cities.js';
|
|
11
|
+
import { Chart } from './Chart';
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (!CitiesData) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const items = CitiesData.features.map((feature: any) => ({
|
|
25
|
-
x: feature.geometry.coordinates[0],
|
|
26
|
-
y: feature.geometry.coordinates[1],
|
|
27
|
-
}));
|
|
28
|
-
|
|
29
|
-
return <Chart items={items} accessor={(obj) => ({ x: obj.x, y: obj.y })} options={{ stroke: 'blue' }} />;
|
|
30
|
-
};
|
|
13
|
+
const items = CitiesData.features.map((feature: any) => ({
|
|
14
|
+
x: feature.geometry.coordinates[0],
|
|
15
|
+
y: feature.geometry.coordinates[1],
|
|
16
|
+
}));
|
|
31
17
|
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
const DefaultStory = () => (
|
|
19
|
+
<Chart items={items} accessor={(obj) => ({ x: obj.x, y: obj.y })} options={{ stroke: 'blue' }} />
|
|
20
|
+
);
|
|
34
21
|
|
|
35
|
-
const meta
|
|
36
|
-
title: 'plugins/plugin-explorer/Chart',
|
|
22
|
+
const meta = {
|
|
23
|
+
title: 'plugins/plugin-explorer/components/Chart',
|
|
37
24
|
component: Chart,
|
|
38
|
-
|
|
39
|
-
}
|
|
25
|
+
render: DefaultStory,
|
|
26
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
|
|
27
|
+
parameters: {
|
|
28
|
+
layout: 'fullscreen',
|
|
29
|
+
},
|
|
30
|
+
} satisfies Meta<typeof Chart>;
|
|
40
31
|
|
|
41
32
|
export default meta;
|
|
33
|
+
|
|
34
|
+
type Story = StoryObj<typeof meta>;
|
|
35
|
+
|
|
36
|
+
export const Default: Story = {};
|
|
@@ -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,33 +2,28 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
6
|
-
|
|
7
|
-
import { plot, sphere, geo, graticule, dot } from '@observablehq/plot';
|
|
8
|
-
import { type Meta } from '@storybook/react';
|
|
5
|
+
import { dot, geo, graticule, plot, sphere } from '@observablehq/plot';
|
|
6
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
9
7
|
import { geoCircle } from 'd3';
|
|
10
8
|
import React, { useEffect } from 'react';
|
|
11
9
|
import { useResizeDetector } from 'react-resize-detector';
|
|
12
10
|
import { feature } from 'topojson-client';
|
|
13
11
|
|
|
14
|
-
import {
|
|
15
|
-
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
12
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
16
13
|
|
|
17
|
-
import { Globe } from './Globe';
|
|
18
14
|
import CitiesData from '../../../data/cities.js';
|
|
19
15
|
import CountriesData from '../../../data/countries-110m.js';
|
|
16
|
+
import { Globe } from './Globe';
|
|
20
17
|
|
|
21
18
|
// TODO(burdon): Generate data with geo lat/lng.
|
|
22
19
|
// TODO(burdon): How to provide geo service via agent?
|
|
23
20
|
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}));
|
|
21
|
+
const items = CitiesData.features.map((feature: any) => ({
|
|
22
|
+
lat: feature.geometry.coordinates[0],
|
|
23
|
+
lng: feature.geometry.coordinates[1],
|
|
24
|
+
}));
|
|
29
25
|
|
|
30
|
-
|
|
31
|
-
};
|
|
26
|
+
const DefaultStory = () => <Globe items={items} />;
|
|
32
27
|
|
|
33
28
|
const ExtendedStory = () => {
|
|
34
29
|
const { ref: containerRef, width = 0, height = 0 } = useResizeDetector({ refreshRate: 200 });
|
|
@@ -38,11 +33,6 @@ const ExtendedStory = () => {
|
|
|
38
33
|
}
|
|
39
34
|
|
|
40
35
|
const land = feature(CountriesData as any, CountriesData.objects.land as any);
|
|
41
|
-
const items = CitiesData.features.map((feature: any) => ({
|
|
42
|
-
lat: feature.geometry.coordinates[0],
|
|
43
|
-
lng: feature.geometry.coordinates[1],
|
|
44
|
-
}));
|
|
45
|
-
|
|
46
36
|
const city = items[0];
|
|
47
37
|
const circle = geoCircle().center([city.lat, city.lng]).radius(16)();
|
|
48
38
|
|
|
@@ -51,7 +41,6 @@ const ExtendedStory = () => {
|
|
|
51
41
|
const drawing = plot({
|
|
52
42
|
// https://observablehq.com/plot/features/projections
|
|
53
43
|
projection: { type: 'orthographic', rotate: [-city.lat + 30, -30] },
|
|
54
|
-
// projection: { type: 'equirectangular', rotate: [-140, -30] },
|
|
55
44
|
width,
|
|
56
45
|
height,
|
|
57
46
|
style: {
|
|
@@ -80,13 +69,23 @@ const ExtendedStory = () => {
|
|
|
80
69
|
return <div ref={containerRef} className='grow p-8' />;
|
|
81
70
|
};
|
|
82
71
|
|
|
83
|
-
|
|
72
|
+
const meta = {
|
|
73
|
+
title: 'plugins/plugin-explorer/components/Globe',
|
|
74
|
+
component: Globe,
|
|
75
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
|
|
76
|
+
parameters: {
|
|
77
|
+
layout: 'fullscreen',
|
|
78
|
+
},
|
|
79
|
+
} satisfies Meta<typeof Globe>;
|
|
84
80
|
|
|
85
|
-
export
|
|
81
|
+
export default meta;
|
|
82
|
+
|
|
83
|
+
type Story = StoryObj<typeof meta>;
|
|
86
84
|
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
decorators: [withTheme, withLayout({ fullscreen: true })],
|
|
85
|
+
export const Default: Story = {
|
|
86
|
+
render: DefaultStory,
|
|
90
87
|
};
|
|
91
88
|
|
|
92
|
-
export
|
|
89
|
+
export const Extended: Story = {
|
|
90
|
+
render: ExtendedStory,
|
|
91
|
+
};
|
|
@@ -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,
|