@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.
- package/dist/lib/browser/GraphPlugin-M2U6IMU2.mjs +22 -0
- package/dist/lib/browser/GraphPlugin-M2U6IMU2.mjs.map +7 -0
- package/dist/lib/browser/{graph-DSSWPFSF.mjs → graph-RCKCHDM6.mjs} +1 -1
- package/dist/lib/browser/{graph-DSSWPFSF.mjs.map → graph-RCKCHDM6.mjs.map} +2 -2
- package/dist/lib/browser/index.mjs +18 -29
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/GraphPlugin-4Y4JMNE2.mjs +24 -0
- package/dist/lib/node-esm/GraphPlugin-4Y4JMNE2.mjs.map +7 -0
- package/dist/lib/node-esm/{graph-6OCP5GD6.mjs → graph-P7F6HXZB.mjs} +1 -1
- package/dist/lib/node-esm/{graph-6OCP5GD6.mjs.map → graph-P7F6HXZB.mjs.map} +2 -2
- package/dist/lib/node-esm/index.mjs +18 -29
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/GraphPlugin.d.ts +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.map +1 -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/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -15
- package/src/GraphPlugin.test.ts +26 -0
- package/src/GraphPlugin.ts +4 -2
- package/src/action.ts +2 -1
- package/src/index.ts +10 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-graph",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.abd8ff62ef",
|
|
4
4
|
"description": "DXOS Surface plugin for constructing knowledge graphs",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
15
|
"imports": {
|
|
16
|
+
"#plugin": "./src/GraphPlugin.ts",
|
|
16
17
|
"#hooks": "./src/hooks/index.ts",
|
|
17
18
|
"#meta": "./src/meta.ts"
|
|
18
19
|
},
|
|
@@ -25,22 +26,20 @@
|
|
|
25
26
|
}
|
|
26
27
|
},
|
|
27
28
|
"types": "dist/types/src/index.d.ts",
|
|
28
|
-
"typesVersions": {
|
|
29
|
-
"*": {}
|
|
30
|
-
},
|
|
31
29
|
"files": [
|
|
32
30
|
"dist",
|
|
33
31
|
"src"
|
|
34
32
|
],
|
|
35
33
|
"dependencies": {
|
|
36
|
-
"@dxos/app-
|
|
37
|
-
"@dxos/app-
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/async": "0.8.4-main.
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/effect": "0.8.4-main.
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
34
|
+
"@dxos/app-framework": "0.8.4-main.abd8ff62ef",
|
|
35
|
+
"@dxos/app-graph": "0.8.4-main.abd8ff62ef",
|
|
36
|
+
"@dxos/debug": "0.8.4-main.abd8ff62ef",
|
|
37
|
+
"@dxos/async": "0.8.4-main.abd8ff62ef",
|
|
38
|
+
"@dxos/app-toolkit": "0.8.4-main.abd8ff62ef",
|
|
39
|
+
"@dxos/effect": "0.8.4-main.abd8ff62ef",
|
|
40
|
+
"@dxos/compute": "0.8.4-main.abd8ff62ef",
|
|
41
|
+
"@dxos/operation": "0.8.4-main.abd8ff62ef",
|
|
42
|
+
"@dxos/util": "0.8.4-main.abd8ff62ef"
|
|
44
43
|
},
|
|
45
44
|
"devDependencies": {
|
|
46
45
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -50,9 +49,9 @@
|
|
|
50
49
|
"effect": "3.20.0",
|
|
51
50
|
"react": "~19.2.3",
|
|
52
51
|
"react-dom": "~19.2.3",
|
|
53
|
-
"vite": "^
|
|
54
|
-
"@dxos/react-client": "0.8.4-main.
|
|
55
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
52
|
+
"vite": "^8.0.10",
|
|
53
|
+
"@dxos/react-client": "0.8.4-main.abd8ff62ef",
|
|
54
|
+
"@dxos/storybook-utils": "0.8.4-main.abd8ff62ef"
|
|
56
55
|
},
|
|
57
56
|
"peerDependencies": {
|
|
58
57
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { OperationPlugin, RuntimePlugin } from '@dxos/app-framework';
|
|
8
|
+
import { createTestApp } from '@dxos/app-framework/testing';
|
|
9
|
+
|
|
10
|
+
import { GraphPlugin } from '#plugin';
|
|
11
|
+
|
|
12
|
+
import { meta } from './meta';
|
|
13
|
+
|
|
14
|
+
const moduleId = (name: string) => `${meta.id}.module.${name}`;
|
|
15
|
+
|
|
16
|
+
describe('GraphPlugin', () => {
|
|
17
|
+
test('modules activate on the expected events', async ({ expect }) => {
|
|
18
|
+
// Use createTestApp directly — createComposerTestApp already includes GraphPlugin.
|
|
19
|
+
await using harness = await createTestApp({
|
|
20
|
+
plugins: [GraphPlugin(), OperationPlugin(), RuntimePlugin()],
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// Graph activates on Startup; fires SetupAppGraph + SetupMetadata before, AppGraphReady after.
|
|
24
|
+
expect(harness.manager.getActive()).toContain(moduleId('Graph'));
|
|
25
|
+
});
|
|
26
|
+
});
|
package/src/GraphPlugin.ts
CHANGED
|
@@ -17,9 +17,11 @@ const Graph = Capability.lazy('Graph', () => import('./graph'));
|
|
|
17
17
|
export const GraphPlugin = Plugin.define(meta).pipe(
|
|
18
18
|
Plugin.addModule({
|
|
19
19
|
activatesOn: ActivationEvents.Startup,
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
firesBeforeActivation: [AppActivationEvents.SetupAppGraph, AppActivationEvents.SetupMetadata],
|
|
21
|
+
firesAfterActivation: [AppActivationEvents.AppGraphReady],
|
|
22
22
|
activate: Graph,
|
|
23
23
|
}),
|
|
24
24
|
Plugin.make,
|
|
25
25
|
);
|
|
26
|
+
|
|
27
|
+
export default GraphPlugin;
|
package/src/action.ts
CHANGED
|
@@ -7,8 +7,9 @@ import * as Function from 'effect/Function';
|
|
|
7
7
|
|
|
8
8
|
import { Capability, type CapabilityManager } from '@dxos/app-framework';
|
|
9
9
|
import { type Node } from '@dxos/app-graph';
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
10
11
|
import { runAndForwardErrors } from '@dxos/effect';
|
|
11
|
-
import {
|
|
12
|
+
import { OperationInvoker } from '@dxos/operation';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Run an action with required layers: Operation.Service, Capability.Service, and captured context.
|
package/src/index.ts
CHANGED
|
@@ -2,9 +2,17 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
import { meta } from './meta';
|
|
8
|
+
|
|
9
|
+
export const GraphPlugin = Plugin.lazy(meta, () => import('./GraphPlugin'));
|
|
10
|
+
|
|
11
|
+
export * from './meta';
|
|
12
|
+
|
|
5
13
|
export * from '@dxos/app-graph';
|
|
6
14
|
|
|
7
15
|
export * from './action';
|
|
8
|
-
|
|
16
|
+
// TODO(wittjosiah): Hooks should not be exported from the plugin package at all.
|
|
17
|
+
// Either refactor callers to not need them or factor them out to a shared package.
|
|
9
18
|
export * from './hooks';
|
|
10
|
-
export * from './meta';
|