UNPKG

claritykit-svelte

Version:

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

210 lines 5.36 kB
export type IngestionStage = 'queued' | 'downloading' | 'parsing' | 'extracting' | 'embedding' | 'complete' | 'error'; export interface PaperIngestionProgressProps { stage?: IngestionStage; progress?: number; message?: string; class?: string; } export interface PaperMetadata { title: string; authors?: string[]; year?: number | string; venue?: string; doi?: string; url?: string; pdfUrl?: string; abstract?: string; tags?: string[]; } export interface PaperMetadataCardProps { metadata: PaperMetadata; showActions?: boolean; class?: string; } export interface PaperMetadataCardEvents { open: { metadata: PaperMetadata; }; save: { metadata: PaperMetadata; }; } export interface DiscoveryItem { id: string; title: string; authors?: string[]; year?: number | string; venue?: string; abstract?: string; url?: string; pdfUrl?: string; tags?: string[]; } export interface ResearchDiscoveryPanelProps { items?: DiscoveryItem[]; loading?: boolean; error?: string; class?: string; } export interface ResearchDiscoveryPanelEvents { open: { id: string; }; save: { id: string; }; } export type CitationStyle = 'apa' | 'mla' | 'chicago'; export interface Citation { title: string; authors?: string[]; year?: number | string; venue?: string; publisher?: string; volume?: string | number; issue?: string | number; pages?: string; doi?: string; url?: string; accessDate?: string; } export interface CitationFormatterProps { citation: Citation; style?: CitationStyle; showCopyButton?: boolean; showStyleSelector?: boolean; class?: string; } export interface CitationFormatterEvents { styleChange: { style: CitationStyle; }; copy: { citation: string; style: CitationStyle; }; } export interface ResearchPaper { id: string; metadata: PaperMetadata; ingestionStatus?: IngestionStage; ingestionProgress?: number; ingestionMessage?: string; addedDate: Date; lastModified: Date; collections?: string[]; notes?: string; highlights?: ResearchHighlight[]; } export interface ResearchHighlight { id: string; text: string; page?: number; position?: { x: number; y: number; width: number; height: number; }; color?: string; note?: string; createdAt: Date; } export interface ResearchCollection { id: string; name: string; description?: string; papers: string[]; tags?: string[]; createdAt: Date; lastModified: Date; } export interface ResearchQuery { keywords?: string[]; authors?: string[]; venues?: string[]; yearRange?: { start?: number; end?: number; }; tags?: string[]; hasFullText?: boolean; citationStyle?: CitationStyle; } export interface SearchFilters { query: ResearchQuery; sortBy?: 'relevance' | 'date' | 'citations' | 'title'; sortOrder?: 'asc' | 'desc'; limit?: number; offset?: number; } export interface SearchResults { items: DiscoveryItem[]; total: number; hasMore: boolean; query: ResearchQuery; suggestions?: string[]; } export interface ResearchAPI { search: (filters: SearchFilters) => Promise<SearchResults>; getPaper: (id: string) => Promise<ResearchPaper | null>; addPaper: (metadata: PaperMetadata) => Promise<ResearchPaper>; updatePaper: (id: string, updates: Partial<ResearchPaper>) => Promise<ResearchPaper>; deletePaper: (id: string) => Promise<void>; getCollections: () => Promise<ResearchCollection[]>; createCollection: (collection: Omit<ResearchCollection, 'id' | 'createdAt' | 'lastModified'>) => Promise<ResearchCollection>; } export interface ADHDResearchSettings { enableFocusMode?: boolean; reducedMotion?: boolean; highContrast?: boolean; largerText?: boolean; showProgressIndicators?: boolean; enableBreakReminders?: boolean; simplifiedInterface?: boolean; keyboardShortcuts?: boolean; } export interface FocusSession { id: string; startTime: Date; endTime?: Date; targetDuration?: number; papersToRead: string[]; currentPaper?: string; notes?: string; completed: boolean; breaks: Array<{ startTime: Date; endTime: Date; type: 'scheduled' | 'needed'; }>; } export interface ResearchState { currentPaper?: ResearchPaper; selectedPapers: string[]; searchQuery: ResearchQuery; searchResults: SearchResults; collections: ResearchCollection[]; focusSession?: FocusSession; settings: ADHDResearchSettings; notifications: Array<{ id: string; type: 'info' | 'success' | 'warning' | 'error'; message: string; timestamp: Date; read: boolean; }>; } export declare class ResearchError extends Error { code: string; context?: Record<string, unknown> | undefined; constructor(message: string, code: string, context?: Record<string, unknown> | undefined); } export interface ErrorContext { component: string; action: string; paperId?: string; query?: ResearchQuery; timestamp: Date; } //# sourceMappingURL=types.d.ts.map