@dxos/plugin-explorer 0.8.4-main.72ec0f3 → 0.8.4-main.7ace549
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-P6FFFVPM.mjs +100 -0
- package/dist/lib/browser/chunk-P6FFFVPM.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +15 -22
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-YS5LZC3A.mjs → intent-resolver-EWB3H5KH.mjs} +9 -5
- package/dist/lib/browser/intent-resolver-EWB3H5KH.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-BVTCOVLK.mjs → react-surface-BY2DYCTH.mjs} +3 -4
- package/dist/lib/browser/react-surface-BY2DYCTH.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node-esm/chunk-4BY2XZET.mjs +101 -0
- package/dist/lib/node-esm/chunk-4BY2XZET.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +15 -22
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-VCEC67WX.mjs → intent-resolver-SH6PW7VF.mjs} +9 -5
- package/dist/lib/node-esm/intent-resolver-SH6PW7VF.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-4HFEX52O.mjs → react-surface-7AAV7GBG.mjs} +3 -4
- package/dist/lib/node-esm/react-surface-7AAV7GBG.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/ExplorerPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/Graph/D3ForceGraph.stories.d.ts.map +1 -1
- package/dist/types/src/components/Graph/ForceGraph.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tree/types/tree.d.ts +6 -6
- package/dist/types/src/translations.d.ts +13 -5
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/ExplorerAction.d.ts +4 -4
- package/dist/types/src/types/ExplorerAction.d.ts.map +1 -1
- package/dist/types/src/types/Graph.d.ts +17 -18
- package/dist/types/src/types/Graph.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +29 -29
- package/src/ExplorerPlugin.tsx +6 -17
- package/src/capabilities/intent-resolver.ts +4 -2
- package/src/capabilities/react-surface.tsx +2 -3
- package/src/components/Graph/D3ForceGraph.stories.tsx +7 -5
- package/src/components/Graph/ForceGraph.stories.tsx +7 -5
- package/src/translations.ts +3 -1
- package/src/types/ExplorerAction.ts +13 -6
- package/src/types/Graph.ts +38 -21
- package/dist/lib/browser/chunk-JDSUIUNR.mjs +0 -80
- package/dist/lib/browser/chunk-JDSUIUNR.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-YS5LZC3A.mjs.map +0 -7
- package/dist/lib/browser/react-surface-BVTCOVLK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MS72BATS.mjs +0 -81
- package/dist/lib/node-esm/chunk-MS72BATS.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-VCEC67WX.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-4HFEX52O.mjs.map +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-explorer",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.7ace549",
|
|
4
4
|
"description": "Braneframe data visualization plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -55,27 +55,27 @@
|
|
|
55
55
|
"react-resize-detector": "^11.0.1",
|
|
56
56
|
"three": "^0.178.0",
|
|
57
57
|
"topojson-client": "^3.1.0",
|
|
58
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/echo-query": "0.8.4-main.
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/plugin-graph": "0.8.4-main.
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/plugin-
|
|
70
|
-
"@dxos/plugin-
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/react-
|
|
73
|
-
"@dxos/react-ui-
|
|
74
|
-
"@dxos/react-ui-
|
|
75
|
-
"@dxos/react-ui-
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
58
|
+
"@dxos/app-framework": "0.8.4-main.7ace549",
|
|
59
|
+
"@dxos/client": "0.8.4-main.7ace549",
|
|
60
|
+
"@dxos/echo": "0.8.4-main.7ace549",
|
|
61
|
+
"@dxos/async": "0.8.4-main.7ace549",
|
|
62
|
+
"@dxos/echo-query": "0.8.4-main.7ace549",
|
|
63
|
+
"@dxos/invariant": "0.8.4-main.7ace549",
|
|
64
|
+
"@dxos/live-object": "0.8.4-main.7ace549",
|
|
65
|
+
"@dxos/log": "0.8.4-main.7ace549",
|
|
66
|
+
"@dxos/plugin-client": "0.8.4-main.7ace549",
|
|
67
|
+
"@dxos/plugin-graph": "0.8.4-main.7ace549",
|
|
68
|
+
"@dxos/react-client": "0.8.4-main.7ace549",
|
|
69
|
+
"@dxos/plugin-space": "0.8.4-main.7ace549",
|
|
70
|
+
"@dxos/plugin-search": "0.8.4-main.7ace549",
|
|
71
|
+
"@dxos/graph": "0.8.4-main.7ace549",
|
|
72
|
+
"@dxos/react-ui-components": "0.8.4-main.7ace549",
|
|
73
|
+
"@dxos/react-ui-graph": "0.8.4-main.7ace549",
|
|
74
|
+
"@dxos/react-ui-attention": "0.8.4-main.7ace549",
|
|
75
|
+
"@dxos/react-ui-stack": "0.8.4-main.7ace549",
|
|
76
|
+
"@dxos/schema": "0.8.4-main.7ace549",
|
|
77
|
+
"@dxos/util": "0.8.4-main.7ace549",
|
|
78
|
+
"@dxos/types": "0.8.4-main.7ace549"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@types/d3": "^7.4.3",
|
|
@@ -88,18 +88,18 @@
|
|
|
88
88
|
"react": "~19.2.0",
|
|
89
89
|
"react-dom": "~19.2.0",
|
|
90
90
|
"vite": "7.1.9",
|
|
91
|
-
"@dxos/echo-generator": "0.8.4-main.
|
|
92
|
-
"@dxos/random": "0.8.4-main.
|
|
93
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
94
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
95
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
91
|
+
"@dxos/echo-generator": "0.8.4-main.7ace549",
|
|
92
|
+
"@dxos/random": "0.8.4-main.7ace549",
|
|
93
|
+
"@dxos/react-ui-theme": "0.8.4-main.7ace549",
|
|
94
|
+
"@dxos/react-ui": "0.8.4-main.7ace549",
|
|
95
|
+
"@dxos/storybook-utils": "0.8.4-main.7ace549"
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
98
|
"effect": "^3.13.3",
|
|
99
99
|
"react": "^19.0.0",
|
|
100
100
|
"react-dom": "^19.0.0",
|
|
101
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
102
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
101
|
+
"@dxos/react-ui": "0.8.4-main.7ace549",
|
|
102
|
+
"@dxos/react-ui-theme": "0.8.4-main.7ace549"
|
|
103
103
|
},
|
|
104
104
|
"publishConfig": {
|
|
105
105
|
"access": "public"
|
package/src/ExplorerPlugin.tsx
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capabilities, Events, contributes, createIntent, defineModule, definePlugin } from '@dxos/app-framework';
|
|
6
|
+
import { Type } from '@dxos/echo';
|
|
6
7
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
7
|
-
import {
|
|
8
|
-
import { defineObjectForm } from '@dxos/plugin-space/types';
|
|
8
|
+
import { type CreateObjectIntent } from '@dxos/plugin-space/types';
|
|
9
9
|
|
|
10
10
|
import { IntentResolver, ReactSurface } from './capabilities';
|
|
11
11
|
import { meta } from './meta';
|
|
@@ -23,27 +23,16 @@ export const ExplorerPlugin = definePlugin(meta, () => [
|
|
|
23
23
|
activatesOn: Events.SetupMetadata,
|
|
24
24
|
activate: () =>
|
|
25
25
|
contributes(Capabilities.Metadata, {
|
|
26
|
-
id: Graph.Graph
|
|
26
|
+
id: Type.getTypename(Graph.Graph),
|
|
27
27
|
metadata: {
|
|
28
28
|
icon: 'ph--graph--regular',
|
|
29
29
|
iconHue: 'green',
|
|
30
|
+
inputSchema: ExplorerAction.GraphProps,
|
|
31
|
+
createObjectIntent: ((props, options) =>
|
|
32
|
+
createIntent(ExplorerAction.CreateGraph, { ...props, space: options.space })) satisfies CreateObjectIntent,
|
|
30
33
|
},
|
|
31
34
|
}),
|
|
32
35
|
}),
|
|
33
|
-
defineModule({
|
|
34
|
-
id: `${meta.id}/module/object-form`,
|
|
35
|
-
activatesOn: ClientEvents.SetupSchema,
|
|
36
|
-
activate: () =>
|
|
37
|
-
contributes(
|
|
38
|
-
SpaceCapabilities.ObjectForm,
|
|
39
|
-
defineObjectForm({
|
|
40
|
-
objectSchema: Graph.Graph,
|
|
41
|
-
formSchema: ExplorerAction.GraphProps,
|
|
42
|
-
hidden: true,
|
|
43
|
-
getIntent: (props, options) => createIntent(ExplorerAction.CreateGraph, { ...props, space: options.space }),
|
|
44
|
-
}),
|
|
45
|
-
),
|
|
46
|
-
}),
|
|
47
36
|
defineModule({
|
|
48
37
|
id: `${meta.id}/module/schema`,
|
|
49
38
|
activatesOn: ClientEvents.SetupSchema,
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { Capabilities, type PluginContext, contributes, createResolver } from '@dxos/app-framework';
|
|
6
6
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
7
|
+
import { View } from '@dxos/schema';
|
|
7
8
|
|
|
8
9
|
import { ExplorerAction, Graph } from '../types';
|
|
9
10
|
|
|
@@ -14,8 +15,9 @@ export default (context: PluginContext) =>
|
|
|
14
15
|
intent: ExplorerAction.CreateGraph,
|
|
15
16
|
resolve: async ({ space, name, typename }) => {
|
|
16
17
|
const client = context.getCapability(ClientCapabilities.Client);
|
|
17
|
-
const { view } = await
|
|
18
|
-
|
|
18
|
+
const { view } = await View.makeFromSpace({ client, space, typename });
|
|
19
|
+
const graph = Graph.make({ name, view });
|
|
20
|
+
return { data: { object: graph } };
|
|
19
21
|
},
|
|
20
22
|
}),
|
|
21
23
|
);
|
|
@@ -6,7 +6,7 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
8
8
|
import { Obj } from '@dxos/echo';
|
|
9
|
-
import { View } from '@dxos/schema';
|
|
9
|
+
import { type View } from '@dxos/schema';
|
|
10
10
|
|
|
11
11
|
import { ExplorerContainer } from '../components';
|
|
12
12
|
import { meta } from '../meta';
|
|
@@ -18,8 +18,7 @@ export default () =>
|
|
|
18
18
|
createSurface({
|
|
19
19
|
id: `${meta.id}/article`,
|
|
20
20
|
role: ['article', 'section'],
|
|
21
|
-
filter: (data): data is { subject: View.View } =>
|
|
22
|
-
Obj.instanceOf(View.View, data.subject) && Obj.instanceOf(Graph.Graph, data.subject.presentation.target),
|
|
21
|
+
filter: (data): data is { subject: View.View } => Obj.instanceOf(Graph.Graph, data.subject),
|
|
23
22
|
component: ({ data, role }) => {
|
|
24
23
|
return <ExplorerContainer view={data.subject} role={role} />;
|
|
25
24
|
},
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import React, { useState } from 'react';
|
|
7
7
|
|
|
8
|
+
import { Type } from '@dxos/echo';
|
|
8
9
|
import { faker } from '@dxos/random';
|
|
9
10
|
import { useClient } from '@dxos/react-client';
|
|
10
11
|
import { type Space } from '@dxos/react-client/echo';
|
|
@@ -29,19 +30,20 @@ faker.seed(1);
|
|
|
29
30
|
const DefaultStory = () => {
|
|
30
31
|
const client = useClient();
|
|
31
32
|
const [space, setSpace] = useState<Space>();
|
|
32
|
-
const [
|
|
33
|
+
const [graph, setGraph] = useState<Graph.Graph>();
|
|
33
34
|
|
|
34
35
|
useAsyncEffect(async () => {
|
|
35
36
|
const space = client.spaces.default;
|
|
36
37
|
void generate(space, generator);
|
|
37
|
-
const { view } = await
|
|
38
|
-
|
|
38
|
+
const { view } = await View.makeFromSpace({ client, space, typename: Type.getTypename(Graph.Graph) });
|
|
39
|
+
const graph = Graph.make({ name: 'Test', view });
|
|
40
|
+
space.db.add(graph);
|
|
39
41
|
setSpace(space);
|
|
40
|
-
|
|
42
|
+
setGraph(graph);
|
|
41
43
|
}, []);
|
|
42
44
|
|
|
43
45
|
const model = useGraphModel(space);
|
|
44
|
-
if (!model || !space || !
|
|
46
|
+
if (!model || !space || !graph) {
|
|
45
47
|
return null;
|
|
46
48
|
}
|
|
47
49
|
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import React, { useState } from 'react';
|
|
7
7
|
|
|
8
|
+
import { Type } from '@dxos/echo';
|
|
8
9
|
import { faker } from '@dxos/random';
|
|
9
10
|
import { useClient } from '@dxos/react-client';
|
|
10
11
|
import { type Space } from '@dxos/react-client/echo';
|
|
@@ -29,19 +30,20 @@ faker.seed(1);
|
|
|
29
30
|
const DefaultStory = () => {
|
|
30
31
|
const client = useClient();
|
|
31
32
|
const [space, setSpace] = useState<Space>();
|
|
32
|
-
const [
|
|
33
|
+
const [graph, setGraph] = useState<Graph.Graph>();
|
|
33
34
|
|
|
34
35
|
useAsyncEffect(async () => {
|
|
35
36
|
const space = client.spaces.default;
|
|
36
37
|
void generate(space, generator);
|
|
37
|
-
const { view } = await
|
|
38
|
-
|
|
38
|
+
const { view } = await View.makeFromSpace({ client, space, typename: Type.getTypename(Graph.Graph) });
|
|
39
|
+
const graph = Graph.make({ name: 'Test', view });
|
|
40
|
+
space.db.add(graph);
|
|
39
41
|
setSpace(space);
|
|
40
|
-
|
|
42
|
+
setGraph(graph);
|
|
41
43
|
}, []);
|
|
42
44
|
|
|
43
45
|
const model = useGraphModel(space);
|
|
44
|
-
if (!model || !space || !
|
|
46
|
+
if (!model || !space || !graph) {
|
|
45
47
|
return null;
|
|
46
48
|
}
|
|
47
49
|
|
package/src/translations.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Type } from '@dxos/echo';
|
|
5
6
|
import { type Resource } from '@dxos/react-ui';
|
|
6
7
|
import { translations as componentsTranslations } from '@dxos/react-ui-components';
|
|
7
8
|
|
|
@@ -11,7 +12,7 @@ import { Graph } from './types';
|
|
|
11
12
|
export const translations = [
|
|
12
13
|
{
|
|
13
14
|
'en-US': {
|
|
14
|
-
[Graph.Graph
|
|
15
|
+
[Type.getTypename(Graph.Graph)]: {
|
|
15
16
|
'typename label': 'Explorer',
|
|
16
17
|
'typename label_zero': 'Explorers',
|
|
17
18
|
'typename label_one': 'Explorer',
|
|
@@ -19,6 +20,7 @@ export const translations = [
|
|
|
19
20
|
'object name placeholder': 'New explorer',
|
|
20
21
|
'rename object label': 'Rename explorer',
|
|
21
22
|
'delete object label': 'Delete explorer',
|
|
23
|
+
'object deleted label': 'Explorer deleted',
|
|
22
24
|
},
|
|
23
25
|
[meta.id]: {
|
|
24
26
|
'plugin name': 'Explorer',
|
|
@@ -4,20 +4,27 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
+
import { TypeInputOptionsAnnotation } from '@dxos/plugin-space/types';
|
|
7
8
|
import { SpaceSchema } from '@dxos/react-client/echo';
|
|
8
|
-
import { TypenameAnnotationId, View } from '@dxos/schema';
|
|
9
9
|
|
|
10
10
|
import { meta } from '../meta';
|
|
11
11
|
|
|
12
|
+
import * as Graph from './Graph';
|
|
13
|
+
|
|
12
14
|
const EXPLORER_ACTION = `${meta.id}/action`;
|
|
13
15
|
|
|
14
16
|
export const GraphProps = Schema.Struct({
|
|
15
17
|
name: Schema.optional(Schema.String),
|
|
16
18
|
// TODO(wittjosiah): This should be a query input instead.
|
|
17
|
-
typename: Schema.String.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
typename: Schema.String.pipe(
|
|
20
|
+
Schema.annotations({ title: 'Select type' }),
|
|
21
|
+
TypeInputOptionsAnnotation.set({
|
|
22
|
+
location: ['database', 'runtime'],
|
|
23
|
+
kind: ['user'],
|
|
24
|
+
registered: ['registered'],
|
|
25
|
+
}),
|
|
26
|
+
Schema.optional,
|
|
27
|
+
),
|
|
21
28
|
});
|
|
22
29
|
|
|
23
30
|
export class CreateGraph extends Schema.TaggedClass<CreateGraph>()(`${EXPLORER_ACTION}/create-graph`, {
|
|
@@ -25,6 +32,6 @@ export class CreateGraph extends Schema.TaggedClass<CreateGraph>()(`${EXPLORER_A
|
|
|
25
32
|
space: SpaceSchema,
|
|
26
33
|
}).pipe(Schema.extend(GraphProps)),
|
|
27
34
|
output: Schema.Struct({
|
|
28
|
-
object:
|
|
35
|
+
object: Graph.Graph,
|
|
29
36
|
}),
|
|
30
37
|
}) {}
|
package/src/types/Graph.ts
CHANGED
|
@@ -4,43 +4,60 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import { Filter, Obj, Query, QueryAST, Type } from '@dxos/echo';
|
|
8
|
-
import {
|
|
9
|
-
import { View } from '@dxos/schema';
|
|
7
|
+
import { Filter, Obj, Query, QueryAST, Ref, Type } from '@dxos/echo';
|
|
8
|
+
import { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';
|
|
9
|
+
import { View, ViewAnnotation } from '@dxos/schema';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const GraphSchema = Schema.Struct({
|
|
12
12
|
name: Schema.optional(Schema.String),
|
|
13
|
+
|
|
14
|
+
view: Type.Ref(View.View).pipe(FormInputAnnotation.set(false)),
|
|
15
|
+
|
|
13
16
|
query: Schema.Struct({
|
|
14
17
|
raw: Schema.optional(Schema.String),
|
|
15
18
|
ast: QueryAST.Query,
|
|
16
|
-
}).pipe(Schema.mutable),
|
|
19
|
+
}).pipe(Schema.mutable, FormInputAnnotation.set(false)),
|
|
17
20
|
}).pipe(
|
|
18
21
|
Type.Obj({
|
|
19
22
|
typename: 'dxos.org/type/Graph',
|
|
20
|
-
version: '0.
|
|
23
|
+
version: '0.2.0',
|
|
21
24
|
}),
|
|
22
25
|
LabelAnnotation.set(['name']),
|
|
23
26
|
ViewAnnotation.set(true),
|
|
24
27
|
);
|
|
28
|
+
export interface Graph extends Schema.Schema.Type<typeof GraphSchema> {}
|
|
29
|
+
export interface GraphEncoded extends Schema.Schema.Encoded<typeof GraphSchema> {}
|
|
30
|
+
export const Graph: Schema.Schema<Graph, GraphEncoded> = GraphSchema;
|
|
25
31
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Make a graph object.
|
|
30
|
-
*/
|
|
31
|
-
export const make = (
|
|
32
|
-
props: Obj.MakeProps<typeof Graph> = { query: { raw: '', ast: Query.select(Filter.nothing()).ast } },
|
|
33
|
-
) => Obj.make(Graph, props);
|
|
34
|
-
|
|
35
|
-
type MakeViewProps = Omit<View.MakeFromSpaceProps, 'presentation'> & {
|
|
36
|
-
presentation?: Omit<Obj.MakeProps<typeof Graph>, 'name'>;
|
|
32
|
+
type MakeProps = Omit<Partial<Obj.MakeProps<typeof Graph>>, 'view'> & {
|
|
33
|
+
view: View.View;
|
|
37
34
|
};
|
|
38
35
|
|
|
39
36
|
/**
|
|
40
37
|
* Make a graph as a view of a data set.
|
|
41
38
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
export const make = ({
|
|
40
|
+
name,
|
|
41
|
+
query = { raw: '', ast: Query.select(Filter.nothing()).ast },
|
|
42
|
+
view,
|
|
43
|
+
}: MakeProps): Graph => {
|
|
44
|
+
return Obj.make(Graph, { name, view: Ref.make(view), query });
|
|
46
45
|
};
|
|
46
|
+
|
|
47
|
+
//
|
|
48
|
+
// V1
|
|
49
|
+
//
|
|
50
|
+
|
|
51
|
+
export const GraphV1 = Schema.Struct({
|
|
52
|
+
name: Schema.optional(Schema.String),
|
|
53
|
+
query: Schema.Struct({
|
|
54
|
+
raw: Schema.optional(Schema.String),
|
|
55
|
+
ast: QueryAST.Query,
|
|
56
|
+
}).pipe(Schema.mutable),
|
|
57
|
+
}).pipe(
|
|
58
|
+
Type.Obj({
|
|
59
|
+
typename: 'dxos.org/type/Graph',
|
|
60
|
+
version: '0.1.0',
|
|
61
|
+
}),
|
|
62
|
+
LabelAnnotation.set(['name']),
|
|
63
|
+
);
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
meta
|
|
3
|
-
} from "./chunk-UBHZGWZQ.mjs";
|
|
4
|
-
import {
|
|
5
|
-
__export
|
|
6
|
-
} from "./chunk-J5LGTIGS.mjs";
|
|
7
|
-
|
|
8
|
-
// src/types/ExplorerAction.ts
|
|
9
|
-
var ExplorerAction_exports = {};
|
|
10
|
-
__export(ExplorerAction_exports, {
|
|
11
|
-
CreateGraph: () => CreateGraph,
|
|
12
|
-
GraphProps: () => GraphProps
|
|
13
|
-
});
|
|
14
|
-
import * as Schema from "effect/Schema";
|
|
15
|
-
import { SpaceSchema } from "@dxos/react-client/echo";
|
|
16
|
-
import { TypenameAnnotationId, View } from "@dxos/schema";
|
|
17
|
-
var EXPLORER_ACTION = `${meta.id}/action`;
|
|
18
|
-
var GraphProps = Schema.Struct({
|
|
19
|
-
name: Schema.optional(Schema.String),
|
|
20
|
-
// TODO(wittjosiah): This should be a query input instead.
|
|
21
|
-
typename: Schema.String.annotations({
|
|
22
|
-
[TypenameAnnotationId]: [
|
|
23
|
-
"used-static",
|
|
24
|
-
"dynamic"
|
|
25
|
-
],
|
|
26
|
-
title: "Select graph record type"
|
|
27
|
-
})
|
|
28
|
-
});
|
|
29
|
-
var CreateGraph = class extends Schema.TaggedClass()(`${EXPLORER_ACTION}/create-graph`, {
|
|
30
|
-
input: Schema.Struct({
|
|
31
|
-
space: SpaceSchema
|
|
32
|
-
}).pipe(Schema.extend(GraphProps)),
|
|
33
|
-
output: Schema.Struct({
|
|
34
|
-
object: View.View
|
|
35
|
-
})
|
|
36
|
-
}) {
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
// src/types/Graph.ts
|
|
40
|
-
var Graph_exports = {};
|
|
41
|
-
__export(Graph_exports, {
|
|
42
|
-
Graph: () => Graph,
|
|
43
|
-
make: () => make,
|
|
44
|
-
makeView: () => makeView
|
|
45
|
-
});
|
|
46
|
-
import * as Schema2 from "effect/Schema";
|
|
47
|
-
import { Filter, Obj, Query, QueryAST, Type } from "@dxos/echo";
|
|
48
|
-
import { LabelAnnotation, ViewAnnotation } from "@dxos/echo/internal";
|
|
49
|
-
import { View as View2 } from "@dxos/schema";
|
|
50
|
-
var Graph = Schema2.Struct({
|
|
51
|
-
name: Schema2.optional(Schema2.String),
|
|
52
|
-
query: Schema2.Struct({
|
|
53
|
-
raw: Schema2.optional(Schema2.String),
|
|
54
|
-
ast: QueryAST.Query
|
|
55
|
-
}).pipe(Schema2.mutable)
|
|
56
|
-
}).pipe(Type.Obj({
|
|
57
|
-
typename: "dxos.org/type/Graph",
|
|
58
|
-
version: "0.1.0"
|
|
59
|
-
}), LabelAnnotation.set([
|
|
60
|
-
"name"
|
|
61
|
-
]), ViewAnnotation.set(true));
|
|
62
|
-
var make = (props = {
|
|
63
|
-
query: {
|
|
64
|
-
raw: "",
|
|
65
|
-
ast: Query.select(Filter.nothing()).ast
|
|
66
|
-
}
|
|
67
|
-
}) => Obj.make(Graph, props);
|
|
68
|
-
var makeView = async ({ presentation, ...props }) => {
|
|
69
|
-
const graph = make(presentation);
|
|
70
|
-
return View2.makeFromSpace({
|
|
71
|
-
...props,
|
|
72
|
-
presentation: graph
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export {
|
|
77
|
-
ExplorerAction_exports,
|
|
78
|
-
Graph_exports
|
|
79
|
-
};
|
|
80
|
-
//# sourceMappingURL=chunk-JDSUIUNR.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/ExplorerAction.ts", "../../../src/types/Graph.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { SpaceSchema } from '@dxos/react-client/echo';\nimport { TypenameAnnotationId, View } from '@dxos/schema';\n\nimport { meta } from '../meta';\n\nconst EXPLORER_ACTION = `${meta.id}/action`;\n\nexport const GraphProps = Schema.Struct({\n name: Schema.optional(Schema.String),\n // TODO(wittjosiah): This should be a query input instead.\n typename: Schema.String.annotations({\n [TypenameAnnotationId]: ['used-static', 'dynamic'],\n title: 'Select graph record type',\n }),\n});\n\nexport class CreateGraph extends Schema.TaggedClass<CreateGraph>()(`${EXPLORER_ACTION}/create-graph`, {\n input: Schema.Struct({\n space: SpaceSchema,\n }).pipe(Schema.extend(GraphProps)),\n output: Schema.Struct({\n object: View.View,\n }),\n}) {}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Filter, Obj, Query, QueryAST, Type } from '@dxos/echo';\nimport { LabelAnnotation, ViewAnnotation } from '@dxos/echo/internal';\nimport { View } from '@dxos/schema';\n\nexport const Graph = Schema.Struct({\n name: Schema.optional(Schema.String),\n query: Schema.Struct({\n raw: Schema.optional(Schema.String),\n ast: QueryAST.Query,\n }).pipe(Schema.mutable),\n}).pipe(\n Type.Obj({\n typename: 'dxos.org/type/Graph',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n ViewAnnotation.set(true),\n);\n\nexport type Graph = Schema.Schema.Type<typeof Graph>;\n\n/**\n * Make a graph object.\n */\nexport const make = (\n props: Obj.MakeProps<typeof Graph> = { query: { raw: '', ast: Query.select(Filter.nothing()).ast } },\n) => Obj.make(Graph, props);\n\ntype MakeViewProps = Omit<View.MakeFromSpaceProps, 'presentation'> & {\n presentation?: Omit<Obj.MakeProps<typeof Graph>, 'name'>;\n};\n\n/**\n * Make a graph as a view of a data set.\n */\n// TODO(burdon): Move to @dxos/schema.\nexport const makeView = async ({ presentation, ...props }: MakeViewProps) => {\n const graph = make(presentation);\n return View.makeFromSpace({ ...props, presentation: graph });\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAAA;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,mBAAmB;AAC5B,SAASC,sBAAsBC,YAAY;AAI3C,IAAMC,kBAAkB,GAAGC,KAAKC,EAAE;AAE3B,IAAMC,aAAoBC,cAAO;EACtCC,MAAaC,gBAAgBC,aAAM;;EAEnCC,UAAiBD,cAAOE,YAAY;IAClC,CAACC,oBAAAA,GAAuB;MAAC;MAAe;;IACxCC,OAAO;EACT,CAAA;AACF,CAAA;AAEO,IAAMC,cAAN,cAAiCC,mBAAW,EAAgB,GAAGb,eAAAA,iBAAgC;EACpGc,OAAcV,cAAO;IACnBW,OAAOC;EACT,CAAA,EAAGC,KAAYC,cAAOf,UAAAA,CAAAA;EACtBgB,QAAef,cAAO;IACpBgB,QAAQC,KAAKA;EACf,CAAA;AACF,CAAA,EAAA;AAAI;;;AC7BJ;;;;;;AAIA,YAAYC,aAAY;AAExB,SAASC,QAAQC,KAAKC,OAAOC,UAAUC,YAAY;AACnD,SAASC,iBAAiBC,sBAAsB;AAChD,SAASC,QAAAA,aAAY;AAEd,IAAMC,QAAeC,eAAO;EACjCC,MAAaC,iBAAgBC,cAAM;EACnCC,OAAcJ,eAAO;IACnBK,KAAYH,iBAAgBC,cAAM;IAClCG,KAAKC,SAASC;EAChB,CAAA,EAAGC,KAAYC,eAAO;AACxB,CAAA,EAAGD,KACDE,KAAKC,IAAI;EACPC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,gBAAgBC,IAAI;EAAC;CAAO,GAC5BC,eAAeD,IAAI,IAAA,CAAA;AAQd,IAAME,OAAO,CAClBC,QAAqC;EAAEf,OAAO;IAAEC,KAAK;IAAIC,KAAKE,MAAMY,OAAOC,OAAOC,QAAO,CAAA,EAAIhB;EAAI;AAAE,MAChGM,IAAIM,KAAKnB,OAAOoB,KAAAA;AAUd,IAAMI,WAAW,OAAO,EAAEC,cAAc,GAAGL,MAAAA,MAAsB;AACtE,QAAMM,QAAQP,KAAKM,YAAAA;AACnB,SAAOE,MAAKC,cAAc;IAAE,GAAGR;IAAOK,cAAcC;EAAM,CAAA;AAC5D;",
|
|
6
|
-
"names": ["Schema", "SpaceSchema", "TypenameAnnotationId", "View", "EXPLORER_ACTION", "meta", "id", "GraphProps", "Struct", "name", "optional", "String", "typename", "annotations", "TypenameAnnotationId", "title", "CreateGraph", "TaggedClass", "input", "space", "SpaceSchema", "pipe", "extend", "output", "object", "View", "Schema", "Filter", "Obj", "Query", "QueryAST", "Type", "LabelAnnotation", "ViewAnnotation", "View", "Graph", "Struct", "name", "optional", "String", "query", "raw", "ast", "QueryAST", "Query", "pipe", "mutable", "Type", "Obj", "typename", "version", "LabelAnnotation", "set", "ViewAnnotation", "make", "props", "select", "Filter", "nothing", "makeView", "presentation", "graph", "View", "makeFromSpace"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/intent-resolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, type PluginContext, contributes, createResolver } from '@dxos/app-framework';\nimport { ClientCapabilities } from '@dxos/plugin-client';\n\nimport { ExplorerAction, Graph } from '../types';\n\nexport default (context: PluginContext) =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: ExplorerAction.CreateGraph,\n resolve: async ({ space, name, typename }) => {\n const client = context.getCapability(ClientCapabilities.Client);\n const { view } = await Graph.makeView({ client, space, name, typename });\n return { data: { object: view } };\n },\n }),\n );\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAIA,SAASA,cAAkCC,aAAaC,sBAAsB;AAC9E,SAASC,0BAA0B;AAInC,IAAA,2BAAe,CAACC,YACdC,YACEC,aAAaC,gBACbC,eAAe;EACbC,QAAQC,uBAAeC;EACvBC,SAAS,OAAO,EAAEC,OAAOC,MAAMC,SAAQ,MAAE;AACvC,UAAMC,SAASZ,QAAQa,cAAcC,mBAAmBC,MAAM;AAC9D,UAAM,EAAEC,KAAI,IAAK,MAAMC,cAAMC,SAAS;MAAEN;MAAQH;MAAOC;MAAMC;IAAS,CAAA;AACtE,WAAO;MAAEQ,MAAM;QAAEC,QAAQJ;MAAK;IAAE;EAClC;AACF,CAAA,CAAA;",
|
|
6
|
-
"names": ["Capabilities", "contributes", "createResolver", "ClientCapabilities", "context", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "ExplorerAction", "CreateGraph", "resolve", "space", "name", "typename", "client", "getCapability", "ClientCapabilities", "Client", "view", "Graph", "makeView", "data", "object"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\nimport { View } from '@dxos/schema';\n\nimport { ExplorerContainer } from '../components';\nimport { meta } from '../meta';\nimport { Graph } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: `${meta.id}/article`,\n role: ['article', 'section'],\n filter: (data): data is { subject: View.View } =>\n Obj.instanceOf(View.View, data.subject) && Obj.instanceOf(Graph.Graph, data.subject.presentation.target),\n component: ({ data, role }) => {\n return <ExplorerContainer view={data.subject} role={role} />;\n },\n }),\n );\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,WAAW;AACpB,SAASC,YAAY;AAMrB,IAAA,yBAAe,MACbC,YACEC,aAAaC,cACbC,cAAc;EACZC,IAAI,GAAGC,KAAKD,EAAE;EACdE,MAAM;IAAC;IAAW;;EAClBC,QAAQ,CAACC,SACPC,IAAIC,WAAWC,KAAKA,MAAMH,KAAKI,OAAO,KAAKH,IAAIC,WAAWG,cAAMA,OAAOL,KAAKI,QAAQE,aAAaC,MAAM;EACzGC,WAAW,CAAC,EAAER,MAAMF,KAAI,MAAE;AACxB,WAAO,sBAAA,cAACW,mBAAAA;MAAkBC,MAAMV,KAAKI;MAASN;;EAChD;AACF,CAAA,CAAA;",
|
|
6
|
-
"names": ["React", "Capabilities", "contributes", "createSurface", "Obj", "View", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "View", "subject", "Graph", "presentation", "target", "component", "ExplorerContainer", "view"]
|
|
7
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
meta
|
|
4
|
-
} from "./chunk-UXZM5VJB.mjs";
|
|
5
|
-
import {
|
|
6
|
-
__export
|
|
7
|
-
} from "./chunk-HSLMI22Q.mjs";
|
|
8
|
-
|
|
9
|
-
// src/types/ExplorerAction.ts
|
|
10
|
-
var ExplorerAction_exports = {};
|
|
11
|
-
__export(ExplorerAction_exports, {
|
|
12
|
-
CreateGraph: () => CreateGraph,
|
|
13
|
-
GraphProps: () => GraphProps
|
|
14
|
-
});
|
|
15
|
-
import * as Schema from "effect/Schema";
|
|
16
|
-
import { SpaceSchema } from "@dxos/react-client/echo";
|
|
17
|
-
import { TypenameAnnotationId, View } from "@dxos/schema";
|
|
18
|
-
var EXPLORER_ACTION = `${meta.id}/action`;
|
|
19
|
-
var GraphProps = Schema.Struct({
|
|
20
|
-
name: Schema.optional(Schema.String),
|
|
21
|
-
// TODO(wittjosiah): This should be a query input instead.
|
|
22
|
-
typename: Schema.String.annotations({
|
|
23
|
-
[TypenameAnnotationId]: [
|
|
24
|
-
"used-static",
|
|
25
|
-
"dynamic"
|
|
26
|
-
],
|
|
27
|
-
title: "Select graph record type"
|
|
28
|
-
})
|
|
29
|
-
});
|
|
30
|
-
var CreateGraph = class extends Schema.TaggedClass()(`${EXPLORER_ACTION}/create-graph`, {
|
|
31
|
-
input: Schema.Struct({
|
|
32
|
-
space: SpaceSchema
|
|
33
|
-
}).pipe(Schema.extend(GraphProps)),
|
|
34
|
-
output: Schema.Struct({
|
|
35
|
-
object: View.View
|
|
36
|
-
})
|
|
37
|
-
}) {
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
// src/types/Graph.ts
|
|
41
|
-
var Graph_exports = {};
|
|
42
|
-
__export(Graph_exports, {
|
|
43
|
-
Graph: () => Graph,
|
|
44
|
-
make: () => make,
|
|
45
|
-
makeView: () => makeView
|
|
46
|
-
});
|
|
47
|
-
import * as Schema2 from "effect/Schema";
|
|
48
|
-
import { Filter, Obj, Query, QueryAST, Type } from "@dxos/echo";
|
|
49
|
-
import { LabelAnnotation, ViewAnnotation } from "@dxos/echo/internal";
|
|
50
|
-
import { View as View2 } from "@dxos/schema";
|
|
51
|
-
var Graph = Schema2.Struct({
|
|
52
|
-
name: Schema2.optional(Schema2.String),
|
|
53
|
-
query: Schema2.Struct({
|
|
54
|
-
raw: Schema2.optional(Schema2.String),
|
|
55
|
-
ast: QueryAST.Query
|
|
56
|
-
}).pipe(Schema2.mutable)
|
|
57
|
-
}).pipe(Type.Obj({
|
|
58
|
-
typename: "dxos.org/type/Graph",
|
|
59
|
-
version: "0.1.0"
|
|
60
|
-
}), LabelAnnotation.set([
|
|
61
|
-
"name"
|
|
62
|
-
]), ViewAnnotation.set(true));
|
|
63
|
-
var make = (props = {
|
|
64
|
-
query: {
|
|
65
|
-
raw: "",
|
|
66
|
-
ast: Query.select(Filter.nothing()).ast
|
|
67
|
-
}
|
|
68
|
-
}) => Obj.make(Graph, props);
|
|
69
|
-
var makeView = async ({ presentation, ...props }) => {
|
|
70
|
-
const graph = make(presentation);
|
|
71
|
-
return View2.makeFromSpace({
|
|
72
|
-
...props,
|
|
73
|
-
presentation: graph
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export {
|
|
78
|
-
ExplorerAction_exports,
|
|
79
|
-
Graph_exports
|
|
80
|
-
};
|
|
81
|
-
//# sourceMappingURL=chunk-MS72BATS.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/ExplorerAction.ts", "../../../src/types/Graph.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { SpaceSchema } from '@dxos/react-client/echo';\nimport { TypenameAnnotationId, View } from '@dxos/schema';\n\nimport { meta } from '../meta';\n\nconst EXPLORER_ACTION = `${meta.id}/action`;\n\nexport const GraphProps = Schema.Struct({\n name: Schema.optional(Schema.String),\n // TODO(wittjosiah): This should be a query input instead.\n typename: Schema.String.annotations({\n [TypenameAnnotationId]: ['used-static', 'dynamic'],\n title: 'Select graph record type',\n }),\n});\n\nexport class CreateGraph extends Schema.TaggedClass<CreateGraph>()(`${EXPLORER_ACTION}/create-graph`, {\n input: Schema.Struct({\n space: SpaceSchema,\n }).pipe(Schema.extend(GraphProps)),\n output: Schema.Struct({\n object: View.View,\n }),\n}) {}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Filter, Obj, Query, QueryAST, Type } from '@dxos/echo';\nimport { LabelAnnotation, ViewAnnotation } from '@dxos/echo/internal';\nimport { View } from '@dxos/schema';\n\nexport const Graph = Schema.Struct({\n name: Schema.optional(Schema.String),\n query: Schema.Struct({\n raw: Schema.optional(Schema.String),\n ast: QueryAST.Query,\n }).pipe(Schema.mutable),\n}).pipe(\n Type.Obj({\n typename: 'dxos.org/type/Graph',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n ViewAnnotation.set(true),\n);\n\nexport type Graph = Schema.Schema.Type<typeof Graph>;\n\n/**\n * Make a graph object.\n */\nexport const make = (\n props: Obj.MakeProps<typeof Graph> = { query: { raw: '', ast: Query.select(Filter.nothing()).ast } },\n) => Obj.make(Graph, props);\n\ntype MakeViewProps = Omit<View.MakeFromSpaceProps, 'presentation'> & {\n presentation?: Omit<Obj.MakeProps<typeof Graph>, 'name'>;\n};\n\n/**\n * Make a graph as a view of a data set.\n */\n// TODO(burdon): Move to @dxos/schema.\nexport const makeView = async ({ presentation, ...props }: MakeViewProps) => {\n const graph = make(presentation);\n return View.makeFromSpace({ ...props, presentation: graph });\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;AAAA;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,mBAAmB;AAC5B,SAASC,sBAAsBC,YAAY;AAI3C,IAAMC,kBAAkB,GAAGC,KAAKC,EAAE;AAE3B,IAAMC,aAAoBC,cAAO;EACtCC,MAAaC,gBAAgBC,aAAM;;EAEnCC,UAAiBD,cAAOE,YAAY;IAClC,CAACC,oBAAAA,GAAuB;MAAC;MAAe;;IACxCC,OAAO;EACT,CAAA;AACF,CAAA;AAEO,IAAMC,cAAN,cAAiCC,mBAAW,EAAgB,GAAGb,eAAAA,iBAAgC;EACpGc,OAAcV,cAAO;IACnBW,OAAOC;EACT,CAAA,EAAGC,KAAYC,cAAOf,UAAAA,CAAAA;EACtBgB,QAAef,cAAO;IACpBgB,QAAQC,KAAKA;EACf,CAAA;AACF,CAAA,EAAA;AAAI;;;AC7BJ;;;;;;AAIA,YAAYC,aAAY;AAExB,SAASC,QAAQC,KAAKC,OAAOC,UAAUC,YAAY;AACnD,SAASC,iBAAiBC,sBAAsB;AAChD,SAASC,QAAAA,aAAY;AAEd,IAAMC,QAAeC,eAAO;EACjCC,MAAaC,iBAAgBC,cAAM;EACnCC,OAAcJ,eAAO;IACnBK,KAAYH,iBAAgBC,cAAM;IAClCG,KAAKC,SAASC;EAChB,CAAA,EAAGC,KAAYC,eAAO;AACxB,CAAA,EAAGD,KACDE,KAAKC,IAAI;EACPC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,gBAAgBC,IAAI;EAAC;CAAO,GAC5BC,eAAeD,IAAI,IAAA,CAAA;AAQd,IAAME,OAAO,CAClBC,QAAqC;EAAEf,OAAO;IAAEC,KAAK;IAAIC,KAAKE,MAAMY,OAAOC,OAAOC,QAAO,CAAA,EAAIhB;EAAI;AAAE,MAChGM,IAAIM,KAAKnB,OAAOoB,KAAAA;AAUd,IAAMI,WAAW,OAAO,EAAEC,cAAc,GAAGL,MAAAA,MAAsB;AACtE,QAAMM,QAAQP,KAAKM,YAAAA;AACnB,SAAOE,MAAKC,cAAc;IAAE,GAAGR;IAAOK,cAAcC;EAAM,CAAA;AAC5D;",
|
|
6
|
-
"names": ["Schema", "SpaceSchema", "TypenameAnnotationId", "View", "EXPLORER_ACTION", "meta", "id", "GraphProps", "Struct", "name", "optional", "String", "typename", "annotations", "TypenameAnnotationId", "title", "CreateGraph", "TaggedClass", "input", "space", "SpaceSchema", "pipe", "extend", "output", "object", "View", "Schema", "Filter", "Obj", "Query", "QueryAST", "Type", "LabelAnnotation", "ViewAnnotation", "View", "Graph", "Struct", "name", "optional", "String", "query", "raw", "ast", "QueryAST", "Query", "pipe", "mutable", "Type", "Obj", "typename", "version", "LabelAnnotation", "set", "ViewAnnotation", "make", "props", "select", "Filter", "nothing", "makeView", "presentation", "graph", "View", "makeFromSpace"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/intent-resolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, type PluginContext, contributes, createResolver } from '@dxos/app-framework';\nimport { ClientCapabilities } from '@dxos/plugin-client';\n\nimport { ExplorerAction, Graph } from '../types';\n\nexport default (context: PluginContext) =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: ExplorerAction.CreateGraph,\n resolve: async ({ space, name, typename }) => {\n const client = context.getCapability(ClientCapabilities.Client);\n const { view } = await Graph.makeView({ client, space, name, typename });\n return { data: { object: view } };\n },\n }),\n );\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;AAIA,SAASA,cAAkCC,aAAaC,sBAAsB;AAC9E,SAASC,0BAA0B;AAInC,IAAA,2BAAe,CAACC,YACdC,YACEC,aAAaC,gBACbC,eAAe;EACbC,QAAQC,uBAAeC;EACvBC,SAAS,OAAO,EAAEC,OAAOC,MAAMC,SAAQ,MAAE;AACvC,UAAMC,SAASZ,QAAQa,cAAcC,mBAAmBC,MAAM;AAC9D,UAAM,EAAEC,KAAI,IAAK,MAAMC,cAAMC,SAAS;MAAEN;MAAQH;MAAOC;MAAMC;IAAS,CAAA;AACtE,WAAO;MAAEQ,MAAM;QAAEC,QAAQJ;MAAK;IAAE;EAClC;AACF,CAAA,CAAA;",
|
|
6
|
-
"names": ["Capabilities", "contributes", "createResolver", "ClientCapabilities", "context", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "ExplorerAction", "CreateGraph", "resolve", "space", "name", "typename", "client", "getCapability", "ClientCapabilities", "Client", "view", "Graph", "makeView", "data", "object"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\nimport { View } from '@dxos/schema';\n\nimport { ExplorerContainer } from '../components';\nimport { meta } from '../meta';\nimport { Graph } from '../types';\n\nexport default () =>\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: `${meta.id}/article`,\n role: ['article', 'section'],\n filter: (data): data is { subject: View.View } =>\n Obj.instanceOf(View.View, data.subject) && Obj.instanceOf(Graph.Graph, data.subject.presentation.target),\n component: ({ data, role }) => {\n return <ExplorerContainer view={data.subject} role={role} />;\n },\n }),\n );\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,WAAW;AACpB,SAASC,YAAY;AAMrB,IAAA,yBAAe,MACbC,YACEC,aAAaC,cACbC,cAAc;EACZC,IAAI,GAAGC,KAAKD,EAAE;EACdE,MAAM;IAAC;IAAW;;EAClBC,QAAQ,CAACC,SACPC,IAAIC,WAAWC,KAAKA,MAAMH,KAAKI,OAAO,KAAKH,IAAIC,WAAWG,cAAMA,OAAOL,KAAKI,QAAQE,aAAaC,MAAM;EACzGC,WAAW,CAAC,EAAER,MAAMF,KAAI,MAAE;AACxB,WAAO,sBAAA,cAACW,mBAAAA;MAAkBC,MAAMV,KAAKI;MAASN;;EAChD;AACF,CAAA,CAAA;",
|
|
6
|
-
"names": ["React", "Capabilities", "contributes", "createSurface", "Obj", "View", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "View", "subject", "Graph", "presentation", "target", "component", "ExplorerContainer", "view"]
|
|
7
|
-
}
|