@dxos/plugin-graph 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef

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 (30) hide show
  1. package/dist/lib/browser/GraphPlugin-M2U6IMU2.mjs +22 -0
  2. package/dist/lib/browser/GraphPlugin-M2U6IMU2.mjs.map +7 -0
  3. package/dist/lib/browser/{graph-DSSWPFSF.mjs → graph-RCKCHDM6.mjs} +1 -1
  4. package/dist/lib/browser/{graph-DSSWPFSF.mjs.map → graph-RCKCHDM6.mjs.map} +2 -2
  5. package/dist/lib/browser/index.mjs +18 -29
  6. package/dist/lib/browser/index.mjs.map +4 -4
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/node-esm/GraphPlugin-4Y4JMNE2.mjs +24 -0
  9. package/dist/lib/node-esm/GraphPlugin-4Y4JMNE2.mjs.map +7 -0
  10. package/dist/lib/node-esm/{graph-6OCP5GD6.mjs → graph-P7F6HXZB.mjs} +1 -1
  11. package/dist/lib/node-esm/{graph-6OCP5GD6.mjs.map → graph-P7F6HXZB.mjs.map} +2 -2
  12. package/dist/lib/node-esm/index.mjs +18 -29
  13. package/dist/lib/node-esm/index.mjs.map +4 -4
  14. package/dist/lib/node-esm/meta.json +1 -1
  15. package/dist/types/src/GraphPlugin.d.ts +1 -0
  16. package/dist/types/src/GraphPlugin.d.ts.map +1 -1
  17. package/dist/types/src/GraphPlugin.test.d.ts +2 -0
  18. package/dist/types/src/GraphPlugin.test.d.ts.map +1 -0
  19. package/dist/types/src/action.d.ts +1 -1
  20. package/dist/types/src/action.d.ts.map +1 -1
  21. package/dist/types/src/graph.d.ts.map +1 -1
  22. package/dist/types/src/hooks/useNode.d.ts.map +1 -1
  23. package/dist/types/src/index.d.ts +3 -2
  24. package/dist/types/src/index.d.ts.map +1 -1
  25. package/dist/types/tsconfig.tsbuildinfo +1 -1
  26. package/package.json +14 -15
  27. package/src/GraphPlugin.test.ts +26 -0
  28. package/src/GraphPlugin.ts +4 -2
  29. package/src/action.ts +2 -1
  30. package/src/index.ts +10 -2
@@ -0,0 +1,22 @@
1
+ // src/GraphPlugin.ts
2
+ import { ActivationEvents, Capability, Plugin } from "@dxos/app-framework";
3
+ import { AppActivationEvents } from "@dxos/app-toolkit";
4
+ import { meta } from "#meta";
5
+ var Graph = Capability.lazy("Graph", () => import("./graph-RCKCHDM6.mjs"));
6
+ var GraphPlugin = Plugin.define(meta).pipe(Plugin.addModule({
7
+ activatesOn: ActivationEvents.Startup,
8
+ firesBeforeActivation: [
9
+ AppActivationEvents.SetupAppGraph,
10
+ AppActivationEvents.SetupMetadata
11
+ ],
12
+ firesAfterActivation: [
13
+ AppActivationEvents.AppGraphReady
14
+ ],
15
+ activate: Graph
16
+ }), Plugin.make);
17
+ var GraphPlugin_default = GraphPlugin;
18
+ export {
19
+ GraphPlugin,
20
+ GraphPlugin_default as default
21
+ };
22
+ //# sourceMappingURL=GraphPlugin-M2U6IMU2.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/GraphPlugin.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvents, Capability, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents } from '@dxos/app-toolkit';\n\nimport { meta } from '#meta';\n\nconst Graph = Capability.lazy('Graph', () => import('./graph'));\n\n/**\n * Manages the state of the graph for the application.\n * Enables other plugins to register node builders to add nodes to the graph.\n * This includes actions and annotation each other's nodes.\n */\nexport const GraphPlugin = Plugin.define(meta).pipe(\n Plugin.addModule({\n activatesOn: ActivationEvents.Startup,\n firesBeforeActivation: [AppActivationEvents.SetupAppGraph, AppActivationEvents.SetupMetadata],\n firesAfterActivation: [AppActivationEvents.AppGraphReady],\n activate: Graph,\n }),\n Plugin.make,\n);\n\nexport default GraphPlugin;\n"],
5
+ "mappings": ";AAIA,SAASA,kBAAkBC,YAAYC,cAAc;AACrD,SAASC,2BAA2B;AAEpC,SAASC,YAAY;AAErB,IAAMC,QAAQJ,WAAWK,KAAK,SAAS,MAAM,OAAO,sBAAA,CAAA;AAO7C,IAAMC,cAAcL,OAAOM,OAAOJ,IAAAA,EAAMK,KAC7CP,OAAOQ,UAAU;EACfC,aAAaX,iBAAiBY;EAC9BC,uBAAuB;IAACV,oBAAoBW;IAAeX,oBAAoBY;;EAC/EC,sBAAsB;IAACb,oBAAoBc;;EAC3CC,UAAUb;AACZ,CAAA,GACAH,OAAOiB,IAAI;AAGb,IAAA,sBAAeZ;",
6
+ "names": ["ActivationEvents", "Capability", "Plugin", "AppActivationEvents", "meta", "Graph", "lazy", "GraphPlugin", "define", "pipe", "addModule", "activatesOn", "Startup", "firesBeforeActivation", "SetupAppGraph", "SetupMetadata", "firesAfterActivation", "AppGraphReady", "activate", "make"]
7
+ }
@@ -45,4 +45,4 @@ var setupDevtools = (graph) => {
45
45
  export {
46
46
  graph_default as default
47
47
  };
48
- //# sourceMappingURL=graph-DSSWPFSF.mjs.map
48
+ //# sourceMappingURL=graph-RCKCHDM6.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/graph.ts"],
4
4
  "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Record from 'effect/Record';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Graph, GraphBuilder, Node } from '@dxos/app-graph';\nimport { AppCapabilities } from '@dxos/app-toolkit';\n\n// TODO(wittjosiah): Remove or restore graph caching.\n// import { meta } from './meta';\n\n// const KEY = `${meta.id}.app-graph`;\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const registry = yield* Capability.get(Capabilities.AtomRegistry);\n const extensionsByModuleAtom = yield* Capability.atomByModule(AppCapabilities.AppGraphBuilder);\n\n const builder = GraphBuilder.from(/* localStorage.getItem(KEY) ?? */ undefined, registry);\n // const interval = setInterval(() => {\n // localStorage.setItem(KEY, builder.graph.pickle());\n // }, 5_000);\n\n const unsubscribe = registry.subscribe(\n extensionsByModuleAtom,\n (extensionsByModule) => {\n const next: GraphBuilder.BuilderExtension[] = [];\n for (const [moduleId, extensions] of Object.entries(extensionsByModule)) {\n for (const ext of GraphBuilder.flattenExtensions(extensions)) {\n next.push({ ...ext, id: `${moduleId}.${ext.id}` });\n }\n }\n const current = Record.values(registry.get(builder.extensions));\n const removed = current.filter(({ id }) => !next.some(({ id: nextId }) => nextId === id));\n removed.forEach((extension) => GraphBuilder.removeExtension(builder, extension.id));\n next.forEach((extension) => GraphBuilder.addExtension(builder, extension));\n },\n { immediate: true },\n );\n\n // await builder.initialize();\n void Graph.expand(builder.graph, Node.RootId, 'child');\n\n setupDevtools(builder.graph);\n\n return Capability.contributes(\n AppCapabilities.AppGraph,\n { graph: builder.graph, explore: GraphBuilder.explore },\n () =>\n Effect.sync(() => {\n // clearInterval(interval);\n unsubscribe();\n }),\n );\n }),\n);\n\n// Expose the graph to the window for debugging.\nconst setupDevtools = (graph: Graph.ExpandableGraph) => {\n (globalThis as any).composer ??= {};\n (globalThis as any).composer.graph = graph;\n};\n"],
