Skip to content

Commit 445769c

Browse files
Kingsley  Idehenclaude
authored andcommitted
feat: add Enhanced Graph visualization plugin with D3.js force-directed layout
Implements a new internal Yasr plugin for interactive RDF graph visualization with the following features: - D3.js v7 force-directed graph with physics simulation - Interactive controls: zoom, pan, drag nodes with sticky behavior - Draggable control panel with physics parameters and filtering - Node grouping by rdf:type with automatic color coding - Predicate display: toggle between FontAwesome icons and CURIE labels - Tooltip system: toggle between full IRIs and compact CURIEs - Faceted filtering by node groups with visual legend - Real-time physics parameter adjustment (charge strength, link distance) - Theme support (light/dark) with automatic switching - JSON-LD metadata injection and SVG download functionality - Configuration persistence via localStorage - Responsive design with mobile support Plugin registered at priority 11 to auto-select for CONSTRUCT/DESCRIBE queries. All preferences (panel position, visibility, display modes) persist across sessions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent e09e044 commit 445769c

File tree

12 files changed

+3342
-0
lines changed

12 files changed

+3342
-0
lines changed

package-lock.json

Lines changed: 285 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/yasr/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
},
4242
"devDependencies": {
4343
"@types/codemirror": "0.0.100",
44+
"@types/d3": "^7.4.0",
4445
"@types/jquery": "^3.5.32",
4546
"@types/lodash-es": "^4.17.3",
4647
"@types/n3": "^1.1.5",

packages/yasr/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,10 +676,12 @@ export function registerPlugin(name: string, plugin: typeof Plugin, enable = tru
676676
import * as YasrPluginBoolean from "./plugins/boolean";
677677
import * as YasrPluginResponse from "./plugins/response";
678678
import * as YasrPluginError from "./plugins/error";
679+
import * as YasrPluginEnhancedGraph from "./plugins/enhanced-graph";
679680

680681
Yasr.registerPlugin("boolean", YasrPluginBoolean.default as any);
681682
Yasr.registerPlugin("response", YasrPluginResponse.default as any);
682683
Yasr.registerPlugin("error", YasrPluginError.default as any);
684+
Yasr.registerPlugin("enhanced-graph", YasrPluginEnhancedGraph.default as any);
683685

684686
export type { Plugin, DownloadInfo } from "./plugins";
685687

0 commit comments

Comments
 (0)