@dxos/plugin-pipeline 0.8.4-main.c351d160a8 → 0.8.4-main.d9fc60f731

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/LICENSE +102 -5
  2. package/PLUGIN.mdl +345 -0
  3. package/README.md +1 -1
  4. package/dist/lib/neutral/PipelineArticle-6JIVXMYF.mjs +69 -0
  5. package/dist/lib/neutral/PipelineArticle-6JIVXMYF.mjs.map +7 -0
  6. package/dist/lib/neutral/PipelinePlugin.mjs +38 -0
  7. package/dist/lib/neutral/PipelinePlugin.mjs.map +7 -0
  8. package/dist/lib/neutral/PipelinePlugin.node.mjs +21 -0
  9. package/dist/lib/neutral/PipelinePlugin.node.mjs.map +7 -0
  10. package/dist/lib/neutral/PipelinePlugin.workerd.mjs +16 -0
  11. package/dist/lib/neutral/PipelinePlugin.workerd.mjs.map +7 -0
  12. package/dist/lib/{browser/PipelineObjectSettings-QFMIKJH5.mjs → neutral/PipelineProperties-JXY3AVOY.mjs} +54 -65
  13. package/dist/lib/neutral/PipelineProperties-JXY3AVOY.mjs.map +7 -0
  14. package/dist/lib/neutral/app-graph-builder-ZLGRWRJU.mjs +44 -0
  15. package/dist/lib/neutral/app-graph-builder-ZLGRWRJU.mjs.map +7 -0
  16. package/dist/lib/neutral/capabilities/index.mjs +11 -0
  17. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  18. package/dist/lib/neutral/chunk-CYXDAAKN.mjs +35 -0
  19. package/dist/lib/neutral/chunk-CYXDAAKN.mjs.map +7 -0
  20. package/dist/lib/neutral/components/index.mjs +203 -0
  21. package/dist/lib/neutral/components/index.mjs.map +7 -0
  22. package/dist/lib/neutral/containers/index.mjs +9 -0
  23. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  24. package/dist/lib/neutral/create-object-6Z4MMGX4.mjs +26 -0
  25. package/dist/lib/neutral/create-object-6Z4MMGX4.mjs.map +7 -0
  26. package/dist/lib/neutral/hooks/index.mjs +70 -0
  27. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  28. package/dist/lib/neutral/index.mjs +7 -0
  29. package/dist/lib/neutral/meta.json +1 -0
  30. package/dist/lib/neutral/meta.mjs +7 -0
  31. package/dist/lib/neutral/meta.mjs.map +7 -0
  32. package/dist/lib/neutral/plugin.mjs +11 -0
  33. package/dist/lib/neutral/plugin.mjs.map +7 -0
  34. package/dist/lib/{browser/react-surface-7PY3UOEA.mjs → neutral/react-surface-QG7QSZSS.mjs} +12 -24
  35. package/dist/lib/neutral/react-surface-QG7QSZSS.mjs.map +7 -0
  36. package/dist/lib/neutral/translations.mjs +39 -0
  37. package/dist/lib/neutral/translations.mjs.map +7 -0
  38. package/dist/lib/neutral/types/index.mjs.map +7 -0
  39. package/dist/types/src/PipelinePlugin.d.ts +1 -0
  40. package/dist/types/src/PipelinePlugin.d.ts.map +1 -1
  41. package/dist/types/src/PipelinePlugin.node.d.ts +4 -0
  42. package/dist/types/src/PipelinePlugin.node.d.ts.map +1 -0
  43. package/dist/types/src/PipelinePlugin.test.d.ts +2 -0
  44. package/dist/types/src/PipelinePlugin.test.d.ts.map +1 -0
  45. package/dist/types/src/PipelinePlugin.workerd.d.ts +4 -0
  46. package/dist/types/src/PipelinePlugin.workerd.d.ts.map +1 -0
  47. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  48. package/dist/types/src/capabilities/create-object.d.ts +11 -0
  49. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  50. package/dist/types/src/capabilities/index.d.ts +9 -3
  51. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  52. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  53. package/dist/types/src/components/PipelineComponent/PipelineColumn.d.ts +4 -4
  54. package/dist/types/src/components/PipelineComponent/PipelineColumn.d.ts.map +1 -1
  55. package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts +22 -16
  56. package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts.map +1 -1
  57. package/dist/types/src/components/PipelineComponent/PipelineComponent.stories.d.ts +44 -25
  58. package/dist/types/src/components/PipelineComponent/PipelineComponent.stories.d.ts.map +1 -1
  59. package/dist/types/src/containers/PipelineArticle/PipelineArticle.d.ts +6 -0
  60. package/dist/types/src/containers/PipelineArticle/PipelineArticle.d.ts.map +1 -0
  61. package/dist/types/src/containers/PipelineArticle/PipelineArticle.stories.d.ts +76 -0
  62. package/dist/types/src/containers/PipelineArticle/PipelineArticle.stories.d.ts.map +1 -0
  63. package/dist/types/src/containers/PipelineArticle/index.d.ts +2 -0
  64. package/dist/types/src/containers/PipelineArticle/index.d.ts.map +1 -0
  65. package/dist/types/src/containers/PipelineProperties/PipelineProperties.d.ts +11 -0
  66. package/dist/types/src/containers/PipelineProperties/PipelineProperties.d.ts.map +1 -0
  67. package/dist/types/src/containers/PipelineProperties/index.d.ts +2 -0
  68. package/dist/types/src/containers/PipelineProperties/index.d.ts.map +1 -0
  69. package/dist/types/src/containers/index.d.ts +2 -2
  70. package/dist/types/src/containers/index.d.ts.map +1 -1
  71. package/dist/types/src/hooks/usePipelineBoardModel.d.ts.map +1 -1
  72. package/dist/types/src/index.d.ts +0 -1
  73. package/dist/types/src/index.d.ts.map +1 -1
  74. package/dist/types/src/meta.d.ts +1 -1
  75. package/dist/types/src/meta.d.ts.map +1 -1
  76. package/dist/types/src/plugin.d.ts +3 -0
  77. package/dist/types/src/plugin.d.ts.map +1 -0
  78. package/dist/types/src/templates/research.d.ts.map +1 -1
  79. package/dist/types/src/translations.d.ts +44 -26
  80. package/dist/types/src/translations.d.ts.map +1 -1
  81. package/dist/types/tsconfig.tsbuildinfo +1 -1
  82. package/package.json +103 -58
  83. package/src/PipelinePlugin.node.ts +19 -0
  84. package/src/PipelinePlugin.test.ts +27 -0
  85. package/src/PipelinePlugin.tsx +12 -19
  86. package/src/PipelinePlugin.workerd.ts +16 -0
  87. package/src/capabilities/app-graph-builder.ts +40 -0
  88. package/src/capabilities/create-object.ts +30 -0
  89. package/src/capabilities/index.ts +5 -3
  90. package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +13 -15
  91. package/src/components/PipelineComponent/PipelineColumn.tsx +69 -55
  92. package/src/components/PipelineComponent/PipelineComponent.stories.tsx +18 -20
  93. package/src/components/PipelineComponent/PipelineComponent.tsx +22 -13
  94. package/src/containers/{PipelineContainer/PipelineContainer.stories.tsx → PipelineArticle/PipelineArticle.stories.tsx} +43 -47
  95. package/src/containers/{PipelineContainer/PipelineContainer.tsx → PipelineArticle/PipelineArticle.tsx} +12 -14
  96. package/src/containers/PipelineArticle/index.ts +5 -0
  97. package/src/containers/{PipelineObjectSettings/PipelineObjectSettings.tsx → PipelineProperties/PipelineProperties.tsx} +66 -70
  98. package/src/containers/PipelineProperties/index.ts +5 -0
  99. package/src/containers/index.ts +2 -2
  100. package/src/hooks/usePipelineBoardModel.ts +6 -6
  101. package/src/index.ts +0 -1
  102. package/src/meta.ts +19 -6
  103. package/src/plugin.ts +9 -0
  104. package/src/templates/research.ts +2 -2
  105. package/src/translations.ts +24 -23
  106. package/src/vite-env.d.ts +10 -0
  107. package/dist/lib/browser/PipelineContainer-V5KGYEQR.mjs +0 -318
  108. package/dist/lib/browser/PipelineContainer-V5KGYEQR.mjs.map +0 -7
  109. package/dist/lib/browser/PipelineObjectSettings-QFMIKJH5.mjs.map +0 -7
  110. package/dist/lib/browser/app-graph-builder-QQKBLYFD.mjs +0 -56
  111. package/dist/lib/browser/app-graph-builder-QQKBLYFD.mjs.map +0 -7
  112. package/dist/lib/browser/chunk-3A235GUD.mjs +0 -21
  113. package/dist/lib/browser/chunk-3A235GUD.mjs.map +0 -7
  114. package/dist/lib/browser/index.mjs +0 -87
  115. package/dist/lib/browser/index.mjs.map +0 -7
  116. package/dist/lib/browser/meta.json +0 -1
  117. package/dist/lib/browser/react-surface-7PY3UOEA.mjs.map +0 -7
  118. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
  119. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
  120. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
  121. package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -2
  122. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
  123. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
  124. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
  125. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  126. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  127. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  128. package/dist/types/src/containers/PipelineContainer/PipelineContainer.d.ts +0 -6
  129. package/dist/types/src/containers/PipelineContainer/PipelineContainer.d.ts.map +0 -1
  130. package/dist/types/src/containers/PipelineContainer/PipelineContainer.stories.d.ts +0 -57
  131. package/dist/types/src/containers/PipelineContainer/PipelineContainer.stories.d.ts.map +0 -1
  132. package/dist/types/src/containers/PipelineContainer/index.d.ts +0 -3
  133. package/dist/types/src/containers/PipelineContainer/index.d.ts.map +0 -1
  134. package/dist/types/src/containers/PipelineObjectSettings/PipelineObjectSettings.d.ts +0 -11
  135. package/dist/types/src/containers/PipelineObjectSettings/PipelineObjectSettings.d.ts.map +0 -1
  136. package/dist/types/src/containers/PipelineObjectSettings/index.d.ts +0 -3
  137. package/dist/types/src/containers/PipelineObjectSettings/index.d.ts.map +0 -1
  138. package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -49
  139. package/src/capabilities/app-graph-builder/index.ts +0 -7
  140. package/src/capabilities/operation-resolver/index.ts +0 -5
  141. package/src/capabilities/operation-resolver/operation-resolver.ts +0 -9
  142. package/src/capabilities/react-surface/index.ts +0 -7
  143. package/src/containers/PipelineContainer/index.ts +0 -7
  144. package/src/containers/PipelineObjectSettings/index.ts +0 -7
  145. /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
  146. /package/dist/lib/{browser → neutral}/types/index.mjs +0 -0
  147. /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
  148. /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