5
- "mappings": ";AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,OAAOC,cAAcC,YAAY;AAC1C,SAASC,uBAAuB;AAOhC,IAAA,gBAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,WAAW,OAAOH,WAAWI,IAAIC,aAAaC,YAAY;AAChE,QAAMC,yBAAyB,OAAOP,WAAWQ,aAAaC,gBAAgBC,eAAe;AAE7F,QAAMC,UAAUC,aAAaC;;IAAwCC;IAAWX;EAAAA;AAKhF,QAAMY,cAAcZ,SAASa,UAC3BT,wBACA,CAACU,uBAAAA;AACC,UAAMC,OAAwC,CAAA;AAC9C,eAAW,CAACC,UAAUC,UAAAA,KAAeC,OAAOC,QAAQL,kBAAAA,GAAqB;AACvE,iBAAWM,OAAOX,aAAaY,kBAAkBJ,UAAAA,GAAa;AAC5DF,aAAKO,KAAK;UAAE,GAAGF;UAAKG,IAAI,GAAGP,QAAAA,IAAYI,IAAIG,EAAE;QAAG,CAAA;MAClD;IACF;AACA,UAAMC,UAAiBC,cAAOzB,SAASC,IAAIO,QAAQS,UAAU,CAAA;AAC7D,UAAMS,UAAUF,QAAQG,OAAO,CAAC,EAAEJ,GAAE,MAAO,CAACR,KAAKa,KAAK,CAAC,EAAEL,IAAIM,OAAM,MAAOA,WAAWN,EAAAA,CAAAA;AACrFG,YAAQI,QAAQ,CAACC,cAActB,aAAauB,gBAAgBxB,SAASuB,UAAUR,EAAE,CAAA;AACjFR,SAAKe,QAAQ,CAACC,cAActB,aAAawB,aAAazB,SAASuB,SAAAA,CAAAA;EACjE,GACA;IAAEG,WAAW;EAAK,CAAA;AAIpB,OAAKC,MAAMC,OAAO5B,QAAQ6B,OAAOC,KAAKC,QAAQ,OAAA;AAE9CC,gBAAchC,QAAQ6B,KAAK;AAE3B,SAAOxC,WAAW4C,YAChBnC,gBAAgBoC,UAChB;IAAEL,OAAO7B,QAAQ6B;IAAOM,SAASlC,aAAakC;EAAQ,GACtD,MACSC,YAAK,MAAA;AAEVhC,gBAAAA;EACF,CAAA,CAAA;AAEN,CAAA,CAAA;AAIF,IAAM4B,gBAAgB,CAACH,UAAAA;AACpBQ,aAAmBC,aAAa,CAAC;AACjCD,aAAmBC,SAAST,QAAQA;AACvC;",
6
- "names": ["Effect", "Record", "Capabilities", "Capability", "Graph", "GraphBuilder", "Node", "AppCapabilities", "Capability", "makeModule", "fnUntraced", "registry", "get", "Capabilities", "AtomRegistry", "extensionsByModuleAtom", "atomByModule", "AppCapabilities", "AppGraphBuilder", "builder", "GraphBuilder", "from", "undefined", "unsubscribe", "subscribe", "extensionsByModule", "next", "moduleId", "extensions", "Object", "entries", "ext", "flattenExtensions", "push", "id", "current", "values", "removed", "filter", "some", "nextId", "forEach", "extension", "removeExtension", "addExtension", "immediate", "Graph", "expand", "graph", "Node", "RootId", "setupDevtools", "contributes", "AppGraph", "explore", "sync", "globalThis", "composer"]
5
+ "mappings": ";AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,OAAOC,cAAcC,YAAY;AAC1C,SAASC,uBAAuB;AAOhC,IAAA,gBAAeJ,WAAWK,WACjBC,kBAAW,aAAA;AAChB,QAAMC,WAAW,OAAOP,WAAWQ,IAAIT,aAAaU,YAAY;AAChE,QAAMC,yBAAyB,OAAOV,WAAWW,aAAaP,gBAAgBQ,eAAe;AAE7F,QAAMC,UAAUX,aAAaY;;IAAwCC;IAAWR;EAAAA;AAKhF,QAAMS,cAAcT,SAASU,UAC3BP,wBACA,CAACQ,uBAAAA;AACC,UAAMC,OAAwC,CAAA;AAC9C,eAAW,CAACC,UAAUC,UAAAA,KAAeC,OAAOC,QAAQL,kBAAAA,GAAqB;AACvE,iBAAWM,OAAOtB,aAAauB,kBAAkBJ,UAAAA,GAAa;AAC5DF,aAAKO,KAAK;UAAE,GAAGF;UAAKG,IAAI,GAAGP,QAAAA,IAAYI,IAAIG,EAAE;QAAG,CAAA;MAClD;IACF;AACA,UAAMC,UAAiBC,cAAOtB,SAASC,IAAIK,QAAQQ,UAAU,CAAA;AAC7D,UAAMS,UAAUF,QAAQG,OAAO,CAAC,EAAEJ,GAAE,MAAO,CAACR,KAAKa,KAAK,CAAC,EAAEL,IAAIM,OAAM,MAAOA,WAAWN,EAAAA,CAAAA;AACrFG,YAAQI,QAAQ,CAACC,cAAcjC,aAAakC,gBAAgBvB,SAASsB,UAAUR,EAAE,CAAA;AACjFR,SAAKe,QAAQ,CAACC,cAAcjC,aAAamC,aAAaxB,SAASsB,SAAAA,CAAAA;EACjE,GACA;IAAEG,WAAW;EAAK,CAAA;AAIpB,OAAKrC,MAAMsC,OAAO1B,QAAQ2B,OAAOrC,KAAKsC,QAAQ,OAAA;AAE9CC,gBAAc7B,QAAQ2B,KAAK;AAE3B,SAAOxC,WAAW2C,YAChBvC,gBAAgBwC,UAChB;IAAEJ,OAAO3B,QAAQ2B;IAAOK,SAAS3C,aAAa2C;EAAQ,GACtD,MACSC,YAAK,MAAA;AAEV9B,gBAAAA;EACF,CAAA,CAAA;AAEN,CAAA,CAAA;AAIF,IAAM0B,gBAAgB,CAACF,UAAAA;AACpBO,aAAmBC,aAAa,CAAC;AACjCD,aAAmBC,SAASR,QAAQA;AACvC;",
6
+ "names": ["Effect", "Record", "Capabilities", "Capability", "Graph", "GraphBuilder", "Node", "AppCapabilities", "makeModule", "fnUntraced", "registry", "get", "AtomRegistry", "extensionsByModuleAtom", "atomByModule", "AppGraphBuilder", "builder", "from", "undefined", "unsubscribe", "subscribe", "extensionsByModule", "next", "moduleId", "extensions", "Object", "entries", "ext", "flattenExtensions", "push", "id", "current", "values", "removed", "filter", "some", "nextId", "forEach", "extension", "removeExtension", "addExtension", "immediate", "expand", "graph", "RootId", "setupDevtools", "contributes", "AppGraph", "explore", "sync", "globalThis", "composer"]
7
7
  }
@@ -1,3 +1,17 @@
1
+ // src/index.ts
2
+ import { Plugin } from "@dxos/app-framework";
3
+
4
+ // src/meta.ts
5
+ import { trim } from "@dxos/util";
6
+ var meta = {
7
+ id: "org.dxos.plugin.graph",
8
+ name: "Graph",
9
+ description: trim`
10
+ Graph database layer providing relationship modeling and queries for workspace objects.
11
+ Build knowledge graphs and explore complex data relationships.
12
+ `
13
+ };
14
+
1
15
  // src/index.ts
2
16
  export * from "@dxos/app-graph";
3
17
 
@@ -5,27 +19,10 @@ export * from "@dxos/app-graph";
5
19
  import * as Effect from "effect/Effect";
6
20
  import * as Function from "effect/Function";
7
21
  import { Capability } from "@dxos/app-framework";
22
+ import { Operation } from "@dxos/compute";
8
23
  import { runAndForwardErrors } from "@dxos/effect";
9
- import { Operation } from "@dxos/operation";
10
24
  var runAction = async (invoker, capabilityManager, action, params = {}) => runAndForwardErrors(action.data(params).pipe(Effect.provideService(Operation.Service, invoker), Effect.provideService(Capability.Service, capabilityManager), action._actionContext ? Effect.provide(action._actionContext) : Function.identity));
11
25
 
12
- // src/GraphPlugin.ts
13
- import { ActivationEvents, Capability as Capability2, Plugin } from "@dxos/app-framework";
14
- import { AppActivationEvents } from "@dxos/app-toolkit";
15
- import { meta } from "#meta";
16
- var Graph = Capability2.lazy("Graph", () => import("./graph-DSSWPFSF.mjs"));
17
- var GraphPlugin = Plugin.define(meta).pipe(Plugin.addModule({
18
- activatesOn: ActivationEvents.Startup,
19
- activatesBefore: [
20
- AppActivationEvents.SetupAppGraph,
21
- AppActivationEvents.SetupMetadata
22
- ],
23
- activatesAfter: [
24
- AppActivationEvents.AppGraphReady
25
- ],
26
- activate: Graph
27
- }), Plugin.make);
28
-
29
26
  // src/hooks/useActionRunner.ts
30
27
  import { useCallback } from "react";
31
28
  import { useOperationInvoker, usePluginManager } from "@dxos/app-framework/ui";
@@ -67,19 +64,11 @@ var useEdges = (graph, id) => {
67
64
  return useAtomValue(atom);
68
65
  };
69
66
 
