@dxos/plugin-pipeline 0.8.4-main.c85a9c8dae → 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 (169) 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-D36OYVHW.mjs → neutral/PipelineProperties-JXY3AVOY.mjs} +58 -73
  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-ZGQVH4VX.mjs → neutral/react-surface-QG7QSZSS.mjs} +15 -26
  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 +1 -0
  39. package/dist/lib/neutral/types/index.mjs.map +7 -0
  40. package/dist/types/src/PipelinePlugin.d.ts +1 -0
  41. package/dist/types/src/PipelinePlugin.d.ts.map +1 -1
  42. package/dist/types/src/PipelinePlugin.node.d.ts +4 -0
  43. package/dist/types/src/PipelinePlugin.node.d.ts.map +1 -0
  44. package/dist/types/src/PipelinePlugin.test.d.ts +2 -0
  45. package/dist/types/src/PipelinePlugin.test.d.ts.map +1 -0
  46. package/dist/types/src/PipelinePlugin.workerd.d.ts +4 -0
  47. package/dist/types/src/PipelinePlugin.workerd.d.ts.map +1 -0
  48. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  49. package/dist/types/src/capabilities/create-object.d.ts +11 -0
  50. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  51. package/dist/types/src/capabilities/index.d.ts +9 -3
  52. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  53. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  54. package/dist/types/src/components/{PipelineColumn.d.ts → PipelineComponent/PipelineColumn.d.ts} +4 -4
  55. package/dist/types/src/components/PipelineComponent/PipelineColumn.d.ts.map +1 -0
  56. package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts +53 -0
  57. package/dist/types/src/components/PipelineComponent/PipelineComponent.d.ts.map +1 -0
  58. package/dist/types/src/components/PipelineComponent/PipelineComponent.stories.d.ts +62 -0
  59. package/dist/types/src/components/PipelineComponent/PipelineComponent.stories.d.ts.map +1 -0
  60. package/dist/types/src/components/PipelineComponent/index.d.ts +3 -0
  61. package/dist/types/src/components/PipelineComponent/index.d.ts.map +1 -0
  62. package/dist/types/src/components/index.d.ts +0 -1
  63. package/dist/types/src/components/index.d.ts.map +1 -1
  64. package/dist/types/src/containers/PipelineArticle/PipelineArticle.d.ts +6 -0
  65. package/dist/types/src/containers/PipelineArticle/PipelineArticle.d.ts.map +1 -0
  66. package/dist/types/src/containers/PipelineArticle/PipelineArticle.stories.d.ts +76 -0
  67. package/dist/types/src/containers/PipelineArticle/PipelineArticle.stories.d.ts.map +1 -0
  68. package/dist/types/src/containers/PipelineArticle/index.d.ts +2 -0
  69. package/dist/types/src/containers/PipelineArticle/index.d.ts.map +1 -0
  70. package/dist/types/src/containers/PipelineProperties/PipelineProperties.d.ts +11 -0
  71. package/dist/types/src/containers/PipelineProperties/PipelineProperties.d.ts.map +1 -0
  72. package/dist/types/src/containers/PipelineProperties/index.d.ts +2 -0
  73. package/dist/types/src/containers/PipelineProperties/index.d.ts.map +1 -0
  74. package/dist/types/src/containers/index.d.ts +2 -2
  75. package/dist/types/src/containers/index.d.ts.map +1 -1
  76. package/dist/types/src/hooks/usePipelineBoardModel.d.ts.map +1 -1
  77. package/dist/types/src/index.d.ts +0 -1
  78. package/dist/types/src/index.d.ts.map +1 -1
  79. package/dist/types/src/meta.d.ts +1 -1
  80. package/dist/types/src/meta.d.ts.map +1 -1
  81. package/dist/types/src/plugin.d.ts +3 -0
  82. package/dist/types/src/plugin.d.ts.map +1 -0
  83. package/dist/types/src/templates/research.d.ts.map +1 -1
  84. package/dist/types/src/translations.d.ts +44 -25
  85. package/dist/types/src/translations.d.ts.map +1 -1
  86. package/dist/types/src/types/index.d.ts +0 -2
  87. package/dist/types/src/types/index.d.ts.map +1 -1
  88. package/dist/types/tsconfig.tsbuildinfo +1 -1
  89. package/package.json +103 -58
  90. package/src/PipelinePlugin.node.ts +19 -0
  91. package/src/PipelinePlugin.test.ts +27 -0
  92. package/src/PipelinePlugin.tsx +12 -30
  93. package/src/PipelinePlugin.workerd.ts +16 -0
  94. package/src/capabilities/app-graph-builder.ts +40 -0
  95. package/src/capabilities/create-object.ts +30 -0
  96. package/src/capabilities/index.ts +5 -3
  97. package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +16 -15
  98. package/src/components/PipelineComponent/PipelineColumn.tsx +154 -0
  99. package/src/components/{PipelineComponent.stories.tsx → PipelineComponent/PipelineComponent.stories.tsx} +21 -21
  100. package/src/components/{PipelineComponent.tsx → PipelineComponent/PipelineComponent.tsx} +22 -13
  101. package/src/components/PipelineComponent/index.ts +6 -0
  102. package/src/components/index.ts +0 -1
  103. package/src/containers/{PipelineContainer/PipelineContainer.stories.tsx → PipelineArticle/PipelineArticle.stories.tsx} +43 -47
  104. package/src/containers/{PipelineContainer/PipelineContainer.tsx → PipelineArticle/PipelineArticle.tsx} +14 -17
  105. package/src/containers/PipelineArticle/index.ts +5 -0
  106. package/src/containers/{PipelineObjectSettings/PipelineObjectSettings.tsx → PipelineProperties/PipelineProperties.tsx} +72 -75
  107. package/src/containers/PipelineProperties/index.ts +5 -0
  108. package/src/containers/index.ts +2 -2
  109. package/src/hooks/usePipelineBoardModel.ts +6 -6
  110. package/src/index.ts +0 -1
  111. package/src/meta.ts +19 -6
  112. package/src/plugin.ts +9 -0
  113. package/src/templates/research.ts +8 -7
  114. package/src/translations.ts +24 -22
  115. package/src/types/index.ts +0 -3
  116. package/src/vite-env.d.ts +10 -0
  117. package/dist/lib/browser/PipelineContainer-2ZYSZATA.mjs +0 -320
  118. package/dist/lib/browser/PipelineContainer-2ZYSZATA.mjs.map +0 -7
  119. package/dist/lib/browser/PipelineObjectSettings-D36OYVHW.mjs.map +0 -7
  120. package/dist/lib/browser/app-graph-builder-NUJB33F7.mjs +0 -65
  121. package/dist/lib/browser/app-graph-builder-NUJB33F7.mjs.map +0 -7
  122. package/dist/lib/browser/chunk-N6FZHYWT.mjs +0 -42
  123. package/dist/lib/browser/chunk-N6FZHYWT.mjs.map +0 -7
  124. package/dist/lib/browser/chunk-QWNKLHBY.mjs +0 -28
  125. package/dist/lib/browser/chunk-QWNKLHBY.mjs.map +0 -7
  126. package/dist/lib/browser/index.mjs +0 -109
  127. package/dist/lib/browser/index.mjs.map +0 -7
  128. package/dist/lib/browser/meta.json +0 -1
  129. package/dist/lib/browser/react-surface-ZGQVH4VX.mjs.map +0 -7
  130. package/dist/lib/browser/types/index.mjs +0 -10
  131. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
  132. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
  133. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
  134. package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -2
  135. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
  136. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
  137. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
  138. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  139. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  140. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  141. package/dist/types/src/components/PipelineColumn.d.ts.map +0 -1
  142. package/dist/types/src/components/PipelineComponent.d.ts +0 -47
  143. package/dist/types/src/components/PipelineComponent.d.ts.map +0 -1
  144. package/dist/types/src/components/PipelineComponent.stories.d.ts +0 -42
  145. package/dist/types/src/components/PipelineComponent.stories.d.ts.map +0 -1
  146. package/dist/types/src/containers/PipelineContainer/PipelineContainer.d.ts +0 -6
  147. package/dist/types/src/containers/PipelineContainer/PipelineContainer.d.ts.map +0 -1
  148. package/dist/types/src/containers/PipelineContainer/PipelineContainer.stories.d.ts +0 -56
  149. package/dist/types/src/containers/PipelineContainer/PipelineContainer.stories.d.ts.map +0 -1
  150. package/dist/types/src/containers/PipelineContainer/index.d.ts +0 -3
  151. package/dist/types/src/containers/PipelineContainer/index.d.ts.map +0 -1
  152. package/dist/types/src/containers/PipelineObjectSettings/PipelineObjectSettings.d.ts +0 -11
  153. package/dist/types/src/containers/PipelineObjectSettings/PipelineObjectSettings.d.ts.map +0 -1
  154. package/dist/types/src/containers/PipelineObjectSettings/index.d.ts +0 -3
  155. package/dist/types/src/containers/PipelineObjectSettings/index.d.ts.map +0 -1
  156. package/dist/types/src/types/PipelineAction.d.ts +0 -25
  157. package/dist/types/src/types/PipelineAction.d.ts.map +0 -1
  158. package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -51
  159. package/src/capabilities/app-graph-builder/index.ts +0 -7
  160. package/src/capabilities/operation-resolver/index.ts +0 -5
  161. package/src/capabilities/operation-resolver/operation-resolver.ts +0 -29
  162. package/src/capabilities/react-surface/index.ts +0 -7
  163. package/src/components/PipelineColumn.tsx +0 -133
  164. package/src/containers/PipelineContainer/index.ts +0 -7
  165. package/src/containers/PipelineObjectSettings/index.ts +0 -7
  166. package/src/types/PipelineAction.ts +0 -29
  167. /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
  168. /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
  169. /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
