@dxos/plugin-pipeline 0.9.1-main.c7dcc2e112 → 0.10.0
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/neutral/PipelinePlugin.mjs +2 -6
- package/dist/lib/neutral/PipelinePlugin.mjs.map +3 -3
- package/dist/lib/neutral/PipelinePlugin.node.mjs +2 -4
- package/dist/lib/neutral/PipelinePlugin.node.mjs.map +3 -3
- package/dist/lib/neutral/{PipelineProperties-JW7AWWU4.mjs → PipelineProperties-LDD4P4RA.mjs} +3 -3
- package/dist/lib/neutral/PipelineProperties-LDD4P4RA.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +2 -6
- package/dist/lib/neutral/capabilities/index.mjs.map +3 -3
- package/dist/lib/neutral/components/index.mjs.map +1 -1
- package/dist/lib/neutral/containers/index.mjs +1 -1
- package/dist/lib/neutral/{create-object-VIRI2DY5.mjs → create-object-B4FHAFWY.mjs} +2 -7
- package/dist/lib/neutral/create-object-B4FHAFWY.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/{react-surface-U7OOZHUQ.mjs → react-surface-G6WO2XOI.mjs} +1 -20
- package/dist/lib/neutral/react-surface-G6WO2XOI.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +0 -2
- package/dist/lib/neutral/translations.mjs.map +2 -2
- 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/capabilities/create-object.d.ts +1 -7
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +0 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts +1 -1
- package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts.map +1 -1
- package/dist/types/src/components/PipelineComponent/PipelineComponent.stories.d.ts +0 -4
- package/dist/types/src/components/PipelineComponent/PipelineComponent.stories.d.ts.map +1 -1
- package/dist/types/src/containers/PipelineArticle/PipelineArticle.stories.d.ts +2 -19
- package/dist/types/src/containers/PipelineArticle/PipelineArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/PipelineProperties/PipelineProperties.stories.d.ts +0 -17
- package/dist/types/src/containers/PipelineProperties/PipelineProperties.stories.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +4 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +0 -4
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +44 -45
- package/src/PipelinePlugin.node.ts +1 -2
- package/src/PipelinePlugin.test.ts +2 -4
- package/src/PipelinePlugin.tsx +1 -3
- package/src/capabilities/create-object.ts +1 -4
- package/src/capabilities/index.ts +0 -2
- package/src/capabilities/react-surface.tsx +0 -21
- package/src/components/PipelineComponent/PipelineComponent.tsx +1 -1
- package/src/containers/PipelineArticle/PipelineArticle.stories.tsx +2 -7
- package/src/containers/PipelineProperties/PipelineProperties.stories.tsx +2 -7
- package/src/containers/PipelineProperties/PipelineProperties.tsx +2 -2
- package/src/translations.ts +0 -2
- package/dist/lib/neutral/PipelineProperties-JW7AWWU4.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-DULKWFOE.mjs +0 -81
- package/dist/lib/neutral/app-graph-builder-DULKWFOE.mjs.map +0 -7
- package/dist/lib/neutral/chunk-OF66INHQ.mjs +0 -9
- package/dist/lib/neutral/chunk-OF66INHQ.mjs.map +0 -7
- package/dist/lib/neutral/create-object-VIRI2DY5.mjs.map +0 -7
- package/dist/lib/neutral/navigation-resolver-PB6XKEAG.mjs +0 -12
- package/dist/lib/neutral/navigation-resolver-PB6XKEAG.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-U7OOZHUQ.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -6
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/navigation-resolver.d.ts +0 -6
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +0 -1
- package/dist/types/src/paths.d.ts +0 -3
- package/dist/types/src/paths.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -74
- package/src/capabilities/navigation-resolver.ts +0 -18
- package/src/paths.ts +0 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-pipeline",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Pipeline plugin for Composer",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -89,58 +89,57 @@
|
|
|
89
89
|
"@radix-ui/react-compose-refs": "1.1.1",
|
|
90
90
|
"@radix-ui/react-context": "1.1.1",
|
|
91
91
|
"@radix-ui/react-slot": "1.1.2",
|
|
92
|
-
"effect": "3.21.
|
|
93
|
-
"@dxos/app-
|
|
94
|
-
"@dxos/
|
|
95
|
-
"@dxos/
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/
|
|
101
|
-
"@dxos/
|
|
102
|
-
"@dxos/plugin-client": "0.
|
|
103
|
-
"@dxos/
|
|
104
|
-
"@dxos/plugin-
|
|
105
|
-
"@dxos/
|
|
106
|
-
"@dxos/plugin-
|
|
107
|
-
"@dxos/plugin-space": "0.
|
|
108
|
-
"@dxos/react-
|
|
109
|
-
"@dxos/react-ui-attention": "0.
|
|
110
|
-
"@dxos/react-ui-
|
|
111
|
-
"@dxos/react-ui-
|
|
112
|
-
"@dxos/react-ui-
|
|
113
|
-
"@dxos/
|
|
114
|
-
"@dxos/
|
|
115
|
-
"@dxos/
|
|
116
|
-
"@dxos/
|
|
117
|
-
"@dxos/schema": "0.9.1-main.c7dcc2e112"
|
|
92
|
+
"effect": "3.21.4",
|
|
93
|
+
"@dxos/app-framework": "0.10.0",
|
|
94
|
+
"@dxos/compute": "0.10.0",
|
|
95
|
+
"@dxos/devtools": "0.10.0",
|
|
96
|
+
"@dxos/app-toolkit": "0.10.0",
|
|
97
|
+
"@dxos/echo-query": "0.10.0",
|
|
98
|
+
"@dxos/echo": "0.10.0",
|
|
99
|
+
"@dxos/effect": "0.10.0",
|
|
100
|
+
"@dxos/log": "0.10.0",
|
|
101
|
+
"@dxos/keys": "0.10.0",
|
|
102
|
+
"@dxos/plugin-client": "0.10.0",
|
|
103
|
+
"@dxos/client": "0.10.0",
|
|
104
|
+
"@dxos/plugin-graph": "0.10.0",
|
|
105
|
+
"@dxos/react-client": "0.10.0",
|
|
106
|
+
"@dxos/plugin-inbox": "0.10.0",
|
|
107
|
+
"@dxos/plugin-space": "0.10.0",
|
|
108
|
+
"@dxos/react-ui-form": "0.10.0",
|
|
109
|
+
"@dxos/react-ui-attention": "0.10.0",
|
|
110
|
+
"@dxos/react-ui-list": "0.10.0",
|
|
111
|
+
"@dxos/react-ui-menu": "0.10.0",
|
|
112
|
+
"@dxos/react-ui-mosaic": "0.10.0",
|
|
113
|
+
"@dxos/types": "0.10.0",
|
|
114
|
+
"@dxos/util": "0.10.0",
|
|
115
|
+
"@dxos/schema": "0.10.0",
|
|
116
|
+
"@dxos/plugin-markdown": "0.10.0"
|
|
118
117
|
},
|
|
119
118
|
"devDependencies": {
|
|
120
119
|
"@effect-atom/atom-react": "^0.5.0",
|
|
121
|
-
"@types/react": "~19.2.
|
|
120
|
+
"@types/react": "~19.2.17",
|
|
122
121
|
"@types/react-dom": "~19.2.3",
|
|
123
|
-
"react": "~19.2.
|
|
124
|
-
"react-dom": "~19.2.
|
|
122
|
+
"react": "~19.2.7",
|
|
123
|
+
"react-dom": "~19.2.7",
|
|
125
124
|
"vite": "^8.0.16",
|
|
126
|
-
"@dxos/
|
|
127
|
-
"@dxos/
|
|
128
|
-
"@dxos/plugin-
|
|
129
|
-
"@dxos/plugin-
|
|
130
|
-
"@dxos/plugin-testing": "0.
|
|
131
|
-
"@dxos/
|
|
132
|
-
"@dxos/
|
|
133
|
-
"@dxos/storybook-utils": "0.
|
|
134
|
-
"@dxos/
|
|
135
|
-
"@dxos/
|
|
125
|
+
"@dxos/plugin-attention": "0.10.0",
|
|
126
|
+
"@dxos/echo-client": "0.10.0",
|
|
127
|
+
"@dxos/plugin-inbox": "0.10.0",
|
|
128
|
+
"@dxos/plugin-preview": "0.10.0",
|
|
129
|
+
"@dxos/plugin-testing": "0.10.0",
|
|
130
|
+
"@dxos/plugin-theme": "0.10.0",
|
|
131
|
+
"@dxos/react-ui": "0.10.0",
|
|
132
|
+
"@dxos/storybook-utils": "0.10.0",
|
|
133
|
+
"@dxos/random": "0.10.0",
|
|
134
|
+
"@dxos/ui-theme": "0.10.0"
|
|
136
135
|
},
|
|
137
136
|
"peerDependencies": {
|
|
138
137
|
"@effect-atom/atom-react": "^0.5.0",
|
|
139
|
-
"effect": "3.21.
|
|
140
|
-
"react": "~19.2.
|
|
141
|
-
"react-dom": "~19.2.
|
|
142
|
-
"@dxos/ui-theme": "0.
|
|
143
|
-
"@dxos/react-ui": "0.
|
|
138
|
+
"effect": "3.21.4",
|
|
139
|
+
"react": "~19.2.7",
|
|
140
|
+
"react-dom": "~19.2.7",
|
|
141
|
+
"@dxos/ui-theme": "0.10.0",
|
|
142
|
+
"@dxos/react-ui": "0.10.0"
|
|
144
143
|
},
|
|
145
144
|
"publishConfig": {
|
|
146
145
|
"access": "public"
|
|
@@ -6,11 +6,10 @@ import { Plugin } from '@dxos/app-framework';
|
|
|
6
6
|
import { AppPlugin } from '@dxos/app-toolkit';
|
|
7
7
|
import { Pipeline } from '@dxos/types';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { CreateObject } from '#capabilities';
|
|
10
10
|
import { meta } from '#meta';
|
|
11
11
|
|
|
12
12
|
export const PipelinePlugin = Plugin.define(meta).pipe(
|
|
13
|
-
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
14
13
|
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
15
14
|
AppPlugin.addSchemaModule({ schema: [Pipeline.Pipeline] }),
|
|
16
15
|
Plugin.make,
|
|
@@ -19,9 +19,7 @@ describe('PipelinePlugin', () => {
|
|
|
19
19
|
plugins: [ClientPlugin({}), PipelinePlugin()],
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
// After autoStart:
|
|
23
|
-
expect(harness.manager.getActive()).toEqual(
|
|
24
|
-
expect.arrayContaining([moduleId('AppGraphBuilder'), moduleId('CreateObject'), moduleId('schema')]),
|
|
25
|
-
);
|
|
22
|
+
// After autoStart: CreateObject and schema auto-cascade.
|
|
23
|
+
expect(harness.manager.getActive()).toEqual(expect.arrayContaining([moduleId('CreateObject'), moduleId('schema')]));
|
|
26
24
|
});
|
|
27
25
|
});
|
package/src/PipelinePlugin.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import { Plugin } from '@dxos/app-framework';
|
|
|
6
6
|
import { AppPlugin } from '@dxos/app-toolkit';
|
|
7
7
|
import { Pipeline } from '@dxos/types';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { CreateObject, ReactSurface } from '#capabilities';
|
|
10
10
|
import { meta } from '#meta';
|
|
11
11
|
import { translations } from '#translations';
|
|
12
12
|
|
|
@@ -14,9 +14,7 @@ import { translations } from '#translations';
|
|
|
14
14
|
import pluginSpec from '../PLUGIN.mdl?raw';
|
|
15
15
|
|
|
16
16
|
export const PipelinePlugin = Plugin.define(meta).pipe(
|
|
17
|
-
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
18
17
|
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
19
|
-
AppPlugin.addNavigationResolverModule({ activate: NavigationResolver }),
|
|
20
18
|
AppPlugin.addSchemaModule({ schema: [Pipeline.Pipeline] }),
|
|
21
19
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
22
20
|
AppPlugin.addTranslationsModule({ translations }),
|
|
@@ -11,8 +11,6 @@ import { SpaceOperation } from '@dxos/plugin-space';
|
|
|
11
11
|
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
12
12
|
import { Pipeline } from '@dxos/types';
|
|
13
13
|
|
|
14
|
-
import { getPipelinesPath } from '../paths';
|
|
15
|
-
|
|
16
14
|
export default Capability.makeModule(
|
|
17
15
|
Effect.fnUntraced(function* () {
|
|
18
16
|
return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
@@ -23,8 +21,7 @@ export default Capability.makeModule(
|
|
|
23
21
|
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
24
22
|
object,
|
|
25
23
|
target: options.target,
|
|
26
|
-
|
|
27
|
-
targetNodeId: options.targetNodeId ?? getPipelinesPath(options.db.spaceId),
|
|
24
|
+
targetNodeId: options.targetNodeId,
|
|
28
25
|
});
|
|
29
26
|
}),
|
|
30
27
|
});
|
|
@@ -4,7 +4,5 @@
|
|
|
4
4
|
|
|
5
5
|
import { Capability } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
-
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
8
7
|
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
9
|
-
export const NavigationResolver = Capability.lazy('NavigationResolver', () => import('./navigation-resolver'));
|
|
10
8
|
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
@@ -8,9 +8,6 @@ import React from 'react';
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
9
|
import { Surface } from '@dxos/app-framework/ui';
|
|
10
10
|
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
11
|
-
import { InvocationTraceContainer } from '@dxos/devtools';
|
|
12
|
-
import { Obj } from '@dxos/echo';
|
|
13
|
-
import { Panel } from '@dxos/react-ui';
|
|
14
11
|
import { Pipeline } from '@dxos/types';
|
|
15
12
|
|
|
16
13
|
import { PipelineArticle, PipelineProperties } from '#containers';
|
|
@@ -25,24 +22,6 @@ export default Capability.makeModule(() =>
|
|
|
25
22
|
<PipelineArticle role={role} subject={data.subject} attendableId={data.attendableId} />
|
|
26
23
|
),
|
|
27
24
|
}),
|
|
28
|
-
Surface.create({
|
|
29
|
-
id: 'companion.invocations',
|
|
30
|
-
filter: AppSurface.allOf(
|
|
31
|
-
AppSurface.literal(AppSurface.Article, 'invocations'),
|
|
32
|
-
AppSurface.companion(AppSurface.Article, Pipeline.Pipeline),
|
|
33
|
-
),
|
|
34
|
-
component: ({ data, role }) => {
|
|
35
|
-
const db = Obj.getDatabase(data.companionTo);
|
|
36
|
-
// TODO(wittjosiah): Filter the invocations to those relevant to the project.
|
|
37
|
-
return (
|
|
38
|
-
<Panel.Root role={role} className='dx-document'>
|
|
39
|
-
<Panel.Content asChild>
|
|
40
|
-
<InvocationTraceContainer db={db} detailAxis='block' />
|
|
41
|
-
</Panel.Content>
|
|
42
|
-
</Panel.Root>
|
|
43
|
-
);
|
|
44
|
-
},
|
|
45
|
-
}),
|
|
46
25
|
Surface.create({
|
|
47
26
|
id: 'objectProperties',
|
|
48
27
|
filter: AppSurface.object(AppSurface.ObjectProperties, Pipeline.Pipeline),
|
|
@@ -137,4 +137,4 @@ export const PipelineComponent = {
|
|
|
137
137
|
|
|
138
138
|
export { usePipeline };
|
|
139
139
|
|
|
140
|
-
export type { ItemProps,
|
|
140
|
+
export type { ItemProps, PipelineColumnsProps, PipelineContentProps, PipelineContextValue, PipelineRootProps };
|
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import * as Effect from 'effect/Effect';
|
|
7
|
-
import * as Layer from 'effect/Layer';
|
|
8
7
|
import React from 'react';
|
|
9
8
|
|
|
10
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
11
10
|
import { Collection, Database, Feed, Filter, JsonSchema, Obj, Query, Ref, Scope, Tag, View } from '@dxos/echo';
|
|
12
|
-
import { createFeedServiceLayer } from '@dxos/echo-client';
|
|
13
11
|
import { ClientPlugin } from '@dxos/plugin-client/plugin';
|
|
14
12
|
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
15
13
|
import { InboxPlugin } from '@dxos/plugin-inbox/plugin';
|
|
@@ -17,7 +15,6 @@ import { PreviewPlugin } from '@dxos/plugin-preview/testing';
|
|
|
17
15
|
import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
|
|
18
16
|
import { random } from '@dxos/random';
|
|
19
17
|
import { useDatabase, useQuery } from '@dxos/react-client/echo';
|
|
20
|
-
import { translations as stackTranslations } from '@dxos/react-ui-stack/translations';
|
|
21
18
|
import { withLayout } from '@dxos/react-ui/testing';
|
|
22
19
|
import { ViewModel } from '@dxos/schema';
|
|
23
20
|
import { createObjectFactory } from '@dxos/schema/testing';
|
|
@@ -202,9 +199,7 @@ const meta = {
|
|
|
202
199
|
}),
|
|
203
200
|
);
|
|
204
201
|
}
|
|
205
|
-
}).pipe(
|
|
206
|
-
Effect.provide(Layer.merge(Database.layer(personalSpace.db), createFeedServiceLayer(personalSpace.db))),
|
|
207
|
-
);
|
|
202
|
+
}).pipe(Effect.provide(Database.layer(personalSpace.db)));
|
|
208
203
|
}),
|
|
209
204
|
}),
|
|
210
205
|
InboxPlugin(),
|
|
@@ -214,7 +209,7 @@ const meta = {
|
|
|
214
209
|
],
|
|
215
210
|
parameters: {
|
|
216
211
|
layout: 'fullscreen',
|
|
217
|
-
translations
|
|
212
|
+
translations,
|
|
218
213
|
},
|
|
219
214
|
} satisfies Meta<typeof PipelineArticle>;
|
|
220
215
|
|
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import * as Effect from 'effect/Effect';
|
|
7
|
-
import * as Layer from 'effect/Layer';
|
|
8
7
|
import React from 'react';
|
|
9
8
|
|
|
10
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
11
10
|
import { Collection, Database, Feed, Filter, JsonSchema, Obj, Query, Ref, Scope, Tag, View } from '@dxos/echo';
|
|
12
|
-
import { createFeedServiceLayer } from '@dxos/echo-client';
|
|
13
11
|
import { ClientPlugin } from '@dxos/plugin-client/plugin';
|
|
14
12
|
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
15
13
|
import { PreviewPlugin } from '@dxos/plugin-preview/testing';
|
|
@@ -18,7 +16,6 @@ import { random } from '@dxos/random';
|
|
|
18
16
|
import { useQuery, useSpaces } from '@dxos/react-client/echo';
|
|
19
17
|
import { ObjectProperties } from '@dxos/react-ui-form';
|
|
20
18
|
import { translations as formTranslations } from '@dxos/react-ui-form/translations';
|
|
21
|
-
import { translations as stackTranslations } from '@dxos/react-ui-stack/translations';
|
|
22
19
|
import { Loading, withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
23
20
|
import { ViewModel } from '@dxos/schema';
|
|
24
21
|
import { createObjectFactory } from '@dxos/schema/testing';
|
|
@@ -128,9 +125,7 @@ const meta = {
|
|
|
128
125
|
// Generate sample Contacts.
|
|
129
126
|
const factory = createObjectFactory(personalSpace.db, random as any);
|
|
130
127
|
yield* Effect.promise(() => factory([{ type: Person.Person, count: 12 }]));
|
|
131
|
-
}).pipe(
|
|
132
|
-
Effect.provide(Layer.merge(Database.layer(personalSpace.db), createFeedServiceLayer(personalSpace.db))),
|
|
133
|
-
);
|
|
128
|
+
}).pipe(Effect.provide(Database.layer(personalSpace.db)));
|
|
134
129
|
}),
|
|
135
130
|
}),
|
|
136
131
|
PreviewPlugin(),
|
|
@@ -139,7 +134,7 @@ const meta = {
|
|
|
139
134
|
],
|
|
140
135
|
parameters: {
|
|
141
136
|
layout: 'fullscreen',
|
|
142
|
-
translations: [...translations, ...formTranslations
|
|
137
|
+
translations: [...translations, ...formTranslations],
|
|
143
138
|
},
|
|
144
139
|
} satisfies Meta<typeof PipelineProperties>;
|
|
145
140
|
|
|
@@ -12,7 +12,7 @@ import { type Mutable } from '@dxos/echo/Obj';
|
|
|
12
12
|
import { SchemaEx } from '@dxos/effect';
|
|
13
13
|
import { useObject, useQuery } from '@dxos/react-client/echo';
|
|
14
14
|
import { useAsyncEffect, useTranslation } from '@dxos/react-ui';
|
|
15
|
-
import {
|
|
15
|
+
import { Form, FormFieldHeader, ViewEditor } from '@dxos/react-ui-form';
|
|
16
16
|
import { OrderedList } from '@dxos/react-ui-list';
|
|
17
17
|
import { type ProjectionModel, ViewModel } from '@dxos/schema';
|
|
18
18
|
import { Pipeline } from '@dxos/types';
|
|
@@ -150,7 +150,7 @@ export const PipelineProperties = ({ subject: pipeline }: PipelinePropertiesProp
|
|
|
150
150
|
|
|
151
151
|
return (
|
|
152
152
|
<Form.Section>
|
|
153
|
-
<
|
|
153
|
+
<FormFieldHeader label={t('columns.label')} add={{ label: t('add-column.label'), onClick: handleAdd }} />
|
|
154
154
|
<OrderedList.Root<Pipeline.Column>
|
|
155
155
|
items={columns}
|
|
156
156
|
isItem={Schema.is(Pipeline.Column)}
|
package/src/translations.ts
CHANGED
|
@@ -30,8 +30,6 @@ export const translations = [
|
|
|
30
30
|
'enumerating-tab.label': 'List',
|
|
31
31
|
'editing-tab.label': 'Edit',
|
|
32
32
|
'columns.label': 'Columns',
|
|
33
|
-
'pipeline-invocations.label': 'Invocations',
|
|
34
|
-
'pipeline-automation.label': 'Automations',
|
|
35
33
|
'toggle-expand.label': 'Toggle expand',
|
|
36
34
|
'delete-column.label': 'Delete column',
|
|
37
35
|
},
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/PipelineProperties/PipelineProperties.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\n\nimport { resolveSchemaWithRegistry } from '@dxos/app-toolkit/query';\nimport { AppSurface, useTypeOptions } from '@dxos/app-toolkit/ui';\nimport { EID, Filter, JsonSchema, Obj, Query, type QueryAST, Ref, Scope, Tag, type Type } from '@dxos/echo';\nimport { type Mutable } from '@dxos/echo/Obj';\nimport { SchemaEx } from '@dxos/effect';\nimport { useObject, useQuery } from '@dxos/react-client/echo';\nimport { useAsyncEffect, useTranslation } from '@dxos/react-ui';\nimport { FieldHeader, Form, ViewEditor } from '@dxos/react-ui-form';\nimport { OrderedList } from '@dxos/react-ui-list';\nimport { type ProjectionModel, ViewModel } from '@dxos/schema';\nimport { Pipeline } from '@dxos/types';\nimport { arrayMove } from '@dxos/util';\n\nimport { meta } from '#meta';\n\nconst ColumnFormSchema = Pipeline.Column.pipe(Schema.mutable, Schema.pick('name'));\n\nexport type PipelinePropertiesProps = AppSurface.ObjectPropertiesProps<Pipeline.Pipeline>;\n\n/**\n * Supports editing the pipeline view.\n */\nexport const PipelineProperties = ({ subject: pipeline }: PipelinePropertiesProps) => {\n const { t } = useTranslation(meta.profile.key);\n const db = Obj.getDatabase(pipeline);\n const [expandedId, setExpandedId] = useState<string>();\n const [columns, updateColumns] = useObject(pipeline, 'columns');\n const column = useMemo(() => columns.find((column) => column.view.uri === expandedId), [columns, expandedId]);\n const [view, updateView] = useObject(column?.view);\n const [type, setType] = useState<Type.AnyEntity>();\n const projectionRef = useRef<ProjectionModel>(null);\n const tags = useQuery(db, Filter.type(Tag.Tag));\n const types = useTypeOptions({\n db,\n annotation: {\n location: ['database', 'runtime'],\n kind: ['user'],\n },\n });\n\n useAsyncEffect(async () => {\n if (!view?.query || !db) {\n return;\n }\n\n const foundType = await resolveSchemaWithRegistry(db, view.query.ast);\n if (foundType && foundType !== type) {\n setType(() => foundType);\n }\n }, [db, view, type]);\n\n const handleMove = useCallback(\n (fromIndex: number, toIndex: number) =>\n updateColumns((columns) => {\n arrayMove(columns, fromIndex, toIndex);\n }),\n [updateColumns],\n );\n\n const handleQueryChanged = useCallback(\n async (newQuery: QueryAST.Query, target?: EID.EID) => {\n if (!view || !db) {\n return;\n }\n\n const queue = target;\n const query = queue ? Query.fromAst(newQuery).from([Scope.feed(String(queue))]) : Query.fromAst(newQuery);\n updateView((view) => {\n view.query.ast = query.ast as Mutable<typeof query.ast>;\n });\n const newType = await resolveSchemaWithRegistry(db, query.ast);\n if (!newType) {\n return;\n }\n\n const newView = ViewModel.make({\n query,\n jsonSchema: newType.jsonSchema,\n });\n updateView((view) => {\n view.projection = Obj.getSnapshot(newView).projection as Mutable<typeof view.projection>;\n });\n\n setType(() => newType);\n },\n [db, view, updateView, type],\n );\n\n const handleColumnValuesChanged = useCallback(\n (column: Pipeline.Column) =>\n (newValues: { name?: string }, { changed }: { changed: Record<SchemaEx.JsonPath, boolean> }) => {\n if (changed['name' as SchemaEx.JsonPath]) {\n const columnIndex = columns.findIndex((c) => c === column);\n if (columnIndex === -1) {\n return;\n }\n updateColumns((cols) => {\n cols[columnIndex].name = newValues.name ?? '';\n });\n }\n },\n [columns, updateColumns],\n );\n\n const handleDelete = useCallback(\n async (column: Pipeline.Column) => {\n if (column.view.uri === expandedId) {\n setExpandedId(undefined);\n }\n\n const index = columns.findIndex((l) => l === column);\n const viewToRemove = await column.view.load();\n updateColumns((columns) => {\n columns.splice(index, 1);\n });\n db?.remove(viewToRemove);\n },\n [expandedId, columns, updateColumns, db],\n );\n\n const handleAdd = useCallback(() => {\n if (!db) {\n return;\n }\n\n const newView = db.add(\n ViewModel.make({\n query: Query.select(Filter.nothing()),\n jsonSchema: JsonSchema.toJsonSchema(Schema.Struct({})),\n }),\n );\n\n updateColumns((columns) => {\n columns.push({\n name: '',\n // Type assertion needed due to QueryAST type variance.\n view: Ref.make(newView) as (typeof columns)[number]['view'],\n order: [],\n });\n });\n setExpandedId(newView.id);\n }, [db, updateColumns]);\n\n return (\n <Form.Section>\n <FieldHeader label={t('columns.label')} add={{ label: t('add-column.label'), onClick: handleAdd }} />\n <OrderedList.Root<Pipeline.Column>\n items={columns}\n isItem={Schema.is(Pipeline.Column)}\n getId={(column) => column.view.uri}\n onMove={handleMove}\n expandedId={expandedId}\n onExpandedChange={setExpandedId}\n >\n {({ items }) => (\n <OrderedList.Content>\n {items.map((column) => (\n <OrderedList.DetailItem<Pipeline.Column>\n key={column.view.uri}\n id={column.view.uri}\n item={column}\n title={column.name || t('untitled-column.title')}\n trailing={\n <OrderedList.DeleteButton\n label={t('delete-column.label')}\n onClick={() => handleDelete(column)}\n data-testid='column.delete'\n />\n }\n >\n {column.view.target && (\n <>\n <Form.Root\n schema={ColumnFormSchema}\n values={column}\n onValuesChanged={handleColumnValuesChanged(column)}\n >\n <Form.Content>\n <Form.FieldSet />\n </Form.Content>\n </Form.Root>\n <ViewEditor\n ref={projectionRef}\n mode='tag'\n readonly\n type={type}\n view={column.view.target}\n registry={db?.graph.registry}\n db={db}\n tags={tags}\n types={types}\n onQueryChanged={handleQueryChanged}\n />\n </>\n )}\n </OrderedList.DetailItem>\n ))}\n </OrderedList.Content>\n )}\n </OrderedList.Root>\n </Form.Section>\n );\n};\n"],
|
|
5
|
-
"mappings": ";AAIA,YAAYA,YAAY;AACxB,OAAOC,SAASC,aAAaC,SAASC,QAAQC,gBAAgB;AAE9D,SAASC,iCAAiC;AAC1C,SAAqBC,sBAAsB;AAC3C,SAAcC,QAAQC,YAAYC,KAAKC,OAAsBC,KAAKC,OAAOC,WAAsB;AAG/F,SAASC,WAAWC,gBAAgB;AACpC,SAASC,gBAAgBC,sBAAsB;AAC/C,SAASC,aAAaC,MAAMC,kBAAkB;AAC9C,SAASC,mBAAmB;AAC5B,SAA+BC,iBAAiB;AAChD,SAASC,gBAAgB;AACzB,SAASC,iBAAiB;AAE1B,SAASC,YAAY;AAErB,IAAMC,mBAAmBH,SAASI,OAAOC,KAAYC,gBAAgBC,YAAK,MAAA,CAAA;AAOnE,IAAMC,qBAAqB,CA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AA;MAC5B2E,eAAY;;KAIf3E,QAAOE,KAAKmB,UACX,sBAAA,cAAA,MAAA,UAAA,MACE,sBAAA,cAAC7C,KAAKqF,MAAI;IACRe,QAAQ7F;IACR8F,QAAQ7E;IACR8E,iBAAiB7C,0BAA0BjC,OAAAA;KAE3C,sBAAA,cAACxB,KAAK4F,SAAO,MACX,sBAAA,cAAC5F,KAAKuG,UAAQ,IAAA,CAAA,CAAA,GAGlB,sBAAA,cAACtG,YAAAA;IACCuG,KAAKzE;IACL0E,MAAK;IACLC,UAAAA;IACA7E;IACAH,MAAMF,QAAOE,KAAKmB;IAClB8D,UAAUzF,IAAI0F,MAAMD;IACpBzF;IACAc;IACAC;IACA4E,gBAAgBlE;;AAWtC;",
|
|
6
|
-
"names": ["Schema", "React", "useCallback", "useMemo", "useRef", "useState", "resolveSchemaWithRegistry", "useTypeOptions", "Filter", "JsonSchema", "Obj", "Query", "Ref", "Scope", "Tag", "useObject", "useQuery", "useAsyncEffect", "useTranslation", "FieldHeader", "Form", "ViewEditor", "OrderedList", "ViewModel", "Pipeline", "arrayMove", "meta", "ColumnFormSchema", "Column", "pipe", "mutable", "pick", "PipelineProperties", "subject", "pipeline", "t", "profile", "key", "db", "getDatabase", "expandedId", "setExpandedId", "columns", "updateColumns", "column", "find", "view", "uri", "updateView", "type", "setType", "projectionRef", "tags", "types", "annotation", "location", "kind", "query", "foundType", "ast", "handleMove", "fromIndex", "toIndex", "handleQueryChanged", "newQuery", "target", "queue", "fromAst", "from", "feed", "String", "newType", "newView", "make", "jsonSchema", "projection", "getSnapshot", "handleColumnValuesChanged", "newValues", "changed", "columnIndex", "findIndex", "c", "cols", "name", "handleDelete", "undefined", "index", "l", "viewToRemove", "load", "splice", "remove", "handleAdd", "add", "select", "nothing", "toJsonSchema", "Struct", "push", "order", "id", "Section", "label", "onClick", "Root", "items", "isItem", "is", "getId", "onMove", "onExpandedChange", "Content", "map", "DetailItem", "item", "title", "trailing", "DeleteButton", "data-testid", "schema", "values", "onValuesChanged", "FieldSet", "ref", "mode", "readonly", "registry", "graph", "onQueryChanged"]
|
|
7
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getPipelinesPath
|
|
3
|
-
} from "./chunk-OF66INHQ.mjs";
|
|
4
|
-
|
|
5
|
-
// src/capabilities/app-graph-builder.ts
|
|
6
|
-
import * as Effect from "effect/Effect";
|
|
7
|
-
import * as Option from "effect/Option";
|
|
8
|
-
import { Capability } from "@dxos/app-framework";
|
|
9
|
-
import { AppCapabilities, AppNode, TypeSection } from "@dxos/app-toolkit";
|
|
10
|
-
import { isSpace } from "@dxos/client/echo";
|
|
11
|
-
import { Operation } from "@dxos/compute";
|
|
12
|
-
import { Type } from "@dxos/echo";
|
|
13
|
-
import { GraphBuilder, Node } from "@dxos/plugin-graph";
|
|
14
|
-
import { SpaceOperation } from "@dxos/plugin-space";
|
|
15
|
-
import { Pipeline } from "@dxos/types";
|
|
16
|
-
import { meta } from "#meta";
|
|
17
|
-
var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
18
|
-
const extensions = yield* Effect.all([
|
|
19
|
-
TypeSection.createTypeSectionExtension(Pipeline.Pipeline),
|
|
20
|
-
GraphBuilder.createExtension({
|
|
21
|
-
id: "pipelinesSectionActions",
|
|
22
|
-
match: (node) => {
|
|
23
|
-
const space = isSpace(node.properties.space) ? node.properties.space : void 0;
|
|
24
|
-
return node.type === Type.getTypename(Pipeline.Pipeline) && space ? Option.some(space) : Option.none();
|
|
25
|
-
},
|
|
26
|
-
actions: (space) => Effect.succeed([
|
|
27
|
-
Node.makeAction({
|
|
28
|
-
id: "create-pipeline",
|
|
29
|
-
data: () => Operation.invoke(SpaceOperation.OpenCreateObject, {
|
|
30
|
-
target: space.db,
|
|
31
|
-
typename: Type.getTypename(Pipeline.Pipeline),
|
|
32
|
-
targetNodeId: getPipelinesPath(space.db.spaceId)
|
|
33
|
-
}),
|
|
34
|
-
properties: {
|
|
35
|
-
label: [
|
|
36
|
-
"add-object.label",
|
|
37
|
-
{
|
|
38
|
-
ns: Type.getTypename(Pipeline.Pipeline)
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
icon: "ph--plus--regular",
|
|
42
|
-
disposition: "list-item-primary"
|
|
43
|
-
}
|
|
44
|
-
})
|
|
45
|
-
])
|
|
46
|
-
}),
|
|
47
|
-
GraphBuilder.createTypeExtension({
|
|
48
|
-
id: "triggers",
|
|
49
|
-
type: Pipeline.Pipeline,
|
|
50
|
-
connector: () => Effect.succeed([
|
|
51
|
-
AppNode.makeCompanion({
|
|
52
|
-
id: "invocations",
|
|
53
|
-
label: [
|
|
54
|
-
"pipeline-invocations.label",
|
|
55
|
-
{
|
|
56
|
-
ns: meta.profile.key
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
icon: "ph--clock-countdown--regular",
|
|
60
|
-
data: "invocations"
|
|
61
|
-
}),
|
|
62
|
-
AppNode.makeCompanion({
|
|
63
|
-
id: "automation",
|
|
64
|
-
label: [
|
|
65
|
-
"pipeline-automation.label",
|
|
66
|
-
{
|
|
67
|
-
ns: meta.profile.key
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
icon: "ph--lightning--regular",
|
|
71
|
-
data: "automation"
|
|
72
|
-
})
|
|
73
|
-
])
|
|
74
|
-
})
|
|
75
|
-
]);
|
|
76
|
-
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
77
|
-
}));
|
|
78
|
-
export {
|
|
79
|
-
app_graph_builder_default as default
|
|
80
|
-
};
|
|
81
|
-
//# sourceMappingURL=app-graph-builder-DULKWFOE.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities, AppNode, TypeSection } from '@dxos/app-toolkit';\nimport { isSpace } from '@dxos/client/echo';\nimport { Operation } from '@dxos/compute';\nimport { Type } from '@dxos/echo';\nimport { GraphBuilder, Node } from '@dxos/plugin-graph';\nimport { SpaceOperation } from '@dxos/plugin-space';\nimport { Pipeline } from '@dxos/types';\n\nimport { meta } from '#meta';\n\nimport { getPipelinesPath } from '../paths';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* Effect.all([\n TypeSection.createTypeSectionExtension(Pipeline.Pipeline),\n\n GraphBuilder.createExtension({\n id: 'pipelinesSectionActions',\n match: (node) => {\n const space = isSpace(node.properties.space) ? node.properties.space : undefined;\n return node.type === Type.getTypename(Pipeline.Pipeline) && space ? Option.some(space) : Option.none();\n },\n actions: (space) =>\n Effect.succeed([\n Node.makeAction({\n id: 'create-pipeline',\n data: () =>\n Operation.invoke(SpaceOperation.OpenCreateObject, {\n target: space.db,\n typename: Type.getTypename(Pipeline.Pipeline),\n targetNodeId: getPipelinesPath(space.db.spaceId),\n }),\n properties: {\n label: ['add-object.label', { ns: Type.getTypename(Pipeline.Pipeline) }],\n icon: 'ph--plus--regular',\n disposition: 'list-item-primary',\n },\n }),\n ]),\n }),\n\n GraphBuilder.createTypeExtension({\n id: 'triggers',\n type: Pipeline.Pipeline,\n connector: () =>\n Effect.succeed([\n AppNode.makeCompanion({\n id: 'invocations',\n label: ['pipeline-invocations.label', { ns: meta.profile.key }],\n icon: 'ph--clock-countdown--regular',\n data: 'invocations',\n }),\n AppNode.makeCompanion({\n id: 'automation',\n label: ['pipeline-automation.label', { ns: meta.profile.key }],\n icon: 'ph--lightning--regular',\n data: 'automation',\n }),\n ]),\n }),\n ]);\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,kBAAkB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IO,KAAKC,QAAQC;YAAI;;UAC5DR,MAAM;UACNb,MAAM;QACR,CAAA;OACD;IACL,CAAA;GACD;AAED,SAAO1B,WAAWgD,YAAYC,gBAAgBC,iBAAiB/C,UAAAA;AACjE,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Option", "Capability", "AppCapabilities", "AppNode", "TypeSection", "isSpace", "Operation", "Type", "GraphBuilder", "Node", "SpaceOperation", "Pipeline", "meta", "Capability", "makeModule", "fnUntraced", "extensions", "all", "TypeSection", "createTypeSectionExtension", "Pipeline", "GraphBuilder", "createExtension", "id", "match", "node", "space", "isSpace", "properties", "undefined", "type", "Type", "getTypename", "some", "none", "actions", "succeed", "Node", "makeAction", "data", "Operation", "invoke", "SpaceOperation", "OpenCreateObject", "target", "db", "typename", "targetNodeId", "getPipelinesPath", "spaceId", "label", "ns", "icon", "disposition", "createTypeExtension", "connector", "AppNode", "makeCompanion", "meta", "profile", "key", "contributes", "AppCapabilities", "AppGraphBuilder"]
|
|
7
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// src/paths.ts
|
|
2
|
-
import { Paths } from "@dxos/app-toolkit";
|
|
3
|
-
import { Pipeline } from "@dxos/types";
|
|
4
|
-
var { getSectionPath: getPipelinesPath, getObjectPath: getPipelinePath } = Paths.createTypeSectionPaths(Pipeline.Pipeline);
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
getPipelinesPath
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=chunk-OF66INHQ.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/paths.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Paths } from '@dxos/app-toolkit';\nimport { Pipeline } from '@dxos/types';\n\nconst { getSectionPath: getPipelinesPath, getObjectPath: getPipelinePath } = Paths.createTypeSectionPaths(\n Pipeline.Pipeline,\n);\n\nexport { getPipelinesPath, getPipelinePath };\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,aAAa;AACtB,SAASC,gBAAgB;AAEzB,IAAM,EAAEC,gBAAgBC,kBAAkBC,eAAeC,gBAAe,IAAKL,MAAMM,uBACjFL,SAASA,QAAQ;",
|
|
6
|
-
"names": ["Paths", "Pipeline", "getSectionPath", "getPipelinesPath", "getObjectPath", "getPipelinePath", "createTypeSectionPaths"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/create-object.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { Type } from '@dxos/echo';\nimport { SpaceOperation } from '@dxos/plugin-space';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { Pipeline } from '@dxos/types';\n\nimport { getPipelinesPath } from '../paths';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {\n id: Type.getTypename(Pipeline.Pipeline),\n createObject: (props, options) =>\n Effect.gen(function* () {\n const object = Pipeline.make(props);\n return yield* Operation.invoke(SpaceOperation.AddObject, {\n object,\n target: options.target,\n hidden: true,\n targetNodeId: options.targetNodeId ?? getPipelinesPath(options.db.spaceId),\n });\n }),\n });\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,YAAY;AACrB,SAASC,sBAAsB;AAC/B,SAASC,yBAAyB;AAClC,SAASC,gBAAgB;AAIzB,IAAA,wBAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,SAAOF,WAAWG,YAAYC,kBAAkBC,mBAAmB;IACjEC,IAAIC,KAAKC,YAAYC,SAASA,QAAQ;IACtCC,cAAc,CAACC,OAAOC,YACbC,WAAI,aAAA;AACT,YAAMC,SAASL,SAASM,KAAKJ,KAAAA;AAC7B,aAAO,OAAOK,UAAUC,OAAOC,eAAeC,WAAW;QACvDL;QACAM,QAAQR,QAAQQ;QAChBC,QAAQ;QACRC,cAAcV,QAAQU,gBAAgBC,iBAAiBX,QAAQY,GAAGC,OAAO;MAC3E,CAAA;IACF,CAAA;EACJ,CAAA;AACF,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Capability", "Operation", "Type", "SpaceOperation", "SpaceCapabilities", "Pipeline", "Capability", "makeModule", "fnUntraced", "contributes", "SpaceCapabilities", "CreateObjectEntry", "id", "Type", "getTypename", "Pipeline", "createObject", "props", "options", "gen", "object", "make", "Operation", "invoke", "SpaceOperation", "AddObject", "target", "hidden", "targetNodeId", "getPipelinesPath", "db", "spaceId"]
|
|
7
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// src/capabilities/navigation-resolver.ts
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import { Capability } from "@dxos/app-framework";
|
|
4
|
-
import { AppCapabilities, TypeSection } from "@dxos/app-toolkit";
|
|
5
|
-
import { Pipeline } from "@dxos/types";
|
|
6
|
-
var navigation_resolver_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
7
|
-
return Capability.contributes(AppCapabilities.NavigationPathResolver, TypeSection.createTypeSectionPathResolver(Pipeline.Pipeline));
|
|
8
|
-
}));
|
|
9
|
-
export {
|
|
10
|
-
navigation_resolver_default as default
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=navigation-resolver-PB6XKEAG.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/navigation-resolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities, TypeSection } from '@dxos/app-toolkit';\nimport { Pipeline } from '@dxos/types';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contributes(\n AppCapabilities.NavigationPathResolver,\n TypeSection.createTypeSectionPathResolver(Pipeline.Pipeline),\n );\n }),\n);\n"],
|
|
5
|
-
"mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiBC,mBAAmB;AAC7C,SAASC,gBAAgB;AAEzB,IAAA,8BAAeH,WAAWI,WACjBC,kBAAW,aAAA;AAChB,SAAOL,WAAWM,YAChBL,gBAAgBM,wBAChBL,YAAYM,8BAA8BL,SAASA,QAAQ,CAAA;AAE/D,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Capability", "AppCapabilities", "TypeSection", "Pipeline", "makeModule", "fnUntraced", "contributes", "NavigationPathResolver", "createTypeSectionPathResolver"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/ui';\nimport { AppSurface } from '@dxos/app-toolkit/ui';\nimport { InvocationTraceContainer } from '@dxos/devtools';\nimport { Obj } from '@dxos/echo';\nimport { Panel } from '@dxos/react-ui';\nimport { Pipeline } from '@dxos/types';\n\nimport { PipelineArticle, PipelineProperties } from '#containers';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Capabilities.ReactSurface, [\n Surface.create({\n id: 'root',\n filter: AppSurface.object(AppSurface.Article, Pipeline.Pipeline),\n component: ({ data, role }) => (\n <PipelineArticle role={role} subject={data.subject} attendableId={data.attendableId} />\n ),\n }),\n Surface.create({\n id: 'companion.invocations',\n filter: AppSurface.allOf(\n AppSurface.literal(AppSurface.Article, 'invocations'),\n AppSurface.companion(AppSurface.Article, Pipeline.Pipeline),\n ),\n component: ({ data, role }) => {\n const db = Obj.getDatabase(data.companionTo);\n // TODO(wittjosiah): Filter the invocations to those relevant to the project.\n return (\n <Panel.Root role={role} className='dx-document'>\n <Panel.Content asChild>\n <InvocationTraceContainer db={db} detailAxis='block' />\n </Panel.Content>\n </Panel.Root>\n );\n },\n }),\n Surface.create({\n id: 'objectProperties',\n filter: AppSurface.object(AppSurface.ObjectProperties, Pipeline.Pipeline),\n component: ({ data }) => <PipelineProperties subject={data.subject} />,\n }),\n ]),\n ),\n);\n"],
|
|
5
|
-
"mappings": ";AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,eAAe;AACxB,SAASC,kBAAkB;AAC3B,SAASC,gCAAgC;AACzC,SAASC,WAAW;AACpB,SAASC,aAAa;AACtB,SAASC,gBAAgB;AAEzB,SAASC,iBAAiBC,0BAA0B;AAEpD,IAAA,wBAAeR,WAAWS,WAAW,MAC5BC,eACLV,WAAWW,YAAYZ,aAAaa,cAAc;EAChDX,QAAQY,OAAO;IACbC,IAAI;IACJC,QAAQb,WAAWc,OAAOd,WAAWe,SAASX,SAASA,QAAQ;IAC/DY,WAAW,CAAC,EAAEC,MAAMC,KAAI,MACtB,sBAAA,cAACb,iBAAAA;MAAgBa;MAAYC,SAASF,KAAKE;MAASC,cAAcH,KAAKG;;EAE3E,CAAA;EACArB,QAAQY,OAAO;IACbC,IAAI;IACJC,QAAQb,WAAWqB,MACjBrB,WAAWsB,QAAQtB,WAAWe,SAAS,aAAA,GACvCf,WAAWuB,UAAUvB,WAAWe,SAASX,SAASA,QAAQ,CAAA;IAE5DY,WAAW,CAAC,EAAEC,MAAMC,KAAI,MAAE;AACxB,YAAMM,KAAKtB,IAAIuB,YAAYR,KAAKS,WAAW;AAE3C,aACE,sBAAA,cAACvB,MAAMwB,MAAI;QAACT;QAAYU,WAAU;SAChC,sBAAA,cAACzB,MAAM0B,SAAO;QAACC,SAAAA;SACb,sBAAA,cAAC7B,0BAAAA;QAAyBuB;QAAQO,YAAW;;IAIrD;EACF,CAAA;EACAhC,QAAQY,OAAO;IACbC,IAAI;IACJC,QAAQb,WAAWc,OAAOd,WAAWgC,kBAAkB5B,SAASA,QAAQ;IACxEY,WAAW,CAAC,EAAEC,KAAI,MAAO,sBAAA,cAACX,oBAAAA;MAAmBa,SAASF,KAAKE;;EAC7D,CAAA;CACD,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "React", "Capabilities", "Capability", "Surface", "AppSurface", "InvocationTraceContainer", "Obj", "Panel", "Pipeline", "PipelineArticle", "PipelineProperties", "makeModule", "succeed", "contributes", "ReactSurface", "create", "id", "filter", "object", "Article", "component", "data", "role", "subject", "attendableId", "allOf", "literal", "companion", "db", "getDatabase", "companionTo", "Root", "className", "Content", "asChild", "detailAxis", "ObjectProperties"]
|
|
7
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as Effect from 'effect/Effect';
|
|
2
|
-
import { Capability } from '@dxos/app-framework';
|
|
3
|
-
import { GraphBuilder } from '@dxos/plugin-graph';
|
|
4
|
-
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<GraphBuilder.BuilderExtensions>>, never, never>;
|
|
5
|
-
export default _default;
|
|
6
|
-
//# sourceMappingURL=app-graph-builder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-graph-builder.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/app-graph-builder.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAKjD,OAAO,EAAE,YAAY,EAAQ,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as Effect from 'effect/Effect';
|
|
2
|
-
import { Capability } from '@dxos/app-framework';
|
|
3
|
-
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
4
|
-
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<AppCapabilities.NavigationPathResolver>>, never, never>;
|
|
5
|
-
export default _default;
|
|
6
|
-
//# sourceMappingURL=navigation-resolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/navigation-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAe,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../src/paths.ts"],"names":[],"mappings":"AAOA,QAAA,MAAwB,gBAAgB,+BAAiB,eAAe,+CAEvE,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC"}
|