70
- // src/meta.ts
71
- import { trim } from "@dxos/util";
72
- var meta2 = {
73
- id: "org.dxos.plugin.graph",
74
- name: "Graph",
75
- description: trim`
76
- Graph database layer providing relationship modeling and queries for workspace objects.
77
- Build knowledge graphs and explore complex data relationships.
78
- `
79
- };
67
+ // src/index.ts
68
+ var GraphPlugin = Plugin.lazy(meta, () => import("./GraphPlugin-M2U6IMU2.mjs"));
80
69
  export {
81
70
  GraphPlugin,
82
- meta2 as meta,
71
+ meta,
83
72
  runAction,
84
73
  useActionRunner,
85
74
  useActions,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/index.ts", "../../../src/action.ts", "../../../src/GraphPlugin.ts", "../../../src/hooks/useActionRunner.ts", "../../../src/hooks/useNode.ts", "../../../src/meta.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nexport * from '@dxos/app-graph';\n\nexport * from './action';\nexport * from './GraphPlugin';\nexport * from './hooks';\nexport * from './meta';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\n\nimport { Capability, type CapabilityManager } from '@dxos/app-framework';\nimport { type Node } from '@dxos/app-graph';\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { Operation, type OperationInvoker } from '@dxos/operation';\n\n/**\n * Run an action with required layers: Operation.Service, Capability.Service, and captured context.\n * @param invoker The operation invoker to use for Operation.Service.\n * @param capabilityManager The capability manager for Capability.Service.\n * @param action The action to execute.\n * @param params Parameters to pass to the action.\n */\nexport const runAction = async (\n invoker: OperationInvoker.OperationInvoker,\n capabilityManager: CapabilityManager.CapabilityManager,\n action: Node.Action,\n params: Node.InvokeProps = {},\n): Promise<void> =>\n runAndForwardErrors(\n action\n .data(params)\n .pipe(\n Effect.provideService(Operation.Service, invoker),\n Effect.provideService(Capability.Service, capabilityManager),\n action._actionContext ? Effect.provide(action._actionContext) : Function.identity,\n ),\n );\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvents, Capability, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents } from '@dxos/app-toolkit';\n\nimport { meta } from '#meta';\n\nconst Graph = Capability.lazy('Graph', () => import('./graph'));\n\n/**\n * Manages the state of the graph for the application.\n * Enables other plugins to register node builders to add nodes to the graph.\n * This includes actions and annotation each other's nodes.\n */\nexport const GraphPlugin = Plugin.define(meta).pipe(\n Plugin.addModule({\n activatesOn: ActivationEvents.Startup,\n activatesBefore: [AppActivationEvents.SetupAppGraph, AppActivationEvents.SetupMetadata],\n activatesAfter: [AppActivationEvents.AppGraphReady],\n activate: Graph,\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useCallback } from 'react';\n\nimport { useOperationInvoker, usePluginManager } from '@dxos/app-framework/ui';\nimport { type Node } from '@dxos/app-graph';\n\nimport { runAction } from '../action';\n\n/**\n * Hook that returns a function to run action Effects.\n * Provides Operation.Service, PluginContextService, and captured plugin context.\n */\nexport const useActionRunner = () => {\n const invoker = useOperationInvoker();\n const pluginManager = usePluginManager();\n\n return useCallback(\n (action: Node.Action, params: Node.InvokeProps = {}) =>\n runAction(invoker, pluginManager.capabilities, action, params),\n [invoker, pluginManager.capabilities],\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useAtomValue } from '@effect-atom/atom-react';\nimport * as Option from 'effect/Option';\nimport { useMemo } from 'react';\n\nimport { type Graph, type Node } from '@dxos/app-graph';\n\n/**\n * React hook to get a node from the graph.\n *\n * @param graph Graph to find the node in.\n * @param id Id of the node to find.\n * @param timeout Optional timeout in milliseconds to wait for the node to be found.\n * @returns Node if found, undefined otherwise.\n */\n// TODO(wittjosiah): Factor out to @dxos/app-graph/react.\nexport const useNode = <T = any>(graph: Graph.ReadableGraph, id?: string): Node.Node<T> | undefined => {\n const atom = useMemo(() => graph.node(id ?? ''), [graph, id]);\n return Option.getOrElse(useAtomValue(atom), () => undefined);\n};\n\nexport const useConnections = (\n graph: Graph.ReadableGraph,\n id: string | undefined,\n relation: Node.RelationInput,\n): Node.Node[] => {\n return useAtomValue(graph.connections(id ?? '', relation));\n};\n\n/**\n * React hook to get actions available for a node.\n *\n * @param graph Graph containing the node.\n * @param id Id of the node.\n * @returns Actions available for the node.\n */\nexport const useActions = (graph: Graph.ReadableGraph, id?: string): Node.Node[] => {\n const atom = useMemo(() => graph.actions(id ?? ''), [graph, id]);\n return useAtomValue(atom);\n};\n\n/**\n * Subscribe to just the edge topology (inbound/outbound IDs) of a node without subscribing to node content.\n *\n * @param graph Graph containing the node.\n * @param id Id of the node.\n * @returns Edge topology for the node.\n */\nexport const useEdges = (graph: Graph.ReadableGraph, id?: string): Graph.Edges => {\n const atom = useMemo(() => graph.edges(id ?? ''), [graph, id]);\n return useAtomValue(atom);\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.graph',\n name: 'Graph',\n description: trim`\n Graph database layer providing relationship modeling and queries for workspace objects.\n Build knowledge graphs and explore complex data relationships.\n `,\n};\n"],
5
- "mappings": ";AAIA,cAAc;;;ACAd,YAAYA,YAAY;AACxB,YAAYC,cAAc;AAE1B,SAASC,kBAA0C;AAEnD,SAASC,2BAA2B;AACpC,SAASC,iBAAwC;AAS1C,IAAMC,YAAY,OACvBC,SACAC,mBACAC,QACAC,SAA2B,CAAC,MAE5BC,oBACEF,OACGG,KAAKF,MAAAA,EACLG,KACQC,sBAAeC,UAAUC,SAAST,OAAAA,GAClCO,sBAAeG,WAAWD,SAASR,iBAAAA,GAC1CC,OAAOS,iBAAwBC,eAAQV,OAAOS,cAAc,IAAaE,iBAAQ,CAAA;;;AC3BzF,SAASC,kBAAkBC,cAAAA,aAAYC,cAAc;AACrD,SAASC,2BAA2B;AAEpC,SAASC,YAAY;AAErB,IAAMC,QAAQC,YAAWC,KAAK,SAAS,MAAM,OAAO,sBAAA,CAAA;AAO7C,IAAMC,cAAcC,OAAOC,OAAOC,IAAAA,EAAMC,KAC7CH,OAAOI,UAAU;EACfC,aAAaC,iBAAiBC;EAC9BC,iBAAiB;IAACC,oBAAoBC;IAAeD,oBAAoBE;;EACzEC,gBAAgB;IAACH,oBAAoBI;;EACrCC,UAAUlB;AACZ,CAAA,GACAI,OAAOe,IAAI;;;ACnBb,SAASC,mBAAmB;AAE5B,SAASC,qBAAqBC,wBAAwB;AAS/C,IAAMC,kBAAkB,MAAA;AAC7B,QAAMC,UAAUC,oBAAAA;AAChB,QAAMC,gBAAgBC,iBAAAA;AAEtB,SAAOC,YACL,CAACC,QAAqBC,SAA2B,CAAC,MAChDC,UAAUP,SAASE,cAAcM,cAAcH,QAAQC,MAAAA,GACzD;IAACN;IAASE,cAAcM;GAAa;AAEzC;;;ACpBA,SAASC,oBAAoB;AAC7B,YAAYC,YAAY;AACxB,SAASC,eAAe;AAajB,IAAMC,UAAU,CAAUC,OAA4BC,OAAAA;AAC3D,QAAMC,OAAOC,QAAQ,MAAMH,MAAMI,KAAKH,MAAM,EAAA,GAAK;IAACD;IAAOC;GAAG;AAC5D,SAAcI,iBAAUC,aAAaJ,IAAAA,GAAO,MAAMK,MAAAA;AACpD;AAEO,IAAMC,iBAAiB,CAC5BR,OACAC,IACAQ,aAAAA;AAEA,SAAOH,aAAaN,MAAMU,YAAYT,MAAM,IAAIQ,QAAAA,CAAAA;AAClD;AASO,IAAME,aAAa,CAACX,OAA4BC,OAAAA;AACrD,QAAMC,OAAOC,QAAQ,MAAMH,MAAMY,QAAQX,MAAM,EAAA,GAAK;IAACD;IAAOC;GAAG;AAC/D,SAAOK,aAAaJ,IAAAA;AACtB;AASO,IAAMW,WAAW,CAACb,OAA4BC,OAAAA;AACnD,QAAMC,OAAOC,QAAQ,MAAMH,MAAMc,MAAMb,MAAM,EAAA,GAAK;IAACD;IAAOC;GAAG;AAC7D,SAAOK,aAAaJ,IAAAA;AACtB;;;ACjDA,SAASa,YAAY;AAEd,IAAMC,QAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;AAIf;",
6
- "names": ["Effect", "Function", "Capability", "runAndForwardErrors", "Operation", "runAction", "invoker", "capabilityManager", "action", "params", "runAndForwardErrors", "data", "pipe", "provideService", "Operation", "Service", "Capability", "_actionContext", "provide", "identity", "ActivationEvents", "Capability", "Plugin", "AppActivationEvents", "meta", "Graph", "Capability", "lazy", "GraphPlugin", "Plugin", "define", "meta", "pipe", "addModule", "activatesOn", "ActivationEvents", "Startup", "activatesBefore", "AppActivationEvents", "SetupAppGraph", "SetupMetadata", "activatesAfter", "AppGraphReady", "activate", "make", "useCallback", "useOperationInvoker", "usePluginManager", "useActionRunner", "invoker", "useOperationInvoker", "pluginManager", "usePluginManager", "useCallback", "action", "params", "runAction", "capabilities", "useAtomValue", "Option", "useMemo", "useNode", "graph", "id", "atom", "useMemo", "node", "getOrElse", "useAtomValue", "undefined", "useConnections", "relation", "connections", "useActions", "actions", "useEdges", "edges", "trim", "meta", "id", "name", "description", "trim"]
3
+ "sources": ["../../../src/index.ts", "../../../src/meta.ts", "../../../src/action.ts", "../../../src/hooks/useActionRunner.ts", "../../../src/hooks/useNode.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport const GraphPlugin = Plugin.lazy(meta, () => import('./GraphPlugin'));\n\nexport * from './meta';\n\nexport * from '@dxos/app-graph';\n\nexport * from './action';\n// TODO(wittjosiah): Hooks should not be exported from the plugin package at all.\n// Either refactor callers to not need them or factor them out to a shared package.\nexport * from './hooks';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.graph',\n name: 'Graph',\n description: trim`\n Graph database layer providing relationship modeling and queries for workspace objects.\n Build knowledge graphs and explore complex data relationships.\n `,\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\n\nimport { Capability, type CapabilityManager } from '@dxos/app-framework';\nimport { type Node } from '@dxos/app-graph';\nimport { Operation } from '@dxos/compute';\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { OperationInvoker } from '@dxos/operation';\n\n/**\n * Run an action with required layers: Operation.Service, Capability.Service, and captured context.\n * @param invoker The operation invoker to use for Operation.Service.\n * @param capabilityManager The capability manager for Capability.Service.\n * @param action The action to execute.\n * @param params Parameters to pass to the action.\n */\nexport const runAction = async (\n invoker: OperationInvoker.OperationInvoker,\n capabilityManager: CapabilityManager.CapabilityManager,\n action: Node.Action,\n params: Node.InvokeProps = {},\n): Promise<void> =>\n runAndForwardErrors(\n action\n .data(params)\n .pipe(\n Effect.provideService(Operation.Service, invoker),\n Effect.provideService(Capability.Service, capabilityManager),\n action._actionContext ? Effect.provide(action._actionContext) : Function.identity,\n ),\n );\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useCallback } from 'react';\n\nimport { useOperationInvoker, usePluginManager } from '@dxos/app-framework/ui';\nimport { type Node } from '@dxos/app-graph';\n\nimport { runAction } from '../action';\n\n/**\n * Hook that returns a function to run action Effects.\n * Provides Operation.Service, PluginContextService, and captured plugin context.\n */\nexport const useActionRunner = () => {\n const invoker = useOperationInvoker();\n const pluginManager = usePluginManager();\n\n return useCallback(\n (action: Node.Action, params: Node.InvokeProps = {}) =>\n runAction(invoker, pluginManager.capabilities, action, params),\n [invoker, pluginManager.capabilities],\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useAtomValue } from '@effect-atom/atom-react';\nimport * as Option from 'effect/Option';\nimport { useMemo } from 'react';\n\nimport { type Graph, type Node } from '@dxos/app-graph';\n\n/**\n * React hook to get a node from the graph.\n *\n * @param graph Graph to find the node in.\n * @param id Id of the node to find.\n * @param timeout Optional timeout in milliseconds to wait for the node to be found.\n * @returns Node if found, undefined otherwise.\n */\n// TODO(wittjosiah): Factor out to @dxos/app-graph/react.\nexport const useNode = <T = any>(graph: Graph.ReadableGraph, id?: string): Node.Node<T> | undefined => {\n const atom = useMemo(() => graph.node(id ?? ''), [graph, id]);\n return Option.getOrElse(useAtomValue(atom), () => undefined);\n};\n\nexport const useConnections = (\n graph: Graph.ReadableGraph,\n id: string | undefined,\n relation: Node.RelationInput,\n): Node.Node[] => {\n return useAtomValue(graph.connections(id ?? '', relation));\n};\n\n/**\n * React hook to get actions available for a node.\n *\n * @param graph Graph containing the node.\n * @param id Id of the node.\n * @returns Actions available for the node.\n */\nexport const useActions = (graph: Graph.ReadableGraph, id?: string): Node.Node[] => {\n const atom = useMemo(() => graph.actions(id ?? ''), [graph, id]);\n return useAtomValue(atom);\n};\n\n/**\n * Subscribe to just the edge topology (inbound/outbound IDs) of a node without subscribing to node content.\n *\n * @param graph Graph containing the node.\n * @param id Id of the node.\n * @returns Edge topology for the node.\n */\nexport const useEdges = (graph: Graph.ReadableGraph, id?: string): Graph.Edges => {\n const atom = useMemo(() => graph.edges(id ?? ''), [graph, id]);\n return useAtomValue(atom);\n};\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;;;ACCvB,SAASC,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;AAIf;;;ADFA,cAAc;;;AERd,YAAYK,YAAY;AACxB,YAAYC,cAAc;AAE1B,SAASC,kBAA0C;AAEnD,SAASC,iBAAiB;AAC1B,SAASC,2BAA2B;AAU7B,IAAMC,YAAY,OACvBC,SACAC,mBACAC,QACAC,SAA2B,CAAC,MAE5BL,oBACEI,OACGE,KAAKD,MAAAA,EACLE,KACQC,sBAAeT,UAAUU,SAASP,OAAAA,GAClCM,sBAAeV,WAAWW,SAASN,iBAAAA,GAC1CC,OAAOM,iBAAwBC,eAAQP,OAAOM,cAAc,IAAaE,iBAAQ,CAAA;;;AC5BzF,SAASC,mBAAmB;AAE5B,SAASC,qBAAqBC,wBAAwB;AAS/C,IAAMC,kBAAkB,MAAA;AAC7B,QAAMC,UAAUC,oBAAAA;AAChB,QAAMC,gBAAgBC,iBAAAA;AAEtB,SAAOC,YACL,CAACC,QAAqBC,SAA2B,CAAC,MAChDC,UAAUP,SAASE,cAAcM,cAAcH,QAAQC,MAAAA,GACzD;IAACN;IAASE,cAAcM;GAAa;AAEzC;;;ACpBA,SAASC,oBAAoB;AAC7B,YAAYC,YAAY;AACxB,SAASC,eAAe;AAajB,IAAMC,UAAU,CAAUC,OAA4BC,OAAAA;AAC3D,QAAMC,OAAOJ,QAAQ,MAAME,MAAMG,KAAKF,MAAM,EAAA,GAAK;IAACD;IAAOC;GAAG;AAC5D,SAAcG,iBAAUR,aAAaM,IAAAA,GAAO,MAAMG,MAAAA;AACpD;AAEO,IAAMC,iBAAiB,CAC5BN,OACAC,IACAM,aAAAA;AAEA,SAAOX,aAAaI,MAAMQ,YAAYP,MAAM,IAAIM,QAAAA,CAAAA;AAClD;AASO,IAAME,aAAa,CAACT,OAA4BC,OAAAA;AACrD,QAAMC,OAAOJ,QAAQ,MAAME,MAAMU,QAAQT,MAAM,EAAA,GAAK;IAACD;IAAOC;GAAG;AAC/D,SAAOL,aAAaM,IAAAA;AACtB;AASO,IAAMS,WAAW,CAACX,OAA4BC,OAAAA;AACnD,QAAMC,OAAOJ,QAAQ,MAAME,MAAMY,MAAMX,MAAM,EAAA,GAAK;IAACD;IAAOC;GAAG;AAC7D,SAAOL,aAAaM,IAAAA;AACtB;;;AJ9CO,IAAMW,cAAcC,OAAOC,KAAKC,MAAM,MAAM,OAAO,4BAAA,CAAA;",
6
+ "names": ["Plugin", "trim", "meta", "id", "name", "description", "Effect", "Function", "Capability", "Operation", "runAndForwardErrors", "runAction", "invoker", "capabilityManager", "action", "params", "data", "pipe", "provideService", "Service", "_actionContext", "provide", "identity", "useCallback", "useOperationInvoker", "usePluginManager", "useActionRunner", "invoker", "useOperationInvoker", "pluginManager", "usePluginManager", "useCallback", "action", "params", "runAction", "capabilities", "useAtomValue", "Option", "useMemo", "useNode", "graph", "id", "atom", "node", "getOrElse", "undefined", "useConnections", "relation", "connections", "useActions", "actions", "useEdges", "edges", "GraphPlugin", "Plugin", "lazy", "meta"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/action.ts":{"bytes":3719,"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/effect","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"format":"esm"},"src/graph.ts":{"bytes":8384,"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":3055,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"src/graph.ts","kind":"dynamic-import","original":"./graph"}],"format":"esm"},"src/hooks/useActionRunner.ts":{"bytes":2530,"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":5406,"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":568,"imports":[{"path":"src/hooks/useActionRunner.ts","kind":"import-statement","original":"./useActionRunner"},{"path":"src/hooks/useNode.ts","kind":"import-statement","original":"./useNode"}],"format":"esm"},"src/meta.ts":{"bytes":1365,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":815,"imports":[{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"src/action.ts","kind":"import-statement","original":"./action"},{"path":"src/GraphPlugin.ts","kind":"import-statement","original":"./GraphPlugin"},{"path":"src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8164},"dist/lib/browser/index.mjs":{"imports":[{"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/effect","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"dist/lib/browser/graph-DSSWPFSF.mjs","kind":"dynamic-import"},{"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":"@dxos/util","kind":"import-statement","external":true}],"exports":["GraphPlugin","meta","runAction","useActionRunner","useActions","useConnections","useEdges","useNode"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":33},"src/action.ts":{"bytesInOutput":551},"src/GraphPlugin.ts":{"bytesInOutput":560},"src/hooks/useActionRunner.ts":{"bytesInOutput":397},"src/hooks/index.ts":{"bytesInOutput":0},"src/hooks/useNode.ts":{"bytesInOutput":703},"src/meta.ts":{"bytesInOutput":284}},"bytes":2824},"dist/lib/browser/graph-DSSWPFSF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4403},"dist/lib/browser/graph-DSSWPFSF.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":1811}}}
1
+ {"inputs":{"src/meta.ts":{"bytes":1286,"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":3101,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","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"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7029},"dist/lib/browser/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/browser/GraphPlugin-M2U6IMU2.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":283},"src/action.ts":{"bytesInOutput":549},"src/hooks/useActionRunner.ts":{"bytesInOutput":397},"src/hooks/index.ts":{"bytesInOutput":0},"src/hooks/useNode.ts":{"bytesInOutput":703}},"bytes":2390},"dist/lib/browser/graph-RCKCHDM6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4327},"dist/lib/browser/graph-RCKCHDM6.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":1811},"dist/lib/browser/GraphPlugin-M2U6IMU2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1584},"dist/lib/browser/GraphPlugin-M2U6IMU2.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"dist/lib/browser/graph-RCKCHDM6.mjs","kind":"dynamic-import"}],"exports":["GraphPlugin","default"],"entryPoint":"src/GraphPlugin.ts","inputs":{"src/GraphPlugin.ts":{"bytesInOutput":595}},"bytes":727}}}
@@ -0,0 +1,24 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+
3
+ // src/GraphPlugin.ts
4
+ import { ActivationEvents, Capability, Plugin } from "@dxos/app-framework";
5
+ import { AppActivationEvents } from "@dxos/app-toolkit";
6
+ import { meta } from "#meta";
7
+ var Graph = Capability.lazy("Graph", () => import("./graph-P7F6HXZB.mjs"));
8
+ var GraphPlugin = Plugin.define(meta).pipe(Plugin.addModule({
9
+ activatesOn: ActivationEvents.Startup,
10
+ firesBeforeActivation: [
11
+ AppActivationEvents.SetupAppGraph,
12
+ AppActivationEvents.SetupMetadata
13
+ ],
14
+ firesAfterActivation: [
15
+ AppActivationEvents.AppGraphReady
16
+ ],
17
+ activate: Graph
18
+ }), Plugin.make);
19
+ var GraphPlugin_default = GraphPlugin;
20
+ export {
21
+ GraphPlugin,
22
+ GraphPlugin_default as default
23
+ };
24
+ //# sourceMappingURL=GraphPlugin-4Y4JMNE2.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/GraphPlugin.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvents, Capability, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents } from '@dxos/app-toolkit';\n\nimport { meta } from '#meta';\n\nconst Graph = Capability.lazy('Graph', () => import('./graph'));\n\n/**\n * Manages the state of the graph for the application.\n * Enables other plugins to register node builders to add nodes to the graph.\n * This includes actions and annotation each other's nodes.\n */\nexport const GraphPlugin = Plugin.define(meta).pipe(\n Plugin.addModule({\n activatesOn: ActivationEvents.Startup,\n firesBeforeActivation: [AppActivationEvents.SetupAppGraph, AppActivationEvents.SetupMetadata],\n firesAfterActivation: [AppActivationEvents.AppGraphReady],\n activate: Graph,\n }),\n Plugin.make,\n);\n\nexport default GraphPlugin;\n"],
5
+ "mappings": ";;;AAIA,SAASA,kBAAkBC,YAAYC,cAAc;AACrD,SAASC,2BAA2B;AAEpC,SAASC,YAAY;AAErB,IAAMC,QAAQJ,WAAWK,KAAK,SAAS,MAAM,OAAO,sBAAA,CAAA;AAO7C,IAAMC,cAAcL,OAAOM,OAAOJ,IAAAA,EAAMK,KAC7CP,OAAOQ,UAAU;EACfC,aAAaX,iBAAiBY;EAC9BC,uBAAuB;IAACV,oBAAoBW;IAAeX,oBAAoBY;;EAC/EC,sBAAsB;IAACb,oBAAoBc;;EAC3CC,UAAUb;AACZ,CAAA,GACAH,OAAOiB,IAAI;AAGb,IAAA,sBAAeZ;",
6
+ "names": ["ActivationEvents", "Capability", "Plugin", "AppActivationEvents", "meta", "Graph", "lazy", "GraphPlugin", "define", "pipe", "addModule", "activatesOn", "Startup", "firesBeforeActivation", "SetupAppGraph", "SetupMetadata", "firesAfterActivation", "AppGraphReady", "activate", "make"]
7
+ }
@@ -47,4 +47,4 @@ var setupDevtools = (graph) => {
47
47
  export {
48
48
  graph_default as default
49
49
  };
50
- //# sourceMappingURL=graph-6OCP5GD6.mjs.map
50
+ //# sourceMappingURL=graph-P7F6HXZB.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/graph.ts"],
4
4
  "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Record from 'effect/Record';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Graph, GraphBuilder, Node } from '@dxos/app-graph';\nimport { AppCapabilities } from '@dxos/app-toolkit';\n\n// TODO(wittjosiah): Remove or restore graph caching.\n// import { meta } from './meta';\n\n// const KEY = `${meta.id}.app-graph`;\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const registry = yield* Capability.get(Capabilities.AtomRegistry);\n const extensionsByModuleAtom = yield* Capability.atomByModule(AppCapabilities.AppGraphBuilder);\n\n const builder = GraphBuilder.from(/* localStorage.getItem(KEY) ?? */ undefined, registry);\n // const interval = setInterval(() => {\n // localStorage.setItem(KEY, builder.graph.pickle());\n // }, 5_000);\n\n const unsubscribe = registry.subscribe(\n extensionsByModuleAtom,\n (extensionsByModule) => {\n const next: GraphBuilder.BuilderExtension[] = [];\n for (const [moduleId, extensions] of Object.entries(extensionsByModule)) {\n for (const ext of GraphBuilder.flattenExtensions(extensions)) {\n next.push({ ...ext, id: `${moduleId}.${ext.id}` });\n }\n }\n const current = Record.values(registry.get(builder.extensions));\n const removed = current.filter(({ id }) => !next.some(({ id: nextId }) => nextId === id));\n removed.forEach((extension) => GraphBuilder.removeExtension(builder, extension.id));\n next.forEach((extension) => GraphBuilder.addExtension(builder, extension));\n },\n { immediate: true },\n );\n\n // await builder.initialize();\n void Graph.expand(builder.graph, Node.RootId, 'child');\n\n setupDevtools(builder.graph);\n\n return Capability.contributes(\n AppCapabilities.AppGraph,\n { graph: builder.graph, explore: GraphBuilder.explore },\n () =>\n Effect.sync(() => {\n // clearInterval(interval);\n unsubscribe();\n }),\n );\n }),\n);\n\n// Expose the graph to the window for debugging.\nconst setupDevtools = (graph: Graph.ExpandableGraph) => {\n (globalThis as any).composer ??= {};\n (globalThis as any).composer.graph = graph;\n};\n"],
