@dxos/app-graph 0.7.5-main.9cb18ac → 0.7.5-main.9d2a38b
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 +36 -11
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +35 -10
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +36 -11
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/graph-builder.d.ts +6 -3
- package/dist/types/src/graph-builder.d.ts.map +1 -1
- package/dist/types/src/node.d.ts +2 -2
- package/dist/types/src/node.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -16
- package/src/graph-builder.ts +27 -9
- package/src/graph.ts +1 -1
- package/src/node.ts +3 -3
package/src/graph.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { type MakeOptional, nonNullable, pick } from '@dxos/util';
|
|
|
13
13
|
import { type Node, type NodeArg, type NodeFilter, type Relation, actionGroupSymbol, isActionLike } from './node';
|
|
14
14
|
|
|
15
15
|
const graphSymbol = Symbol('graph');
|
|
16
|
-
type DeepWriteable<T> = { -readonly [K in keyof T]: DeepWriteable<T[K]> };
|
|
16
|
+
type DeepWriteable<T> = { -readonly [K in keyof T]: T[K] extends object ? DeepWriteable<T[K]> : T[K] };
|
|
17
17
|
type NodeInternal = DeepWriteable<Node> & { [graphSymbol]: Graph };
|
|
18
18
|
|
|
19
19
|
export const getGraph = (node: Node): Graph => {
|
package/src/node.ts
CHANGED
|
@@ -87,9 +87,9 @@ export const isAction = (data: unknown): data is Action =>
|
|
|
87
87
|
|
|
88
88
|
export const actionGroupSymbol = Symbol('ActionGroup');
|
|
89
89
|
|
|
90
|
-
export type ActionGroup = Readonly<
|
|
91
|
-
Omit<Node<typeof actionGroupSymbol,
|
|
92
|
-
properties: Readonly<
|
|
90
|
+
export type ActionGroup<TProperties extends Record<string, any> = Record<string, any>> = Readonly<
|
|
91
|
+
Omit<Node<typeof actionGroupSymbol, TProperties>, 'properties'> & {
|
|
92
|
+
properties: Readonly<TProperties>;
|
|
93
93
|
}
|
|
94
94
|
>;
|
|
95
95
|
|