arqlet 0.1.0 → 0.2.0
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/README.md +19 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -28,6 +28,25 @@ example. `renderSvg(svgElement, scene)` draws a scene; `toReactFlow(scene)` maps
|
|
|
28
28
|
React Flow nodes and edges. Types for snapshots and scenes come from
|
|
29
29
|
`@arqlet/contracts`.
|
|
30
30
|
|
|
31
|
+
### Cluster overview
|
|
32
|
+
|
|
33
|
+
For a whole graph (tens of thousands of nodes), the `overview` operation lays it out as nested discs, and the WebGL
|
|
34
|
+
renderer draws it; a cluster can then be shown structured, as its layered layout in place:
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
import {loadEngine, overviewModel, resolvedEdgeIds, createOverviewRenderer, bindOverviewNavigation, viewOf} from 'arqlet';
|
|
38
|
+
|
|
39
|
+
const run = await loadEngine();
|
|
40
|
+
const {overview} = run({op: 'overview', graph}); // nodes with parentId form the clusters
|
|
41
|
+
const model = overviewModel(overview, resolvedEdgeIds(graph));
|
|
42
|
+
const renderer = createOverviewRenderer(canvas, model, {labels: labelCanvas});
|
|
43
|
+
renderer.view = viewOf(model, -1, canvas.clientWidth, canvas.clientHeight);
|
|
44
|
+
renderer.resize();
|
|
45
|
+
bindOverviewNavigation(canvas, renderer, {onClick: i => console.log(overview.ids[i])});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
See `apps/playground/overview.js` in the repository for collapsing, structuring in place and animated changes.
|
|
49
|
+
|
|
31
50
|
Arqlet reads graphs in the JSON form [ELK](https://eclipse.dev/elk/) uses. It is not a
|
|
32
51
|
1:1 ELK, contains no ELK code and is not affiliated with the Eclipse Foundation.
|
|
33
52
|
|
package/index.d.ts
CHANGED
|
@@ -7,4 +7,6 @@ export * from '@arqlet/viewer/scene.js';
|
|
|
7
7
|
export * from '@arqlet/viewer/react-flow.js';
|
|
8
8
|
export * from '@arqlet/viewer/navigation.js';
|
|
9
9
|
export * from '@arqlet/viewer/routes.js';
|
|
10
|
+
export * from '@arqlet/viewer/overview.js';
|
|
11
|
+
export * from '@arqlet/viewer/overview-gl.js';
|
|
10
12
|
export type * from '@arqlet/contracts';
|
package/index.js
CHANGED
|
@@ -8,3 +8,5 @@ export {checkScene, routePath} from '@arqlet/viewer/scene.js';
|
|
|
8
8
|
export {toReactFlow} from '@arqlet/viewer/react-flow.js';
|
|
9
9
|
export {bindNavigation, zoomAnchor} from '@arqlet/viewer/navigation.js';
|
|
10
10
|
export {bendsOf, pathLength, crosses, routeDetails, drawingOf, routeConflictsOf} from '@arqlet/viewer/routes.js';
|
|
11
|
+
export {overviewModel, overviewBuffers, pickNode, pickExpanded, placeScene, frameOf, clipToFrame, ownersOf, labelsOf, viewOf, subtreeOf, structuredExcerpt, resolvedEdgeIds, BORDER_PREFIX, representationsOf, REPRESENTATIONS, flowDirectionOf, displayName, COMMUNITY_PREFIX, clusterColour} from '@arqlet/viewer/overview.js';
|
|
12
|
+
export {createOverviewRenderer, bindOverviewNavigation} from '@arqlet/viewer/overview-gl.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arqlet",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Incremental graph layout for nested graphs with ports, in the browser and Node via WebAssembly: one entry point for the Arqlet engine, its ELK-style call and the SVG and React Flow viewers. Prototype; the API is provisional.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"graph",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@arqlet/contracts": "^0.
|
|
46
|
-
"@arqlet/engine-client": "^0.
|
|
47
|
-
"@arqlet/viewer": "^0.
|
|
45
|
+
"@arqlet/contracts": "^0.2.0",
|
|
46
|
+
"@arqlet/engine-client": "^0.2.0",
|
|
47
|
+
"@arqlet/viewer": "^0.2.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"typescript": "7.0.2"
|