@@ -5,49 +5,45 @@
5
5
  import * as Schema from 'effect/Schema';
6
6
  import React, { useCallback, useMemo, useRef, useState } from 'react';
7
7
 
8
- import { DXN, Filter, JsonSchema, Obj, Query, type QueryAST, Ref, Tag } from '@dxos/echo';
8
+ import { resolveSchemaWithRegistry } from '@dxos/app-toolkit/query';
9
+ import { useTypeOptions } from '@dxos/app-toolkit/ui';
10
+ import { EID, Filter, JsonSchema, Obj, Query, type QueryAST, Ref, Scope, Tag, type Type } from '@dxos/echo';
9
11
  import { type JsonPath, type Mutable } from '@dxos/echo/internal';
10
- import { useTypeOptions } from '@dxos/plugin-space';
11
- import { resolveSchemaWithRegistry } from '@dxos/plugin-space';
12
- import { getSpace, useObject, useQuery } from '@dxos/react-client/echo';
12
+ import { useObject, useQuery } from '@dxos/react-client/echo';
13
13
  import { IconButton, type ThemedClassName, useAsyncEffect, useTranslation } from '@dxos/react-ui';
14
14
  import { Form, ViewEditor } from '@dxos/react-ui-form';
15
15
  import { List } from '@dxos/react-ui-list';
