UNPKG

claritykit-svelte

Version:

A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility

119 lines 2.93 kB
/** * Types for the KnowledgeGraph component */ export type NodeType = 'Block' | 'Concept' | 'Person' | 'Place' | 'Object' | 'Project' | 'Task' | 'Area' | 'Goal' | 'Note' | 'Journal'; export type RelationshipType = 'TAGGED_WITH' | 'LINKS_TO' | 'RELATED_TO' | 'PART_OF' | 'ASSIGNED_TO'; export interface GraphNode { id: string; label: string; type: NodeType; weight?: number; [key: string]: any; } export interface GraphEdge { id: string; source: string; target: string; type: RelationshipType; strength?: number; [key: string]: any; } export interface GraphData { nodes: GraphNode[]; edges: GraphEdge[]; } export interface LayoutOptions { name: 'cose' | 'circle' | 'grid' | 'breadthfirst' | 'concentric' | 'random'; animate?: boolean; animationDuration?: number; fit?: boolean; padding?: number; [key: string]: any; } export interface StyleOptions { nodeColors?: Record<NodeType, string>; edgeColors?: Record<RelationshipType, string>; nodeSize?: { min: number; max: number; weightMultiplier: number; }; edgeWidth?: { min: number; max: number; strengthMultiplier: number; }; } export interface FilterOptions { nodeTypes?: NodeType[]; relationshipTypes?: RelationshipType[]; minWeight?: number; maxWeight?: number; minStrength?: number; maxStrength?: number; } export interface SearchOptions { query: string; searchFields?: string[]; caseSensitive?: boolean; exactMatch?: boolean; } export interface ClusteringOptions { algorithm: 'markov' | 'hierarchical' | 'fuzzy'; k?: number; threshold?: number; attributes?: string[]; } export interface GraphEvents { 'node-select': { node: GraphNode; element: any; }; 'node-deselect': { node: GraphNode; element: any; }; 'edge-select': { edge: GraphEdge; element: any; }; 'edge-deselect': { edge: GraphEdge; element: any; }; 'layout-complete': { layout: string; }; 'filter-change': { filter: FilterOptions; }; 'search-complete': { results: GraphNode[]; }; 'cluster-complete': { clusters: GraphNode[][]; }; } export interface KnowledgeGraphProps { data: GraphData; layout?: LayoutOptions; style?: StyleOptions; filter?: FilterOptions; search?: SearchOptions; clustering?: ClusteringOptions; width?: string; height?: string; class?: string; interactive?: boolean; showLabels?: boolean; showEdgeLabels?: boolean; enableClustering?: boolean; enableSearch?: boolean; enableFiltering?: boolean; zoomEnabled?: boolean; panEnabled?: boolean; boxSelectionEnabled?: boolean; autofit?: boolean; 'data-testid'?: string; } //# sourceMappingURL=types.d.ts.map