@dxos/plugin-pipeline 0.8.4-main.9be5663bfe → 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/neutral/chunk-ULB5DKWO.mjs +21 -0
- 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/translations.mjs +38 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.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/PipelinePlugin.workerd.d.ts +4 -0
- package/dist/types/src/PipelinePlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- 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/capabilities/react-surface.d.ts.map +1 -1
- 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 +4 -0
- 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/PipelineArticle/PipelineArticle.d.ts +6 -0
- package/dist/types/src/containers/PipelineArticle/PipelineArticle.d.ts.map +1 -0
- package/dist/types/src/containers/PipelineArticle/PipelineArticle.stories.d.ts +76 -0
- 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/PipelineProperties/PipelineProperties.d.ts.map +1 -1
- 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 +0 -1
- 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/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 +98 -61
- package/src/PipelinePlugin.node.ts +19 -0
- package/src/PipelinePlugin.test.ts +27 -0
- package/src/PipelinePlugin.tsx +5 -30
- 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 +7 -10
- package/src/components/PipelineComponent/PipelineColumn.tsx +9 -9
- package/src/components/PipelineComponent/PipelineComponent.stories.tsx +5 -7
- package/src/components/PipelineComponent/PipelineComponent.tsx +1 -1
- package/src/containers/{PipelineContainer/PipelineContainer.stories.tsx → PipelineArticle/PipelineArticle.stories.tsx} +18 -19
- package/src/containers/{PipelineContainer/PipelineContainer.tsx → PipelineArticle/PipelineArticle.tsx} +8 -10
- 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 -1
- package/src/plugin.ts +9 -0
- package/src/templates/research.ts +2 -2
- package/dist/lib/browser/index.mjs +0 -98
- 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 +0 -57
- 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}/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,38 +8,76 @@
|
|
|
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
|
-
|
|
21
|
-
"#
|
|
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
|
+
},
|
|
41
|
+
"#plugin": {
|
|
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"
|
|
56
|
+
},
|
|
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
|
+
}
|
|
22
62
|
},
|
|
23
63
|
"exports": {
|
|
24
64
|
".": {
|
|
25
65
|
"source": "./src/index.ts",
|
|
26
66
|
"types": "./dist/types/src/index.d.ts",
|
|
27
|
-
"
|
|
67
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
28
68
|
},
|
|
29
|
-
"./
|
|
30
|
-
"source": "./src/
|
|
31
|
-
"types": "./dist/types/src/
|
|
32
|
-
"
|
|
69
|
+
"./plugin": {
|
|
70
|
+
"source": "./src/plugin.ts",
|
|
71
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
72
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
73
|
+
},
|
|
74
|
+
"./translations": {
|
|
75
|
+
"source": "./src/translations.ts",
|
|
76
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
77
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
33
78
|
}
|
|
34
79
|
},
|
|
35
80
|
"types": "dist/types/src/index.d.ts",
|
|
36
|
-
"typesVersions": {
|
|
37
|
-
"*": {
|
|
38
|
-
"types": [
|
|
39
|
-
"dist/types/src/types/index.d.ts"
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
81
|
"files": [
|
|
44
82
|
"dist",
|
|
45
83
|
"src"
|
|
@@ -49,34 +87,33 @@
|
|
|
49
87
|
"@radix-ui/react-context": "1.1.1",
|
|
50
88
|
"@radix-ui/react-slot": "1.1.2",
|
|
51
89
|
"effect": "3.20.0",
|
|
52
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/async": "0.8.4-main.
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/echo": "0.8.4-main.
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/echo-
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/plugin-
|
|
66
|
-
"@dxos/plugin-
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/react-ui-
|
|
71
|
-
"@dxos/react-ui-
|
|
72
|
-
"@dxos/react-ui-list": "0.8.4-main.
|
|
73
|
-
"@dxos/react-ui-
|
|
74
|
-
"@dxos/react-ui-
|
|
75
|
-
"@dxos/react-ui-
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/util": "0.8.4-main.
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/react-ui-stack": "0.8.4-main.9be5663bfe"
|
|
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"
|
|
80
117
|
},
|
|
81
118
|
"devDependencies": {
|
|
82
119
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -84,25 +121,25 @@
|
|
|
84
121
|
"@types/react-dom": "~19.2.3",
|
|
85
122
|
"react": "~19.2.3",
|
|
86
123
|
"react-dom": "~19.2.3",
|
|
87
|
-
"vite": "^
|
|
88
|
-
"@dxos/
|
|
89
|
-
"@dxos/
|
|
90
|
-
"@dxos/plugin-
|
|
91
|
-
"@dxos/plugin-
|
|
92
|
-
"@dxos/plugin-
|
|
93
|
-
"@dxos/
|
|
94
|
-
"@dxos/
|
|
95
|
-
"@dxos/
|
|
96
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
97
|
-
"@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"
|
|
98
135
|
},
|
|
99
136
|
"peerDependencies": {
|
|
100
137
|
"@effect-atom/atom-react": "^0.5.0",
|
|
101
138
|
"effect": "3.20.0",
|
|
102
139
|
"react": "~19.2.3",
|
|
103
140
|
"react-dom": "~19.2.3",
|
|
104
|
-
"@dxos/
|
|
105
|
-
"@dxos/ui
|
|
141
|
+
"@dxos/ui-theme": "0.8.4-main.bc2380dfbc",
|
|
142
|
+
"@dxos/react-ui": "0.8.4-main.bc2380dfbc"
|
|
106
143
|
},
|
|
107
144
|
"publishConfig": {
|
|
108
145
|
"access": "public"
|
|
@@ -0,0 +1,19 @@
|
|
|
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 { AppGraphBuilder, CreateObject } from '#capabilities';
|
|
10
|
+
import { meta } from '#meta';
|
|
11
|
+
|
|
12
|
+
export const PipelinePlugin = Plugin.define(meta).pipe(
|
|
13
|
+
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
14
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
15
|
+
AppPlugin.addSchemaModule({ schema: [Pipeline.Pipeline] }),
|
|
16
|
+
Plugin.make,
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
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/plugin';
|
|
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, CreateObject, schema all auto-cascade.
|
|
23
|
+
expect(harness.manager.getActive()).toEqual(
|
|
24
|
+
expect.arrayContaining([moduleId('AppGraphBuilder'), moduleId('CreateObject'), moduleId('schema')]),
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
});
|
package/src/PipelinePlugin.tsx
CHANGED
|
@@ -2,46 +2,21 @@
|
|
|
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 { Annotation } from '@dxos/echo';
|
|
11
|
-
import { Operation } from '@dxos/operation';
|
|
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
|
-
|
|
19
|
-
import { translations } from './translations';
|
|
11
|
+
import { translations } from '#translations';
|
|
20
12
|
|
|
21
13
|
export const PipelinePlugin = Plugin.define(meta).pipe(
|
|
22
14
|
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
23
|
-
AppPlugin.
|
|
24
|
-
metadata: {
|
|
25
|
-
id: Pipeline.Pipeline.typename,
|
|
26
|
-
metadata: {
|
|
27
|
-
icon: Annotation.IconAnnotation.get(Pipeline.Pipeline).pipe(Option.getOrThrow).icon,
|
|
28
|
-
iconHue: Annotation.IconAnnotation.get(Pipeline.Pipeline).pipe(Option.getOrThrow).hue ?? 'white',
|
|
29
|
-
createObject: ((props, options) =>
|
|
30
|
-
Effect.gen(function* () {
|
|
31
|
-
const object = Pipeline.make(props);
|
|
32
|
-
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
33
|
-
object,
|
|
34
|
-
target: options.target,
|
|
35
|
-
hidden: true,
|
|
36
|
-
targetNodeId: options.targetNodeId,
|
|
37
|
-
});
|
|
38
|
-
})) satisfies CreateObject,
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
}),
|
|
42
|
-
|
|
15
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
43
16
|
AppPlugin.addSchemaModule({ schema: [Pipeline.Pipeline] }),
|
|
44
17
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
45
18
|
AppPlugin.addTranslationsModule({ translations }),
|
|
46
19
|
Plugin.make,
|
|
47
20
|
);
|
|
21
|
+
|
|
22
|
+
export default PipelinePlugin;
|
|
@@ -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,25 +13,23 @@ 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(
|
|
20
20
|
Capability.contributes(Capabilities.ReactSurface, [
|
|
21
21
|
Surface.create({
|
|
22
22
|
id: 'root',
|
|
23
|
-
|
|
24
|
-
filter: AppSurface.objectArticle(Pipeline.Pipeline),
|
|
23
|
+
filter: AppSurface.object(AppSurface.Article, Pipeline.Pipeline),
|
|
25
24
|
component: ({ data, role }) => (
|
|
26
|
-
<
|
|
25
|
+
<PipelineArticle role={role} subject={data.subject} attendableId={data.attendableId} />
|
|
27
26
|
),
|
|
28
27
|
}),
|
|
29
28
|
Surface.create({
|
|
30
29
|
id: 'companion.invocations',
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
AppSurface.
|
|
34
|
-
AppSurface.companionArticle(Pipeline.Pipeline),
|
|
30
|
+
filter: AppSurface.allOf(
|
|
31
|
+
AppSurface.literal(AppSurface.Article, 'invocations'),
|
|
32
|
+
AppSurface.companion(AppSurface.Article, Pipeline.Pipeline),
|
|
35
33
|
),
|
|
36
34
|
component: ({ data, role }) => {
|
|
37
35
|
const db = Obj.getDatabase(data.companionTo);
|
|
@@ -47,8 +45,7 @@ export default Capability.makeModule(() =>
|
|
|
47
45
|
}),
|
|
48
46
|
Surface.create({
|
|
49
47
|
id: 'object-properties',
|
|
50
|
-
|
|
51
|
-
filter: AppSurface.objectProperties(Pipeline.Pipeline),
|
|
48
|
+
filter: AppSurface.object(AppSurface.ObjectProperties, Pipeline.Pipeline),
|
|
52
49
|
component: ({ data }) => <PipelineProperties pipeline={data.subject} />,
|
|
53
50
|
}),
|
|
54
51
|
]),
|
|
@@ -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';
|
|
@@ -21,8 +19,8 @@ import { withRegistry } from '@dxos/storybook-utils';
|
|
|
21
19
|
import { Person, Pipeline } from '@dxos/types';
|
|
22
20
|
|
|
23
21
|
import { usePipelineBoardModel } from '#hooks';
|
|
22
|
+
import { translations } from '#translations';
|
|
24
23
|
|
|
25
|
-
import { translations } from '../../translations';
|
|
26
24
|
import { type ItemProps, PipelineComponent } from './PipelineComponent';
|
|
27
25
|
|
|
28
26
|
const StorybookProjectItem = ({ item, projectionModel }: ItemProps) => {
|
|
@@ -64,7 +62,7 @@ const DefaultStory = () => {
|
|
|
64
62
|
fields: ['fullName'],
|
|
65
63
|
});
|
|
66
64
|
|
|
67
|
-
Obj.
|
|
65
|
+
Obj.update(pipeline, (pipeline) => {
|
|
68
66
|
pipeline.columns.push({
|
|
69
67
|
name: 'New Contacts',
|
|
70
68
|
view: Ref.make(view) as (typeof pipeline.columns)[number]['view'],
|
|
@@ -108,7 +106,7 @@ const MutationsStory = () => {
|
|
|
108
106
|
fields: ['fullName'],
|
|
109
107
|
});
|
|
110
108
|
|
|
111
|
-
Obj.
|
|
109
|
+
Obj.update(pipeline, (pipeline) => {
|
|
112
110
|
pipeline.columns.push({
|
|
113
111
|
name: 'New Contacts',
|
|
114
112
|
view: Ref.make(view) as (typeof pipeline.columns)[number]['view'],
|
|
@@ -131,7 +129,7 @@ const MutationsStory = () => {
|
|
|
131
129
|
if (p < 0.4) {
|
|
132
130
|
// Append to the name
|
|
133
131
|
const contactToAdjust = random.helpers.arrayElement(contacts);
|
|
134
|
-
Obj.
|
|
132
|
+
Obj.update(contactToAdjust, (contactToAdjust) => {
|
|
135
133
|
contactToAdjust.fullName = (contactToAdjust.fullName ?? '') + ' X';
|
|
136
134
|
});
|
|
137
135
|
return;
|
|
@@ -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} />;
|
|
@@ -8,26 +8,25 @@ 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';
|
|
22
|
-
import { translations as stackTranslations } from '@dxos/react-ui-stack';
|
|
20
|
+
import { translations as stackTranslations } from '@dxos/react-ui-stack/translations';
|
|
23
21
|
import { withLayout } from '@dxos/react-ui/testing';
|
|
24
22
|
import { ViewModel } from '@dxos/schema';
|
|
25
23
|
import { createObjectFactory } from '@dxos/schema/testing';
|
|
26
24
|
import { Message, Organization, Person, Pipeline, Task } from '@dxos/types';
|
|
27
25
|
|
|
28
|
-
import { translations } from '
|
|
26
|
+
import { translations } from '#translations';
|
|
27
|
+
|
|
29
28
|
import PipelineProperties from '../PipelineProperties';
|
|
30
|
-
import {
|
|
29
|
+
import { PipelineArticle } from './PipelineArticle';
|
|
31
30
|
|
|
32
31
|
random.seed(0);
|
|
33
32
|
|
|
@@ -42,14 +41,14 @@ const DefaultStory = () => {
|
|
|
42
41
|
|
|
43
42
|
return (
|
|
44
43
|
<div className='grow grid grid-cols-[1fr_350px] overflow-hidden h-full w-full'>
|
|
45
|
-
<
|
|
44
|
+
<PipelineArticle role='article' subject={pipeline} attendableId='test' />
|
|
46
45
|
<PipelineProperties pipeline={pipeline} classNames='border-s border-separator' />
|
|
47
46
|
</div>
|
|
48
47
|
);
|
|
49
48
|
};
|
|
50
49
|
|
|
51
50
|
const meta = {
|
|
52
|
-
title: 'plugins/plugin-pipeline/containers/
|
|
51
|
+
title: 'plugins/plugin-pipeline/containers/PipelineArticle',
|
|
53
52
|
render: DefaultStory,
|
|
54
53
|
decorators: [
|
|
55
54
|
withLayout({ layout: 'fullscreen' }),
|
|
@@ -74,7 +73,7 @@ const meta = {
|
|
|
74
73
|
|
|
75
74
|
yield* Effect.gen(function* () {
|
|
76
75
|
const tag = yield* Database.add(Tag.make({ label: 'important', hue: 'green' }));
|
|
77
|
-
const
|
|
76
|
+
const tagDXN = Obj.getDXN(tag).toString();
|
|
78
77
|
|
|
79
78
|
// Create a view for Contacts.
|
|
80
79
|
const personView = ViewModel.make({
|
|
@@ -84,13 +83,13 @@ const meta = {
|
|
|
84
83
|
|
|
85
84
|
// Create a view for Organizations.
|
|
86
85
|
const organizationView = ViewModel.make({
|
|
87
|
-
query: Query.select(Filter.type(Organization.Organization)).select(Filter.tag(
|
|
86
|
+
query: Query.select(Filter.type(Organization.Organization)).select(Filter.tag(tagDXN)),
|
|
88
87
|
jsonSchema: JsonSchema.toJsonSchema(Organization.Organization),
|
|
89
88
|
});
|
|
90
89
|
|
|
91
90
|
// Create a view for Tasks.
|
|
92
91
|
const taskView = ViewModel.make({
|
|
93
|
-
query: Query.select(Filter.type(Task.Task)).select(Filter.tag(
|
|
92
|
+
query: Query.select(Filter.type(Task.Task)).select(Filter.tag(tagDXN)),
|
|
94
93
|
jsonSchema: JsonSchema.toJsonSchema(Task.Task),
|
|
95
94
|
});
|
|
96
95
|
|
|
@@ -111,10 +110,10 @@ const meta = {
|
|
|
111
110
|
);
|
|
112
111
|
yield* Feed.append(messageFeed, messages);
|
|
113
112
|
|
|
114
|
-
const
|
|
113
|
+
const messageQueueDXN = Feed.getQueueDxn(messageFeed)!.toString();
|
|
115
114
|
const messageView = ViewModel.make({
|
|
116
115
|
query: Query.select(Filter.type(Message.Message)).from({
|
|
117
|
-
|
|
116
|
+
feeds: [messageQueueDXN],
|
|
118
117
|
}),
|
|
119
118
|
jsonSchema: JsonSchema.toJsonSchema(Message.Message),
|
|
120
119
|
});
|
|
@@ -167,7 +166,7 @@ const meta = {
|
|
|
167
166
|
yield* Database.add(
|
|
168
167
|
Obj.make(Organization.Organization, {
|
|
169
168
|
[Obj.Meta]: {
|
|
170
|
-
tags: random.datatype.boolean() ? [
|
|
169
|
+
tags: random.datatype.boolean() ? [tagDXN] : [],
|
|
171
170
|
},
|
|
172
171
|
name: random.company.name(),
|
|
173
172
|
website: random.internet.url(),
|
|
@@ -182,7 +181,7 @@ const meta = {
|
|
|
182
181
|
yield* Database.add(
|
|
183
182
|
Obj.make(Task.Task, {
|
|
184
183
|
[Obj.Meta]: {
|
|
185
|
-
tags: random.datatype.boolean() ? [
|
|
184
|
+
tags: random.datatype.boolean() ? [tagDXN] : [],
|
|
186
185
|
},
|
|
187
186
|
title: random.lorem.sentence(),
|
|
188
187
|
status: random.helpers.arrayElement(['todo', 'in-progress', 'done']) as any,
|
|
@@ -220,7 +219,7 @@ const meta = {
|
|
|
220
219
|
layout: 'fullscreen',
|
|
221
220
|
translations: [...translations, ...stackTranslations],
|
|
222
221
|
},
|
|
223
|
-
} satisfies Meta<typeof
|
|
222
|
+
} satisfies Meta<typeof PipelineArticle>;
|
|
224
223
|
|
|
225
224
|
export default meta;
|
|
226
225
|
|