@dxos/plugin-graph 0.8.4-main.f5c0578 → 0.8.4-main.fcc0d83b33
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/graph-RCKCHDM6.mjs +48 -0
- package/dist/lib/browser/graph-RCKCHDM6.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +69 -29
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/graph-P7F6HXZB.mjs +50 -0
- package/dist/lib/node-esm/graph-P7F6HXZB.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +69 -29
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/GraphPlugin.d.ts +2 -1
- package/dist/types/src/GraphPlugin.d.ts.map +1 -1
- package/dist/types/src/action.d.ts +12 -0
- package/dist/types/src/action.d.ts.map +1 -0
- package/dist/types/src/graph.d.ts +7 -3
- package/dist/types/src/graph.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useActionRunner.d.ts +7 -0
- package/dist/types/src/hooks/useActionRunner.d.ts.map +1 -0
- package/dist/types/src/hooks/useNode.d.ts +19 -4
- package/dist/types/src/hooks/useNode.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +32 -24
- package/src/GraphPlugin.ts +14 -12
- package/src/action.ts +34 -0
- package/src/graph.ts +53 -37
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useActionRunner.ts +25 -0
- package/src/hooks/useNode.ts +35 -9
- package/src/index.ts +1 -0
- package/src/meta.ts +8 -5
- package/dist/lib/browser/graph-WYYTSA5Q.mjs +0 -37
- package/dist/lib/browser/graph-WYYTSA5Q.mjs.map +0 -7
- package/dist/lib/node-esm/graph-UPSQNHOM.mjs +0 -39
- package/dist/lib/node-esm/graph-UPSQNHOM.mjs.map +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Graph, type Node } from '@dxos/app-graph';
|
|
2
2
|
/**
|
|
3
3
|
* React hook to get a node from the graph.
|
|
4
4
|
*
|
|
@@ -7,7 +7,22 @@ import { type Node, type ReadableGraph, type Relation } from '@dxos/app-graph';
|
|
|
7
7
|
* @param timeout Optional timeout in milliseconds to wait for the node to be found.
|
|
8
8
|
* @returns Node if found, undefined otherwise.
|
|
9
9
|
*/
|
|
10
|
-
export declare const useNode: <T = any>(graph: ReadableGraph, id?: string) => Node<T> | undefined;
|
|
11
|
-
export declare const useConnections: (graph: ReadableGraph, id
|
|
12
|
-
|
|
10
|
+
export declare const useNode: <T = any>(graph: Graph.ReadableGraph, id?: string) => Node.Node<T> | undefined;
|
|
11
|
+
export declare const useConnections: (graph: Graph.ReadableGraph, id: string | undefined, relation: Node.RelationInput) => Node.Node[];
|
|
12
|
+
/**
|
|
13
|
+
* React hook to get actions available for a node.
|
|
14
|
+
*
|
|
15
|
+
* @param graph Graph containing the node.
|
|
16
|
+
* @param id Id of the node.
|
|
17
|
+
* @returns Actions available for the node.
|
|
18
|
+
*/
|
|
19
|
+
export declare const useActions: (graph: Graph.ReadableGraph, id?: string) => Node.Node[];
|
|
20
|
+
/**
|
|
21
|
+
* Subscribe to just the edge topology (inbound/outbound IDs) of a node without subscribing to node content.
|
|
22
|
+
*
|
|
23
|
+
* @param graph Graph containing the node.
|
|
24
|
+
* @param id Id of the node.
|
|
25
|
+
* @returns Edge topology for the node.
|
|
26
|
+
*/
|
|
27
|
+
export declare const useEdges: (graph: Graph.ReadableGraph, id?: string) => Graph.Edges;
|
|
13
28
|
//# sourceMappingURL=useNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNode.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useNode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useNode.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useNode.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAExD;;;;;;;GAOG;AAEH,eAAO,MAAM,OAAO,GAAI,CAAC,GAAG,GAAG,SAAS,KAAK,CAAC,aAAa,OAAO,MAAM,KAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,SAGzF,CAAC;AAEF,eAAO,MAAM,cAAc,UAClB,KAAK,CAAC,aAAa,MACtB,MAAM,GAAG,SAAS,YACZ,IAAI,CAAC,aAAa,KAC3B,IAAI,CAAC,IAAI,EAEX,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,UAAW,KAAK,CAAC,aAAa,OAAO,MAAM,KAAG,IAAI,CAAC,IAAI,EAG7E,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,UAAW,KAAK,CAAC,aAAa,OAAO,MAAM,KAAG,KAAK,CAAC,KAGxE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAEhC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAEhC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const meta: PluginMeta;
|
|
1
|
+
import { type Plugin } from '@dxos/app-framework';
|
|
2
|
+
export declare const meta: Plugin.Meta;
|
|
4
3
|
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,IAOzB,CAAC"}
|