@dxos/plugin-graph 0.8.4-main.1068cf700f → 0.8.4-main.1c7ec43d41
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/GraphPlugin-J77OP3OB.mjs +9 -0
- package/dist/lib/browser/GraphPlugin-J77OP3OB.mjs.map +7 -0
- package/dist/lib/browser/chunk-B4RCERKV.mjs +22 -0
- package/dist/lib/browser/chunk-B4RCERKV.mjs.map +7 -0
- package/dist/lib/browser/{graph-TG7EILYY.mjs → graph-RCKCHDM6.mjs} +13 -5
- package/dist/lib/browser/graph-RCKCHDM6.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +38 -30
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/plugin.mjs +7 -0
- package/dist/lib/browser/plugin.mjs.map +7 -0
- package/dist/lib/node-esm/GraphPlugin-WEZHXHSK.mjs +10 -0
- package/dist/lib/node-esm/GraphPlugin-WEZHXHSK.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-FOAY5PMJ.mjs +24 -0
- package/dist/lib/node-esm/chunk-FOAY5PMJ.mjs.map +7 -0
- package/dist/lib/node-esm/{graph-EFBE3QLJ.mjs → graph-P7F6HXZB.mjs} +13 -5
- package/dist/lib/node-esm/graph-P7F6HXZB.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +38 -30
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/plugin.mjs +8 -0
- package/dist/lib/node-esm/plugin.mjs.map +7 -0
- package/dist/types/src/GraphPlugin.d.ts +1 -0
- package/dist/types/src/GraphPlugin.d.ts.map +1 -1
- package/dist/types/src/GraphPlugin.test.d.ts +2 -0
- package/dist/types/src/GraphPlugin.test.d.ts.map +1 -0
- package/dist/types/src/action.d.ts +1 -1
- package/dist/types/src/action.d.ts.map +1 -1
- package/dist/types/src/graph.d.ts +1 -1
- package/dist/types/src/graph.d.ts.map +1 -1
- package/dist/types/src/hooks/useNode.d.ts +16 -1
- package/dist/types/src/hooks/useNode.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +2 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +26 -17
- package/src/GraphPlugin.test.ts +26 -0
- package/src/GraphPlugin.ts +6 -4
- package/src/action.ts +2 -1
- package/src/graph.ts +11 -6
- package/src/hooks/useNode.ts +29 -3
- package/src/index.ts +10 -2
- package/src/meta.ts +2 -1
- package/src/plugin.ts +7 -0
- package/dist/lib/browser/graph-TG7EILYY.mjs.map +0 -7
- package/dist/lib/node-esm/graph-EFBE3QLJ.mjs.map +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/action.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":1390,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/action.ts":{"bytes":3672,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/useActionRunner.ts":{"bytes":2430,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"src/action.ts","kind":"import-statement","original":"../action"}],"format":"esm"},"src/hooks/useNode.ts":{"bytes":5318,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/index.ts":{"bytes":482,"imports":[{"path":"src/hooks/useActionRunner.ts","kind":"import-statement","original":"./useActionRunner"},{"path":"src/hooks/useNode.ts","kind":"import-statement","original":"./useNode"}],"format":"esm"},"src/graph.ts":{"bytes":8304,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Record","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true}],"format":"esm"},"src/GraphPlugin.ts":{"bytes":2981,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/events","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"src/graph.ts","kind":"dynamic-import","original":"./graph"}],"format":"esm"},"src/index.ts":{"bytes":1648,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"src/action.ts","kind":"import-statement","original":"./action"},{"path":"src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"src/GraphPlugin.ts","kind":"dynamic-import","original":"./GraphPlugin"}],"format":"esm"},"src/plugin.ts":{"bytes":653,"imports":[{"path":"src/GraphPlugin.ts","kind":"import-statement","original":"./GraphPlugin"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7077},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"dist/lib/node-esm/GraphPlugin-WEZHXHSK.mjs","kind":"dynamic-import"}],"exports":["GraphPlugin","meta","runAction","useActionRunner","useActions","useConnections","useEdges","useNode"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":160},"src/meta.ts":{"bytesInOutput":311},"src/action.ts":{"bytesInOutput":549},"src/hooks/useActionRunner.ts":{"bytesInOutput":397},"src/hooks/index.ts":{"bytesInOutput":0},"src/hooks/useNode.ts":{"bytesInOutput":703}},"bytes":2511},"dist/lib/node-esm/plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/plugin.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-FOAY5PMJ.mjs","kind":"import-statement"}],"exports":["GraphPlugin"],"entryPoint":"src/plugin.ts","inputs":{"src/plugin.ts":{"bytesInOutput":0}},"bytes":208},"dist/lib/node-esm/graph-P7F6HXZB.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4329},"dist/lib/node-esm/graph-P7F6HXZB.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Record","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/graph.ts","inputs":{"src/graph.ts":{"bytesInOutput":1712}},"bytes":1904},"dist/lib/node-esm/GraphPlugin-WEZHXHSK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/GraphPlugin-WEZHXHSK.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-FOAY5PMJ.mjs","kind":"import-statement"}],"exports":["GraphPlugin","default"],"entryPoint":"src/GraphPlugin.ts","inputs":{},"bytes":279},"dist/lib/node-esm/chunk-FOAY5PMJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1527},"dist/lib/node-esm/chunk-FOAY5PMJ.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/events","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"dist/lib/node-esm/graph-P7F6HXZB.mjs","kind":"dynamic-import"}],"exports":["GraphPlugin","GraphPlugin_default"],"inputs":{"src/GraphPlugin.ts":{"bytesInOutput":563}},"bytes":772}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphPlugin.d.ts","sourceRoot":"","sources":["../../../src/GraphPlugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgC,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAO3E;;;;GAIG;AACH,eAAO,MAAM,WAAW,4BAQvB,CAAC"}
|
|
1
|
+
{"version":3,"file":"GraphPlugin.d.ts","sourceRoot":"","sources":["../../../src/GraphPlugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgC,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAO3E;;;;GAIG;AACH,eAAO,MAAM,WAAW,4BAQvB,CAAC;eAEa,WAAW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphPlugin.test.d.ts","sourceRoot":"","sources":["../../../src/GraphPlugin.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CapabilityManager } from '@dxos/app-framework';
|
|
2
2
|
import { type Node } from '@dxos/app-graph';
|
|
3
|
-
import {
|
|
3
|
+
import { OperationInvoker } from '@dxos/operation';
|
|
4
4
|
/**
|
|
5
5
|
* Run an action with required layers: Operation.Service, Capability.Service, and captured context.
|
|
6
6
|
* @param invoker The operation invoker to use for Operation.Service.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../src/action.ts"],"names":[],"mappings":"AAOA,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../src/action.ts"],"names":[],"mappings":"AAOA,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,YACX,gBAAgB,CAAC,gBAAgB,qBACvB,iBAAiB,CAAC,iBAAiB,UAC9C,IAAI,CAAC,MAAM,WACX,IAAI,CAAC,WAAW,KACvB,OAAO,CAAC,IAAI,CASZ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
2
|
import { Capability } from '@dxos/app-framework';
|
|
3
3
|
import { Graph, GraphBuilder } from '@dxos/app-graph';
|
|
4
|
-
declare const _default: (props
|
|
4
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Readonly<{
|
|
5
5
|
graph: Graph.ExpandableGraph;
|
|
6
6
|
explore: typeof GraphBuilder.explore;
|
|
7
7
|
}>>>, Error, Capability.Service>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../src/graph.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,YAAY,EAAQ,MAAM,iBAAiB,CAAC
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../src/graph.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,YAAY,EAAQ,MAAM,iBAAiB,CAAC"}
|
|
@@ -8,6 +8,21 @@ import { type Graph, type Node } from '@dxos/app-graph';
|
|
|
8
8
|
* @returns Node if found, undefined otherwise.
|
|
9
9
|
*/
|
|
10
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
|
|
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
|
+
*/
|
|
12
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,6 +1,7 @@
|
|
|
1
|
+
import { Plugin } from '@dxos/app-framework';
|
|
2
|
+
export declare const GraphPlugin: Plugin.PluginFactory<void>;
|
|
3
|
+
export * from './meta';
|
|
1
4
|
export * from '@dxos/app-graph';
|
|
2
5
|
export * from './action';
|
|
3
|
-
export * from './GraphPlugin';
|
|
4
6
|
export * from './hooks';
|
|
5
|
-
export * from './meta';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,eAAO,MAAM,WAAW,4BAAmD,CAAC;AAE5E,cAAc,QAAQ,CAAC;AAEvB,cAAc,iBAAiB,CAAC;AAEhC,cAAc,UAAU,CAAC;AAGzB,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,IAQzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugin.ts"],"names":[],"mappings":"AAMA,cAAc,eAAe,CAAC"}
|