16
16
  import { type ProjectionModel, ViewModel } from '@dxos/schema';
17
17
  import { Pipeline } from '@dxos/types';
18
- import { mx, osTranslations, subtleHover } from '@dxos/ui-theme';
18
+ import { mx, osTranslations } from '@dxos/ui-theme';
19
19
  import { arrayMove } from '@dxos/util';
20
20
 
21
- import { meta } from '../../meta';
21
+ import { meta } from '#meta';
22
22
 
23
23
  const listGrid = 'grid grid-cols-[min-content_1fr_min-content_min-content_min-content]';
24
24
  const listItemGrid = 'grid grid-cols-subgrid col-span-5';
25
25
 
26
26
  const ColumnFormSchema = Pipeline.Column.pipe(Schema.mutable, Schema.pick('name'));
27
27
 
28
- // TODO(burdon): Standardize Object/Plugin settings.
29
- export type PipelineObjectSettingsProps = ThemedClassName<{
28
+ export type PipelinePropertiesProps = ThemedClassName<{
30
29
  pipeline: Pipeline.Pipeline;
31
30
  }>;
32
31
 
33
32
  /**
34
33
  * Supports editing the pipeline view.
35
34
  */
36
- export const PipelineObjectSettings = ({ classNames, pipeline }: PipelineObjectSettingsProps) => {
35
+ export const PipelineProperties = ({ classNames, pipeline }: PipelinePropertiesProps) => {
37
36
  const { t } = useTranslation(meta.id);
38
- const space = getSpace(pipeline);
37
+ const db = Obj.getDatabase(pipeline);
39
38
  const [expandedId, setExpandedId] = useState<string>();
40
39
  const [columns, updateColumns] = useObject(pipeline, 'columns');
41
- const column = useMemo(
42
- () => columns.find((column) => column.view.dxn.toString() === expandedId),
43
- [columns, expandedId],
44
- );
40
+ const column = useMemo(() => columns.find((column) => column.view.uri === expandedId), [columns, expandedId]);
45
41
  const [view, updateView] = useObject(column?.view);
46
- const [schema, setSchema] = useState<Schema.Schema.AnyNoContext>(() => Schema.Struct({}));
42
+ const [type, setType] = useState<Type.AnyEntity>();
47
43
  const projectionRef = useRef<ProjectionModel>(null);
48
- const tags = useQuery(space?.db, Filter.type(Tag.Tag));
44
+ const tags = useQuery(db, Filter.type(Tag.Tag));
49
45
  const types = useTypeOptions({
50
- space,
46
+ db,
51
47
  annotation: {
52
48
  location: ['database', 'runtime'],
53
49
  kind: ['user'],
@@ -55,15 +51,15 @@ export const PipelineObjectSettings = ({ classNames, pipeline }: PipelineObjectS
55
51
  });
56
52
 
57
53
  useAsyncEffect(async () => {
58
- if (!view?.query || !space) {
54
+ if (!view?.query || !db) {
59
55
  return;
60
56
  }
61
57
 
62
- const foundSchema = await resolveSchemaWithRegistry(space.db.schemaRegistry, view.query.ast);
63
- if (foundSchema && foundSchema !== schema) {
64
- setSchema(() => foundSchema);
58
+ const foundType = await resolveSchemaWithRegistry(db, view.query.ast);
59
+ if (foundType && foundType !== type) {
60
+ setType(() => foundType);
65
61
  }
66
- }, [space, view, schema]);
62
+ }, [db, view, type]);
67
63
 
68
64
  const handleMove = useCallback(
69
65
  (fromIndex: number, toIndex: number) =>
@@ -74,32 +70,36 @@ export const PipelineObjectSettings = ({ classNames, pipeline }: PipelineObjectS
74
70
  );
75
71
 
76
72
  const handleQueryChanged = useCallback(
77
- async (newQuery: QueryAST.Query, target?: string) => {
78
- if (!view || !space) {
73
+ async (newQuery: QueryAST.Query, target?: EID.EID) => {
74
+ if (!view || !db) {
79
75
  return;
80
76
  }
81
77
 
82
- const queue = target && DXN.tryParse(target) ? target : undefined;
83
- const query = queue ? Query.fromAst(newQuery).from({ queues: [queue] }) : Query.fromAst(newQuery);
78
+ const queue = target;
79
+ const query = queue
80
+ ? Query.fromAst(newQuery).from([
81
+ Scope.feed(`dxn:queue:data:${EID.getSpaceId(queue)}:${EID.getEntityId(queue)}`),
82
+ ])
83
+ : Query.fromAst(newQuery);
84
84
  updateView((view) => {
85
85
  view.query.ast = query.ast as Mutable<typeof query.ast>;
86
86
  });
87
- const newSchema = await resolveSchemaWithRegistry(space.db.schemaRegistry, query.ast);
88
- if (!newSchema) {
87
+ const newType = await resolveSchemaWithRegistry(db, query.ast);
88
+ if (!newType) {
89
89
  return;
90
90
  }
91
91
 
92
92
  const newView = ViewModel.make({
93
93
  query,
94
- jsonSchema: JsonSchema.toJsonSchema(newSchema),
94
+ jsonSchema: newType.jsonSchema,
95
95
  });
96
96
  updateView((view) => {
97
97
  view.projection = Obj.getSnapshot(newView).projection as Mutable<typeof view.projection>;
98
98
  });
99
99
 
100
- setSchema(() => newSchema);
100
+ setType(() => newType);
101
101
  },
102
- [view, updateView, schema],
102
+ [db, view, updateView, type],
103
103
  );
104
104
 
105
105
  const handleColumnValuesChanged = useCallback(
@@ -119,14 +119,12 @@ export const PipelineObjectSettings = ({ classNames, pipeline }: PipelineObjectS
119
119
  );
120
120
 
121
121
  const handleToggleField = useCallback((column: Pipeline.Column) => {
122
- setExpandedId((prevExpandedId) =>
123
- prevExpandedId === column.view.dxn.toString() ? undefined : column.view.dxn.toString(),
124
- );
122
+ setExpandedId((prevExpandedId) => (prevExpandedId === column.view.uri ? undefined : column.view.uri));
125
123
  }, []);
126
124
 
127
125
  const handleDelete = useCallback(
128
126
  async (column: Pipeline.Column) => {
129
- if (column.view.dxn.toString() === expandedId) {
127
+ if (column.view.uri === expandedId) {
130
128
  setExpandedId(undefined);
131
129
  }
132
130
 
@@ -135,20 +133,20 @@ export const PipelineObjectSettings = ({ classNames, pipeline }: PipelineObjectS
135
133
  updateColumns((columns) => {
136
134
  columns.splice(index, 1);
137
135
  });
138
- space?.db.remove(viewToRemove);
136
+ db?.remove(viewToRemove);
139
137
  },
140
- [expandedId, columns, updateColumns, space],
138
+ [expandedId, columns, updateColumns, db],
141
139
  );
142
140
 
143
141
  const handleAdd = useCallback(() => {
144
- if (!space) {
142
+ if (!db) {
145
143
  return;
146
144
  }
147
145
  const newView = ViewModel.make({
148
146
  query: Query.select(Filter.nothing()),
149
147
  jsonSchema: JsonSchema.toJsonSchema(Schema.Struct({})),
150
148
  });
151
- space.db.add(newView);
149
+ db.add(newView);
152
150
  updateColumns((columns) => {
153
151
  columns.push({
154
152
  name: '',
@@ -158,16 +156,16 @@ export const PipelineObjectSettings = ({ classNames, pipeline }: PipelineObjectS
158
156
  });
159
157
  });
160
158
  setExpandedId(newView.id);
161
- }, [space, updateColumns]);
159
+ }, [db, updateColumns]);
162
160
 
163
161
  return (
164
- <div role='none' className={mx('py-form-padding overflow-y-auto', classNames)}>
165
- <h2 className='text-sm text-description py-1'>{t('views label')}</h2>
162
+ <div className={mx('py-form-padding overflow-y-auto', classNames)}>
163
+ <h2 className='text-sm text-description py-1'>{t('views.label')}</h2>
166
164
 
167
165
  <List.Root<Pipeline.Column>
168
166
  items={columns}
169
167
  isItem={Schema.is(Pipeline.Column)}
170
- getId={(column) => column.view.dxn.toString()}
168
+ getId={(column) => column.view.uri}
171
169
  onMove={handleMove}
172
170
  >
173
171
  {({ items: columns }) => (
@@ -175,18 +173,18 @@ export const PipelineObjectSettings = ({ classNames, pipeline }: PipelineObjectS
175
173
  <div role='list' className={mx(listGrid)}>
176
174
  {columns.map((column) => (
177
175
  <List.Item<Pipeline.Column>
178
- key={column.view.dxn.toString()}
176
+ key={column.view.uri}
179
177
  item={column}
180
178
  classNames={listItemGrid}
181
- aria-expanded={expandedId === column.view.dxn.toString()}
179
+ aria-expanded={expandedId === column.view.uri}
182
180
  >
183
- <div role='none' className={mx(subtleHover, listItemGrid, 'rounded-xs cursor-pointer min-h-10')}>
181
+ <div className={mx(listItemGrid, 'dx-hover rounded-xs cursor-pointer min-h-10')}>
184
182
  <List.ItemDragHandle />
185
183
  <List.ItemTitle onClick={() => handleToggleField(column)}>
186
- {column.name || t('untitled view title')}
184
+ {column.name || t('untitled-view.title')}
187
185
  </List.ItemTitle>
188
186
  <List.ItemDeleteButton
189
- label={t('delete view label')}
187
+ label={t('delete-view.label')}
190
188
  autoHide={false}
191
189
  onClick={() => handleDelete(column)}
192
190
  data-testid='view.delete'
@@ -194,17 +192,13 @@ export const PipelineObjectSettings = ({ classNames, pipeline }: PipelineObjectS
194
192
  <IconButton
195
193
  iconOnly
196
194
  variant='ghost'
197
- label={t('toggle expand label', { ns: osTranslations })}
198
- icon={
199
- expandedId === column.view.dxn.toString()
200
- ? 'ph--caret-down--regular'
201
- : 'ph--caret-right--regular'
202
- }
195
+ label={t('toggle-expand.label', { ns: osTranslations })}
196
+ icon={expandedId === column.view.uri ? 'ph--caret-down--regular' : 'ph--caret-right--regular'}
203
197
  onClick={() => handleToggleField(column)}
204
198
  />
205
199
  </div>
206
- {expandedId === column.view.dxn.toString() && column?.view.target && (
207
- <div role='none' className='col-span-5 my-2 border border-separator rounded-md'>
200
+ {expandedId === column.view.uri && column?.view.target && (
201
+ <div className='col-span-5 my-2 border border-separator rounded-md'>
208
202
  <Form.Root
209
203
  schema={ColumnFormSchema}
210
204
  values={column}
@@ -214,18 +208,20 @@ export const PipelineObjectSettings = ({ classNames, pipeline }: PipelineObjectS
214
208
  <Form.FieldSet />
215
209
  </Form.Content>
216
210
  </Form.Root>
217
- <ViewEditor
218
- ref={projectionRef}
219
- mode='tag'
220
- readonly
221
- schema={schema}
222
- view={column.view.target}
223
- registry={space?.db.schemaRegistry}
224
- db={space?.db}
225
- tags={tags}
226
- types={types}
227
- onQueryChanged={handleQueryChanged}
228
- />
211
+ {type && (
212
+ <ViewEditor
213
+ ref={projectionRef}
214
+ mode='tag'
215
+ readonly
216
+ type={type}
217
+ view={column.view.target}
218
+ registry={db?.graph.registry}
219
+ db={db}
220
+ tags={tags}
221
+ types={types}
222
+ onQueryChanged={handleQueryChanged}
223
+ />
224
+ )}
229
225
  </div>
230
226
  )}
231
227
  </List.Item>
@@ -235,8 +231,8 @@ export const PipelineObjectSettings = ({ classNames, pipeline }: PipelineObjectS
235
231
  )}
236
232
  </List.Root>
237
233
 
238
- <div role='none' className='my-form-padding'>
239
- <IconButton icon='ph--plus--regular' label={t('add view label')} onClick={handleAdd} classNames='w-full' />
234
+ <div className='my-form-padding'>
235
+ <IconButton icon='ph--plus--regular' label={t('add-view.label')} onClick={handleAdd} classNames='w-full' />
240
236
  </div>
241
237
  </div>
242
238
  );
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export { PipelineProperties as default } from './PipelineProperties';
@@ -4,5 +4,5 @@
4
4
 
5
5
  import { type ComponentType, lazy } from 'react';
6
6
 
7
- export const PipelineContainer: ComponentType<any> = lazy(() => import('./PipelineContainer'));
8
- export const PipelineObjectSettings: ComponentType<any> = lazy(() => import('./PipelineObjectSettings'));
7
+ export const PipelineArticle: ComponentType<any> = lazy(() => import('./PipelineArticle'));
8
+ export const PipelineProperties: ComponentType<any> = lazy(() => import('./PipelineProperties'));
@@ -6,9 +6,9 @@ import { Atom, type Registry } from '@effect-atom/atom-react';
6
6
  import * as Schema from 'effect/Schema';
7
7
  import { useMemo } from 'react';
8
8
 
9
+ import { getQueryTarget } from '@dxos/app-toolkit/query';
9
10
  import { Obj, Query } from '@dxos/echo';
10
11
  import { AtomObj, AtomQuery } from '@dxos/echo-atom';
11
- import { getQueryTarget } from '@dxos/plugin-space';
12
12
  import { getSpace, isSpace } from '@dxos/react-client/echo';
13
13
  import { type BoardModel } from '@dxos/react-ui-mosaic';
14
14
  import { Pipeline } from '@dxos/types';
@@ -27,7 +27,7 @@ export const usePipelineBoardModel = (
27
27
  const columnAtomFamily = Atom.family<string, Atom.Atom<Pipeline.Column | undefined>>((viewKey: string) =>
28
28
  Atom.make((get) => {
29
29
  const columns = get(columnsAtom);
30
- return columns.find((c) => c.view.dxn.toString() === viewKey);
30
+ return columns.find((c) => c.view.uri === viewKey);
31
31
  }),
32
32
  );
33
33
 
@@ -52,14 +52,14 @@ export const usePipelineBoardModel = (
52
52
  );
53
53
 
54
54
  return {
55
- getColumnId: (data) => (data as Pipeline.Column).view.dxn.toString(),
55
+ getColumnId: (data) => (data as Pipeline.Column).view.uri,
56
56
  getItemId: (data) => (data as Obj.Unknown).id,
57
57
  isColumn: (obj: unknown): obj is Pipeline.Column => Schema.is(Pipeline.Column)(obj),
58
58
  isItem: (obj: unknown): obj is Obj.Unknown => Obj.isObject(obj),
59
59
  columns: columnsAtom,
60
- items: (column) => itemsAtomFamily(column.view.dxn.toString()),
60
+ items: (column) => itemsAtomFamily(column.view.uri),
61
61
  getColumns: () => [...registry.get(columnsAtom)],
62
- getItems: (column) => registry.get(itemsAtomFamily(column.view.dxn.toString())) ?? [],
62
+ getItems: (column) => registry.get(itemsAtomFamily(column.view.uri)) ?? [],
63
63
  };
64
64
  }, [pipeline, registry]);
65
65
 
@@ -68,7 +68,7 @@ const emptyColumnsAtom = Atom.make(() => [] as Pipeline.Column[]);
68
68
  const emptyItemsAtom = Atom.make(() => [] as Obj.Unknown[]);
69
69
 
70
70
  const emptyPipelineModel: BoardModel<Pipeline.Column, Obj.Unknown> = {
71
- getColumnId: (data) => (data as Pipeline.Column).view.dxn.toString(),
71
+ getColumnId: (data) => (data as Pipeline.Column).view.uri,
72
72
  getItemId: (data) => (data as Obj.Unknown).id,
73
73
  isColumn: (obj: unknown): obj is Pipeline.Column => Schema.is(Pipeline.Column)(obj),
74
74
  isItem: (obj): obj is Obj.Unknown => Obj.isObject(obj),
package/src/index.ts CHANGED
@@ -3,4 +3,3 @@
3
3
  //
4
4
 
5
5
  export * from './meta';
6
- export * from './PipelinePlugin';
package/src/meta.ts CHANGED
@@ -2,18 +2,31 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type Plugin } from '@dxos/app-framework';
5
+ import { Plugin } from '@dxos/app-framework';
6
+ import { DXN } from '@dxos/keys';
6
7
  import { trim } from '@dxos/util';
7
8
 
8
- export const meta: Plugin.Meta = {
9
- id: 'org.dxos.plugin.pipeline',
9
+ export const meta = Plugin.makeMeta({
10
+ key: DXN.make('org.dxos.plugin.pipeline'),
10
11
  name: 'Pipelines',
12
+ author: 'DXOS',
11
13
  description: trim`
12
- Pipelines for organizing tasks, milestones, and deliverables.
13
- Track progress across multiple pipelines and coordinate team activities in a structured environment.
14
+ A multi-column Kanban-style pipeline plugin for DXOS Composer.
15
+ Each Pipeline holds an ordered set of Columns; each Column is backed by a ViewModel whose query
16
+ can select any ECHO object type — messages, contacts, documents, or custom types — from the active space.
17
+
18
+ Columns are fully configurable through the Settings companion panel, where users can add, rename,
19
+ reorder, and delete columns and edit the underlying query and projection for each column.
20
+ Objects can be dragged between columns and the full pipeline state, including column order and
21
+ per-column item order, persists collaboratively via ECHO.
22
+
23
+ A built-in Research template scaffolds a four-column pipeline wired to the Mailbox, Contacts,
24
+ Organizations, and Notes objects in the space, providing an out-of-the-box CRM-style workflow.
25
+ Pipeline articles also expose Invocations and Automation companion tabs for AI-driven automation.
14
26
  `,
15
27
  icon: 'ph--path--regular',
16
28
  iconHue: 'purple',
17
29
  source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-pipeline',
30
+ spec: 'PLUGIN.mdl',
18
31
  tags: ['labs'],
19
- };
32
+ });
package/src/plugin.ts ADDED
@@ -0,0 +1,9 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Plugin } from '@dxos/app-framework';
6
+
7
+ import { meta } from './meta';
8
+
9
+ export const PipelinePlugin = Plugin.lazy(meta, () => import('#plugin'));
@@ -3,8 +3,8 @@
3
3
  //
4
4
 
5
5
  import { type Database, Filter, JsonSchema, Query, Ref } from '@dxos/echo';
6
- import { Mailbox } from '@dxos/plugin-inbox/types';
7
- import { Markdown } from '@dxos/plugin-markdown/types';
6
+ import { Mailbox } from '@dxos/plugin-inbox';
7
+ import { Markdown } from '@dxos/plugin-markdown';
8
8
  import { ViewModel } from '@dxos/schema';
9
9
  import { Message, Organization, Person, Pipeline } from '@dxos/types';
10
10
 
@@ -1,38 +1,39 @@
1
+ import { Type } from '@dxos/echo';
1
2
  import { type Resource } from '@dxos/react-ui';
2
3
  import { Pipeline } from '@dxos/types';
3
4
  //
4
5
  // Copyright 2023 DXOS.org
5
6
  //
6
7
 
7
- import { meta } from './meta';
8
+ import { meta } from '#meta';
8
9
 
9
10
  export const translations = [
10
11
  {
11
12
  'en-US': {
12
- [Pipeline.Pipeline.typename]: {
13
- 'typename label': 'Pipeline',
14
- 'typename label_zero': 'Pipelines',
15
- 'typename label_one': 'Pipeline',
16
- 'typename label_other': 'Pipelines',
17
- 'object name placeholder': 'New pipeline',
18
- 'add object label': 'Add pipeline',
19
- 'rename object label': 'Rename pipeline',
20
- 'delete object label': 'Delete pipeline',
21
- 'object deleted label': 'Pipeline deleted',
13
+ [Type.getTypename(Pipeline.Pipeline)]: {
14
+ 'typename.label': 'Pipeline',
15
+ 'typename.label_zero': 'Pipelines',
16
+ 'typename.label_one': 'Pipeline',
17
+ 'typename.label_other': 'Pipelines',
18
+ 'object-name.placeholder': 'New pipeline',
19
+ 'add-object.label': 'Add pipeline',
20
+ 'rename-object.label': 'Rename pipeline',
21
+ 'delete-object.label': 'Delete pipeline',
22
+ 'object-deleted.label': 'Pipeline deleted',
22
23
  },
23
24
  [meta.id]: {
24
- 'plugin name': 'Pipelines',
25
- 'add column label': 'Add column',
26
- 'add card label': 'Add object',
27
- 'untitled view title': 'New view',
28
- 'enumerating tab label': 'List',
29
- 'editing tab label': 'Edit',
30
- 'views label': 'Views',
31
- 'pipeline invocations label': 'Invocations',
32
- 'pipeline automation label': 'Automations',
33
- 'toggle expand label': 'Toggle expand',
34
- 'delete view label': 'Delete view',
35
- 'add view label': 'Add view',
25
+ 'plugin.name': 'Pipelines',
26
+ 'add-column.label': 'Add column',
27
+ 'add-card.label': 'Add object',
28
+ 'untitled-view.title': 'New view',
29
+ 'enumerating-tab.label': 'List',
30
+ 'editing-tab.label': 'Edit',
31
+ 'views.label': 'Views',
32
+ 'pipeline-invocations.label': 'Invocations',
33
+ 'pipeline-automation.label': 'Automations',
34
+ 'toggle-expand.label': 'Toggle expand',
35
+ 'delete-view.label': 'Delete view',
36
+ 'add-view.label': 'Add view',
36
37
  },
37
38
  },
38
39
  },
@@ -0,0 +1,10 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ //
4
+ // Copyright 2026 DXOS.org
5
+ //
6
+
7
+ declare module '*.mdl?raw' {
8
+ const content: string;
9
+ export default content;
10
+ }