UNPKG

apple-dev-mcp

Version:

Complete Apple development guidance: Human Interface Guidelines (design) + Technical Documentation for iOS, macOS, watchOS, tvOS, and visionOS

418 lines 11 kB
/** * Types for Apple Human Interface Guidelines MCP Server */ export interface HIGSection { id: string; title: string; url: string; platform: ApplePlatform; category: HIGCategory; content?: string; lastUpdated?: Date; quality?: ContentQualityMetrics; extractionMethod?: 'crawlee' | 'fallback'; structuredContent?: StructuredHIGContent; } export interface HIGComponent { id: string; title: string; description: string; platforms: ApplePlatform[]; url: string; specifications?: ComponentSpec; guidelines?: string[]; examples?: string[]; lastUpdated?: Date; } export interface ComponentSpec { dimensions?: { width?: string; height?: string; minWidth?: string; minHeight?: string; }; spacing?: { padding?: string; margin?: string; }; typography?: { fontSize?: string; fontWeight?: string; lineHeight?: string; }; colors?: { primary?: string; secondary?: string; background?: string; }; touchTarget?: string; minimumSize?: string; } export interface StructuredHIGContent { overview: string; guidelines: string[]; examples: string[]; specifications?: ComponentSpec; relatedConcepts: string[]; platformSpecific?: { [platform: string]: { guidelines?: string[]; examples?: string[]; specifications?: ComponentSpec; }; }; } export interface EnhancedHIGSection extends HIGSection { structuredContent?: StructuredHIGContent; rawHtml?: string; processingMetrics?: { extractionTime: number; contentLength: number; structureScore: number; cleaningScore: number; }; } export interface ProcessedContentResult { cleanedMarkdown: string; structuredContent: StructuredHIGContent; quality: ContentQualityMetrics; processingMetrics: { extractionTime: number; contentLength: number; structureScore: number; cleaningScore: number; }; } export interface SearchResult { id: string; title: string; url: string; platform: ApplePlatform; category?: HIGCategory; relevanceScore: number; content: string; type: 'section' | 'component' | 'guideline'; highlights?: string[]; } export interface HIGUpdate { id: string; title: string; description: string; url: string; date: Date; platform: ApplePlatform; type: 'new' | 'updated' | 'deprecated'; category: HIGCategory; } export type ApplePlatform = 'iOS' | 'macOS' | 'watchOS' | 'tvOS' | 'visionOS' | 'universal'; export type HIGCategory = 'foundations' | 'layout' | 'navigation' | 'presentation' | 'selection-and-input' | 'status' | 'system-capabilities' | 'visual-design' | 'icons-and-images' | 'color-and-materials' | 'typography' | 'motion' | 'technologies'; export interface CacheEntry<T> { data: T; timestamp: Date; ttl: number; } export interface ScrapingConfig { baseUrl: string; userAgent: string; requestDelay: number; retryAttempts: number; timeout: number; } export interface HIGResource { uri: string; name: string; description: string; mimeType: string; content: string; } export interface SearchGuidelinesArgs { query: string; platform?: ApplePlatform; category?: HIGCategory; limit?: number; } export interface GetComponentSpecArgs { componentName: string; platform?: ApplePlatform; } export interface ComparePlatformsArgs { componentName: string; platforms: ApplePlatform[]; } export interface GetLatestUpdatesArgs { since?: string; platform?: ApplePlatform; limit?: number; } export interface ContentQualityMetrics { score: number; length: number; structureScore: number; appleTermsScore: number; codeExamplesCount: number; imageReferencesCount: number; headingCount: number; isFallbackContent: boolean; extractionMethod: string; confidence: number; } export interface ProcessedContent { content: string; summary: string; tableOfContents: string; codeExamples: string[]; imageReferences: string[]; relatedSections: string[]; keywords: string[]; quality: ContentQualityMetrics; } export interface DiscoveredLink { url: string; title: string; platform: ApplePlatform; category: HIGCategory; depth: number; } export interface DiscoveryConfig { baseUrl: string; maxDepth: number; maxPages: number; respectfulDelay: number; cacheKey: string; cacheTTL: number; } export interface ContentExtractionResult { content: string; quality: number; extractionMethod: 'crawlee' | 'fallback'; timestamp: Date; } export interface CrawleeConfig extends ScrapingConfig { maxConcurrency: number; browserOptions: { headless: boolean; viewport: { width: number; height: number; }; args: string[]; }; waitOptions: { networkIdle: number; timeout: number; }; } export interface QualityValidationResult { isValid: boolean; score: number; confidence: number; issues: string[]; recommendations: string[]; } export interface ExtractionStatistics { totalSections: number; successfulExtractions: number; fallbackUsage: number; averageQuality: number; averageConfidence: number; extractionSuccessRate: number; } export interface SemanticSearchResult extends SearchResult { semanticScore: number; keywordScore: number; structureScore: number; contextualScore: number; combinedScore: number; searchTerms: string[]; matchedConcepts: string[]; } export interface QueryAnalysis { originalQuery: string; processedQuery: string; intent: SearchIntent; entities: EntityMatch[]; keywords: string[]; concepts: string[]; platform?: ApplePlatform; category?: HIGCategory; } export interface EntityMatch { text: string; type: EntityType; confidence: number; normalizedValue?: string; } export type EntityType = 'component' | 'platform' | 'property' | 'action' | 'concept' | 'measurement'; export type SearchIntent = 'find_component' | 'find_guideline' | 'compare_platforms' | 'find_specification' | 'find_example' | 'troubleshoot' | 'general_search'; export interface EmbeddingVector { values: number[]; dimension: number; model: string; } export interface SemanticIndex { sectionId: string; embeddings: { title: EmbeddingVector; overview: EmbeddingVector; guidelines: EmbeddingVector; fullContent: EmbeddingVector; }; metadata: { platform: ApplePlatform; category: HIGCategory; concepts: string[]; lastUpdated: Date; qualityScore: number; }; } export interface SearchConfig { semanticWeight: number; keywordWeight: number; structureWeight: number; contextWeight: number; minSemanticThreshold: number; maxResults: number; boostFactors: { exactTitle: number; platformMatch: number; categoryMatch: number; recentContent: number; }; } export interface TechnicalDocumentation { id: string; symbol: string; framework: string; symbolKind: string; platforms: string[]; abstract: string; apiReference: string; codeExamples: string[]; relatedSymbols: string[]; url: string; lastUpdated: Date; } export interface TechnicalSearchResult { title: string; description: string; path: string; framework: string; symbolKind?: string; platforms?: string; url: string; relevanceScore: number; type: 'technical'; } export interface UnifiedSearchResult { id: string; title: string; type: 'design' | 'technical' | 'combined'; url: string; relevanceScore: number; snippet: string; designContent?: { platform: ApplePlatform; category?: HIGCategory; guidelines?: string[]; specifications?: ComponentSpec; }; technicalContent?: { framework: string; symbolKind: string; platforms: string[]; abstract: string; codeExamples: string[]; }; combinedGuidance?: { designPrinciples: string[]; implementationSteps: string[]; crossPlatformConsiderations: string[]; accessibilityNotes: string[]; }; } export interface DesignTechnicalMapping { designGuideline: string; designUrl: string; relatedSymbols: string[]; implementationExamples: string[]; platforms: ApplePlatform[]; mappingConfidence: number; } export interface CrossReferenceEntry { id: string; sourceType: 'design' | 'technical'; sourceId: string; targetType: 'design' | 'technical'; targetId: string; relationshipType: 'implements' | 'related' | 'example' | 'platform-specific'; confidence: number; lastUpdated: Date; } export interface FrameworkInfo { name: string; description: string; platforms: string[]; topicSections: string[]; url: string; relatedHIGSections?: string[]; } export interface UpdateCheckResult { source: 'hig-dynamic' | 'api-documentation' | 'git-repository'; isUpdateAvailable: boolean; currentVersion?: string; latestVersion?: string; lastChecked: Date; updateInstructions?: string; changelog?: string[]; } export interface GetTechnicalDocumentationArgs { path: string; includeDesignGuidance?: boolean; includeRelatedSymbols?: boolean; includeCodeExamples?: boolean; } export interface SearchUnifiedArgs { query: string; searchType?: 'design' | 'technical' | 'both'; platform?: ApplePlatform; category?: HIGCategory; framework?: string; symbolType?: string; includeImplementation?: boolean; limit?: number; } export interface ContentFusionResult { id: string; title: string; type: 'implementation-guide' | 'component-spec' | 'platform-comparison'; designSection: { principles: string[]; specifications: ComponentSpec; guidelines: string[]; examples: string[]; }; technicalSection: { framework: string; symbol: string; apiReference: string; codeExamples: string[]; platforms: string[]; }; fusedGuidance: { overview: string; implementationSteps: string[]; bestPractices: string[]; commonPitfalls: string[]; accessibilityConsiderations: string[]; platformDifferences: string[]; }; lastUpdated: Date; confidenceScore: number; } export interface EnhancedCacheEntry<T> extends CacheEntry<T> { source: 'hig-dynamic' | 'api-documentation' | 'scraped' | 'fused'; quality: number; lastValidated: Date; invalidationRules: string[]; } //# sourceMappingURL=types.d.ts.map