47fac22230
- .claude/CLAUDE.md - .claude/commands/subagentes.md - .claude/rules/INDEX.md - .mcp.json - bash/functions/cybersecurity/analyze_dns.md - bash/functions/cybersecurity/audit_http_headers.md - bash/functions/cybersecurity/audit_ssh_config.md - bash/functions/cybersecurity/check_firewall.md - bash/functions/cybersecurity/detect_suspicious_users.md - bash/functions/cybersecurity/encrypt_file.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.8 KiB
2.8 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, output, tested, tests, test_file_path, file_path, props, emits, has_state, framework, variant
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | output | tested | tests | test_file_path | file_path | props | emits | has_state | framework | variant | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| graph_container | component | ts | ui | 1.0.0 | impure | GraphContainer(props: GraphContainerProps): JSX.Element | Interactive graph visualization with sigma.js, graphology, and ForceAtlas2 layout |
|
false |
|
Componente GraphContainer que renderiza grafo interactivo con sigma.js, ForceAtlas2 layout y legend | false | frontend/functions/ui/graph/index.tsx |
|
true | react |
Ejemplo
import { GraphContainer } from '@fn_library/graph'
import type { GraphData } from '@fn_library/graph'
const data: GraphData = {
nodes: [
{ id: '1', label: 'Node A', color: '#e74c3c', size: 10 },
{ id: '2', label: 'Node B', color: '#3498db', size: 8 },
],
edges: [
{ id: 'e1', source: '1', target: '2', label: 'connects', type: 'arrow' },
],
}
function MyGraph() {
return (
<GraphContainer
data={data}
layout="organic"
showLegend
nodeTypes={[
{ type: 'person', color: '#e74c3c', label: 'Person' },
{ type: 'org', color: '#3498db', label: 'Organization' },
]}
onNodeClick={(node) => console.log('clicked:', node.id)}
height="500px"
/>
)
}
Notas
- Usa graphology como estructura de datos de grafo
- ForceAtlas2 para layout organico (iterations adaptativas segun numero de nodos)
- Sigma.js para renderizado WebGL de alto rendimiento
- Soporta grafos dirigidos multi-edge
- El componente limpia la instancia Sigma al desmontar