5
- "mappings": ";;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,OAAOC,cAAcC,YAAY;AAC1C,SAASC,uBAAuB;AAOhC,IAAA,gBAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,WAAW,OAAOH,WAAWI,IAAIC,aAAaC,YAAY;AAChE,QAAMC,yBAAyB,OAAOP,WAAWQ,aAAaC,gBAAgBC,eAAe;AAE7F,QAAMC,UAAUC,aAAaC;;IAAwCC;IAAWX;EAAAA;AAKhF,QAAMY,cAAcZ,SAASa,UAC3BT,wBACA,CAACU,uBAAAA;AACC,UAAMC,OAAwC,CAAA;AAC9C,eAAW,CAACC,UAAUC,UAAAA,KAAeC,OAAOC,QAAQL,kBAAAA,GAAqB;AACvE,iBAAWM,OAAOX,aAAaY,kBAAkBJ,UAAAA,GAAa;AAC5DF,aAAKO,KAAK;UAAE,GAAGF;UAAKG,IAAI,GAAGP,QAAAA,IAAYI,IAAIG,EAAE;QAAG,CAAA;MAClD;IACF;AACA,UAAMC,UAAiBC,cAAOzB,SAASC,IAAIO,QAAQS,UAAU,CAAA;AAC7D,UAAMS,UAAUF,QAAQG,OAAO,CAAC,EAAEJ,GAAE,MAAO,CAACR,KAAKa,KAAK,CAAC,EAAEL,IAAIM,OAAM,MAAOA,WAAWN,EAAAA,CAAAA;AACrFG,YAAQI,QAAQ,CAACC,cAActB,aAAauB,gBAAgBxB,SAASuB,UAAUR,EAAE,CAAA;AACjFR,SAAKe,QAAQ,CAACC,cAActB,aAAawB,aAAazB,SAASuB,SAAAA,CAAAA;EACjE,GACA;IAAEG,WAAW;EAAK,CAAA;AAIpB,OAAKC,MAAMC,OAAO5B,QAAQ6B,OAAOC,KAAKC,QAAQ,OAAA;AAE9CC,gBAAchC,QAAQ6B,KAAK;AAE3B,SAAOxC,WAAW4C,YAChBnC,gBAAgBoC,UAChB;IAAEL,OAAO7B,QAAQ6B;IAAOM,SAASlC,aAAakC;EAAQ,GACtD,MACSC,YAAK,MAAA;AAEVhC,gBAAAA;EACF,CAAA,CAAA;AAEN,CAAA,CAAA;AAIF,IAAM4B,gBAAgB,CAACH,UAAAA;AACpBQ,aAAmBC,aAAa,CAAC;AACjCD,aAAmBC,SAAST,QAAQA;AACvC;",
6
- "names": ["Effect", "Record", "Capabilities", "Capability", "Graph", "GraphBuilder", "Node", "AppCapabilities", "Capability", "makeModule", "fnUntraced", "registry", "get", "Capabilities", "AtomRegistry", "extensionsByModuleAtom", "atomByModule", "AppCapabilities", "AppGraphBuilder", "builder", "GraphBuilder", "from", "undefined", "unsubscribe", "subscribe", "extensionsByModule", "next", "moduleId", "extensions", "Object", "entries", "ext", "flattenExtensions", "push", "id", "current", "values", "removed", "filter", "some", "nextId", "forEach", "extension", "removeExtension", "addExtension", "immediate", "Graph", "expand", "graph", "Node", "RootId", "setupDevtools", "contributes", "AppGraph", "explore", "sync", "globalThis", "composer"]
5
+ "mappings": ";;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,OAAOC,cAAcC,YAAY;AAC1C,SAASC,uBAAuB;AAOhC,IAAA,gBAAeJ,WAAWK,WACjBC,kBAAW,aAAA;AAChB,QAAMC,WAAW,OAAOP,WAAWQ,IAAIT,aAAaU,YAAY;AAChE,QAAMC,yBAAyB,OAAOV,WAAWW,aAAaP,gBAAgBQ,eAAe;AAE7F,QAAMC,UAAUX,aAAaY;;IAAwCC;IAAWR;EAAAA;AAKhF,QAAMS,cAAcT,SAASU,UAC3BP,wBACA,CAACQ,uBAAAA;AACC,UAAMC,OAAwC,CAAA;AAC9C,eAAW,CAACC,UAAUC,UAAAA,KAAeC,OAAOC,QAAQL,kBAAAA,GAAqB;AACvE,iBAAWM,OAAOtB,aAAauB,kBAAkBJ,UAAAA,GAAa;AAC5DF,aAAKO,KAAK;UAAE,GAAGF;UAAKG,IAAI,GAAGP,QAAAA,IAAYI,IAAIG,EAAE;QAAG,CAAA;MAClD;IACF;AACA,UAAMC,UAAiBC,cAAOtB,SAASC,IAAIK,QAAQQ,UAAU,CAAA;AAC7D,UAAMS,UAAUF,QAAQG,OAAO,CAAC,EAAEJ,GAAE,MAAO,CAACR,KAAKa,KAAK,CAAC,EAAEL,IAAIM,OAAM,MAAOA,WAAWN,EAAAA,CAAAA;AACrFG,YAAQI,QAAQ,CAACC,cAAcjC,aAAakC,gBAAgBvB,SAASsB,UAAUR,EAAE,CAAA;AACjFR,SAAKe,QAAQ,CAACC,cAAcjC,aAAamC,aAAaxB,SAASsB,SAAAA,CAAAA;EACjE,GACA;IAAEG,WAAW;EAAK,CAAA;AAIpB,OAAKrC,MAAMsC,OAAO1B,QAAQ2B,OAAOrC,KAAKsC,QAAQ,OAAA;AAE9CC,gBAAc7B,QAAQ2B,KAAK;AAE3B,SAAOxC,WAAW2C,YAChBvC,gBAAgBwC,UAChB;IAAEJ,OAAO3B,QAAQ2B;IAAOK,SAAS3C,aAAa2C;EAAQ,GACtD,MACSC,YAAK,MAAA;AAEV9B,gBAAAA;EACF,CAAA,CAAA;AAEN,CAAA,CAAA;AAIF,IAAM0B,gBAAgB,CAACF,UAAAA;AACpBO,aAAmBC,aAAa,CAAC;AACjCD,aAAmBC,SAASR,QAAQA;AACvC;",
6
+ "names": ["Effect", "Record", "Capabilities", "Capability", "Graph", "GraphBuilder", "Node", "AppCapabilities", "makeModule", "fnUntraced", "registry", "get", "AtomRegistry", "extensionsByModuleAtom", "atomByModule", "AppGraphBuilder", "builder", "from", "undefined", "unsubscribe", "subscribe", "extensionsByModule", "next", "moduleId", "extensions", "Object", "entries", "ext", "flattenExtensions", "push", "id", "current", "values", "removed", "filter", "some", "nextId", "forEach", "extension", "removeExtension", "addExtension", "immediate", "expand", "graph", "RootId", "setupDevtools", "contributes", "AppGraph", "explore", "sync", "globalThis", "composer"]
7
7
  }
