UNPKG

claritykit-svelte

Version:

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

142 lines 4.39 kB
export type EntityType = 'block' | 'concept' | 'person' | 'place' | 'object' | 'project' | 'task' | 'area' | 'goal' | 'note' | 'journal' | 'tag'; export type SchemaType = 'staging' | 'catalog' | 'pages' | 'core'; export type RelationshipType = 'TAGGED_WITH' | 'LINKS_TO' | 'RELATED_TO' | 'PART_OF' | 'ASSIGNED_TO' | 'DEPENDS_ON' | 'CONTAINS' | 'REFERENCES'; export interface SimilarityScore { targetId: string; targetTitle: string; score: number; type: 'semantic' | 'content' | 'structural'; } export interface EntityRelationship { type: RelationshipType; targetId: string; targetTitle: string; targetType: EntityType; strength: number; count?: number; metadata?: Record<string, any>; } export interface MaterialViewEntity { id: string; type: EntityType; schema: SchemaType; title?: string; content?: string; description?: string; tags?: string[]; created?: Date; modified?: Date; createdBy?: string; modifiedBy?: string; relationships?: EntityRelationship[]; similarityScores?: SimilarityScore[]; blockData?: { parentId?: string; position?: number; isAtomic?: boolean; wordCount?: number; }; conceptData?: { definition?: string; category?: string; confidence?: number; usageCount?: number; }; personData?: { firstName?: string; lastName?: string; email?: string; role?: string; }; placeData?: { address?: string; coordinates?: { lat: number; lng: number; }; type?: 'physical' | 'virtual' | 'conceptual'; }; projectData?: { status?: 'active' | 'completed' | 'paused' | 'cancelled'; priority?: 'low' | 'medium' | 'high' | 'critical'; dueDate?: Date; progress?: number; }; customFields?: Record<string, any>; } export interface MaterialViewColumn { field: string; label: string; width?: string | number; sortable?: boolean; filterable?: boolean; editable?: boolean; required?: boolean; filterType?: 'text' | 'select' | 'date' | 'number'; filterOptions?: Array<{ value: string; label: string; }>; render?: (value: any, entity: MaterialViewEntity) => string; validate?: (value: any) => string | null; columnType?: 'default' | 'entity-type' | 'relationships' | 'similarity' | 'tags' | 'schema' | 'content'; } export interface ApiCall { action: 'create' | 'read' | 'update' | 'delete' | 'query'; entityType?: EntityType; entityId?: string; schema?: SchemaType; field?: string; value?: any; query?: { filters?: Record<string, any>; sort?: { field: string; direction: 'asc' | 'desc'; }; limit?: number; offset?: number; }; } export interface MaterialViewTableProps { entities?: MaterialViewEntity[]; columns?: MaterialViewColumn[]; variant?: 'default' | 'compact' | 'detailed'; sortable?: boolean; filterable?: boolean; searchable?: boolean; selectable?: boolean; editable?: boolean; showRelationships?: boolean; showSimilarity?: boolean; pageSize?: number; class?: string; onEntitySelected?: (event: { entity: MaterialViewEntity; selected: boolean; }) => void; onEntityEdited?: (event: { entity: MaterialViewEntity; field: string; value: any; }) => void; onRelationshipClicked?: (event: { entity: MaterialViewEntity; relationship: EntityRelationship; }) => void; onFilterChanged?: (event: { filters: Record<string, any>; }) => void; onSortChanged?: (event: { column: string; direction: 'asc' | 'desc'; }) => void; onApiCall?: (call: ApiCall) => Promise<any>; } export declare const DEFAULT_COLUMNS: Record<string, MaterialViewColumn[]>; export declare function getEntityDisplayName(entity: MaterialViewEntity): string; export declare function getEntityIcon(entity: MaterialViewEntity): string; export declare function getSchemaColor(schema: SchemaType): string; export declare function formatSimilarityScore(score: number): string; export declare function getSimilarityColor(score: number): string; //# sourceMappingURL=types.d.ts.map