@swarmvaultai/viewer 0.1.1
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/LICENSE +21 -0
- package/README.md +33 -0
- package/dist/assets/index-9TSXS8Kg.css +1 -0
- package/dist/assets/index-DJuffpAB.js +329 -0
- package/dist/index.html +13 -0
- package/dist/lib.d.ts +21 -0
- package/dist/lib.js +11 -0
- package/package.json +61 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SwarmVault
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @swarmvaultai/viewer
|
|
2
|
+
|
|
3
|
+
`@swarmvaultai/viewer` is the graph UI package for SwarmVault.
|
|
4
|
+
|
|
5
|
+
It is the frontend used by `swarmvault graph serve` to visualize `state/graph.json` as an interactive graph of sources, concepts, and entities.
|
|
6
|
+
|
|
7
|
+
## What It Does
|
|
8
|
+
|
|
9
|
+
The viewer loads graph data from `/api/graph` and renders:
|
|
10
|
+
|
|
11
|
+
- source nodes
|
|
12
|
+
- concept nodes
|
|
13
|
+
- entity nodes
|
|
14
|
+
- extracted, inferred, and conflicted edges
|
|
15
|
+
|
|
16
|
+
Its primary use is as part of the SwarmVault runtime, but the package also exports lightweight graph types and a fetch helper for custom integrations.
|
|
17
|
+
|
|
18
|
+
## Package Use
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import { fetchGraphArtifact } from "@swarmvaultai/viewer";
|
|
22
|
+
|
|
23
|
+
const graph = await fetchGraphArtifact("/api/graph");
|
|
24
|
+
console.log(graph.nodes.length);
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Development
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pnpm build
|
|
31
|
+
pnpm lint
|
|
32
|
+
pnpm test
|
|
33
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{color-scheme:dark;font-family:Avenir Next,Segoe UI,sans-serif;background:radial-gradient(circle at top left,rgba(14,165,233,.18),transparent 30%),radial-gradient(circle at right,rgba(245,158,11,.14),transparent 28%),linear-gradient(180deg,#020617,#0f172a);color:#e2e8f0}*{box-sizing:border-box}body{margin:0;min-height:100vh}#root{min-height:100vh}.app-shell{min-height:100vh;padding:24px;display:grid;gap:20px}.app-header,.stats,.workspace,.panel,.filter,article{border:1px solid rgba(148,163,184,.16);background:#0f172ab8;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-radius:22px}.app-header{padding:24px;display:flex;justify-content:space-between;gap:24px;align-items:start}.app-header h1{margin:0 0 8px;font-size:clamp(2rem,4vw,3.4rem);line-height:.95;max-width:12ch}.eyebrow{margin:0 0 12px;text-transform:uppercase;letter-spacing:.14em;color:#7dd3fc;font-size:.78rem}.lede{margin:0;max-width:56ch;color:#cbd5e1}.filter{display:grid;gap:10px;padding:16px;min-width:180px}.filter select{background:#020617;color:#f8fafc;border:1px solid rgba(148,163,184,.28);border-radius:12px;padding:10px 12px}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:14px}.stats article{padding:16px}.stats span,.panel-label{display:block;color:#94a3b8;font-size:.82rem;text-transform:uppercase;letter-spacing:.08em;margin-bottom:8px}.stats strong{font-size:1.25rem}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;padding:16px;min-height:60vh}.canvas{min-height:60vh;border-radius:18px;overflow:hidden;background:linear-gradient(180deg,#020617eb,#0f172aeb),repeating-linear-gradient(90deg,rgba(148,163,184,.04),rgba(148,163,184,.04) 1px,transparent 1px,transparent 44px)}.panel{padding:20px}.panel h2,.panel h3{margin-top:0}.panel code{font-family:IBM Plex Mono,SFMono-Regular,monospace;font-size:.88rem}@media(max-width:900px){.app-header,.workspace,.stats{grid-template-columns:1fr}.app-header{flex-direction:column}}
|