@@ -1,5 +1,19 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
 
3
+ // src/index.ts
4
+ import { Plugin } from "@dxos/app-framework";
5
+
6
+ // src/meta.ts
7
+ import { trim } from "@dxos/util";
8
+ var meta = {
9
+ id: "org.dxos.plugin.graph",
10
+ name: "Graph",
11
+ description: trim`
12
+ Graph database layer providing relationship modeling and queries for workspace objects.
13
+ Build knowledge graphs and explore complex data relationships.
14
+ `
15
+ };
16
+
3
17
  // src/index.ts
4
18
  export * from "@dxos/app-graph";
5
19
 
@@ -7,27 +21,10 @@ export * from "@dxos/app-graph";
7
21
  import * as Effect from "effect/Effect";
8
22
  import * as Function from "effect/Function";
9
23
  import { Capability } from "@dxos/app-framework";
24
+ import { Operation } from "@dxos/compute";
10
25
  import { runAndForwardErrors } from "@dxos/effect";
11
- import { Operation } from "@dxos/operation";
12
26
  var runAction = async (invoker, capabilityManager, action, params = {}) => runAndForwardErrors(action.data(params).pipe(Effect.provideService(Operation.Service, invoker), Effect.provideService(Capability.Service, capabilityManager), action._actionContext ? Effect.provide(action._actionContext) : Function.identity));
