@dxos/plugin-conductor 0.8.4-main.c85a9c8dae → 0.8.4-main.d9fc60f731
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 +102 -5
- package/PLUGIN.mdl +461 -0
- package/dist/lib/{browser/CanvasContainer-GJPWWILJ.mjs → neutral/CanvasArticle-KEPXL3ZT.mjs} +26 -17
- package/dist/lib/neutral/CanvasArticle-KEPXL3ZT.mjs.map +7 -0
- package/dist/lib/neutral/ConductorPlugin.mjs +38 -0
- package/dist/lib/neutral/ConductorPlugin.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +9 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-WDHL35VB.mjs +39 -0
- package/dist/lib/neutral/chunk-WDHL35VB.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +1 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +7 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-object-PTHDJAGI.mjs +26 -0
- package/dist/lib/neutral/create-object-PTHDJAGI.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +7 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +7 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +11 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-JCMKXAUY.mjs +22 -0
- package/dist/lib/neutral/react-surface-JCMKXAUY.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +29 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/types/src/ConductorPlugin.d.ts +1 -0
- package/dist/types/src/ConductorPlugin.d.ts.map +1 -1
- package/dist/types/src/ConductorPlugin.test.d.ts +2 -0
- package/dist/types/src/ConductorPlugin.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 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/containers/CanvasArticle/CanvasArticle.d.ts +6 -0
- package/dist/types/src/containers/CanvasArticle/CanvasArticle.d.ts.map +1 -0
- package/dist/types/src/containers/CanvasArticle/index.d.ts +2 -0
- package/dist/types/src/containers/CanvasArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +1 -1
- package/dist/types/src/containers/index.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 +1 -1
- 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 +24 -15
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +75 -35
- package/src/ConductorPlugin.test.ts +27 -0
- package/src/ConductorPlugin.tsx +12 -17
- package/src/capabilities/create-object.ts +30 -0
- package/src/capabilities/index.ts +4 -1
- package/src/capabilities/react-surface.tsx +32 -0
- package/src/containers/{CanvasContainer/CanvasContainer.tsx → CanvasArticle/CanvasArticle.tsx} +33 -13
- package/src/containers/CanvasArticle/index.ts +5 -0
- package/src/containers/index.ts +1 -1
- package/src/index.ts +0 -1
- package/src/meta.ts +20 -6
- package/src/plugin.ts +9 -0
- package/src/translations.ts +14 -12
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/CanvasContainer-GJPWWILJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-GV4DJFU6.mjs +0 -24
- package/dist/lib/browser/chunk-GV4DJFU6.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -64
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-RLG5OIZN.mjs +0 -33
- package/dist/lib/browser/react-surface-RLG5OIZN.mjs.map +0 -7
- package/dist/lib/node-esm/CanvasContainer-OGY2XHPA.mjs +0 -91
- package/dist/lib/node-esm/CanvasContainer-OGY2XHPA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DILME6SD.mjs +0 -26
- package/dist/lib/node-esm/chunk-DILME6SD.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -65
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-surface-OJ6WPD4B.mjs +0 -34
- package/dist/lib/node-esm/react-surface-OJ6WPD4B.mjs.map +0 -7
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/containers/CanvasContainer/CanvasContainer.d.ts +0 -6
- package/dist/types/src/containers/CanvasContainer/CanvasContainer.d.ts.map +0 -1
- package/dist/types/src/containers/CanvasContainer/index.d.ts +0 -3
- package/dist/types/src/containers/CanvasContainer/index.d.ts.map +0 -1
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -29
- package/src/containers/CanvasContainer/index.ts +0 -7
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-conductor",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.d9fc60f731",
|
|
4
4
|
"description": "Composer plugin for conductor.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -8,63 +8,103 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/dxos/dxos"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
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
|
+
"#meta": {
|
|
32
|
+
"source": "./src/meta.ts",
|
|
33
|
+
"types": "./dist/types/src/meta.d.ts",
|
|
34
|
+
"default": "./dist/lib/neutral/meta.mjs"
|
|
35
|
+
},
|
|
36
|
+
"#plugin": {
|
|
37
|
+
"source": "./src/ConductorPlugin.tsx",
|
|
38
|
+
"types": "./dist/types/src/ConductorPlugin.d.ts",
|
|
39
|
+
"default": "./dist/lib/neutral/ConductorPlugin.mjs"
|
|
40
|
+
},
|
|
41
|
+
"#translations": {
|
|
42
|
+
"source": "./src/translations.ts",
|
|
43
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
44
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
15
47
|
"exports": {
|
|
16
48
|
".": {
|
|
17
49
|
"source": "./src/index.ts",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
50
|
+
"types": "./dist/types/src/index.d.ts",
|
|
51
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
52
|
+
},
|
|
53
|
+
"./assets/PLUGIN.mdl": "./PLUGIN.mdl",
|
|
54
|
+
"./plugin": {
|
|
55
|
+
"source": "./src/plugin.ts",
|
|
56
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
57
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
58
|
+
},
|
|
59
|
+
"./translations": {
|
|
60
|
+
"source": "./src/translations.ts",
|
|
61
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
62
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
21
63
|
}
|
|
22
64
|
},
|
|
23
65
|
"types": "dist/types/src/index.d.ts",
|
|
24
66
|
"files": [
|
|
25
67
|
"dist",
|
|
26
|
-
"src"
|
|
68
|
+
"src",
|
|
69
|
+
"PLUGIN.mdl"
|
|
27
70
|
],
|
|
28
71
|
"dependencies": {
|
|
29
|
-
"effect": "3.
|
|
30
|
-
"@dxos/ai": "0.8.4-main.
|
|
31
|
-
"@dxos/app-
|
|
32
|
-
"@dxos/app-
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/conductor": "0.8.4-main.
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/edge-client": "0.8.4-main.
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/react-
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/react-ui-mosaic": "0.8.4-main.c85a9c8dae",
|
|
48
|
-
"@dxos/util": "0.8.4-main.c85a9c8dae",
|
|
49
|
-
"@dxos/react-ui-stack": "0.8.4-main.c85a9c8dae",
|
|
50
|
-
"@dxos/react-ui-canvas-compute": "0.8.4-main.c85a9c8dae"
|
|
72
|
+
"effect": "3.21.2",
|
|
73
|
+
"@dxos/ai": "0.8.4-main.d9fc60f731",
|
|
74
|
+
"@dxos/app-toolkit": "0.8.4-main.d9fc60f731",
|
|
75
|
+
"@dxos/app-framework": "0.8.4-main.d9fc60f731",
|
|
76
|
+
"@dxos/compute": "0.8.4-main.d9fc60f731",
|
|
77
|
+
"@dxos/conductor": "0.8.4-main.d9fc60f731",
|
|
78
|
+
"@dxos/echo": "0.8.4-main.d9fc60f731",
|
|
79
|
+
"@dxos/functions": "0.8.4-main.d9fc60f731",
|
|
80
|
+
"@dxos/keys": "0.8.4-main.d9fc60f731",
|
|
81
|
+
"@dxos/edge-client": "0.8.4-main.d9fc60f731",
|
|
82
|
+
"@dxos/plugin-automation": "0.8.4-main.d9fc60f731",
|
|
83
|
+
"@dxos/plugin-client": "0.8.4-main.d9fc60f731",
|
|
84
|
+
"@dxos/log": "0.8.4-main.d9fc60f731",
|
|
85
|
+
"@dxos/plugin-space": "0.8.4-main.d9fc60f731",
|
|
86
|
+
"@dxos/react-client": "0.8.4-main.d9fc60f731",
|
|
87
|
+
"@dxos/react-ui-canvas-compute": "0.8.4-main.d9fc60f731",
|
|
88
|
+
"@dxos/react-ui-canvas-editor": "0.8.4-main.d9fc60f731",
|
|
89
|
+
"@dxos/util": "0.8.4-main.d9fc60f731"
|
|
51
90
|
},
|
|
52
91
|
"devDependencies": {
|
|
53
92
|
"@types/react": "~19.2.7",
|
|
54
93
|
"@types/react-dom": "~19.2.3",
|
|
55
94
|
"react": "~19.2.3",
|
|
56
95
|
"react-dom": "~19.2.3",
|
|
57
|
-
"vite": "^
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
60
|
-
"@dxos/ui
|
|
96
|
+
"vite": "^8.0.14",
|
|
97
|
+
"@dxos/plugin-testing": "0.8.4-main.d9fc60f731",
|
|
98
|
+
"@dxos/storybook-utils": "0.8.4-main.d9fc60f731",
|
|
99
|
+
"@dxos/react-ui": "0.8.4-main.d9fc60f731",
|
|
100
|
+
"@dxos/ui-theme": "0.8.4-main.d9fc60f731"
|
|
61
101
|
},
|
|
62
102
|
"peerDependencies": {
|
|
63
|
-
"effect": "3.
|
|
103
|
+
"effect": "3.21.2",
|
|
64
104
|
"react": "~19.2.3",
|
|
65
105
|
"react-dom": "~19.2.3",
|
|
66
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
67
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
106
|
+
"@dxos/react-ui": "0.8.4-main.d9fc60f731",
|
|
107
|
+
"@dxos/ui-theme": "0.8.4-main.d9fc60f731"
|
|
68
108
|
},
|
|
69
109
|
"publishConfig": {
|
|
70
110
|
"access": "public"
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { ConductorPlugin } from '#plugin';
|
|
11
|
+
|
|
12
|
+
import { meta } from './meta';
|
|
13
|
+
|
|
14
|
+
const moduleId = (name: string) => `${meta.id}.module.${name}`;
|
|
15
|
+
|
|
16
|
+
describe('ConductorPlugin', () => {
|
|
17
|
+
test('modules activate on the expected events', async ({ expect }) => {
|
|
18
|
+
await using harness = await createComposerTestApp({
|
|
19
|
+
plugins: [ClientPlugin({}), ConductorPlugin()],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// Modules expected to be active after a normal startup.
|
|
23
|
+
expect(harness.manager.getActive()).toEqual(
|
|
24
|
+
expect.arrayContaining([moduleId('CreateObject'), moduleId('schema'), moduleId('ReactSurface')]),
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
});
|
package/src/ConductorPlugin.tsx
CHANGED
|
@@ -2,32 +2,27 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
|
|
7
5
|
import { Plugin } from '@dxos/app-framework';
|
|
8
6
|
import { AppPlugin } from '@dxos/app-toolkit';
|
|
9
7
|
import { ComputeGraph } from '@dxos/conductor';
|
|
10
|
-
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
11
8
|
import { CanvasBoard } from '@dxos/react-ui-canvas-editor';
|
|
12
9
|
|
|
13
|
-
import { ReactSurface } from '
|
|
14
|
-
import { meta } from '
|
|
15
|
-
import { translations } from '
|
|
10
|
+
import { CreateObject, ReactSurface } from '#capabilities';
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { translations } from '#translations';
|
|
13
|
+
|
|
14
|
+
// eslint-disable-next-line import/no-relative-packages
|
|
15
|
+
import pluginSpec from '../PLUGIN.mdl?raw';
|
|
16
16
|
|
|
17
17
|
export const ConductorPlugin = Plugin.define(meta).pipe(
|
|
18
|
-
AppPlugin.
|
|
19
|
-
metadata: {
|
|
20
|
-
id: CanvasBoard.CanvasBoard.typename,
|
|
21
|
-
metadata: {
|
|
22
|
-
icon: 'ph--infinity--regular',
|
|
23
|
-
iconHue: 'sky',
|
|
24
|
-
createObject: ((props) => Effect.sync(() => CanvasBoard.make(props))) satisfies CreateObject,
|
|
25
|
-
addToCollectionOnCreate: true,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
}),
|
|
18
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
29
19
|
AppPlugin.addSchemaModule({ schema: [CanvasBoard.CanvasBoard, ComputeGraph] }),
|
|
30
20
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
31
21
|
AppPlugin.addTranslationsModule({ translations }),
|
|
22
|
+
AppPlugin.addPluginAssetModule({
|
|
23
|
+
asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
|
|
24
|
+
}),
|
|
32
25
|
Plugin.make,
|
|
33
26
|
);
|
|
27
|
+
|
|
28
|
+
export default ConductorPlugin;
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { CanvasBoard } from '@dxos/react-ui-canvas-editor';
|
|
13
|
+
|
|
14
|
+
export default Capability.makeModule(
|
|
15
|
+
Effect.fnUntraced(function* () {
|
|
16
|
+
return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
17
|
+
id: Type.getTypename(CanvasBoard.CanvasBoard),
|
|
18
|
+
createObject: (props, options) =>
|
|
19
|
+
Effect.gen(function* () {
|
|
20
|
+
const object = CanvasBoard.make(props);
|
|
21
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
22
|
+
object,
|
|
23
|
+
target: options.target,
|
|
24
|
+
hidden: true,
|
|
25
|
+
targetNodeId: options.targetNodeId,
|
|
26
|
+
});
|
|
27
|
+
}),
|
|
28
|
+
});
|
|
29
|
+
}),
|
|
30
|
+
);
|
|
@@ -2,4 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
8
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
11
|
+
import { CanvasBoard } from '@dxos/react-ui-canvas-editor';
|
|
12
|
+
|
|
13
|
+
import { CanvasArticle } from '#containers';
|
|
14
|
+
|
|
15
|
+
export default Capability.makeModule(() =>
|
|
16
|
+
Effect.succeed(
|
|
17
|
+
Capability.contributes(
|
|
18
|
+
Capabilities.ReactSurface,
|
|
19
|
+
Surface.create({
|
|
20
|
+
id: 'root',
|
|
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, CanvasBoard.CanvasBoard),
|
|
24
|
+
AppSurface.object(AppSurface.Section, CanvasBoard.CanvasBoard),
|
|
25
|
+
),
|
|
26
|
+
component: ({ data, role }) => (
|
|
27
|
+
<CanvasArticle role={role} subject={data.subject} attendableId={data.attendableId} />
|
|
28
|
+
),
|
|
29
|
+
}),
|
|
30
|
+
),
|
|
31
|
+
),
|
|
32
|
+
);
|
package/src/containers/{CanvasContainer/CanvasContainer.tsx → CanvasArticle/CanvasArticle.tsx}
RENAMED
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import type * as Exit from 'effect/Exit';
|
|
5
7
|
import React, { Fragment, useEffect, useMemo, useRef } from 'react';
|
|
6
8
|
|
|
9
|
+
import { AiService } from '@dxos/ai';
|
|
10
|
+
import { Capabilities } from '@dxos/app-framework';
|
|
7
11
|
import { useCapability } from '@dxos/app-framework/ui';
|
|
8
|
-
import { type
|
|
12
|
+
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
13
|
+
import { Credential, Operation, OperationRegistry, ServiceResolver } from '@dxos/compute';
|
|
9
14
|
import { ComputeGraphModel } from '@dxos/conductor';
|
|
10
|
-
import { Obj } from '@dxos/echo';
|
|
11
|
-
import { AutomationCapabilities } from '@dxos/plugin-automation';
|
|
15
|
+
import { Database, Feed, Obj } from '@dxos/echo';
|
|
12
16
|
import { useObject } from '@dxos/react-client/echo';
|
|
13
17
|
import { Flex, type FlexProps } from '@dxos/react-ui';
|
|
14
18
|
import {
|
|
@@ -29,16 +33,16 @@ import {
|
|
|
29
33
|
ShapeRegistry,
|
|
30
34
|
} from '@dxos/react-ui-canvas-editor';
|
|
31
35
|
|
|
32
|
-
export type
|
|
36
|
+
export type CanvasArticleProps = AppSurface.ObjectArticleProps<CanvasBoard.CanvasBoard>;
|
|
33
37
|
|
|
34
|
-
export const
|
|
35
|
-
const
|
|
36
|
-
|
|
38
|
+
export const CanvasArticle = ({ role, subject, attendableId: _attendableId }: CanvasArticleProps) => {
|
|
39
|
+
const [canvas] = useObject(subject);
|
|
40
|
+
const id = Obj.getURI(canvas);
|
|
37
41
|
const graph = useMemo(
|
|
38
|
-
() => CanvasGraphModel.create<ComputeShape>(canvas.layout, (fn) => Obj.
|
|
39
|
-
[canvas],
|
|
42
|
+
() => CanvasGraphModel.create<ComputeShape>(canvas.layout, (fn) => Obj.update(subject, fn)),
|
|
43
|
+
[subject, canvas.layout],
|
|
40
44
|
);
|
|
41
|
-
const controller = useGraphController(
|
|
45
|
+
const controller = useGraphController(subject);
|
|
42
46
|
const graphMonitor = useGraphMonitor(controller?.graph);
|
|
43
47
|
const registry = useMemo(() => new ShapeRegistry(computeShapes), []);
|
|
44
48
|
const editorRef = useRef<EditorController>(null);
|
|
@@ -81,16 +85,32 @@ const Container = (props: FlexProps) => <Flex {...props} classNames='aspect-squa
|
|
|
81
85
|
|
|
82
86
|
const useGraphController = (canvas: CanvasBoard.CanvasBoard) => {
|
|
83
87
|
const db = Obj.getDatabase(canvas);
|
|
84
|
-
const
|
|
88
|
+
const processManagerRuntime = useCapability(Capabilities.ProcessManagerRuntime);
|
|
85
89
|
const [computeGraph] = useObject(canvas.computeGraph);
|
|
86
90
|
const controller = useMemo(() => {
|
|
87
91
|
if (!canvas.computeGraph?.target || !db) {
|
|
88
92
|
return null;
|
|
89
93
|
}
|
|
94
|
+
const spaceId = db.spaceId;
|
|
90
95
|
const model = new ComputeGraphModel(canvas.computeGraph?.target);
|
|
91
|
-
const
|
|
96
|
+
const spaceLayer = ServiceResolver.provide(
|
|
97
|
+
{ space: spaceId },
|
|
98
|
+
AiService.AiService,
|
|
99
|
+
Database.Service,
|
|
100
|
+
Feed.FeedService,
|
|
101
|
+
Credential.CredentialsService,
|
|
102
|
+
Operation.Service,
|
|
103
|
+
OperationRegistry.Service,
|
|
104
|
+
);
|
|
105
|
+
const computeGraphRuntime = {
|
|
106
|
+
runPromiseExit: <A, E>(effect: Effect.Effect<A, E, any>): Promise<Exit.Exit<A, E>> =>
|
|
107
|
+
processManagerRuntime.runPromiseExit(effect.pipe(Effect.provide(spaceLayer)) as any) as Promise<
|
|
108
|
+
Exit.Exit<A, E>
|
|
109
|
+
>,
|
|
110
|
+
};
|
|
111
|
+
const controller = new ComputeGraphController(computeGraphRuntime, model);
|
|
92
112
|
return controller;
|
|
93
|
-
}, [computeGraph, db]);
|
|
113
|
+
}, [computeGraph, db, processManagerRuntime]);
|
|
94
114
|
|
|
95
115
|
useEffect(() => {
|
|
96
116
|
if (!controller) {
|
package/src/containers/index.ts
CHANGED
package/src/index.ts
CHANGED
package/src/meta.ts
CHANGED
|
@@ -2,19 +2,33 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { DXN } from '@dxos/keys';
|
|
6
7
|
import { trim } from '@dxos/util';
|
|
7
8
|
|
|
8
|
-
export const meta
|
|
9
|
-
|
|
9
|
+
export const meta = Plugin.makeMeta({
|
|
10
|
+
key: DXN.make('org.dxos.plugin.conductor'),
|
|
10
11
|
name: 'Conductor',
|
|
12
|
+
author: 'DXOS',
|
|
11
13
|
description: trim`
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
Conductor is a visual node-based compute graph plugin for DXOS Composer.
|
|
15
|
+
It lets you compose reactive data pipelines by connecting typed input and output ports on a
|
|
16
|
+
drag-and-drop infinite canvas — no code required for common automation patterns.
|
|
17
|
+
|
|
18
|
+
Each node in the graph is a first-class ECHO object, so the full pipeline topology is
|
|
19
|
+
replicated to every collaborator in real time via the local-first runtime.
|
|
20
|
+
Built-in node types cover constants, templates, boolean logic, control flow, JSON transforms,
|
|
21
|
+
ECHO database access, append-only queues, and conversation threads.
|
|
22
|
+
|
|
23
|
+
AI orchestration is a first-class concern: the GPT node connects to plugin-assistant's AiService
|
|
24
|
+
and supports tool calling, streaming replies, and configurable system prompts.
|
|
25
|
+
Function nodes can invoke any Blueprint operation registered in the space, making it straightforward
|
|
26
|
+
to compose multi-step agent workflows visually and share them across teams.
|
|
14
27
|
`,
|
|
15
28
|
icon: 'ph--infinity--regular',
|
|
16
29
|
iconHue: 'sky',
|
|
17
30
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-conductor',
|
|
31
|
+
spec: 'PLUGIN.mdl',
|
|
18
32
|
tags: ['labs'],
|
|
19
33
|
screenshots: ['https://dxos.network/plugin-details-canvas-dark.png'],
|
|
20
|
-
};
|
|
34
|
+
});
|
package/src/plugin.ts
ADDED
package/src/translations.ts
CHANGED
|
@@ -2,27 +2,29 @@
|
|
|
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 { CanvasBoard } from '@dxos/react-ui-canvas-editor';
|
|
7
8
|
|
|
8
|
-
import { meta } from '
|
|
9
|
+
import { meta } from '#meta';
|
|
9
10
|
|
|
10
11
|
export const translations = [
|
|
11
12
|
{
|
|
12
13
|
'en-US': {
|
|
13
|
-
[CanvasBoard.CanvasBoard
|
|
14
|
-
'typename
|
|
15
|
-
'typename
|
|
16
|
-
'typename
|
|
17
|
-
'typename
|
|
18
|
-
'object
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'object
|
|
14
|
+
[Type.getTypename(CanvasBoard.CanvasBoard)]: {
|
|
15
|
+
'typename.label': 'Circuit',
|
|
16
|
+
'typename.label_zero': 'Circuits',
|
|
17
|
+
'typename.label_one': 'Circuit',
|
|
18
|
+
'typename.label_other': 'Circuits',
|
|
19
|
+
'object-name.placeholder': 'New circuit',
|
|
20
|
+
'add-object.label': 'Add circuit',
|
|
21
|
+
'rename-object.label': 'Rename circuit',
|
|
22
|
+
'delete-object.label': 'Delete circuit',
|
|
23
|
+
'object-deleted.label': 'Circuit deleted',
|
|
22
24
|
},
|
|
23
25
|
[meta.id]: {
|
|
24
|
-
'plugin
|
|
25
|
-
'content
|
|
26
|
+
'plugin.name': 'Conductor',
|
|
27
|
+
'content.placeholder': 'Enter text...',
|
|
26
28
|
},
|
|
27
29
|
},
|
|
28
30
|
},
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/CanvasContainer/CanvasContainer.tsx", "../../../src/containers/CanvasContainer/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { Fragment, useEffect, useMemo, useRef } from 'react';\n\nimport { useCapability } from '@dxos/app-framework/ui';\nimport { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';\nimport { ComputeGraphModel } from '@dxos/conductor';\nimport { Obj } from '@dxos/echo';\nimport { AutomationCapabilities } from '@dxos/plugin-automation';\nimport { useObject } from '@dxos/react-client/echo';\nimport { Flex, type FlexProps } from '@dxos/react-ui';\nimport {\n ComputeContext,\n ComputeGraphController,\n type ComputeShape,\n ComputeShapeLayout,\n computeShapes,\n useComputeGraphController,\n useGraphMonitor,\n} from '@dxos/react-ui-canvas-compute';\nimport {\n type CanvasBoard,\n CanvasGraphModel,\n Editor,\n type EditorController,\n KeyboardContainer,\n ShapeRegistry,\n} from '@dxos/react-ui-canvas-editor';\n\nexport type CanvasContainerProps = SurfaceComponentProps<CanvasBoard.CanvasBoard>;\n\nexport const CanvasContainer = ({ role, subject: canvas }: CanvasContainerProps) => {\n const id = Obj.getDXN(canvas as any).toString();\n useObject(canvas);\n const graph = useMemo(\n () => CanvasGraphModel.create<ComputeShape>(canvas.layout, (fn) => Obj.change(canvas, fn)),\n [canvas],\n );\n const controller = useGraphController(canvas);\n const graphMonitor = useGraphMonitor(controller?.graph);\n const registry = useMemo(() => new ShapeRegistry(computeShapes), []);\n const editorRef = useRef<EditorController>(null);\n useComputeGraphController({ controller, graph, editorRef });\n\n // Layout.\n const layout = useMemo(\n () => (controller && registry ? new ComputeShapeLayout(controller, registry) : undefined),\n [controller, registry],\n );\n\n if (!controller) {\n return;\n }\n\n const Root = role === 'section' ? Container : Fragment;\n\n return (\n <ComputeContext.Provider value={{ controller }}>\n <Root>\n <KeyboardContainer id={id}>\n <Editor.Root\n id={id}\n ref={editorRef}\n graph={graph}\n graphMonitor={graphMonitor as any}\n registry={registry}\n layout={layout}\n >\n <Editor.Canvas />\n <Editor.UI showTools />\n </Editor.Root>\n </KeyboardContainer>\n </Root>\n </ComputeContext.Provider>\n );\n};\n\nconst Container = (props: FlexProps) => <Flex {...props} classNames='aspect-square' />;\n\nconst useGraphController = (canvas: CanvasBoard.CanvasBoard) => {\n const db = Obj.getDatabase(canvas);\n const runtime = useCapability(AutomationCapabilities.ComputeRuntime);\n const [computeGraph] = useObject(canvas.computeGraph);\n const controller = useMemo(() => {\n if (!canvas.computeGraph?.target || !db) {\n return null;\n }\n const model = new ComputeGraphModel(canvas.computeGraph?.target);\n const controller = new ComputeGraphController(runtime.getRuntime(db.spaceId), model);\n return controller;\n }, [computeGraph, db]);\n\n useEffect(() => {\n if (!controller) {\n return;\n }\n\n void controller.open();\n return () => {\n void controller.close();\n };\n }, [controller]);\n\n return controller;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { CanvasContainer } from './CanvasContainer';\n\nexport default CanvasContainer;\n"],
|
|
5
|
-
"mappings": ";AAIA,OAAOA,SAASC,UAAUC,WAAWC,SAASC,cAAc;AAE5D,SAASC,qBAAqB;AAE9B,SAASC,yBAAyB;AAClC,SAASC,WAAW;AACpB,SAASC,8BAA8B;AACvC,SAASC,iBAAiB;AAC1B,SAASC,YAA4B;AACrC,SACEC,gBACAC,wBAEAC,oBACAC,eACAC,2BACAC,uBACK;AACP,SAEEC,kBACAC,QAEAC,mBACAC,qBACK;AAIA,IAAMC,kBAAkB,CAAC,EAAEC,MAAMC,SAASC,OAAM,MAAwB;AAC7E,QAAMC,KAAKC,IAAIC,OAAOH,MAAAA,EAAeI,SAAQ;AAC7CC,YAAUL,MAAAA;AACV,QAAMM,QAAQC,QACZ,MAAMC,iBAAiBC,OAAqBT,OAAOU,QAAQ,CAACC,OAAOT,IAAIU,OAAOZ,QAAQW,EAAAA,CAAAA,GACtF;IAACX;GAAO;AAEV,QAAMa,aAAaC,mBAAmBd,MAAAA;AACtC,QAAMe,eAAeC,gBAAgBH,YAAYP,KAAAA;AACjD,QAAMW,WAAWV,QAAQ,MAAM,IAAIW,cAAcC,aAAAA,GAAgB,CAAA,CAAE;AACnE,QAAMC,YAAYC,OAAyB,IAAA;AAC3CC,4BAA0B;IAAET;IAAYP;IAAOc;EAAU,CAAA;AAGzD,QAAMV,SAASH,QACb,MAAOM,cAAcI,WAAW,IAAIM,mBAAmBV,YAAYI,QAAAA,IAAYO,QAC/E;IAACX;IAAYI;GAAS;AAGxB,MAAI,CAACJ,YAAY;AACf;EACF;AAEA,QAAMY,OAAO3B,SAAS,YAAY4B,YAAYC;AAE9C,SACE,sBAAA,cAACC,eAAeC,UAAQ;IAACC,OAAO;MAAEjB;IAAW;KAC3C,sBAAA,cAACY,MAAAA,MACC,sBAAA,cAACM,mBAAAA;IAAkB9B;KACjB,sBAAA,cAAC+B,OAAOP,MAAI;IACVxB;IACAgC,KAAKb;IACLd;IACAS;IACAE;IACAP;KAEA,sBAAA,cAACsB,OAAOE,QAAM,IAAA,GACd,sBAAA,cAACF,OAAOG,IAAE;IAACC,WAAAA;;AAMvB;AAEA,IAAMV,YAAY,CAACW,UAAqB,sBAAA,cAACC,MAAAA;EAAM,GAAGD;EAAOE,YAAW;;AAEpE,IAAMzB,qBAAqB,CAACd,WAAAA;AAC1B,QAAMwC,KAAKtC,IAAIuC,YAAYzC,MAAAA;AAC3B,QAAM0C,UAAUC,cAAcC,uBAAuBC,cAAc;AACnE,QAAM,CAACC,YAAAA,IAAgBzC,UAAUL,OAAO8C,YAAY;AACpD,QAAMjC,aAAaN,QAAQ,MAAA;AACzB,QAAI,CAACP,OAAO8C,cAAcC,UAAU,CAACP,IAAI;AACvC,aAAO;IACT;AACA,UAAMQ,QAAQ,IAAIC,kBAAkBjD,OAAO8C,cAAcC,MAAAA;AACzD,UAAMlC,cAAa,IAAIqC,uBAAuBR,QAAQS,WAAWX,GAAGY,OAAO,GAAGJ,KAAAA;AAC9E,WAAOnC;EACT,GAAG;IAACiC;IAAcN;GAAG;AAErBa,YAAU,MAAA;AACR,QAAI,CAACxC,YAAY;AACf;IACF;AAEA,SAAKA,WAAWyC,KAAI;AACpB,WAAO,MAAA;AACL,WAAKzC,WAAW0C,MAAK;IACvB;EACF,GAAG;IAAC1C;GAAW;AAEf,SAAOA;AACT;;;ACpGA,IAAA,0BAAe2C;",
|
|
6
|
-
"names": ["React", "Fragment", "useEffect", "useMemo", "useRef", "useCapability", "ComputeGraphModel", "Obj", "AutomationCapabilities", "useObject", "Flex", "ComputeContext", "ComputeGraphController", "ComputeShapeLayout", "computeShapes", "useComputeGraphController", "useGraphMonitor", "CanvasGraphModel", "Editor", "KeyboardContainer", "ShapeRegistry", "CanvasContainer", "role", "subject", "canvas", "id", "Obj", "getDXN", "toString", "useObject", "graph", "useMemo", "CanvasGraphModel", "create", "layout", "fn", "change", "controller", "useGraphController", "graphMonitor", "useGraphMonitor", "registry", "ShapeRegistry", "computeShapes", "editorRef", "useRef", "useComputeGraphController", "ComputeShapeLayout", "undefined", "Root", "Container", "Fragment", "ComputeContext", "Provider", "value", "KeyboardContainer", "Editor", "ref", "Canvas", "UI", "showTools", "props", "Flex", "classNames", "db", "getDatabase", "runtime", "useCapability", "AutomationCapabilities", "ComputeRuntime", "computeGraph", "target", "model", "ComputeGraphModel", "ComputeGraphController", "getRuntime", "spaceId", "useEffect", "open", "close", "CanvasContainer"]
|
|
7
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// src/meta.ts
|
|
2
|
-
import { trim } from "@dxos/util";
|
|
3
|
-
var meta = {
|
|
4
|
-
id: "dxos.org/plugin/conductor",
|
|
5
|
-
name: "Conductor",
|
|
6
|
-
description: trim`
|
|
7
|
-
Visual workflow builder using node-based compute graphs to orchestrate complex AI agent pipelines.
|
|
8
|
-
Connect data sources, transformations, and AI models in a drag-and-drop interface for advanced automation.
|
|
9
|
-
`,
|
|
10
|
-
icon: "ph--infinity--regular",
|
|
11
|
-
iconHue: "sky",
|
|
12
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-conductor",
|
|
13
|
-
tags: [
|
|
14
|
-
"labs"
|
|
15
|
-
],
|
|
16
|
-
screenshots: [
|
|
17
|
-
"https://dxos.network/plugin-details-canvas-dark.png"
|
|
18
|
-
]
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
meta
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=chunk-GV4DJFU6.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'dxos.org/plugin/conductor',\n name: 'Conductor',\n description: trim`\n Visual workflow builder using node-based compute graphs to orchestrate complex AI agent pipelines.\n Connect data sources, transformations, and AI models in a drag-and-drop interface for advanced automation.\n `,\n icon: 'ph--infinity--regular',\n iconHue: 'sky',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-conductor',\n tags: ['labs'],\n screenshots: ['https://dxos.network/plugin-details-canvas-dark.png'],\n};\n"],
|
|
5
|
-
"mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;IAAC;;EACPC,aAAa;IAAC;;AAChB;",
|
|
6
|
-
"names": ["trim", "meta", "id", "name", "description", "trim", "icon", "iconHue", "source", "tags", "screenshots"]
|
|
7
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
meta
|
|
3
|
-
} from "./chunk-GV4DJFU6.mjs";
|
|
4
|
-
|
|
5
|
-
// src/ConductorPlugin.tsx
|
|
6
|
-
import * as Effect from "effect/Effect";
|
|
7
|
-
import { Plugin } from "@dxos/app-framework";
|
|
8
|
-
import { AppPlugin } from "@dxos/app-toolkit";
|
|
9
|
-
import { ComputeGraph } from "@dxos/conductor";
|
|
10
|
-
import { CanvasBoard as CanvasBoard2 } from "@dxos/react-ui-canvas-editor";
|
|
11
|
-
|
|
12
|
-
// src/capabilities/react-surface/index.ts
|
|
13
|
-
import { Capability } from "@dxos/app-framework";
|
|
14
|
-
var ReactSurface = Capability.lazy("ReactSurface", () => import("./react-surface-RLG5OIZN.mjs"));
|
|
15
|
-
|
|
16
|
-
// src/translations.ts
|
|
17
|
-
import { CanvasBoard } from "@dxos/react-ui-canvas-editor";
|
|
18
|
-
var translations = [
|
|
19
|
-
{
|
|
20
|
-
"en-US": {
|
|
21
|
-
[CanvasBoard.CanvasBoard.typename]: {
|
|
22
|
-
"typename label": "Circuit",
|
|
23
|
-
"typename label_zero": "Circuits",
|
|
24
|
-
"typename label_one": "Circuit",
|
|
25
|
-
"typename label_other": "Circuits",
|
|
26
|
-
"object name placeholder": "New circuit",
|
|
27
|
-
"rename object label": "Rename circuit",
|
|
28
|
-
"delete object label": "Delete circuit",
|
|
29
|
-
"object deleted label": "Circuit deleted"
|
|
30
|
-
},
|
|
31
|
-
[meta.id]: {
|
|
32
|
-
"plugin name": "Conductor",
|
|
33
|
-
"content placeholder": "Enter text..."
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
];
|
|
38
|
-
|
|
39
|
-
// src/ConductorPlugin.tsx
|
|
40
|
-
var ConductorPlugin = Plugin.define(meta).pipe(AppPlugin.addMetadataModule({
|
|
41
|
-
metadata: {
|
|
42
|
-
id: CanvasBoard2.CanvasBoard.typename,
|
|
43
|
-
metadata: {
|
|
44
|
-
icon: "ph--infinity--regular",
|
|
45
|
-
iconHue: "sky",
|
|
46
|
-
createObject: (props) => Effect.sync(() => CanvasBoard2.make(props)),
|
|
47
|
-
addToCollectionOnCreate: true
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}), AppPlugin.addSchemaModule({
|
|
51
|
-
schema: [
|
|
52
|
-
CanvasBoard2.CanvasBoard,
|
|
53
|
-
ComputeGraph
|
|
54
|
-
]
|
|
55
|
-
}), AppPlugin.addSurfaceModule({
|
|
56
|
-
activate: ReactSurface
|
|
57
|
-
}), AppPlugin.addTranslationsModule({
|
|
58
|
-
translations
|
|
59
|
-
}), Plugin.make);
|
|
60
|
-
export {
|
|
61
|
-
ConductorPlugin,
|
|
62
|
-
meta
|
|
63
|
-
};
|
|
64
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/ConductorPlugin.tsx", "../../../src/capabilities/react-surface/index.ts", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { ComputeGraph } from '@dxos/conductor';\nimport { type CreateObject } from '@dxos/plugin-space/types';\nimport { CanvasBoard } from '@dxos/react-ui-canvas-editor';\n\nimport { ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\n\nexport const ConductorPlugin = Plugin.define(meta).pipe(\n AppPlugin.addMetadataModule({\n metadata: {\n id: CanvasBoard.CanvasBoard.typename,\n metadata: {\n icon: 'ph--infinity--regular',\n iconHue: 'sky',\n createObject: ((props) => Effect.sync(() => CanvasBoard.make(props))) satisfies CreateObject,\n addToCollectionOnCreate: true,\n },\n },\n }),\n AppPlugin.addSchemaModule({ schema: [CanvasBoard.CanvasBoard, ComputeGraph] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\nimport { CanvasBoard } from '@dxos/react-ui-canvas-editor';\n\nimport { meta } from './meta';\n\nexport const translations = [\n {\n 'en-US': {\n [CanvasBoard.CanvasBoard.typename]: {\n 'typename label': 'Circuit',\n 'typename label_zero': 'Circuits',\n 'typename label_one': 'Circuit',\n 'typename label_other': 'Circuits',\n 'object name placeholder': 'New circuit',\n 'rename object label': 'Rename circuit',\n 'delete object label': 'Delete circuit',\n 'object deleted label': 'Circuit deleted',\n },\n [meta.id]: {\n 'plugin name': 'Conductor',\n 'content placeholder': 'Enter text...',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,oBAAoB;AAE7B,SAASC,eAAAA,oBAAmB;;;ACN5B,SAASC,kBAAkB;AAEpB,IAAMC,eAAeC,WAAWC,KAAK,gBAAgB,MAAM,OAAO,8BAAA,CAAA;;;ACDzE,SAASC,mBAAmB;AAIrB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,YAAYA,YAAYC,QAAQ,GAAG;QAClC,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;QAC3B,uBAAuB;QACvB,uBAAuB;QACvB,wBAAwB;MAC1B;MACA,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,uBAAuB;MACzB;IACF;EACF;;;;AFXK,IAAMC,kBAAkBC,OAAOC,OAAOC,IAAAA,EAAMC,KACjDC,UAAUC,kBAAkB;EAC1BC,UAAU;IACRC,IAAIC,aAAYA,YAAYC;IAC5BH,UAAU;MACRI,MAAM;MACNC,SAAS;MACTC,cAAe,CAACC,UAAiBC,YAAK,MAAMN,aAAYO,KAAKF,KAAAA,CAAAA;MAC7DG,yBAAyB;IAC3B;EACF;AACF,CAAA,GACAZ,UAAUa,gBAAgB;EAAEC,QAAQ;IAACV,aAAYA;IAAaW;;AAAc,CAAA,GAC5Ef,UAAUgB,iBAAiB;EAAEC,UAAUC;AAAa,CAAA,GACpDlB,UAAUmB,sBAAsB;EAAEC;AAAa,CAAA,GAC/CxB,OAAOe,IAAI;",
|
|
6
|
-
"names": ["Effect", "Plugin", "AppPlugin", "ComputeGraph", "CanvasBoard", "Capability", "ReactSurface", "Capability", "lazy", "CanvasBoard", "translations", "CanvasBoard", "typename", "meta", "id", "ConductorPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addMetadataModule", "metadata", "id", "CanvasBoard", "typename", "icon", "iconHue", "createObject", "props", "sync", "make", "addToCollectionOnCreate", "addSchemaModule", "schema", "ComputeGraph", "addSurfaceModule", "activate", "ReactSurface", "addTranslationsModule", "translations"]
|
|
7
|
-
}
|