@dxos/plugin-explorer 0.6.8-main.046e6cf
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/LICENSE +8 -0
- package/README.md +3 -0
- package/dist/lib/browser/ExplorerArticle-IPAJQMAX.mjs +27 -0
- package/dist/lib/browser/ExplorerArticle-IPAJQMAX.mjs.map +7 -0
- package/dist/lib/browser/ExplorerMain-3KFXOEYO.mjs +33 -0
- package/dist/lib/browser/ExplorerMain-3KFXOEYO.mjs.map +7 -0
- package/dist/lib/browser/chunk-7YEM64IQ.mjs +473 -0
- package/dist/lib/browser/chunk-7YEM64IQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-JIDPF2GF.mjs +27 -0
- package/dist/lib/browser/chunk-JIDPF2GF.mjs.map +7 -0
- package/dist/lib/browser/chunk-TL6ADY3P.mjs +21 -0
- package/dist/lib/browser/chunk-TL6ADY3P.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +38151 -0
- package/dist/lib/browser/index.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/browser/meta.mjs +9 -0
- package/dist/lib/browser/meta.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +10 -0
- package/dist/lib/browser/types/index.mjs.map +7 -0
- package/dist/lib/node/ExplorerArticle-PYOGBY3Z.cjs +53 -0
- package/dist/lib/node/ExplorerArticle-PYOGBY3Z.cjs.map +7 -0
- package/dist/lib/node/ExplorerMain-HGCLO5O4.cjs +59 -0
- package/dist/lib/node/ExplorerMain-HGCLO5O4.cjs.map +7 -0
- package/dist/lib/node/chunk-2GOPBQBC.cjs +494 -0
- package/dist/lib/node/chunk-2GOPBQBC.cjs.map +7 -0
- package/dist/lib/node/chunk-HYXFS3AG.cjs +45 -0
- package/dist/lib/node/chunk-HYXFS3AG.cjs.map +7 -0
- package/dist/lib/node/chunk-UJZYAOD2.cjs +54 -0
- package/dist/lib/node/chunk-UJZYAOD2.cjs.map +7 -0
- package/dist/lib/node/index.cjs +38158 -0
- package/dist/lib/node/index.cjs.map +7 -0
- package/dist/lib/node/meta.cjs +30 -0
- package/dist/lib/node/meta.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -0
- package/dist/lib/node/types/index.cjs +32 -0
- package/dist/lib/node/types/index.cjs.map +7 -0
- package/dist/types/src/ExplorerPlugin.d.ts +4 -0
- package/dist/types/src/ExplorerPlugin.d.ts.map +1 -0
- package/dist/types/src/components/Chart/Chart.d.ts +10 -0
- package/dist/types/src/components/Chart/Chart.d.ts.map +1 -0
- package/dist/types/src/components/Chart/Chart.stories.d.ts +11 -0
- package/dist/types/src/components/Chart/Chart.stories.d.ts.map +1 -0
- package/dist/types/src/components/Chart/index.d.ts +2 -0
- package/dist/types/src/components/Chart/index.d.ts.map +1 -0
- package/dist/types/src/components/ExplorerArticle.d.ts +7 -0
- package/dist/types/src/components/ExplorerArticle.d.ts.map +1 -0
- package/dist/types/src/components/ExplorerMain.d.ts +7 -0
- package/dist/types/src/components/ExplorerMain.d.ts.map +1 -0
- package/dist/types/src/components/Globe/Globe.d.ts +12 -0
- package/dist/types/src/components/Globe/Globe.d.ts.map +1 -0
- package/dist/types/src/components/Globe/Globe.stories.d.ts +12 -0
- package/dist/types/src/components/Globe/Globe.stories.d.ts.map +1 -0
- package/dist/types/src/components/Globe/index.d.ts +2 -0
- package/dist/types/src/components/Globe/index.d.ts.map +1 -0
- package/dist/types/src/components/Graph/Graph.d.ts +8 -0
- package/dist/types/src/components/Graph/Graph.d.ts.map +1 -0
- package/dist/types/src/components/Graph/Graph.stories.d.ts +14 -0
- package/dist/types/src/components/Graph/Graph.stories.d.ts.map +1 -0
- package/dist/types/src/components/Graph/graph-model.d.ts +33 -0
- package/dist/types/src/components/Graph/graph-model.d.ts.map +1 -0
- package/dist/types/src/components/Graph/index.d.ts +3 -0
- package/dist/types/src/components/Graph/index.d.ts.map +1 -0
- package/dist/types/src/components/Tree/Tree.d.ts +27 -0
- package/dist/types/src/components/Tree/Tree.d.ts.map +1 -0
- package/dist/types/src/components/Tree/Tree.stories.d.ts +29 -0
- package/dist/types/src/components/Tree/Tree.stories.d.ts.map +1 -0
- package/dist/types/src/components/Tree/index.d.ts +2 -0
- package/dist/types/src/components/Tree/index.d.ts.map +1 -0
- package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts +5 -0
- package/dist/types/src/components/Tree/layout/HierarchicalEdgeBundling.d.ts.map +1 -0
- package/dist/types/src/components/Tree/layout/RadialTree.d.ts +4 -0
- package/dist/types/src/components/Tree/layout/RadialTree.d.ts.map +1 -0
- package/dist/types/src/components/Tree/layout/TidyTree.d.ts +4 -0
- package/dist/types/src/components/Tree/layout/TidyTree.d.ts.map +1 -0
- package/dist/types/src/components/Tree/layout/index.d.ts +5 -0
- package/dist/types/src/components/Tree/layout/index.d.ts.map +1 -0
- package/dist/types/src/components/Tree/types.d.ts +8 -0
- package/dist/types/src/components/Tree/types.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +12 -0
- package/dist/types/src/components/index.d.ts.map +1 -0
- package/dist/types/src/components/plot.d.ts +12 -0
- package/dist/types/src/components/plot.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +5 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +15 -0
- package/dist/types/src/meta.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +12 -0
- package/dist/types/src/translations.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/types/types.d.ts +7 -0
- package/dist/types/src/types/types.d.ts.map +1 -0
- package/dist/types/src/types/view.d.ts +14 -0
- package/dist/types/src/types/view.d.ts.map +1 -0
- package/package.json +98 -0
- package/src/ExplorerPlugin.tsx +103 -0
- package/src/components/Chart/Chart.stories.tsx +46 -0
- package/src/components/Chart/Chart.tsx +54 -0
- package/src/components/Chart/index.ts +5 -0
- package/src/components/ExplorerArticle.tsx +28 -0
- package/src/components/ExplorerMain.tsx +34 -0
- package/src/components/Globe/Globe.stories.tsx +115 -0
- package/src/components/Globe/Globe.tsx +65 -0
- package/src/components/Globe/index.ts +5 -0
- package/src/components/Graph/Graph.stories.tsx +59 -0
- package/src/components/Graph/Graph.tsx +151 -0
- package/src/components/Graph/graph-model.ts +146 -0
- package/src/components/Graph/index.ts +7 -0
- package/src/components/Tree/Tree.stories.tsx +97 -0
- package/src/components/Tree/Tree.tsx +109 -0
- package/src/components/Tree/index.ts +5 -0
- package/src/components/Tree/layout/HierarchicalEdgeBundling.ts +164 -0
- package/src/components/Tree/layout/RadialTree.ts +96 -0
- package/src/components/Tree/layout/TidyTree.ts +102 -0
- package/src/components/Tree/layout/index.ts +9 -0
- package/src/components/Tree/types.ts +39 -0
- package/src/components/index.ts +14 -0
- package/src/components/plot.ts +15 -0
- package/src/index.ts +12 -0
- package/src/meta.tsx +19 -0
- package/src/translations.ts +18 -0
- package/src/types/index.ts +6 -0
- package/src/types/types.ts +27 -0
- package/src/types/view.ts +11 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
// Copyright 2022 Observable, Inc.
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
import * as d3 from 'd3';
|
|
7
|
+
|
|
8
|
+
import { type TreeOptions } from '../Tree';
|
|
9
|
+
|
|
10
|
+
// Released under the ISC license.
|
|
11
|
+
// https://observablehq.com/@d3/radial-tree
|
|
12
|
+
// https://observablehq.com/@d3/tree
|
|
13
|
+
const RadialTree = (s: SVGSVGElement, data: any, options: TreeOptions) => {
|
|
14
|
+
const svg = d3.select(s);
|
|
15
|
+
svg.selectAll('*').remove();
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
label, // given a node d, returns the display name
|
|
19
|
+
radius = 400,
|
|
20
|
+
r = 4, // radius of nodes
|
|
21
|
+
slots,
|
|
22
|
+
} = options;
|
|
23
|
+
|
|
24
|
+
const arc = 2 * Math.PI;
|
|
25
|
+
|
|
26
|
+
const root = d3.hierarchy(data);
|
|
27
|
+
|
|
28
|
+
// Sort the nodes.
|
|
29
|
+
// if (sort) {
|
|
30
|
+
// root.sort(sort);
|
|
31
|
+
// }
|
|
32
|
+
|
|
33
|
+
// Compute labels and titles.
|
|
34
|
+
const descendants = root.descendants();
|
|
35
|
+
const getLabel = label === null ? null : descendants.map((d) => label(d.data));
|
|
36
|
+
|
|
37
|
+
// Compute the layout.
|
|
38
|
+
const layout = d3
|
|
39
|
+
.tree()
|
|
40
|
+
.size([arc, radius])
|
|
41
|
+
.separation((a: any, b: any) => (a.parent === b.parent ? 1 : 2) / a.depth);
|
|
42
|
+
layout(root);
|
|
43
|
+
|
|
44
|
+
// Links.
|
|
45
|
+
svg
|
|
46
|
+
.append('g')
|
|
47
|
+
.selectAll('path')
|
|
48
|
+
.data(root.links())
|
|
49
|
+
.join('path')
|
|
50
|
+
.attr('class', slots?.path ?? '')
|
|
51
|
+
.attr(
|
|
52
|
+
'd',
|
|
53
|
+
d3
|
|
54
|
+
.linkRadial()
|
|
55
|
+
.angle((d: any) => d.x + Math.PI / 2)
|
|
56
|
+
.radius((d: any) => d.y) as any,
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
// Nodes.
|
|
60
|
+
const node = svg
|
|
61
|
+
.append('g')
|
|
62
|
+
.selectAll('a')
|
|
63
|
+
.data(root.descendants())
|
|
64
|
+
.join('a')
|
|
65
|
+
// .attr('xlink:href', link == null ? null : (d) => link(d.data, d))
|
|
66
|
+
// .attr('target', link == null ? null : linkTarget)
|
|
67
|
+
.attr('transform', (d: any) => `rotate(${(d.x * 180) / Math.PI}) translate(${d.y},0)`);
|
|
68
|
+
|
|
69
|
+
node
|
|
70
|
+
.append('circle')
|
|
71
|
+
.attr('class', slots?.node ?? '')
|
|
72
|
+
.attr('r', r);
|
|
73
|
+
|
|
74
|
+
// if (title != null) {
|
|
75
|
+
// node.append('title').text((d) => title(d.data, d));
|
|
76
|
+
// }
|
|
77
|
+
|
|
78
|
+
// Text.
|
|
79
|
+
if (getLabel) {
|
|
80
|
+
node
|
|
81
|
+
.append('text')
|
|
82
|
+
.attr('transform', (d: any) => `rotate(${d.x >= Math.PI ? 180 : 0})`)
|
|
83
|
+
.attr('dy', '0.32em')
|
|
84
|
+
// eslint-disable-next-line no-mixed-operators
|
|
85
|
+
.attr('x', (d: any) => (d.x < Math.PI === !d.children ? 6 : -6))
|
|
86
|
+
// eslint-disable-next-line no-mixed-operators
|
|
87
|
+
.attr('text-anchor', (d: any) => (d.x < Math.PI === !d.children ? 'start' : 'end'))
|
|
88
|
+
// .attr('paint-order', 'stroke')
|
|
89
|
+
.attr('class', slots?.text ?? '')
|
|
90
|
+
.text((d, i) => getLabel[i]);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return svg.node();
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export default RadialTree;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
// Copyright 2021 Observable, Inc.
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
import * as d3 from 'd3';
|
|
7
|
+
|
|
8
|
+
import { type TreeOptions } from '../Tree';
|
|
9
|
+
|
|
10
|
+
// Released under the ISC license.
|
|
11
|
+
// https://observablehq.com/@d3/tree
|
|
12
|
+
const TidyTree = (s: SVGSVGElement, data: any, options: TreeOptions) => {
|
|
13
|
+
const svg = d3.select(s);
|
|
14
|
+
svg.selectAll('*').remove();
|
|
15
|
+
|
|
16
|
+
const { label, width, height, r = 4, padding = 4, margin = 60, slots } = options;
|
|
17
|
+
|
|
18
|
+
const root = d3.hierarchy(data);
|
|
19
|
+
|
|
20
|
+
// Compute labels and titles.
|
|
21
|
+
const descendants = root.descendants();
|
|
22
|
+
const getLabel = label == null ? null : descendants.map((d) => label(d.data));
|
|
23
|
+
|
|
24
|
+
// Compute the layout.
|
|
25
|
+
const dx = 16;
|
|
26
|
+
const dy = width / (root.height + padding);
|
|
27
|
+
const layout = d3.tree().nodeSize([dx, dy]);
|
|
28
|
+
layout(root);
|
|
29
|
+
|
|
30
|
+
// Center the tree.
|
|
31
|
+
let x0 = Infinity;
|
|
32
|
+
let x1 = -x0;
|
|
33
|
+
let y0 = Infinity;
|
|
34
|
+
let y1 = -y0;
|
|
35
|
+
root.each((d: any) => {
|
|
36
|
+
if (d.x > x1) {
|
|
37
|
+
x1 = d.x;
|
|
38
|
+
}
|
|
39
|
+
if (d.x < x0) {
|
|
40
|
+
x0 = d.x;
|
|
41
|
+
}
|
|
42
|
+
if (d.y > y1) {
|
|
43
|
+
y1 = d.y;
|
|
44
|
+
}
|
|
45
|
+
if (d.y < y0) {
|
|
46
|
+
y0 = d.y;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// TODO(burdon): Option to expand.
|
|
51
|
+
// NOTE: x and y are flipped.
|
|
52
|
+
const sx = Math.min(2, Math.max(1, (height - margin * 2) / (x1 - x0)));
|
|
53
|
+
const oy = -(width - (y1 - y0)) / 2;
|
|
54
|
+
|
|
55
|
+
// Links.
|
|
56
|
+
svg
|
|
57
|
+
.append('g')
|
|
58
|
+
.selectAll('path')
|
|
59
|
+
.data(root.links())
|
|
60
|
+
.join('path')
|
|
61
|
+
.attr('class', slots?.path ?? '')
|
|
62
|
+
.attr(
|
|
63
|
+
'd',
|
|
64
|
+
d3
|
|
65
|
+
.link(d3.curveBumpX)
|
|
66
|
+
.x((d: any) => d.y + oy)
|
|
67
|
+
.y((d: any) => d.x * sx) as any,
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
// Nodes.
|
|
71
|
+
const node = svg
|
|
72
|
+
.append('g')
|
|
73
|
+
.selectAll('a')
|
|
74
|
+
.data(root.descendants())
|
|
75
|
+
.join('a')
|
|
76
|
+
// .attr('xlink:href', link == null ? null : (d) => link(d.data, d))
|
|
77
|
+
// .attr('target', link == null ? null : linkTarget)
|
|
78
|
+
.attr('transform', (d: any) => `translate(${d.y + oy},${d.x * sx})`);
|
|
79
|
+
|
|
80
|
+
node
|
|
81
|
+
.append('circle')
|
|
82
|
+
.attr('class', slots?.node ?? '')
|
|
83
|
+
.attr('r', r);
|
|
84
|
+
|
|
85
|
+
// if (title != null) {
|
|
86
|
+
// node.append('title').text((d) => title(d.data, d));
|
|
87
|
+
// }
|
|
88
|
+
|
|
89
|
+
if (getLabel) {
|
|
90
|
+
node
|
|
91
|
+
.append('text')
|
|
92
|
+
|
|
93
|
+
.attr('dy', '0.32em')
|
|
94
|
+
.attr('x', (d) => (d.children ? -6 : 6))
|
|
95
|
+
.attr('text-anchor', (d) => (d.children ? 'end' : 'start'))
|
|
96
|
+
// .attr('paint-order', 'stroke')
|
|
97
|
+
.attr('class', slots?.text ?? '')
|
|
98
|
+
.text((d, i) => getLabel[i]);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export default TidyTree;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import type { GraphModel } from '@dxos/gem-spore';
|
|
6
|
+
|
|
7
|
+
export type TreeNode = {
|
|
8
|
+
id: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
children?: TreeNode[];
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const mapGraphToTreeData = <N>(model: GraphModel<N>, maxDepth = 8): TreeNode | undefined => {
|
|
14
|
+
const mapNode = (node: N, depth = 0): TreeNode => {
|
|
15
|
+
const treeNode: TreeNode = {
|
|
16
|
+
id: model.idAccessor(node),
|
|
17
|
+
label: model.idAccessor(node).slice(0, 8),
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const links = model.graph.links.filter((link) => link.source === treeNode.id);
|
|
21
|
+
if (depth < maxDepth) {
|
|
22
|
+
treeNode.children = links.map((link) =>
|
|
23
|
+
mapNode(model.graph.nodes.find((node) => model.idAccessor(node) === link.target)!, depth + 1),
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return treeNode;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
let data: TreeNode | undefined;
|
|
31
|
+
if (model.selected) {
|
|
32
|
+
const node = model.graph.nodes.find((node) => model.idAccessor(node) === model.selected);
|
|
33
|
+
if (node) {
|
|
34
|
+
data = mapNode(node);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return data;
|
|
39
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
// Lazily load components for content surfaces.
|
|
8
|
+
export const ExplorerMain = React.lazy(() => import('./ExplorerMain'));
|
|
9
|
+
export const ExplorerArticle = React.lazy(() => import('./ExplorerArticle'));
|
|
10
|
+
|
|
11
|
+
export * from './Chart';
|
|
12
|
+
export * from './Globe';
|
|
13
|
+
export * from './Graph';
|
|
14
|
+
export * from './Tree';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import type { ChannelValueSpec } from '@observablehq/plot';
|
|
6
|
+
|
|
7
|
+
export type Point = { x: number; y: number };
|
|
8
|
+
export type GeoLocation = { lat: number; lng: number };
|
|
9
|
+
|
|
10
|
+
export type Accessor<T> = (object: any) => T;
|
|
11
|
+
|
|
12
|
+
export const createAdapter = <T extends Record<string, any>>(
|
|
13
|
+
prop: string,
|
|
14
|
+
accessor: Accessor<T> | undefined,
|
|
15
|
+
): ChannelValueSpec => (accessor ? { transform: (values) => values.map((value) => accessor(value)[prop]) } : prop);
|
package/src/index.ts
ADDED
package/src/meta.tsx
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Graph, type IconProps } from '@phosphor-icons/react';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { pluginMeta } from '@dxos/app-framework';
|
|
9
|
+
|
|
10
|
+
export const EXPLORER_PLUGIN = 'dxos.org/plugin/explorer';
|
|
11
|
+
|
|
12
|
+
export default pluginMeta({
|
|
13
|
+
id: EXPLORER_PLUGIN,
|
|
14
|
+
name: 'Explorer',
|
|
15
|
+
description: 'Explore the ECHO hypergraph.',
|
|
16
|
+
tags: ['experimental'],
|
|
17
|
+
iconComponent: (props: IconProps) => <Graph {...props} />,
|
|
18
|
+
iconSymbol: 'ph--graph--regular',
|
|
19
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { EXPLORER_PLUGIN } from './meta';
|
|
6
|
+
|
|
7
|
+
export default [
|
|
8
|
+
{
|
|
9
|
+
'en-US': {
|
|
10
|
+
[EXPLORER_PLUGIN]: {
|
|
11
|
+
'plugin name': 'Explorer',
|
|
12
|
+
'object title label': 'Title',
|
|
13
|
+
'object title placeholder': 'New explorer',
|
|
14
|
+
'create object label': 'Create explorer',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import type {
|
|
6
|
+
GraphBuilderProvides,
|
|
7
|
+
IntentResolverProvides,
|
|
8
|
+
MetadataRecordsProvides,
|
|
9
|
+
SurfaceProvides,
|
|
10
|
+
TranslationsProvides,
|
|
11
|
+
} from '@dxos/app-framework';
|
|
12
|
+
import { type SchemaProvides } from '@dxos/plugin-client';
|
|
13
|
+
|
|
14
|
+
import { EXPLORER_PLUGIN } from '../meta';
|
|
15
|
+
|
|
16
|
+
const EXPLORER_ACTION = `${EXPLORER_PLUGIN}/action`;
|
|
17
|
+
|
|
18
|
+
export enum ExplorerAction {
|
|
19
|
+
CREATE = `${EXPLORER_ACTION}/create`,
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type ExplorerPluginProvides = SurfaceProvides &
|
|
23
|
+
IntentResolverProvides &
|
|
24
|
+
GraphBuilderProvides &
|
|
25
|
+
MetadataRecordsProvides &
|
|
26
|
+
TranslationsProvides &
|
|
27
|
+
SchemaProvides;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { S, TypedObject } from '@dxos/echo-schema';
|
|
6
|
+
|
|
7
|
+
// TODO(burdon): Standardize views?
|
|
8
|
+
export class ViewType extends TypedObject({ typename: 'dxos.org/type/View', version: '0.1.0' })({
|
|
9
|
+
name: S.optional(S.String),
|
|
10
|
+
type: S.String,
|
|
11
|
+
}) {}
|