13
27
 
14
- // src/GraphPlugin.ts
15
- import { ActivationEvents, Capability as Capability2, Plugin } from "@dxos/app-framework";
16
- import { AppActivationEvents } from "@dxos/app-toolkit";
17
- import { meta } from "#meta";
18
- var Graph = Capability2.lazy("Graph", () => import("./graph-6OCP5GD6.mjs"));
19
- var GraphPlugin = Plugin.define(meta).pipe(Plugin.addModule({
20
- activatesOn: ActivationEvents.Startup,
21
- activatesBefore: [
22
- AppActivationEvents.SetupAppGraph,
23
- AppActivationEvents.SetupMetadata
24
- ],
25
- activatesAfter: [
26
- AppActivationEvents.AppGraphReady
27
- ],
28
- activate: Graph
29
- }), Plugin.make);
30
-
31
28
  // src/hooks/useActionRunner.ts
32
29
  import { useCallback } from "react";
33
30
  import { useOperationInvoker, usePluginManager } from "@dxos/app-framework/ui";
@@ -69,19 +66,11 @@ var useEdges = (graph, id) => {
69
66
  return useAtomValue(atom);
70
67
  };
71
68
 
72
- // src/meta.ts
73
- import { trim } from "@dxos/util";
74
- var meta2 = {
75
- id: "org.dxos.plugin.graph",
76
- name: "Graph",
77
- description: trim`
78
- Graph database layer providing relationship modeling and queries for workspace objects.
79
- Build knowledge graphs and explore complex data relationships.
80
- `
81
- };
69
+ // src/index.ts
70
+ var GraphPlugin = Plugin.lazy(meta, () => import("./GraphPlugin-4Y4JMNE2.mjs"));
82
71
  export {
83
72
  GraphPlugin,
84
- meta2 as meta,
73
+ meta,
85
74
  runAction,
86
75
  useActionRunner,
87
76
  useActions,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/index.ts", "../../../src/action.ts", "../../../src/GraphPlugin.ts", "../../../src/hooks/useActionRunner.ts", "../../../src/hooks/useNode.ts", "../../../src/meta.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nexport * from '@dxos/app-graph';\n\nexport * from './action';\nexport * from './GraphPlugin';\nexport * from './hooks';\nexport * from './meta';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\n\nimport { Capability, type CapabilityManager } from '@dxos/app-framework';\nimport { type Node } from '@dxos/app-graph';\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { Operation, type OperationInvoker } from '@dxos/operation';\n\n/**\n * Run an action with required layers: Operation.Service, Capability.Service, and captured context.\n * @param invoker The operation invoker to use for Operation.Service.\n * @param capabilityManager The capability manager for Capability.Service.\n * @param action The action to execute.\n * @param params Parameters to pass to the action.\n */\nexport const runAction = async (\n invoker: OperationInvoker.OperationInvoker,\n capabilityManager: CapabilityManager.CapabilityManager,\n action: Node.Action,\n params: Node.InvokeProps = {},\n): Promise<void> =>\n runAndForwardErrors(\n action\n .data(params)\n .pipe(\n Effect.provideService(Operation.Service, invoker),\n Effect.provideService(Capability.Service, capabilityManager),\n action._actionContext ? Effect.provide(action._actionContext) : Function.identity,\n ),\n );\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvents, Capability, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents } from '@dxos/app-toolkit';\n\nimport { meta } from '#meta';\n\nconst Graph = Capability.lazy('Graph', () => import('./graph'));\n\n/**\n * Manages the state of the graph for the application.\n * Enables other plugins to register node builders to add nodes to the graph.\n * This includes actions and annotation each other's nodes.\n */\nexport const GraphPlugin = Plugin.define(meta).pipe(\n Plugin.addModule({\n activatesOn: ActivationEvents.Startup,\n activatesBefore: [AppActivationEvents.SetupAppGraph, AppActivationEvents.SetupMetadata],\n activatesAfter: [AppActivationEvents.AppGraphReady],\n activate: Graph,\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useCallback } from 'react';\n\nimport { useOperationInvoker, usePluginManager } from '@dxos/app-framework/ui';\nimport { type Node } from '@dxos/app-graph';\n\nimport { runAction } from '../action';\n\n/**\n * Hook that returns a function to run action Effects.\n * Provides Operation.Service, PluginContextService, and captured plugin context.\n */\nexport const useActionRunner = () => {\n const invoker = useOperationInvoker();\n const pluginManager = usePluginManager();\n\n return useCallback(\n (action: Node.Action, params: Node.InvokeProps = {}) =>\n runAction(invoker, pluginManager.capabilities, action, params),\n [invoker, pluginManager.capabilities],\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useAtomValue } from '@effect-atom/atom-react';\nimport * as Option from 'effect/Option';\nimport { useMemo } from 'react';\n\nimport { type Graph, type Node } from '@dxos/app-graph';\n\n/**\n * React hook to get a node from the graph.\n *\n * @param graph Graph to find the node in.\n * @param id Id of the node to find.\n * @param timeout Optional timeout in milliseconds to wait for the node to be found.\n * @returns Node if found, undefined otherwise.\n */\n// TODO(wittjosiah): Factor out to @dxos/app-graph/react.\nexport const useNode = <T = any>(graph: Graph.ReadableGraph, id?: string): Node.Node<T> | undefined => {\n const atom = useMemo(() => graph.node(id ?? ''), [graph, id]);\n return Option.getOrElse(useAtomValue(atom), () => undefined);\n};\n\nexport const useConnections = (\n graph: Graph.ReadableGraph,\n id: string | undefined,\n relation: Node.RelationInput,\n): Node.Node[] => {\n return useAtomValue(graph.connections(id ?? '', relation));\n};\n\n/**\n * React hook to get actions available for a node.\n *\n * @param graph Graph containing the node.\n * @param id Id of the node.\n * @returns Actions available for the node.\n */\nexport const useActions = (graph: Graph.ReadableGraph, id?: string): Node.Node[] => {\n const atom = useMemo(() => graph.actions(id ?? ''), [graph, id]);\n return useAtomValue(atom);\n};\n\n/**\n * Subscribe to just the edge topology (inbound/outbound IDs) of a node without subscribing to node content.\n *\n * @param graph Graph containing the node.\n * @param id Id of the node.\n * @returns Edge topology for the node.\n */\nexport const useEdges = (graph: Graph.ReadableGraph, id?: string): Graph.Edges => {\n const atom = useMemo(() => graph.edges(id ?? ''), [graph, id]);\n return useAtomValue(atom);\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.graph',\n name: 'Graph',\n description: trim`\n Graph database layer providing relationship modeling and queries for workspace objects.\n Build knowledge graphs and explore complex data relationships.\n `,\n};\n"],
5
- "mappings": ";;;AAIA,cAAc;;;ACAd,YAAYA,YAAY;AACxB,YAAYC,cAAc;AAE1B,SAASC,kBAA0C;AAEnD,SAASC,2BAA2B;AACpC,SAASC,iBAAwC;AAS1C,IAAMC,YAAY,OACvBC,SACAC,mBACAC,QACAC,SAA2B,CAAC,MAE5BC,oBACEF,OACGG,KAAKF,MAAAA,EACLG,KACQC,sBAAeC,UAAUC,SAAST,OAAAA,GAClCO,sBAAeG,WAAWD,SAASR,iBAAAA,GAC1CC,OAAOS,iBAAwBC,eAAQV,OAAOS,cAAc,IAAaE,iBAAQ,CAAA;;;AC3BzF,SAASC,kBAAkBC,cAAAA,aAAYC,cAAc;AACrD,SAASC,2BAA2B;AAEpC,SAASC,YAAY;AAErB,IAAMC,QAAQC,YAAWC,KAAK,SAAS,MAAM,OAAO,sBAAA,CAAA;AAO7C,IAAMC,cAAcC,OAAOC,OAAOC,IAAAA,EAAMC,KAC7CH,OAAOI,UAAU;EACfC,aAAaC,iBAAiBC;EAC9BC,iBAAiB;IAACC,oBAAoBC;IAAeD,oBAAoBE;;EACzEC,gBAAgB;IAACH,oBAAoBI;;EACrCC,UAAUlB;AACZ,CAAA,GACAI,OAAOe,IAAI;;;ACnBb,SAASC,mBAAmB;AAE5B,SAASC,qBAAqBC,wBAAwB;AAS/C,IAAMC,kBAAkB,MAAA;AAC7B,QAAMC,UAAUC,oBAAAA;AAChB,QAAMC,gBAAgBC,iBAAAA;AAEtB,SAAOC,YACL,CAACC,QAAqBC,SAA2B,CAAC,MAChDC,UAAUP,SAASE,cAAcM,cAAcH,QAAQC,MAAAA,GACzD;IAACN;IAASE,cAAcM;GAAa;AAEzC;;;ACpBA,SAASC,oBAAoB;AAC7B,YAAYC,YAAY;AACxB,SAASC,eAAe;AAajB,IAAMC,UAAU,CAAUC,OAA4BC,OAAAA;AAC3D,QAAMC,OAAOC,QAAQ,MAAMH,MAAMI,KAAKH,MAAM,EAAA,GAAK;IAACD;IAAOC;GAAG;AAC5D,SAAcI,iBAAUC,aAAaJ,IAAAA,GAAO,MAAMK,MAAAA;AACpD;AAEO,IAAMC,iBAAiB,CAC5BR,OACAC,IACAQ,aAAAA;AAEA,SAAOH,aAAaN,MAAMU,YAAYT,MAAM,IAAIQ,QAAAA,CAAAA;AAClD;AASO,IAAME,aAAa,CAACX,OAA4BC,OAAAA;AACrD,QAAMC,OAAOC,QAAQ,MAAMH,MAAMY,QAAQX,MAAM,EAAA,GAAK;IAACD;IAAOC;GAAG;AAC/D,SAAOK,aAAaJ,IAAAA;AACtB;AASO,IAAMW,WAAW,CAACb,OAA4BC,OAAAA;AACnD,QAAMC,OAAOC,QAAQ,MAAMH,MAAMc,MAAMb,MAAM,EAAA,GAAK;IAACD;IAAOC;GAAG;AAC7D,SAAOK,aAAaJ,IAAAA;AACtB;;;ACjDA,SAASa,YAAY;AAEd,IAAMC,QAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;AAIf;",
6
- "names": ["Effect", "Function", "Capability", "runAndForwardErrors", "Operation", "runAction", "invoker", "capabilityManager", "action", "params", "runAndForwardErrors", "data", "pipe", "provideService", "Operation", "Service", "Capability", "_actionContext", "provide", "identity", "ActivationEvents", "Capability", "Plugin", "AppActivationEvents", "meta", "Graph", "Capability", "lazy", "GraphPlugin", "Plugin", "define", "meta", "pipe", "addModule", "activatesOn", "ActivationEvents", "Startup", "activatesBefore", "AppActivationEvents", "SetupAppGraph", "SetupMetadata", "activatesAfter", "AppGraphReady", "activate", "make", "useCallback", "useOperationInvoker", "usePluginManager", "useActionRunner", "invoker", "useOperationInvoker", "pluginManager", "usePluginManager", "useCallback", "action", "params", "runAction", "capabilities", "useAtomValue", "Option", "useMemo", "useNode", "graph", "id", "atom", "useMemo", "node", "getOrElse", "useAtomValue", "undefined", "useConnections", "relation", "connections", "useActions", "actions", "useEdges", "edges", "trim", "meta", "id", "name", "description", "trim"]
3
+ "sources": ["../../../src/index.ts", "../../../src/meta.ts", "../../../src/action.ts", "../../../src/hooks/useActionRunner.ts", "../../../src/hooks/useNode.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport const GraphPlugin = Plugin.lazy(meta, () => import('./GraphPlugin'));\n\nexport * from './meta';\n\nexport * from '@dxos/app-graph';\n\nexport * from './action';\n// TODO(wittjosiah): Hooks should not be exported from the plugin package at all.\n// Either refactor callers to not need them or factor them out to a shared package.\nexport * from './hooks';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.graph',\n name: 'Graph',\n description: trim`\n Graph database layer providing relationship modeling and queries for workspace objects.\n Build knowledge graphs and explore complex data relationships.\n `,\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\n\nimport { Capability, type CapabilityManager } from '@dxos/app-framework';\nimport { type Node } from '@dxos/app-graph';\nimport { Operation } from '@dxos/compute';\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { OperationInvoker } from '@dxos/operation';\n\n/**\n * Run an action with required layers: Operation.Service, Capability.Service, and captured context.\n * @param invoker The operation invoker to use for Operation.Service.\n * @param capabilityManager The capability manager for Capability.Service.\n * @param action The action to execute.\n * @param params Parameters to pass to the action.\n */\nexport const runAction = async (\n invoker: OperationInvoker.OperationInvoker,\n capabilityManager: CapabilityManager.CapabilityManager,\n action: Node.Action,\n params: Node.InvokeProps = {},\n): Promise<void> =>\n runAndForwardErrors(\n action\n .data(params)\n .pipe(\n Effect.provideService(Operation.Service, invoker),\n Effect.provideService(Capability.Service, capabilityManager),\n action._actionContext ? Effect.provide(action._actionContext) : Function.identity,\n ),\n );\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useCallback } from 'react';\n\nimport { useOperationInvoker, usePluginManager } from '@dxos/app-framework/ui';\nimport { type Node } from '@dxos/app-graph';\n\nimport { runAction } from '../action';\n\n/**\n * Hook that returns a function to run action Effects.\n * Provides Operation.Service, PluginContextService, and captured plugin context.\n */\nexport const useActionRunner = () => {\n const invoker = useOperationInvoker();\n const pluginManager = usePluginManager();\n\n return useCallback(\n (action: Node.Action, params: Node.InvokeProps = {}) =>\n runAction(invoker, pluginManager.capabilities, action, params),\n [invoker, pluginManager.capabilities],\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useAtomValue } from '@effect-atom/atom-react';\nimport * as Option from 'effect/Option';\nimport { useMemo } from 'react';\n\nimport { type Graph, type Node } from '@dxos/app-graph';\n\n/**\n * React hook to get a node from the graph.\n *\n * @param graph Graph to find the node in.\n * @param id Id of the node to find.\n * @param timeout Optional timeout in milliseconds to wait for the node to be found.\n * @returns Node if found, undefined otherwise.\n */\n// TODO(wittjosiah): Factor out to @dxos/app-graph/react.\nexport const useNode = <T = any>(graph: Graph.ReadableGraph, id?: string): Node.Node<T> | undefined => {\n const atom = useMemo(() => graph.node(id ?? ''), [graph, id]);\n return Option.getOrElse(useAtomValue(atom), () => undefined);\n};\n\nexport const useConnections = (\n graph: Graph.ReadableGraph,\n id: string | undefined,\n relation: Node.RelationInput,\n): Node.Node[] => {\n return useAtomValue(graph.connections(id ?? '', relation));\n};\n\n/**\n * React hook to get actions available for a node.\n *\n * @param graph Graph containing the node.\n * @param id Id of the node.\n * @returns Actions available for the node.\n */\nexport const useActions = (graph: Graph.ReadableGraph, id?: string): Node.Node[] => {\n const atom = useMemo(() => graph.actions(id ?? ''), [graph, id]);\n return useAtomValue(atom);\n};\n\n/**\n * Subscribe to just the edge topology (inbound/outbound IDs) of a node without subscribing to node content.\n *\n * @param graph Graph containing the node.\n * @param id Id of the node.\n * @returns Edge topology for the node.\n */\nexport const useEdges = (graph: Graph.ReadableGraph, id?: string): Graph.Edges => {\n const atom = useMemo(() => graph.edges(id ?? ''), [graph, id]);\n return useAtomValue(atom);\n};\n"],
5
+ "mappings": ";;;AAIA,SAASA,cAAc;;;ACCvB,SAASC,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;AAIf;;;ADFA,cAAc;;;AERd,YAAYK,YAAY;AACxB,YAAYC,cAAc;AAE1B,SAASC,kBAA0C;AAEnD,SAASC,iBAAiB;AAC1B,SAASC,2BAA2B;AAU7B,IAAMC,YAAY,OACvBC,SACAC,mBACAC,QACAC,SAA2B,CAAC,MAE5BL,oBACEI,OACGE,KAAKD,MAAAA,EACLE,KACQC,sBAAeT,UAAUU,SAASP,OAAAA,GAClCM,sBAAeV,WAAWW,SAASN,iBAAAA,GAC1CC,OAAOM,iBAAwBC,eAAQP,OAAOM,cAAc,IAAaE,iBAAQ,CAAA;;;AC5BzF,SAASC,mBAAmB;AAE5B,SAASC,qBAAqBC,wBAAwB;AAS/C,IAAMC,kBAAkB,MAAA;AAC7B,QAAMC,UAAUC,oBAAAA;AAChB,QAAMC,gBAAgBC,iBAAAA;AAEtB,SAAOC,YACL,CAACC,QAAqBC,SAA2B,CAAC,MAChDC,UAAUP,SAASE,cAAcM,cAAcH,QAAQC,MAAAA,GACzD;IAACN;IAASE,cAAcM;GAAa;AAEzC;;;ACpBA,SAASC,oBAAoB;AAC7B,YAAYC,YAAY;AACxB,SAASC,eAAe;AAajB,IAAMC,UAAU,CAAUC,OAA4BC,OAAAA;AAC3D,QAAMC,OAAOJ,QAAQ,MAAME,MAAMG,KAAKF,MAAM,EAAA,GAAK;IAACD;IAAOC;GAAG;AAC5D,SAAcG,iBAAUR,aAAaM,IAAAA,GAAO,MAAMG,MAAAA;AACpD;AAEO,IAAMC,iBAAiB,CAC5BN,OACAC,IACAM,aAAAA;AAEA,SAAOX,aAAaI,MAAMQ,YAAYP,MAAM,IAAIM,QAAAA,CAAAA;AAClD;AASO,IAAME,aAAa,CAACT,OAA4BC,OAAAA;AACrD,QAAMC,OAAOJ,QAAQ,MAAME,MAAMU,QAAQT,MAAM,EAAA,GAAK;IAACD;IAAOC;GAAG;AAC/D,SAAOL,aAAaM,IAAAA;AACtB;AASO,IAAMS,WAAW,CAACX,OAA4BC,OAAAA;AACnD,QAAMC,OAAOJ,QAAQ,MAAME,MAAMY,MAAMX,MAAM,EAAA,GAAK;IAACD;IAAOC;GAAG;AAC7D,SAAOL,aAAaM,IAAAA;AACtB;;;AJ9CO,IAAMW,cAAcC,OAAOC,KAAKC,MAAM,MAAM,OAAO,4BAAA,CAAA;",
6
+ "names": ["Plugin", "trim", "meta", "id", "name", "description", "Effect", "Function", "Capability", "Operation", "runAndForwardErrors", "runAction", "invoker", "capabilityManager", "action", "params", "data", "pipe", "provideService", "Service", "_actionContext", "provide", "identity", "useCallback", "useOperationInvoker", "usePluginManager", "useActionRunner", "invoker", "useOperationInvoker", "pluginManager", "usePluginManager", "useCallback", "action", "params", "runAction", "capabilities", "useAtomValue", "Option", "useMemo", "useNode", "graph", "id", "atom", "node", "getOrElse", "undefined", "useConnections", "relation", "connections", "useActions", "actions", "useEdges", "edges", "GraphPlugin", "Plugin", "lazy", "meta"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/action.ts":{"bytes":3719,"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/effect","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"format":"esm"},"src/graph.ts":{"bytes":8384,"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":3055,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"src/graph.ts","kind":"dynamic-import","original":"./graph"}],"format":"esm"},"src/hooks/useActionRunner.ts":{"bytes":2530,"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":5406,"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":568,"imports":[{"path":"src/hooks/useActionRunner.ts","kind":"import-statement","original":"./useActionRunner"},{"path":"src/hooks/useNode.ts","kind":"import-statement","original":"./useNode"}],"format":"esm"},"src/meta.ts":{"bytes":1365,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":815,"imports":[{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"src/action.ts","kind":"import-statement","original":"./action"},{"path":"src/GraphPlugin.ts","kind":"import-statement","original":"./GraphPlugin"},{"path":"src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8166},"dist/lib/node-esm/index.mjs":{"imports":[{"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/effect","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"dist/lib/node-esm/graph-6OCP5GD6.mjs","kind":"dynamic-import"},{"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":"@dxos/util","kind":"import-statement","external":true}],"exports":["GraphPlugin","meta","runAction","useActionRunner","useActions","useConnections","useEdges","useNode"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":33},"src/action.ts":{"bytesInOutput":551},"src/GraphPlugin.ts":{"bytesInOutput":560},"src/hooks/useActionRunner.ts":{"bytesInOutput":397},"src/hooks/index.ts":{"bytesInOutput":0},"src/hooks/useNode.ts":{"bytesInOutput":703},"src/meta.ts":{"bytesInOutput":284}},"bytes":2917},"dist/lib/node-esm/graph-6OCP5GD6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4405},"dist/lib/node-esm/graph-6OCP5GD6.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}}}
1
+ {"inputs":{"src/meta.ts":{"bytes":1286,"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":3101,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","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"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7031},"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-4Y4JMNE2.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":283},"src/action.ts":{"bytesInOutput":549},"src/hooks/useActionRunner.ts":{"bytesInOutput":397},"src/hooks/index.ts":{"bytesInOutput":0},"src/hooks/useNode.ts":{"bytesInOutput":703}},"bytes":2483},"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-4Y4JMNE2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1586},"dist/lib/node-esm/GraphPlugin-4Y4JMNE2.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","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","default"],"entryPoint":"src/GraphPlugin.ts","inputs":{"src/GraphPlugin.ts":{"bytesInOutput":595}},"bytes":820}}}
@@ -5,4 +5,5 @@ import { Plugin } from '@dxos/app-framework';
5
5
  * This includes actions and annotation each other's nodes.