@@ -1,29 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import * as Effect from 'effect/Effect';
6
-
7
- import { Capabilities, Capability } from '@dxos/app-framework';
8
- import { Obj, Ref, Type } from '@dxos/echo';
9
- import { OperationResolver } from '@dxos/operation';
10
- import { ManagedCollection } from '@dxos/schema';
11
- import { Pipeline } from '@dxos/types';
12
-
13
- import { PipelineOperation } from '../../types';
14
-
15
- export default Capability.makeModule(() =>
16
- Effect.succeed(
17
- Capability.contributes(Capabilities.OperationResolver, [
18
- OperationResolver.make({
19
- operation: PipelineOperation.OnCreateSpace,
20
- handler: Effect.fnUntraced(function* ({ rootCollection }) {
21
- const collection = ManagedCollection.makeManagedCollection({ key: Type.getTypename(Pipeline.Pipeline) });
22
- Obj.change(rootCollection, (c) => {
23
- c.objects.push(Ref.make(collection));
24
- });
25
- }),
26
- }),
27
- ]),
28
- ),
29
- );
@@ -1,7 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { Capability } from '@dxos/app-framework';
6
-
7
- export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
@@ -1,133 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { useComposedRefs } from '@radix-ui/react-compose-refs';
6
- import type * as Schema from 'effect/Schema';
7
- import React, { forwardRef, useMemo, useRef, useState } from 'react';
8
-
9
- import { useObjectNavigate } from '@dxos/app-toolkit/ui';
10
- import { JsonSchema, Obj, Query, Type } from '@dxos/echo';
11
- import { resolveSchemaWithRegistry } from '@dxos/plugin-space';
12
- import { Filter, getSpace, useObject } from '@dxos/react-client/echo';
13
- import { useAsyncEffect, useTranslation } from '@dxos/react-ui';
14
- import { Card } from '@dxos/react-ui';
15
- import { Board, Focus, Mosaic, type MosaicTileProps } from '@dxos/react-ui-mosaic';
16
- import { ProjectionModel, createEchoChangeCallback } from '@dxos/schema';
17
- import { type Pipeline } from '@dxos/types';
18
-
19
- import { meta } from '../meta';
20
-
21
- import { type ItemProps, usePipeline } from './PipelineComponent';
22
-
23
- //
24
- // PipelineColumn
25
- //
26
-
27
- const PIPELINE_COLUMN_NAME = 'PipelineColumn';
28
-
29
- export type PipelineColumnProps = Pick<MosaicTileProps<Pipeline.Column>, 'classNames' | 'location' | 'data' | 'debug'>;
30
-
31
- // TODO(wittjosiah): Support item DnD reordering (ordering needs to be stored on the view presentation collection).
32
- export const PipelineColumn = ({ data: column, location, classNames, debug }: PipelineColumnProps) => {
33
- const { t } = useTranslation(meta.id);
34
- const dragHandleRef = useRef<HTMLButtonElement>(null);
35
- // Subscribe to the view target for reactivity.
36
- const [viewSnapshot] = useObject(column.view);
37
- const view = column.view.target;
38
- const space = getSpace(view);
39
- const { Item } = usePipeline(PIPELINE_COLUMN_NAME);
40
- const [schema, setSchema] = useState<Schema.Schema.AnyNoContext>();
41
- const query = useMemo(() => {
42
- if (!view) {
43
- return Query.select(Filter.nothing());
44
- } else {
45
- // NOTE: Snapshot is required to prevent signal read in prohibited scope.
46
- // TODO(wittjosiah): Without stringify, filter.filters remains a proxied array.
47
- return Query.fromAst(JSON.parse(JSON.stringify(viewSnapshot?.query.ast)));
48
- }
49
- }, [JSON.stringify(viewSnapshot?.query.ast)]);
50
-
51
- useAsyncEffect(async () => {
52
- if (!query || !space?.db) {
53
- return;
54
- }
55
-
56
- const schema = await resolveSchemaWithRegistry(space.db.schemaRegistry, query.ast);
57
- setSchema(() => schema);
58
- }, [space, query]);
59
-
60
- const projectionModel = useMemo(() => {
61
- if (!schema || !view) {
62
- return undefined;
63
- }
64
-
65
- // For mutable schemas (EchoSchema), use the live jsonSchema reference for reactivity.
66
- const jsonSchema = Type.isMutable(schema) ? schema.jsonSchema : JsonSchema.toJsonSchema(schema);
67
- const change = createEchoChangeCallback(view, Type.isMutable(schema) ? schema : undefined);
68
- return new ProjectionModel({ view, baseSchema: jsonSchema, change });
69
- }, [schema, view]);
70
-
71
- const Tile = useMemo(() => {
72
- return forwardRef<HTMLDivElement, Pick<MosaicTileProps<Obj.Unknown>, 'classNames' | 'location' | 'data' | 'debug'>>(
73
- (props, ref) => <ItemTile {...props} ref={ref} itemProps={{ item: props.data, projectionModel }} />,
74
- );
75
- }, [Item, projectionModel]);
76
-
77
- if (!view) {
78
- return null;
79
- }
80
-
81
- return (
82
- <Board.Column.Root
83
- data={column}
84
- location={location}
85
- classNames={['group/column grid h-full overflow-hidden grid-rows-[var(--dx-rail-action)_1fr]', classNames]}
86
- debug={debug}
87
- dragHandleRef={dragHandleRef}
88
- >
89
- <Board.Column.Header label={column.name ?? t('untitled view title')} dragHandleRef={dragHandleRef} />
90
- <Board.Column.Body data={column} Tile={Tile} />
91
- </Board.Column.Root>
92
- );
93
- };
94
-
95
- PipelineColumn.displayName = PIPELINE_COLUMN_NAME;
96
-
97
- //
98
- // ItemTile
99
- //
100
-
101
- const ITEM_TILE_NAME = 'ItemTile';
102
-
103
- type ItemTileProps = Pick<MosaicTileProps<Obj.Unknown>, 'classNames' | 'location' | 'data' | 'debug'> & {
104
- itemProps: ItemProps;
105
- };
106
-
107
- const ItemTile = forwardRef<HTMLDivElement, ItemTileProps>(
108
- ({ classNames, data, location, debug, itemProps }, forwardedRef) => {
109
- const rootRef = useRef<HTMLDivElement>(null);
110
- const composedRef = useComposedRefs<HTMLDivElement>(rootRef, forwardedRef);
111
- const { Item } = usePipeline(ITEM_TILE_NAME);
112
- const handleNavigate = useObjectNavigate(data);
113
-
114
- return (
115
- <Mosaic.Tile asChild id={data.id} data={data} location={location} debug={debug}>
116
- <Focus.Group asChild>
117
- <Card.Root classNames={classNames} ref={composedRef}>
118
- <Card.Toolbar>
119
- <Card.DragHandle />
120
- <Card.Title onClick={handleNavigate}>{Obj.getLabel(data)}</Card.Title>
121
- <Card.Menu />
122
- </Card.Toolbar>
123
- <Card.Content>
124
- <Item {...itemProps} />
125
- </Card.Content>
126
- </Card.Root>
127
- </Focus.Group>
128
- </Mosaic.Tile>
129
- );
130
- },
131
- );
132
-
133
- ItemTile.displayName = ITEM_TILE_NAME;
@@ -1,7 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import { PipelineContainer } from './PipelineContainer';
6
-
7
- export default PipelineContainer;
@@ -1,7 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { PipelineObjectSettings } from './PipelineObjectSettings';
6
-
7
- export default PipelineObjectSettings;
@@ -1,29 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import * as Schema from 'effect/Schema';
6
-
7
- import { Capability } from '@dxos/app-framework';
8
- import { Collection } from '@dxos/echo';
9
- import { Operation } from '@dxos/operation';
10
- import { SpaceSchema } from '@dxos/react-client/echo';
11
-
12
- import { meta } from '../meta';
13
-
14
- const PIPELINE_OPERATION = `${meta.id}/operation`;
15
-
16
- export namespace PipelineOperation {
17
- export const OnCreateSpace = Operation.make({
18
- meta: { key: `${PIPELINE_OPERATION}/on-create-space`, name: 'On Create Space' },
19
- services: [Capability.Service],
20
- schema: {
21
- input: Schema.Struct({
22
- space: SpaceSchema,
23
- rootCollection: Collection.Collection,
24
- isDefault: Schema.optional(Schema.Boolean),
25
- }),
26
- output: Schema.Void,
27
- },
28
- });
29
- }