@dxos/plugin-pipeline 0.8.4-main.7996785055 → 0.8.4-main.abd8ff62ef
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/index.mjs +19 -82
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/translations.mjs +38 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/types/src/PipelinePlugin.d.ts +1 -0
- package/dist/types/src/PipelinePlugin.d.ts.map +1 -1
- package/dist/types/src/PipelinePlugin.node.d.ts +4 -0
- package/dist/types/src/PipelinePlugin.node.d.ts.map +1 -0
- package/dist/types/src/PipelinePlugin.test.d.ts +2 -0
- package/dist/types/src/PipelinePlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +3 -2
- 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/components/PipelineComponent/PipelineColumn.d.ts +4 -4
- package/dist/types/src/components/PipelineComponent/PipelineColumn.d.ts.map +1 -1
- package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts +8 -20
- package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts.map +1 -1
- package/dist/types/src/components/PipelineComponent/PipelineComponent.stories.d.ts +44 -25
- package/dist/types/src/components/PipelineComponent/PipelineComponent.stories.d.ts.map +1 -1
- package/dist/types/src/containers/PipelineContainer/PipelineContainer.d.ts +2 -2
- package/dist/types/src/containers/PipelineContainer/PipelineContainer.d.ts.map +1 -1
- package/dist/types/src/containers/PipelineContainer/PipelineContainer.stories.d.ts +52 -33
- package/dist/types/src/containers/PipelineContainer/PipelineContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/PipelineContainer/index.d.ts +1 -2
- package/dist/types/src/containers/PipelineContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/PipelineProperties/PipelineProperties.d.ts +11 -0
- package/dist/types/src/containers/PipelineProperties/PipelineProperties.d.ts.map +1 -0
- package/dist/types/src/containers/PipelineProperties/index.d.ts +2 -0
- package/dist/types/src/containers/PipelineProperties/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/hooks/usePipelineBoardModel.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/templates/research.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +44 -26
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +61 -49
- package/src/PipelinePlugin.node.ts +44 -0
- package/src/PipelinePlugin.test.ts +27 -0
- package/src/PipelinePlugin.tsx +7 -5
- package/src/capabilities/app-graph-builder.ts +40 -0
- package/src/capabilities/index.ts +4 -2
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +12 -14
- package/src/components/PipelineComponent/PipelineColumn.tsx +4 -4
- package/src/components/PipelineComponent/PipelineComponent.stories.tsx +16 -16
- package/src/components/PipelineComponent/PipelineComponent.tsx +4 -4
- package/src/containers/PipelineContainer/PipelineContainer.stories.tsx +23 -23
- package/src/containers/PipelineContainer/PipelineContainer.tsx +10 -12
- package/src/containers/PipelineContainer/index.ts +1 -3
- package/src/containers/{PipelineObjectSettings/PipelineObjectSettings.tsx → PipelineProperties/PipelineProperties.tsx} +10 -11
- package/src/containers/PipelineProperties/index.ts +5 -0
- package/src/containers/index.ts +1 -1
- package/src/hooks/usePipelineBoardModel.ts +1 -1
- package/src/index.ts +6 -1
- package/src/translations.ts +22 -22
- package/dist/lib/browser/PipelineContainer-LY2P4JPA.mjs +0 -345
- package/dist/lib/browser/PipelineContainer-LY2P4JPA.mjs.map +0 -7
- package/dist/lib/browser/PipelineObjectSettings-QFMIKJH5.mjs +0 -220
- package/dist/lib/browser/PipelineObjectSettings-QFMIKJH5.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-QQKBLYFD.mjs +0 -56
- package/dist/lib/browser/app-graph-builder-QQKBLYFD.mjs.map +0 -7
- package/dist/lib/browser/chunk-3A235GUD.mjs +0 -21
- package/dist/lib/browser/chunk-3A235GUD.mjs.map +0 -7
- package/dist/lib/browser/react-surface-QVPKOGEI.mjs +0 -61
- package/dist/lib/browser/react-surface-QVPKOGEI.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- 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/PipelineObjectSettings/PipelineObjectSettings.d.ts +0 -11
- package/dist/types/src/containers/PipelineObjectSettings/PipelineObjectSettings.d.ts.map +0 -1
- package/dist/types/src/containers/PipelineObjectSettings/index.d.ts +0 -3
- package/dist/types/src/containers/PipelineObjectSettings/index.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -49
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/containers/PipelineObjectSettings/index.ts +0 -7
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /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-pipeline",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.abd8ff62ef",
|
|
4
4
|
"description": "Pipeline plugin for Composer",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -12,12 +12,32 @@
|
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
|
+
"imports": {
|
|
16
|
+
"#capabilities": "./src/capabilities/index.ts",
|
|
17
|
+
"#components": "./src/components/index.ts",
|
|
18
|
+
"#containers": "./src/containers/index.ts",
|
|
19
|
+
"#hooks": "./src/hooks/index.ts",
|
|
20
|
+
"#meta": "./src/meta.ts",
|
|
21
|
+
"#plugin": {
|
|
22
|
+
"browser": "./src/PipelinePlugin.tsx",
|
|
23
|
+
"node": "./src/PipelinePlugin.node.ts",
|
|
24
|
+
"default": "./src/PipelinePlugin.tsx"
|
|
25
|
+
},
|
|
26
|
+
"#translations": "./src/translations.ts",
|
|
27
|
+
"#types": "./src/types/index.ts"
|
|
28
|
+
},
|
|
15
29
|
"exports": {
|
|
16
30
|
".": {
|
|
17
31
|
"source": "./src/index.ts",
|
|
18
32
|
"types": "./dist/types/src/index.d.ts",
|
|
19
33
|
"browser": "./dist/lib/browser/index.mjs"
|
|
20
34
|
},
|
|
35
|
+
"./translations": {
|
|
36
|
+
"source": "./src/translations.ts",
|
|
37
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
38
|
+
"browser": "./dist/lib/browser/translations.mjs",
|
|
39
|
+
"node": "./dist/lib/node-esm/translations.mjs"
|
|
40
|
+
},
|
|
21
41
|
"./types": {
|
|
22
42
|
"source": "./src/types/index.ts",
|
|
23
43
|
"types": "./dist/types/src/types/index.d.ts",
|
|
@@ -25,13 +45,6 @@
|
|
|
25
45
|
}
|
|
26
46
|
},
|
|
27
47
|
"types": "dist/types/src/index.d.ts",
|
|
28
|
-
"typesVersions": {
|
|
29
|
-
"*": {
|
|
30
|
-
"types": [
|
|
31
|
-
"dist/types/src/types/index.d.ts"
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
48
|
"files": [
|
|
36
49
|
"dist",
|
|
37
50
|
"src"
|
|
@@ -41,34 +54,33 @@
|
|
|
41
54
|
"@radix-ui/react-context": "1.1.1",
|
|
42
55
|
"@radix-ui/react-slot": "1.1.2",
|
|
43
56
|
"effect": "3.20.0",
|
|
44
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/echo": "0.8.4-main.
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/plugin-
|
|
57
|
-
"@dxos/plugin-
|
|
58
|
-
"@dxos/plugin-
|
|
59
|
-
"@dxos/plugin-
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/react-ui-
|
|
62
|
-
"@dxos/react-
|
|
63
|
-
"@dxos/react-ui-
|
|
64
|
-
"@dxos/react-ui-
|
|
65
|
-
"@dxos/react-ui-
|
|
66
|
-
"@dxos/react-ui-
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/react-ui-stack": "0.8.4-main.
|
|
69
|
-
"@dxos/schema": "0.8.4-main.
|
|
70
|
-
"@dxos/util": "0.8.4-main.
|
|
71
|
-
"@dxos/types": "0.8.4-main.7996785055"
|
|
57
|
+
"@dxos/app-framework": "0.8.4-main.abd8ff62ef",
|
|
58
|
+
"@dxos/async": "0.8.4-main.abd8ff62ef",
|
|
59
|
+
"@dxos/app-toolkit": "0.8.4-main.abd8ff62ef",
|
|
60
|
+
"@dxos/assistant-toolkit": "0.8.4-main.abd8ff62ef",
|
|
61
|
+
"@dxos/compute": "0.8.4-main.abd8ff62ef",
|
|
62
|
+
"@dxos/echo": "0.8.4-main.abd8ff62ef",
|
|
63
|
+
"@dxos/devtools": "0.8.4-main.abd8ff62ef",
|
|
64
|
+
"@dxos/echo-atom": "0.8.4-main.abd8ff62ef",
|
|
65
|
+
"@dxos/log": "0.8.4-main.abd8ff62ef",
|
|
66
|
+
"@dxos/echo-query": "0.8.4-main.abd8ff62ef",
|
|
67
|
+
"@dxos/plugin-graph": "0.8.4-main.abd8ff62ef",
|
|
68
|
+
"@dxos/plugin-client": "0.8.4-main.abd8ff62ef",
|
|
69
|
+
"@dxos/plugin-inbox": "0.8.4-main.abd8ff62ef",
|
|
70
|
+
"@dxos/plugin-markdown": "0.8.4-main.abd8ff62ef",
|
|
71
|
+
"@dxos/plugin-deck": "0.8.4-main.abd8ff62ef",
|
|
72
|
+
"@dxos/plugin-space": "0.8.4-main.abd8ff62ef",
|
|
73
|
+
"@dxos/react-client": "0.8.4-main.abd8ff62ef",
|
|
74
|
+
"@dxos/react-ui-components": "0.8.4-main.abd8ff62ef",
|
|
75
|
+
"@dxos/react-ui-form": "0.8.4-main.abd8ff62ef",
|
|
76
|
+
"@dxos/react-ui-list": "0.8.4-main.abd8ff62ef",
|
|
77
|
+
"@dxos/react-ui-attention": "0.8.4-main.abd8ff62ef",
|
|
78
|
+
"@dxos/react-ui-menu": "0.8.4-main.abd8ff62ef",
|
|
79
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.abd8ff62ef",
|
|
80
|
+
"@dxos/types": "0.8.4-main.abd8ff62ef",
|
|
81
|
+
"@dxos/react-ui-stack": "0.8.4-main.abd8ff62ef",
|
|
82
|
+
"@dxos/schema": "0.8.4-main.abd8ff62ef",
|
|
83
|
+
"@dxos/util": "0.8.4-main.abd8ff62ef"
|
|
72
84
|
},
|
|
73
85
|
"devDependencies": {
|
|
74
86
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -76,25 +88,25 @@
|
|
|
76
88
|
"@types/react-dom": "~19.2.3",
|
|
77
89
|
"react": "~19.2.3",
|
|
78
90
|
"react-dom": "~19.2.3",
|
|
79
|
-
"vite": "^
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/plugin-
|
|
83
|
-
"@dxos/plugin-
|
|
84
|
-
"@dxos/plugin-testing": "0.8.4-main.
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/
|
|
87
|
-
"@dxos/
|
|
88
|
-
"@dxos/
|
|
89
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
91
|
+
"vite": "^8.0.10",
|
|
92
|
+
"@dxos/plugin-attention": "0.8.4-main.abd8ff62ef",
|
|
93
|
+
"@dxos/echo-db": "0.8.4-main.abd8ff62ef",
|
|
94
|
+
"@dxos/plugin-inbox": "0.8.4-main.abd8ff62ef",
|
|
95
|
+
"@dxos/plugin-preview": "0.8.4-main.abd8ff62ef",
|
|
96
|
+
"@dxos/plugin-testing": "0.8.4-main.abd8ff62ef",
|
|
97
|
+
"@dxos/plugin-theme": "0.8.4-main.abd8ff62ef",
|
|
98
|
+
"@dxos/react-ui": "0.8.4-main.abd8ff62ef",
|
|
99
|
+
"@dxos/random": "0.8.4-main.abd8ff62ef",
|
|
100
|
+
"@dxos/storybook-utils": "0.8.4-main.abd8ff62ef",
|
|
101
|
+
"@dxos/ui-theme": "0.8.4-main.abd8ff62ef"
|
|
90
102
|
},
|
|
91
103
|
"peerDependencies": {
|
|
92
104
|
"@effect-atom/atom-react": "^0.5.0",
|
|
93
105
|
"effect": "3.20.0",
|
|
94
106
|
"react": "~19.2.3",
|
|
95
107
|
"react-dom": "~19.2.3",
|
|
96
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
97
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
108
|
+
"@dxos/react-ui": "0.8.4-main.abd8ff62ef",
|
|
109
|
+
"@dxos/ui-theme": "0.8.4-main.abd8ff62ef"
|
|
98
110
|
},
|
|
99
111
|
"publishConfig": {
|
|
100
112
|
"access": "public"
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Option from 'effect/Option';
|
|
7
|
+
|
|
8
|
+
import { Plugin } from '@dxos/app-framework';
|
|
9
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
11
|
+
import { Annotation } from '@dxos/echo';
|
|
12
|
+
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
13
|
+
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
14
|
+
import { Pipeline } from '@dxos/types';
|
|
15
|
+
|
|
16
|
+
import { AppGraphBuilder } from '#capabilities';
|
|
17
|
+
import { meta } from '#meta';
|
|
18
|
+
|
|
19
|
+
export const PipelinePlugin = Plugin.define(meta).pipe(
|
|
20
|
+
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
21
|
+
AppPlugin.addMetadataModule({
|
|
22
|
+
metadata: {
|
|
23
|
+
id: Pipeline.Pipeline.typename,
|
|
24
|
+
metadata: {
|
|
25
|
+
icon: Annotation.IconAnnotation.get(Pipeline.Pipeline).pipe(Option.getOrThrow).icon,
|
|
26
|
+
iconHue: Annotation.IconAnnotation.get(Pipeline.Pipeline).pipe(Option.getOrThrow).hue ?? 'white',
|
|
27
|
+
createObject: ((props, options) =>
|
|
28
|
+
Effect.gen(function* () {
|
|
29
|
+
const object = Pipeline.make(props);
|
|
30
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
31
|
+
object,
|
|
32
|
+
target: options.target,
|
|
33
|
+
hidden: true,
|
|
34
|
+
targetNodeId: options.targetNodeId,
|
|
35
|
+
});
|
|
36
|
+
})) satisfies CreateObject,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
}),
|
|
40
|
+
AppPlugin.addSchemaModule({ schema: [Pipeline.Pipeline] }),
|
|
41
|
+
Plugin.make,
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
export default PipelinePlugin;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { ClientPlugin } from '@dxos/plugin-client';
|
|
8
|
+
import { createComposerTestApp } from '@dxos/plugin-testing/harness';
|
|
9
|
+
|
|
10
|
+
import { PipelinePlugin } from '#plugin';
|
|
11
|
+
|
|
12
|
+
import { meta } from './meta';
|
|
13
|
+
|
|
14
|
+
const moduleId = (name: string) => `${meta.id}.module.${name}`;
|
|
15
|
+
|
|
16
|
+
describe('PipelinePlugin', () => {
|
|
17
|
+
test('modules activate on the expected events', async ({ expect }) => {
|
|
18
|
+
await using harness = await createComposerTestApp({
|
|
19
|
+
plugins: [ClientPlugin({}), PipelinePlugin()],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// After autoStart: AppGraphBuilder, metadata, schema all auto-cascade.
|
|
23
|
+
expect(harness.manager.getActive()).toEqual(
|
|
24
|
+
expect.arrayContaining([moduleId('AppGraphBuilder'), moduleId('metadata'), moduleId('schema')]),
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
});
|
package/src/PipelinePlugin.tsx
CHANGED
|
@@ -7,15 +7,15 @@ import * as Option from 'effect/Option';
|
|
|
7
7
|
|
|
8
8
|
import { Plugin } from '@dxos/app-framework';
|
|
9
9
|
import { AppPlugin } from '@dxos/app-toolkit';
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
10
11
|
import { Annotation } from '@dxos/echo';
|
|
11
|
-
import { Operation } from '@dxos/operation';
|
|
12
|
-
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
13
12
|
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
13
|
+
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
14
14
|
import { Pipeline } from '@dxos/types';
|
|
15
15
|
|
|
16
|
-
import { AppGraphBuilder, ReactSurface } from '
|
|
17
|
-
import { meta } from '
|
|
18
|
-
import { translations } from '
|
|
16
|
+
import { AppGraphBuilder, ReactSurface } from '#capabilities';
|
|
17
|
+
import { meta } from '#meta';
|
|
18
|
+
import { translations } from '#translations';
|
|
19
19
|
|
|
20
20
|
export const PipelinePlugin = Plugin.define(meta).pipe(
|
|
21
21
|
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
@@ -44,3 +44,5 @@ export const PipelinePlugin = Plugin.define(meta).pipe(
|
|
|
44
44
|
AppPlugin.addTranslationsModule({ translations }),
|
|
45
45
|
Plugin.make,
|
|
46
46
|
);
|
|
47
|
+
|
|
48
|
+
export default PipelinePlugin;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities, AppNode } from '@dxos/app-toolkit';
|
|
9
|
+
import { GraphBuilder } from '@dxos/plugin-graph';
|
|
10
|
+
import { Pipeline } from '@dxos/types';
|
|
11
|
+
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
|
|
14
|
+
export default Capability.makeModule(
|
|
15
|
+
Effect.fnUntraced(function* () {
|
|
16
|
+
const extensions = yield* Effect.all([
|
|
17
|
+
GraphBuilder.createTypeExtension({
|
|
18
|
+
id: 'triggers',
|
|
19
|
+
type: Pipeline.Pipeline,
|
|
20
|
+
connector: () =>
|
|
21
|
+
Effect.succeed([
|
|
22
|
+
AppNode.makeCompanion({
|
|
23
|
+
id: 'invocations',
|
|
24
|
+
label: ['pipeline-invocations.label', { ns: meta.id }],
|
|
25
|
+
icon: 'ph--clock-countdown--regular',
|
|
26
|
+
data: 'invocations',
|
|
27
|
+
}),
|
|
28
|
+
AppNode.makeCompanion({
|
|
29
|
+
id: 'automation',
|
|
30
|
+
label: ['pipeline-automation.label', { ns: meta.id }],
|
|
31
|
+
icon: 'ph--lightning--regular',
|
|
32
|
+
data: 'automation',
|
|
33
|
+
}),
|
|
34
|
+
]),
|
|
35
|
+
}),
|
|
36
|
+
]);
|
|
37
|
+
|
|
38
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
39
|
+
}),
|
|
40
|
+
);
|
|
@@ -2,5 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
8
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
@@ -7,31 +7,30 @@ import React from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
9
|
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
10
11
|
import { InvocationTraceContainer } from '@dxos/devtools';
|
|
11
12
|
import { Obj } from '@dxos/echo';
|
|
12
13
|
import { Panel } from '@dxos/react-ui';
|
|
13
14
|
import { Pipeline } from '@dxos/types';
|
|
14
15
|
|
|
15
|
-
import { PipelineContainer,
|
|
16
|
-
import { meta } from '../../meta';
|
|
16
|
+
import { PipelineContainer, PipelineProperties } from '#containers';
|
|
17
17
|
|
|
18
18
|
export default Capability.makeModule(() =>
|
|
19
19
|
Effect.succeed(
|
|
20
20
|
Capability.contributes(Capabilities.ReactSurface, [
|
|
21
21
|
Surface.create({
|
|
22
|
-
id:
|
|
23
|
-
|
|
24
|
-
filter: (data): data is { attendableId: string; subject: Pipeline.Pipeline } =>
|
|
25
|
-
typeof data.attendableId === 'string' && Obj.instanceOf(Pipeline.Pipeline, data.subject),
|
|
22
|
+
id: 'root',
|
|
23
|
+
filter: AppSurface.object(AppSurface.Article, Pipeline.Pipeline),
|
|
26
24
|
component: ({ data, role }) => (
|
|
27
25
|
<PipelineContainer role={role} subject={data.subject} attendableId={data.attendableId} />
|
|
28
26
|
),
|
|
29
27
|
}),
|
|
30
28
|
Surface.create({
|
|
31
|
-
id:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
id: 'companion.invocations',
|
|
30
|
+
filter: AppSurface.allOf(
|
|
31
|
+
AppSurface.literal(AppSurface.Article, 'invocations'),
|
|
32
|
+
AppSurface.companion(AppSurface.Article, Pipeline.Pipeline),
|
|
33
|
+
),
|
|
35
34
|
component: ({ data, role }) => {
|
|
36
35
|
const db = Obj.getDatabase(data.companionTo);
|
|
37
36
|
// TODO(wittjosiah): Filter the invocations to those relevant to the project.
|
|
@@ -45,10 +44,9 @@ export default Capability.makeModule(() =>
|
|
|
45
44
|
},
|
|
46
45
|
}),
|
|
47
46
|
Surface.create({
|
|
48
|
-
id:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
component: ({ data }) => <PipelineObjectSettings pipeline={data.subject} />,
|
|
47
|
+
id: 'object-properties',
|
|
48
|
+
filter: AppSurface.object(AppSurface.ObjectProperties, Pipeline.Pipeline),
|
|
49
|
+
component: ({ data }) => <PipelineProperties pipeline={data.subject} />,
|
|
52
50
|
}),
|
|
53
51
|
]),
|
|
54
52
|
),
|
|
@@ -8,19 +8,19 @@ import * as Option from 'effect/Option';
|
|
|
8
8
|
import type * as Schema from 'effect/Schema';
|
|
9
9
|
import React, { forwardRef, useMemo, useRef, useState } from 'react';
|
|
10
10
|
|
|
11
|
+
import { resolveSchemaWithRegistry } from '@dxos/app-toolkit/query';
|
|
11
12
|
import { Annotation, JsonSchema, Obj, Query, Type } from '@dxos/echo';
|
|
12
|
-
import { resolveSchemaWithRegistry } from '@dxos/plugin-space';
|
|
13
13
|
import { Filter, getSpace, useObject } from '@dxos/react-client/echo';
|
|
14
14
|
import { Panel, Toolbar, useAsyncEffect, useTranslation } from '@dxos/react-ui';
|
|
15
15
|
import { Card } from '@dxos/react-ui';
|
|
16
|
+
import { Menu } from '@dxos/react-ui-menu';
|
|
16
17
|
import { Board, Focus, Mosaic, type MosaicTileProps } from '@dxos/react-ui-mosaic';
|
|
17
18
|
import { ProjectionModel, createEchoChangeCallback } from '@dxos/schema';
|
|
18
19
|
import { type Pipeline } from '@dxos/types';
|
|
19
20
|
|
|
20
|
-
import { meta } from '
|
|
21
|
+
import { meta } from '#meta';
|
|
21
22
|
|
|
22
23
|
import { type ItemProps, usePipeline } from './PipelineComponent';
|
|
23
|
-
import { Menu } from '@dxos/react-ui-menu';
|
|
24
24
|
|
|
25
25
|
//
|
|
26
26
|
// PipelineColumn
|
|
@@ -92,7 +92,7 @@ export const PipelineColumn = ({ data: column, location, classNames, debug }: Pi
|
|
|
92
92
|
<Panel.Toolbar asChild>
|
|
93
93
|
<Board.Column.Header
|
|
94
94
|
classNames='_opacity-10'
|
|
95
|
-
label={column.name || t('untitled
|
|
95
|
+
label={column.name || t('untitled-view.title')}
|
|
96
96
|
dragHandleRef={dragHandleRef}
|
|
97
97
|
/>
|
|
98
98
|
</Panel.Toolbar>
|
|
@@ -9,19 +9,19 @@ import React, { useCallback, useContext, useEffect, useMemo } from 'react';
|
|
|
9
9
|
import { Filter, Ref } from '@dxos/client/echo';
|
|
10
10
|
import { JsonSchema, Obj, Query } from '@dxos/echo';
|
|
11
11
|
import { Collection, View } from '@dxos/echo';
|
|
12
|
-
import {
|
|
12
|
+
import { random } from '@dxos/random';
|
|
13
13
|
import { useQuery } from '@dxos/react-client/echo';
|
|
14
14
|
import { useClientStory, withClientProvider } from '@dxos/react-client/testing';
|
|
15
|
-
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
16
15
|
import { Form, omitId } from '@dxos/react-ui-form';
|
|
17
16
|
import { withMosaic } from '@dxos/react-ui-mosaic/testing';
|
|
17
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
18
18
|
import { ViewModel } from '@dxos/schema';
|
|
19
19
|
import { createObjectFactory } from '@dxos/schema/testing';
|
|
20
20
|
import { withRegistry } from '@dxos/storybook-utils';
|
|
21
21
|
import { Person, Pipeline } from '@dxos/types';
|
|
22
22
|
|
|
23
|
-
import { usePipelineBoardModel } from '
|
|
24
|
-
import { translations } from '
|
|
23
|
+
import { usePipelineBoardModel } from '#hooks';
|
|
24
|
+
import { translations } from '#translations';
|
|
25
25
|
|
|
26
26
|
import { type ItemProps, PipelineComponent } from './PipelineComponent';
|
|
27
27
|
|
|
@@ -64,10 +64,10 @@ const DefaultStory = () => {
|
|
|
64
64
|
fields: ['fullName'],
|
|
65
65
|
});
|
|
66
66
|
|
|
67
|
-
Obj.
|
|
68
|
-
|
|
67
|
+
Obj.update(pipeline, (pipeline) => {
|
|
68
|
+
pipeline.columns.push({
|
|
69
69
|
name: 'New Contacts',
|
|
70
|
-
view: Ref.make(view) as (typeof
|
|
70
|
+
view: Ref.make(view) as (typeof pipeline.columns)[number]['view'],
|
|
71
71
|
order: [],
|
|
72
72
|
});
|
|
73
73
|
});
|
|
@@ -108,10 +108,10 @@ const MutationsStory = () => {
|
|
|
108
108
|
fields: ['fullName'],
|
|
109
109
|
});
|
|
110
110
|
|
|
111
|
-
Obj.
|
|
112
|
-
|
|
111
|
+
Obj.update(pipeline, (pipeline) => {
|
|
112
|
+
pipeline.columns.push({
|
|
113
113
|
name: 'New Contacts',
|
|
114
|
-
view: Ref.make(view) as (typeof
|
|
114
|
+
view: Ref.make(view) as (typeof pipeline.columns)[number]['view'],
|
|
115
115
|
order: [],
|
|
116
116
|
});
|
|
117
117
|
});
|
|
@@ -125,19 +125,19 @@ const MutationsStory = () => {
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
const interval = setInterval(() => {
|
|
128
|
-
const factory = createObjectFactory(space.db,
|
|
128
|
+
const factory = createObjectFactory(space.db, random as any);
|
|
129
129
|
const p = Math.random();
|
|
130
130
|
|
|
131
131
|
if (p < 0.4) {
|
|
132
132
|
// Append to the name
|
|
133
|
-
const contactToAdjust =
|
|
134
|
-
Obj.
|
|
135
|
-
|
|
133
|
+
const contactToAdjust = random.helpers.arrayElement(contacts);
|
|
134
|
+
Obj.update(contactToAdjust, (contactToAdjust) => {
|
|
135
|
+
contactToAdjust.fullName = (contactToAdjust.fullName ?? '') + ' X';
|
|
136
136
|
});
|
|
137
137
|
return;
|
|
138
138
|
} else if (p < 0.7 && contacts.length > 1) {
|
|
139
139
|
// Remove a contact (30% chance, but only if we have more than 1)
|
|
140
|
-
const contactToRemove =
|
|
140
|
+
const contactToRemove = random.helpers.arrayElement(contacts);
|
|
141
141
|
space.db.remove(contactToRemove);
|
|
142
142
|
} else {
|
|
143
143
|
// Add a new contact (30% chance)
|
|
@@ -195,7 +195,7 @@ const meta = {
|
|
|
195
195
|
);
|
|
196
196
|
|
|
197
197
|
// Generate random contacts.
|
|
198
|
-
const factory = createObjectFactory(space.db,
|
|
198
|
+
const factory = createObjectFactory(space.db, random as any);
|
|
199
199
|
await factory([{ type: Person.Person, count: 12 }]);
|
|
200
200
|
},
|
|
201
201
|
}),
|
|
@@ -14,7 +14,7 @@ import { type ProjectionModel } from '@dxos/schema';
|
|
|
14
14
|
import { type Pipeline } from '@dxos/types';
|
|
15
15
|
import { composable, composableProps, slottable } from '@dxos/ui-theme';
|
|
16
16
|
|
|
17
|
-
import { meta } from '
|
|
17
|
+
import { meta } from '#meta';
|
|
18
18
|
|
|
19
19
|
import { PipelineColumn } from './PipelineColumn';
|
|
20
20
|
|
|
@@ -66,7 +66,7 @@ const PipelineContent = slottable<HTMLDivElement, PipelineContentProps>(
|
|
|
66
66
|
const Comp = asChild ? Slot : 'div';
|
|
67
67
|
return (
|
|
68
68
|
<Board.Root model={model}>
|
|
69
|
-
<Comp {...composableProps(props
|
|
69
|
+
<Comp {...composableProps(props)} ref={forwardedRef}>
|
|
70
70
|
{children}
|
|
71
71
|
</Comp>
|
|
72
72
|
</Board.Root>
|
|
@@ -97,7 +97,7 @@ const PipelineColumns = composable<HTMLDivElement, PipelineColumnsProps>(({ pipe
|
|
|
97
97
|
get: (data) => data as unknown as Obj.Unknown,
|
|
98
98
|
make: (object) => object as unknown as Pipeline.Column,
|
|
99
99
|
canDrop: ({ source }) => model.isColumn(source.data),
|
|
100
|
-
onChange: (mutate) => Obj.
|
|
100
|
+
onChange: (mutate) => Obj.update(pipeline, (pipeline) => mutate(pipeline.columns)),
|
|
101
101
|
});
|
|
102
102
|
|
|
103
103
|
return <Board.Content {...props} id='pipeline' eventHandler={eventHandler} Tile={PipelineColumn} />;
|
|
@@ -117,7 +117,7 @@ export const PipelineToolbar = composable<HTMLDivElement, ToolbarRootProps>(({ c
|
|
|
117
117
|
|
|
118
118
|
return (
|
|
119
119
|
<Toolbar.Root {...composableProps(props)} ref={forwardedRef}>
|
|
120
|
-
<Toolbar.IconButton icon='ph--plus--regular' iconOnly label={t('add
|
|
120
|
+
<Toolbar.IconButton icon='ph--plus--regular' iconOnly label={t('add-column.label')} onClick={onAddColumn} />
|
|
121
121
|
</Toolbar.Root>
|
|
122
122
|
);
|
|
123
123
|
});
|
|
@@ -17,20 +17,20 @@ import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
|
17
17
|
import { InboxPlugin } from '@dxos/plugin-inbox';
|
|
18
18
|
import { PreviewPlugin } from '@dxos/plugin-preview';
|
|
19
19
|
import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
|
|
20
|
-
import {
|
|
20
|
+
import { random } from '@dxos/random';
|
|
21
21
|
import { useDatabase, useQuery } from '@dxos/react-client/echo';
|
|
22
|
+
import { translations as stackTranslations } from '@dxos/react-ui-stack/translations';
|
|
22
23
|
import { withLayout } from '@dxos/react-ui/testing';
|
|
23
|
-
import { translations as stackTranslations } from '@dxos/react-ui-stack';
|
|
24
24
|
import { ViewModel } from '@dxos/schema';
|
|
25
25
|
import { createObjectFactory } from '@dxos/schema/testing';
|
|
26
26
|
import { Message, Organization, Person, Pipeline, Task } from '@dxos/types';
|
|
27
27
|
|
|
28
|
-
import { translations } from '
|
|
29
|
-
import PipelineObjectSettings from '../PipelineObjectSettings';
|
|
28
|
+
import { translations } from '#translations';
|
|
30
29
|
|
|
30
|
+
import PipelineProperties from '../PipelineProperties';
|
|
31
31
|
import { PipelineContainer } from './PipelineContainer';
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
random.seed(0);
|
|
34
34
|
|
|
35
35
|
const DefaultStory = () => {
|
|
36
36
|
const db = useDatabase();
|
|
@@ -44,7 +44,7 @@ const DefaultStory = () => {
|
|
|
44
44
|
return (
|
|
45
45
|
<div className='grow grid grid-cols-[1fr_350px] overflow-hidden h-full w-full'>
|
|
46
46
|
<PipelineContainer role='article' subject={pipeline} attendableId='test' />
|
|
47
|
-
<
|
|
47
|
+
<PipelineProperties pipeline={pipeline} classNames='border-s border-separator' />
|
|
48
48
|
</div>
|
|
49
49
|
);
|
|
50
50
|
};
|
|
@@ -105,9 +105,9 @@ const meta = {
|
|
|
105
105
|
const messageFeed = yield* Database.add(Feed.make({ name: 'Messages' }));
|
|
106
106
|
const messages = Array.from({ length: 20 }).map(() =>
|
|
107
107
|
Obj.make(Message.Message, {
|
|
108
|
-
created:
|
|
108
|
+
created: random.date.recent().toISOString(),
|
|
109
109
|
sender: { role: 'user' },
|
|
110
|
-
blocks: [{ _tag: 'text' as const, text:
|
|
110
|
+
blocks: [{ _tag: 'text' as const, text: random.lorem.sentences(2) }],
|
|
111
111
|
}),
|
|
112
112
|
);
|
|
113
113
|
yield* Feed.append(messageFeed, messages);
|
|
@@ -124,9 +124,9 @@ const meta = {
|
|
|
124
124
|
const taskFeed = yield* Database.add(Feed.make({ name: 'Tasks' }));
|
|
125
125
|
const feedTasks = Array.from({ length: 10 }).map(() =>
|
|
126
126
|
Obj.make(Task.Task, {
|
|
127
|
-
title:
|
|
128
|
-
status:
|
|
129
|
-
priority:
|
|
127
|
+
title: random.lorem.sentence(),
|
|
128
|
+
status: random.helpers.arrayElement(['todo', 'in-progress', 'done']) as any,
|
|
129
|
+
priority: random.helpers.arrayElement(['low', 'medium', 'high']) as any,
|
|
130
130
|
}),
|
|
131
131
|
);
|
|
132
132
|
yield* Feed.append(taskFeed, feedTasks);
|
|
@@ -168,12 +168,12 @@ const meta = {
|
|
|
168
168
|
yield* Database.add(
|
|
169
169
|
Obj.make(Organization.Organization, {
|
|
170
170
|
[Obj.Meta]: {
|
|
171
|
-
tags:
|
|
171
|
+
tags: random.datatype.boolean() ? [tagDxn] : [],
|
|
172
172
|
},
|
|
173
|
-
name:
|
|
174
|
-
website:
|
|
175
|
-
description:
|
|
176
|
-
image:
|
|
173
|
+
name: random.company.name(),
|
|
174
|
+
website: random.internet.url(),
|
|
175
|
+
description: random.lorem.paragraph(),
|
|
176
|
+
image: random.image.url(),
|
|
177
177
|
}),
|
|
178
178
|
);
|
|
179
179
|
}
|
|
@@ -183,25 +183,25 @@ const meta = {
|
|
|
183
183
|
yield* Database.add(
|
|
184
184
|
Obj.make(Task.Task, {
|
|
185
185
|
[Obj.Meta]: {
|
|
186
|
-
tags:
|
|
186
|
+
tags: random.datatype.boolean() ? [tagDxn] : [],
|
|
187
187
|
},
|
|
188
|
-
title:
|
|
189
|
-
status:
|
|
190
|
-
priority:
|
|
188
|
+
title: random.lorem.sentence(),
|
|
189
|
+
status: random.helpers.arrayElement(['todo', 'in-progress', 'done']) as any,
|
|
190
|
+
priority: random.helpers.arrayElement(['low', 'medium', 'high']) as any,
|
|
191
191
|
}),
|
|
192
192
|
);
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
// Generate sample Contacts.
|
|
196
|
-
const factory = createObjectFactory(personalSpace.db,
|
|
196
|
+
const factory = createObjectFactory(personalSpace.db, random as any);
|
|
197
197
|
yield* Effect.promise(() => factory([{ type: Person.Person, count: 12 }]));
|
|
198
198
|
|
|
199
199
|
// Generate sample Projects.
|
|
200
200
|
for (const _ of Array.from({ length: 20 })) {
|
|
201
201
|
yield* Database.add(
|
|
202
202
|
Pipeline.make({
|
|
203
|
-
name:
|
|
204
|
-
description:
|
|
203
|
+
name: random.commerce.productName(),
|
|
204
|
+
description: random.lorem.sentence(),
|
|
205
205
|
}),
|
|
206
206
|
);
|
|
207
207
|
}
|