6
6
  */
7
7
  export declare const GraphPlugin: Plugin.PluginFactory<void>;
8
+ export default GraphPlugin;
8
9
  //# sourceMappingURL=GraphPlugin.d.ts.map
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=GraphPlugin.test.d.ts.map
@@ -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 { type OperationInvoker } from '@dxos/operation';
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;AAE5C,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnE;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,GACpB,SAAS,gBAAgB,CAAC,gBAAgB,EAC1C,mBAAmB,iBAAiB,CAAC,iBAAiB,EACtD,QAAQ,IAAI,CAAC,MAAM,EACnB,SAAQ,IAAI,CAAC,WAAgB,KAC5B,OAAO,CAAC,IAAI,CASZ,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 +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;;;;;AAQ5D,wBA0CE"}
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 +1 @@
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,EAAE,OAAO,KAAK,CAAC,aAAa,EAAE,KAAK,MAAM,KAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,SAGzF,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,OAAO,KAAK,CAAC,aAAa,EAC1B,IAAI,MAAM,GAAG,SAAS,EACtB,UAAU,IAAI,CAAC,aAAa,KAC3B,IAAI,CAAC,IAAI,EAEX,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,KAAK,CAAC,aAAa,EAAE,KAAK,MAAM,KAAG,IAAI,CAAC,IAAI,EAG7E,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,KAAK,CAAC,aAAa,EAAE,KAAK,MAAM,KAAG,KAAK,CAAC,KAGxE,CAAC"}
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,cAAc,iBAAiB,CAAC;AAEhC,cAAc,UAAU,CAAC;AACzB,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,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"}