@dxos/app-graph 0.8.2-main.12df754 → 0.8.2-main.30e4dbb
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/browser/index.mjs.map +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs.map +2 -2
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs.map +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/experimental/graph-projections.test.d.ts +25 -0
- package/dist/types/src/experimental/graph-projections.test.d.ts.map +1 -0
- package/dist/types/src/graph-builder.d.ts.map +1 -1
- package/dist/types/src/graph.d.ts +3 -3
- package/dist/types/src/graph.d.ts.map +1 -1
- package/dist/types/src/node.d.ts +3 -3
- package/dist/types/src/node.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -16
- package/src/experimental/graph-projections.test.ts +56 -0
- package/src/graph.ts +6 -3
- package/src/node.ts +4 -4
package/src/node.ts
CHANGED
|
@@ -41,10 +41,10 @@ export type Node<TData = any, TProperties extends Record<string, any> = Record<s
|
|
|
41
41
|
data: TData;
|
|
42
42
|
}>;
|
|
43
43
|
|
|
44
|
-
export type NodeFilter<
|
|
44
|
+
export type NodeFilter<TData = any, TProperties extends Record<string, any> = Record<string, any>> = (
|
|
45
45
|
node: Node<unknown, Record<string, any>>,
|
|
46
46
|
connectedNode: Node,
|
|
47
|
-
) => node is Node<
|
|
47
|
+
) => node is Node<TData, TProperties>;
|
|
48
48
|
|
|
49
49
|
export type Relation = 'outbound' | 'inbound';
|
|
50
50
|
|
|
@@ -70,12 +70,12 @@ export type NodeArg<TData, TProperties extends Record<string, any> = Record<stri
|
|
|
70
70
|
|
|
71
71
|
export type InvokeParams = {
|
|
72
72
|
/** Node the invoked action is connected to. */
|
|
73
|
-
|
|
73
|
+
parent?: Node;
|
|
74
74
|
|
|
75
75
|
caller?: string;
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
export type ActionData = (params
|
|
78
|
+
export type ActionData = (params?: InvokeParams) => MaybePromise<void>;
|
|
79
79
|
|
|
80
80
|
export type Action<TProperties extends Record<string, any> = Record<string, any>> = Readonly<
|
|
81
81
|
Omit<Node<ActionData, TProperties>, 'properties'> & {
|