@ruckc/truss-graph 1.27.0 → 1.29.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.
Files changed (2) hide show
  1. package/README.md +29 -0
  2. package/package.json +3 -2
package/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # @ruckc/truss-graph
2
+
3
+ A zero-dependency node/edge graph editor and read-only explorer for [Truss UI](https://truss.ruck.io): custom node components, five edge routers, layered, force and radial layouts, minimap, selection and keyboard control.
4
+
5
+ Docs: <https://truss.ruck.io/docs/packages>
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install @ruckc/truss-graph @ruckc/truss-ui
11
+ ```
12
+
13
+ `svelte` (^5.20) and `@ruckc/truss-ui` are peer dependencies.
14
+
15
+ ## Usage
16
+
17
+ ```svelte
18
+ <script lang="ts">
19
+ import { Graph } from '@ruckc/truss-graph';
20
+ let nodes = $state([{ id: 'a', x: 0, y: 0, label: 'A' }, { id: 'b', x: 200, y: 80, label: 'B' }]);
21
+ let edges = $state([{ id: 'e1', from: 'a', to: 'b' }]);
22
+ </script>
23
+
24
+ <Graph bind:nodes bind:edges height={420} />
25
+ ```
26
+
27
+ ## License
28
+
29
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruckc/truss-graph",
3
- "version": "1.27.0",
3
+ "version": "1.29.0",
4
4
  "description": "Zero-dependency node/edge graph editor for Truss UI",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -8,7 +8,8 @@
8
8
  "package": "svelte-package -i src/lib -o dist"
9
9
  },
10
10
  "files": [
11
- "dist"
11
+ "dist",
12
+ "README.md"
12
13
  ],
13
14
  "svelte": "./dist/index.js",
14
15
  "types": "./dist/index.d.ts",