@dxos/plugin-pipeline 0.8.4-main.abd8ff62ef → 0.8.4-main.bc2380dfbc
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/README.md +1 -1
- package/dist/lib/neutral/PipelineArticle-6JIVXMYF.mjs +69 -0
- package/dist/lib/neutral/PipelineArticle-6JIVXMYF.mjs.map +7 -0
- package/dist/lib/neutral/PipelinePlugin.mjs +26 -0
- package/dist/lib/neutral/PipelinePlugin.mjs.map +7 -0
- package/dist/lib/neutral/PipelinePlugin.node.mjs +21 -0
- package/dist/lib/neutral/PipelinePlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/PipelinePlugin.workerd.mjs +16 -0
- package/dist/lib/neutral/PipelinePlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/PipelineProperties-GED4FJSS.mjs +211 -0
- package/dist/lib/neutral/PipelineProperties-GED4FJSS.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-ZLGRWRJU.mjs +44 -0
- package/dist/lib/neutral/app-graph-builder-ZLGRWRJU.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +11 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/{browser/index.mjs → neutral/chunk-ULB5DKWO.mjs} +1 -7
- package/dist/lib/neutral/chunk-ULB5DKWO.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +206 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +9 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-object-ZJYFACOI.mjs +25 -0
- package/dist/lib/neutral/create-object-ZJYFACOI.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +70 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +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-4W5YLCHT.mjs +49 -0
- package/dist/lib/neutral/react-surface-4W5YLCHT.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/PipelinePlugin.d.ts.map +1 -1
- package/dist/types/src/PipelinePlugin.node.d.ts.map +1 -1
- package/dist/types/src/PipelinePlugin.workerd.d.ts +4 -0
- package/dist/types/src/PipelinePlugin.workerd.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 +6 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/components/PipelineComponent/PipelineComponent.stories.d.ts.map +1 -1
- package/dist/types/src/containers/PipelineArticle/PipelineArticle.d.ts +6 -0
- package/dist/types/src/containers/PipelineArticle/PipelineArticle.d.ts.map +1 -0
- package/dist/types/src/containers/{PipelineContainer/PipelineContainer.stories.d.ts → PipelineArticle/PipelineArticle.stories.d.ts} +1 -1
- package/dist/types/src/containers/PipelineArticle/PipelineArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/PipelineArticle/index.d.ts +2 -0
- package/dist/types/src/containers/PipelineArticle/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 -2
- package/dist/types/src/index.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/tsconfig.tsbuildinfo +1 -1
- package/package.json +93 -60
- package/src/PipelinePlugin.node.ts +2 -27
- package/src/PipelinePlugin.test.ts +3 -3
- package/src/PipelinePlugin.tsx +2 -28
- package/src/PipelinePlugin.workerd.ts +16 -0
- package/src/capabilities/create-object.ts +29 -0
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/react-surface.tsx +2 -2
- package/src/components/PipelineComponent/PipelineColumn.tsx +9 -9
- package/src/components/PipelineComponent/PipelineComponent.stories.tsx +1 -3
- package/src/containers/{PipelineContainer/PipelineContainer.stories.tsx → PipelineArticle/PipelineArticle.stories.tsx} +15 -17
- package/src/containers/{PipelineContainer/PipelineContainer.tsx → PipelineArticle/PipelineArticle.tsx} +2 -2
- package/src/containers/PipelineArticle/index.ts +5 -0
- package/src/containers/PipelineProperties/PipelineProperties.tsx +23 -23
- package/src/containers/index.ts +1 -1
- package/src/index.ts +0 -6
- package/src/plugin.ts +9 -0
- package/src/templates/research.ts +2 -2
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/types/src/containers/PipelineContainer/PipelineContainer.d.ts +0 -6
- package/dist/types/src/containers/PipelineContainer/PipelineContainer.d.ts.map +0 -1
- package/dist/types/src/containers/PipelineContainer/PipelineContainer.stories.d.ts.map +0 -1
- package/dist/types/src/containers/PipelineContainer/index.d.ts +0 -2
- package/dist/types/src/containers/PipelineContainer/index.d.ts.map +0 -1
- package/src/containers/PipelineContainer/index.ts +0 -5
- /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/translations.mjs +0 -0
- /package/dist/lib/{browser → neutral}/translations.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/types/index.mjs +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.bc2380dfbc",
|
|
4
4
|
"description": "Pipeline plugin for Composer",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -8,40 +8,73 @@
|
|
|
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
15
|
"imports": {
|
|
16
|
-
"#capabilities":
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
"#capabilities": {
|
|
17
|
+
"source": "./src/capabilities/index.ts",
|
|
18
|
+
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
19
|
+
"default": "./dist/lib/neutral/capabilities/index.mjs"
|
|
20
|
+
},
|
|
21
|
+
"#components": {
|
|
22
|
+
"source": "./src/components/index.ts",
|
|
23
|
+
"types": "./dist/types/src/components/index.d.ts",
|
|
24
|
+
"default": "./dist/lib/neutral/components/index.mjs"
|
|
25
|
+
},
|
|
26
|
+
"#containers": {
|
|
27
|
+
"source": "./src/containers/index.ts",
|
|
28
|
+
"types": "./dist/types/src/containers/index.d.ts",
|
|
29
|
+
"default": "./dist/lib/neutral/containers/index.mjs"
|
|
30
|
+
},
|
|
31
|
+
"#hooks": {
|
|
32
|
+
"source": "./src/hooks/index.ts",
|
|
33
|
+
"types": "./dist/types/src/hooks/index.d.ts",
|
|
34
|
+
"default": "./dist/lib/neutral/hooks/index.mjs"
|
|
35
|
+
},
|
|
36
|
+
"#meta": {
|
|
37
|
+
"source": "./src/meta.ts",
|
|
38
|
+
"types": "./dist/types/src/meta.d.ts",
|
|
39
|
+
"default": "./dist/lib/neutral/meta.mjs"
|
|
40
|
+
},
|
|
21
41
|
"#plugin": {
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
42
|
+
"source": {
|
|
43
|
+
"workerd": "./src/PipelinePlugin.workerd.ts",
|
|
44
|
+
"node": "./src/PipelinePlugin.node.ts",
|
|
45
|
+
"default": "./src/PipelinePlugin.tsx"
|
|
46
|
+
},
|
|
47
|
+
"types": "./dist/types/src/PipelinePlugin.d.ts",
|
|
48
|
+
"workerd": "./dist/lib/neutral/PipelinePlugin.workerd.mjs",
|
|
49
|
+
"node": "./dist/lib/neutral/PipelinePlugin.node.mjs",
|
|
50
|
+
"default": "./dist/lib/neutral/PipelinePlugin.mjs"
|
|
51
|
+
},
|
|
52
|
+
"#translations": {
|
|
53
|
+
"source": "./src/translations.ts",
|
|
54
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
55
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
25
56
|
},
|
|
26
|
-
"#
|
|
27
|
-
|
|
57
|
+
"#types": {
|
|
58
|
+
"source": "./src/types/index.ts",
|
|
59
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
60
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
61
|
+
}
|
|
28
62
|
},
|
|
29
63
|
"exports": {
|
|
30
64
|
".": {
|
|
31
65
|
"source": "./src/index.ts",
|
|
32
66
|
"types": "./dist/types/src/index.d.ts",
|
|
33
|
-
"
|
|
67
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
68
|
+
},
|
|
69
|
+
"./plugin": {
|
|
70
|
+
"source": "./src/plugin.ts",
|
|
71
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
72
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
34
73
|
},
|
|
35
74
|
"./translations": {
|
|
36
75
|
"source": "./src/translations.ts",
|
|
37
76
|
"types": "./dist/types/src/translations.d.ts",
|
|
38
|
-
"
|
|
39
|
-
"node": "./dist/lib/node-esm/translations.mjs"
|
|
40
|
-
},
|
|
41
|
-
"./types": {
|
|
42
|
-
"source": "./src/types/index.ts",
|
|
43
|
-
"types": "./dist/types/src/types/index.d.ts",
|
|
44
|
-
"browser": "./dist/lib/browser/types/index.mjs"
|
|
77
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
45
78
|
}
|
|
46
79
|
},
|
|
47
80
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -54,33 +87,33 @@
|
|
|
54
87
|
"@radix-ui/react-context": "1.1.1",
|
|
55
88
|
"@radix-ui/react-slot": "1.1.2",
|
|
56
89
|
"effect": "3.20.0",
|
|
57
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/echo": "0.8.4-main.
|
|
63
|
-
"@dxos/devtools": "0.8.4-main.
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/plugin-graph": "0.8.4-main.
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/plugin-
|
|
71
|
-
"@dxos/plugin-
|
|
72
|
-
"@dxos/plugin-
|
|
73
|
-
"@dxos/react-client": "0.8.4-main.
|
|
74
|
-
"@dxos/react-ui-
|
|
75
|
-
"@dxos/react-ui-
|
|
76
|
-
"@dxos/react-ui-
|
|
77
|
-
"@dxos/react-ui-
|
|
78
|
-
"@dxos/react-ui-menu": "0.8.4-main.
|
|
79
|
-
"@dxos/react-ui-mosaic": "0.8.4-main.
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/
|
|
83
|
-
"@dxos/
|
|
90
|
+
"@dxos/app-framework": "0.8.4-main.bc2380dfbc",
|
|
91
|
+
"@dxos/assistant-toolkit": "0.8.4-main.bc2380dfbc",
|
|
92
|
+
"@dxos/compute": "0.8.4-main.bc2380dfbc",
|
|
93
|
+
"@dxos/async": "0.8.4-main.bc2380dfbc",
|
|
94
|
+
"@dxos/echo": "0.8.4-main.bc2380dfbc",
|
|
95
|
+
"@dxos/echo-atom": "0.8.4-main.bc2380dfbc",
|
|
96
|
+
"@dxos/devtools": "0.8.4-main.bc2380dfbc",
|
|
97
|
+
"@dxos/plugin-client": "0.8.4-main.bc2380dfbc",
|
|
98
|
+
"@dxos/echo-query": "0.8.4-main.bc2380dfbc",
|
|
99
|
+
"@dxos/plugin-deck": "0.8.4-main.bc2380dfbc",
|
|
100
|
+
"@dxos/plugin-graph": "0.8.4-main.bc2380dfbc",
|
|
101
|
+
"@dxos/app-toolkit": "0.8.4-main.bc2380dfbc",
|
|
102
|
+
"@dxos/log": "0.8.4-main.bc2380dfbc",
|
|
103
|
+
"@dxos/plugin-inbox": "0.8.4-main.bc2380dfbc",
|
|
104
|
+
"@dxos/plugin-space": "0.8.4-main.bc2380dfbc",
|
|
105
|
+
"@dxos/plugin-markdown": "0.8.4-main.bc2380dfbc",
|
|
106
|
+
"@dxos/react-client": "0.8.4-main.bc2380dfbc",
|
|
107
|
+
"@dxos/react-ui-form": "0.8.4-main.bc2380dfbc",
|
|
108
|
+
"@dxos/react-ui-components": "0.8.4-main.bc2380dfbc",
|
|
109
|
+
"@dxos/react-ui-attention": "0.8.4-main.bc2380dfbc",
|
|
110
|
+
"@dxos/react-ui-list": "0.8.4-main.bc2380dfbc",
|
|
111
|
+
"@dxos/react-ui-menu": "0.8.4-main.bc2380dfbc",
|
|
112
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.bc2380dfbc",
|
|
113
|
+
"@dxos/react-ui-stack": "0.8.4-main.bc2380dfbc",
|
|
114
|
+
"@dxos/types": "0.8.4-main.bc2380dfbc",
|
|
115
|
+
"@dxos/util": "0.8.4-main.bc2380dfbc",
|
|
116
|
+
"@dxos/schema": "0.8.4-main.bc2380dfbc"
|
|
84
117
|
},
|
|
85
118
|
"devDependencies": {
|
|
86
119
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -88,25 +121,25 @@
|
|
|
88
121
|
"@types/react-dom": "~19.2.3",
|
|
89
122
|
"react": "~19.2.3",
|
|
90
123
|
"react-dom": "~19.2.3",
|
|
91
|
-
"vite": "^8.0.
|
|
92
|
-
"@dxos/plugin-
|
|
93
|
-
"@dxos/echo-db": "0.8.4-main.
|
|
94
|
-
"@dxos/plugin-
|
|
95
|
-
"@dxos/plugin-
|
|
96
|
-
"@dxos/plugin-
|
|
97
|
-
"@dxos/plugin-theme": "0.8.4-main.
|
|
98
|
-
"@dxos/
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
101
|
-
"@dxos/ui
|
|
124
|
+
"vite": "^8.0.13",
|
|
125
|
+
"@dxos/plugin-inbox": "0.8.4-main.bc2380dfbc",
|
|
126
|
+
"@dxos/echo-db": "0.8.4-main.bc2380dfbc",
|
|
127
|
+
"@dxos/plugin-attention": "0.8.4-main.bc2380dfbc",
|
|
128
|
+
"@dxos/plugin-testing": "0.8.4-main.bc2380dfbc",
|
|
129
|
+
"@dxos/plugin-preview": "0.8.4-main.bc2380dfbc",
|
|
130
|
+
"@dxos/plugin-theme": "0.8.4-main.bc2380dfbc",
|
|
131
|
+
"@dxos/random": "0.8.4-main.bc2380dfbc",
|
|
132
|
+
"@dxos/ui-theme": "0.8.4-main.bc2380dfbc",
|
|
133
|
+
"@dxos/storybook-utils": "0.8.4-main.bc2380dfbc",
|
|
134
|
+
"@dxos/react-ui": "0.8.4-main.bc2380dfbc"
|
|
102
135
|
},
|
|
103
136
|
"peerDependencies": {
|
|
104
137
|
"@effect-atom/atom-react": "^0.5.0",
|
|
105
138
|
"effect": "3.20.0",
|
|
106
139
|
"react": "~19.2.3",
|
|
107
140
|
"react-dom": "~19.2.3",
|
|
108
|
-
"@dxos/
|
|
109
|
-
"@dxos/ui
|
|
141
|
+
"@dxos/ui-theme": "0.8.4-main.bc2380dfbc",
|
|
142
|
+
"@dxos/react-ui": "0.8.4-main.bc2380dfbc"
|
|
110
143
|
},
|
|
111
144
|
"publishConfig": {
|
|
112
145
|
"access": "public"
|
|
@@ -2,41 +2,16 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
import * as Option from 'effect/Option';
|
|
7
|
-
|
|
8
5
|
import { Plugin } from '@dxos/app-framework';
|
|
9
6
|
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
7
|
import { Pipeline } from '@dxos/types';
|
|
15
8
|
|
|
16
|
-
import { AppGraphBuilder } from '#capabilities';
|
|
9
|
+
import { AppGraphBuilder, CreateObject } from '#capabilities';
|
|
17
10
|
import { meta } from '#meta';
|
|
18
11
|
|
|
19
12
|
export const PipelinePlugin = Plugin.define(meta).pipe(
|
|
20
13
|
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
21
|
-
AppPlugin.
|
|
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
|
-
}),
|
|
14
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
40
15
|
AppPlugin.addSchemaModule({ schema: [Pipeline.Pipeline] }),
|
|
41
16
|
Plugin.make,
|
|
42
17
|
);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { describe, test } from 'vitest';
|
|
6
6
|
|
|
7
|
-
import { ClientPlugin } from '@dxos/plugin-client';
|
|
7
|
+
import { ClientPlugin } from '@dxos/plugin-client/plugin';
|
|
8
8
|
import { createComposerTestApp } from '@dxos/plugin-testing/harness';
|
|
9
9
|
|
|
10
10
|
import { PipelinePlugin } from '#plugin';
|
|
@@ -19,9 +19,9 @@ describe('PipelinePlugin', () => {
|
|
|
19
19
|
plugins: [ClientPlugin({}), PipelinePlugin()],
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
// After autoStart: AppGraphBuilder,
|
|
22
|
+
// After autoStart: AppGraphBuilder, CreateObject, schema all auto-cascade.
|
|
23
23
|
expect(harness.manager.getActive()).toEqual(
|
|
24
|
-
expect.arrayContaining([moduleId('AppGraphBuilder'), moduleId('
|
|
24
|
+
expect.arrayContaining([moduleId('AppGraphBuilder'), moduleId('CreateObject'), moduleId('schema')]),
|
|
25
25
|
);
|
|
26
26
|
});
|
|
27
27
|
});
|
package/src/PipelinePlugin.tsx
CHANGED
|
@@ -2,43 +2,17 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
import * as Option from 'effect/Option';
|
|
7
|
-
|
|
8
5
|
import { Plugin } from '@dxos/app-framework';
|
|
9
6
|
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
7
|
import { Pipeline } from '@dxos/types';
|
|
15
8
|
|
|
16
|
-
import { AppGraphBuilder, ReactSurface } from '#capabilities';
|
|
9
|
+
import { AppGraphBuilder, CreateObject, ReactSurface } from '#capabilities';
|
|
17
10
|
import { meta } from '#meta';
|
|
18
11
|
import { translations } from '#translations';
|
|
19
12
|
|
|
20
13
|
export const PipelinePlugin = Plugin.define(meta).pipe(
|
|
21
14
|
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
22
|
-
AppPlugin.
|
|
23
|
-
metadata: {
|
|
24
|
-
id: Pipeline.Pipeline.typename,
|
|
25
|
-
metadata: {
|
|
26
|
-
icon: Annotation.IconAnnotation.get(Pipeline.Pipeline).pipe(Option.getOrThrow).icon,
|
|
27
|
-
iconHue: Annotation.IconAnnotation.get(Pipeline.Pipeline).pipe(Option.getOrThrow).hue ?? 'white',
|
|
28
|
-
createObject: ((props, options) =>
|
|
29
|
-
Effect.gen(function* () {
|
|
30
|
-
const object = Pipeline.make(props);
|
|
31
|
-
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
32
|
-
object,
|
|
33
|
-
target: options.target,
|
|
34
|
-
hidden: true,
|
|
35
|
-
targetNodeId: options.targetNodeId,
|
|
36
|
-
});
|
|
37
|
-
})) satisfies CreateObject,
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
}),
|
|
41
|
-
|
|
15
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
42
16
|
AppPlugin.addSchemaModule({ schema: [Pipeline.Pipeline] }),
|
|
43
17
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
44
18
|
AppPlugin.addTranslationsModule({ translations }),
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
+
import { Pipeline } from '@dxos/types';
|
|
8
|
+
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
|
|
11
|
+
export const PipelinePlugin = Plugin.define(meta).pipe(
|
|
12
|
+
AppPlugin.addSchemaModule({ schema: [Pipeline.Pipeline] }),
|
|
13
|
+
Plugin.make,
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
export default PipelinePlugin;
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { SpaceOperation } from '@dxos/plugin-space';
|
|
10
|
+
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
11
|
+
import { Pipeline } from '@dxos/types';
|
|
12
|
+
|
|
13
|
+
export default Capability.makeModule(
|
|
14
|
+
Effect.fnUntraced(function* () {
|
|
15
|
+
return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
16
|
+
id: Pipeline.Pipeline.typename,
|
|
17
|
+
createObject: (props, options) =>
|
|
18
|
+
Effect.gen(function* () {
|
|
19
|
+
const object = Pipeline.make(props);
|
|
20
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
21
|
+
object,
|
|
22
|
+
target: options.target,
|
|
23
|
+
hidden: true,
|
|
24
|
+
targetNodeId: options.targetNodeId,
|
|
25
|
+
});
|
|
26
|
+
}),
|
|
27
|
+
});
|
|
28
|
+
}),
|
|
29
|
+
);
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
import { Capability } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
7
|
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
8
|
+
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
8
9
|
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
@@ -13,7 +13,7 @@ import { Obj } from '@dxos/echo';
|
|
|
13
13
|
import { Panel } from '@dxos/react-ui';
|
|
14
14
|
import { Pipeline } from '@dxos/types';
|
|
15
15
|
|
|
16
|
-
import {
|
|
16
|
+
import { PipelineArticle, PipelineProperties } from '#containers';
|
|
17
17
|
|
|
18
18
|
export default Capability.makeModule(() =>
|
|
19
19
|
Effect.succeed(
|
|
@@ -22,7 +22,7 @@ export default Capability.makeModule(() =>
|
|
|
22
22
|
id: 'root',
|
|
23
23
|
filter: AppSurface.object(AppSurface.Article, Pipeline.Pipeline),
|
|
24
24
|
component: ({ data, role }) => (
|
|
25
|
-
<
|
|
25
|
+
<PipelineArticle role={role} subject={data.subject} attendableId={data.attendableId} />
|
|
26
26
|
),
|
|
27
27
|
}),
|
|
28
28
|
Surface.create({
|
|
@@ -9,8 +9,8 @@ import type * as Schema from 'effect/Schema';
|
|
|
9
9
|
import React, { forwardRef, useMemo, useRef, useState } from 'react';
|
|
10
10
|
|
|
11
11
|
import { resolveSchemaWithRegistry } from '@dxos/app-toolkit/query';
|
|
12
|
-
import { Annotation, JsonSchema, Obj, Query, Type } from '@dxos/echo';
|
|
13
|
-
import {
|
|
12
|
+
import { Annotation, Filter, JsonSchema, Obj, Query, Type } from '@dxos/echo';
|
|
13
|
+
import { 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
16
|
import { Menu } from '@dxos/react-ui-menu';
|
|
@@ -33,11 +33,11 @@ export type PipelineColumnProps = Pick<MosaicTileProps<Pipeline.Column>, 'classN
|
|
|
33
33
|
// TODO(wittjosiah): Support item DnD reordering (ordering needs to be stored on the view presentation collection).
|
|
34
34
|
export const PipelineColumn = ({ data: column, location, classNames, debug }: PipelineColumnProps) => {
|
|
35
35
|
const { t } = useTranslation(meta.id);
|
|
36
|
-
const
|
|
36
|
+
const [dragHandle, setDragHandle] = useState<HTMLButtonElement | null>(null);
|
|
37
37
|
// Subscribe to the view target for reactivity.
|
|
38
38
|
const [viewSnapshot] = useObject(column.view);
|
|
39
39
|
const view = column.view.target;
|
|
40
|
-
const
|
|
40
|
+
const db = view && Obj.getDatabase(view);
|
|
41
41
|
const { Item } = usePipeline(PIPELINE_COLUMN_NAME);
|
|
42
42
|
const [schema, setSchema] = useState<Schema.Schema.AnyNoContext>();
|
|
43
43
|
const query = useMemo(() => {
|
|
@@ -51,13 +51,13 @@ export const PipelineColumn = ({ data: column, location, classNames, debug }: Pi
|
|
|
51
51
|
}, [JSON.stringify(viewSnapshot?.query.ast)]);
|
|
52
52
|
|
|
53
53
|
useAsyncEffect(async () => {
|
|
54
|
-
if (!query || !
|
|
54
|
+
if (!query || !db) {
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
const schema = await resolveSchemaWithRegistry(
|
|
58
|
+
const schema = await resolveSchemaWithRegistry(db.schemaRegistry, query.ast);
|
|
59
59
|
setSchema(() => schema);
|
|
60
|
-
}, [
|
|
60
|
+
}, [db, query]);
|
|
61
61
|
|
|
62
62
|
const projectionModel = useMemo(() => {
|
|
63
63
|
if (!schema || !view) {
|
|
@@ -87,13 +87,13 @@ export const PipelineColumn = ({ data: column, location, classNames, debug }: Pi
|
|
|
87
87
|
data={column}
|
|
88
88
|
location={location}
|
|
89
89
|
classNames={classNames}
|
|
90
|
-
|
|
90
|
+
dragHandle={dragHandle}
|
|
91
91
|
>
|
|
92
92
|
<Panel.Toolbar asChild>
|
|
93
93
|
<Board.Column.Header
|
|
94
94
|
classNames='_opacity-10'
|
|
95
95
|
label={column.name || t('untitled-view.title')}
|
|
96
|
-
dragHandleRef={
|
|
96
|
+
dragHandleRef={setDragHandle}
|
|
97
97
|
/>
|
|
98
98
|
</Panel.Toolbar>
|
|
99
99
|
<Panel.Content asChild>
|
|
@@ -6,9 +6,7 @@ import { RegistryContext } from '@effect-atom/atom-react';
|
|
|
6
6
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
7
7
|
import React, { useCallback, useContext, useEffect, useMemo } from 'react';
|
|
8
8
|
|
|
9
|
-
import { Filter, Ref } from '@dxos/
|
|
10
|
-
import { JsonSchema, Obj, Query } from '@dxos/echo';
|
|
11
|
-
import { Collection, View } from '@dxos/echo';
|
|
9
|
+
import { Collection, Filter, JsonSchema, Obj, Query, Ref, View } from '@dxos/echo';
|
|
12
10
|
import { random } from '@dxos/random';
|
|
13
11
|
import { useQuery } from '@dxos/react-client/echo';
|
|
14
12
|
import { useClientStory, withClientProvider } from '@dxos/react-client/testing';
|
|
@@ -8,14 +8,12 @@ import * as Layer from 'effect/Layer';
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
10
10
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
11
|
-
import { Filter, Ref } from '@dxos/
|
|
12
|
-
import { Database, Feed, JsonSchema, Obj, Query, Tag } from '@dxos/echo';
|
|
13
|
-
import { Collection, View } from '@dxos/echo';
|
|
11
|
+
import { Collection, Database, Feed, Filter, JsonSchema, Obj, Query, Ref, Tag, View } from '@dxos/echo';
|
|
14
12
|
import { createFeedServiceLayer } from '@dxos/echo-db';
|
|
15
|
-
import { ClientPlugin } from '@dxos/plugin-client';
|
|
13
|
+
import { ClientPlugin } from '@dxos/plugin-client/testing';
|
|
16
14
|
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
17
|
-
import { InboxPlugin } from '@dxos/plugin-inbox';
|
|
18
|
-
import { PreviewPlugin } from '@dxos/plugin-preview';
|
|
15
|
+
import { InboxPlugin } from '@dxos/plugin-inbox/testing';
|
|
16
|
+
import { PreviewPlugin } from '@dxos/plugin-preview/testing';
|
|
19
17
|
import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
|
|
20
18
|
import { random } from '@dxos/random';
|
|
21
19
|
import { useDatabase, useQuery } from '@dxos/react-client/echo';
|
|
@@ -28,7 +26,7 @@ import { Message, Organization, Person, Pipeline, Task } from '@dxos/types';
|
|
|
28
26
|
import { translations } from '#translations';
|
|
29
27
|
|
|
30
28
|
import PipelineProperties from '../PipelineProperties';
|
|
31
|
-
import {
|
|
29
|
+
import { PipelineArticle } from './PipelineArticle';
|
|
32
30
|
|
|
33
31
|
random.seed(0);
|
|
34
32
|
|
|
@@ -43,14 +41,14 @@ const DefaultStory = () => {
|
|
|
43
41
|
|
|
44
42
|
return (
|
|
45
43
|
<div className='grow grid grid-cols-[1fr_350px] overflow-hidden h-full w-full'>
|
|
46
|
-
<
|
|
44
|
+
<PipelineArticle role='article' subject={pipeline} attendableId='test' />
|
|
47
45
|
<PipelineProperties pipeline={pipeline} classNames='border-s border-separator' />
|
|
48
46
|
</div>
|
|
49
47
|
);
|
|
50
48
|
};
|
|
51
49
|
|
|
52
50
|
const meta = {
|
|
53
|
-
title: 'plugins/plugin-pipeline/containers/
|
|
51
|
+
title: 'plugins/plugin-pipeline/containers/PipelineArticle',
|
|
54
52
|
render: DefaultStory,
|
|
55
53
|
decorators: [
|
|
56
54
|
withLayout({ layout: 'fullscreen' }),
|
|
@@ -75,7 +73,7 @@ const meta = {
|
|
|
75
73
|
|
|
76
74
|
yield* Effect.gen(function* () {
|
|
77
75
|
const tag = yield* Database.add(Tag.make({ label: 'important', hue: 'green' }));
|
|
78
|
-
const
|
|
76
|
+
const tagDXN = Obj.getDXN(tag).toString();
|
|
79
77
|
|
|
80
78
|
// Create a view for Contacts.
|
|
81
79
|
const personView = ViewModel.make({
|
|
@@ -85,13 +83,13 @@ const meta = {
|
|
|
85
83
|
|
|
86
84
|
// Create a view for Organizations.
|
|
87
85
|
const organizationView = ViewModel.make({
|
|
88
|
-
query: Query.select(Filter.type(Organization.Organization)).select(Filter.tag(
|
|
86
|
+
query: Query.select(Filter.type(Organization.Organization)).select(Filter.tag(tagDXN)),
|
|
89
87
|
jsonSchema: JsonSchema.toJsonSchema(Organization.Organization),
|
|
90
88
|
});
|
|
91
89
|
|
|
92
90
|
// Create a view for Tasks.
|
|
93
91
|
const taskView = ViewModel.make({
|
|
94
|
-
query: Query.select(Filter.type(Task.Task)).select(Filter.tag(
|
|
92
|
+
query: Query.select(Filter.type(Task.Task)).select(Filter.tag(tagDXN)),
|
|
95
93
|
jsonSchema: JsonSchema.toJsonSchema(Task.Task),
|
|
96
94
|
});
|
|
97
95
|
|
|
@@ -112,10 +110,10 @@ const meta = {
|
|
|
112
110
|
);
|
|
113
111
|
yield* Feed.append(messageFeed, messages);
|
|
114
112
|
|
|
115
|
-
const
|
|
113
|
+
const messageQueueDXN = Feed.getQueueDxn(messageFeed)!.toString();
|
|
116
114
|
const messageView = ViewModel.make({
|
|
117
115
|
query: Query.select(Filter.type(Message.Message)).from({
|
|
118
|
-
|
|
116
|
+
feeds: [messageQueueDXN],
|
|
119
117
|
}),
|
|
120
118
|
jsonSchema: JsonSchema.toJsonSchema(Message.Message),
|
|
121
119
|
});
|
|
@@ -168,7 +166,7 @@ const meta = {
|
|
|
168
166
|
yield* Database.add(
|
|
169
167
|
Obj.make(Organization.Organization, {
|
|
170
168
|
[Obj.Meta]: {
|
|
171
|
-
tags: random.datatype.boolean() ? [
|
|
169
|
+
tags: random.datatype.boolean() ? [tagDXN] : [],
|
|
172
170
|
},
|
|
173
171
|
name: random.company.name(),
|
|
174
172
|
website: random.internet.url(),
|
|
@@ -183,7 +181,7 @@ const meta = {
|
|
|
183
181
|
yield* Database.add(
|
|
184
182
|
Obj.make(Task.Task, {
|
|
185
183
|
[Obj.Meta]: {
|
|
186
|
-
tags: random.datatype.boolean() ? [
|
|
184
|
+
tags: random.datatype.boolean() ? [tagDXN] : [],
|
|
187
185
|
},
|
|
188
186
|
title: random.lorem.sentence(),
|
|
189
187
|
status: random.helpers.arrayElement(['todo', 'in-progress', 'done']) as any,
|
|
@@ -221,7 +219,7 @@ const meta = {
|
|
|
221
219
|
layout: 'fullscreen',
|
|
222
220
|
translations: [...translations, ...stackTranslations],
|
|
223
221
|
},
|
|
224
|
-
} satisfies Meta<typeof
|
|
222
|
+
} satisfies Meta<typeof PipelineArticle>;
|
|
225
223
|
|
|
226
224
|
export default meta;
|
|
227
225
|
|
|
@@ -24,9 +24,9 @@ import { usePipelineBoardModel } from '#hooks';
|
|
|
24
24
|
|
|
25
25
|
const PIPELINE_ITEM = 'PipelineItem';
|
|
26
26
|
|
|
27
|
-
export type
|
|
27
|
+
export type PipelineArticleProps = AppSurface.ObjectArticleProps<Pipeline.Pipeline>;
|
|
28
28
|
|
|
29
|
-
export const
|
|
29
|
+
export const PipelineArticle = ({ role, subject: pipeline, attendableId }: PipelineArticleProps) => {
|
|
30
30
|
const registry = useCapability(Capabilities.AtomRegistry);
|
|
31
31
|
const model = usePipelineBoardModel(pipeline, registry);
|
|
32
32
|
const { invokePromise } = useOperationInvoker();
|