@tachui/devtools 0.8.0-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/LICENSE +363 -0
  2. package/README.md +189 -0
  3. package/dist/build-time/detection.d.ts +32 -0
  4. package/dist/build-time/detection.d.ts.map +1 -0
  5. package/dist/build-time/index.d.ts +84 -0
  6. package/dist/build-time/index.d.ts.map +1 -0
  7. package/dist/build-time/plugins.d.ts +75 -0
  8. package/dist/build-time/plugins.d.ts.map +1 -0
  9. package/dist/build-time/rules.d.ts +73 -0
  10. package/dist/build-time/rules.d.ts.map +1 -0
  11. package/dist/build-time/transformer.d.ts +23 -0
  12. package/dist/build-time/transformer.d.ts.map +1 -0
  13. package/dist/build-time/types.d.ts +212 -0
  14. package/dist/build-time/types.d.ts.map +1 -0
  15. package/dist/debug/advanced-debugging.d.ts +327 -0
  16. package/dist/debug/advanced-debugging.d.ts.map +1 -0
  17. package/dist/debug/debug.d.ts +61 -0
  18. package/dist/debug/debug.d.ts.map +1 -0
  19. package/dist/debug/developer-experience.d.ts +261 -0
  20. package/dist/debug/developer-experience.d.ts.map +1 -0
  21. package/dist/debug/development-warnings.d.ts +42 -0
  22. package/dist/debug/development-warnings.d.ts.map +1 -0
  23. package/dist/debug/documentation-integration.d.ts +269 -0
  24. package/dist/debug/documentation-integration.d.ts.map +1 -0
  25. package/dist/debug/enhanced-errors.d.ts +176 -0
  26. package/dist/debug/enhanced-errors.d.ts.map +1 -0
  27. package/dist/debug/enhanced-types.d.ts +284 -0
  28. package/dist/debug/enhanced-types.d.ts.map +1 -0
  29. package/dist/debug/ide-integration.d.ts +328 -0
  30. package/dist/debug/ide-integration.d.ts.map +1 -0
  31. package/dist/debug/index.d.ts +12 -0
  32. package/dist/debug/index.d.ts.map +1 -0
  33. package/dist/debug/index.js +1251 -0
  34. package/dist/debug/index.js.map +1 -0
  35. package/dist/debug/validation-debug-tools.d.ts +228 -0
  36. package/dist/debug/validation-debug-tools.d.ts.map +1 -0
  37. package/dist/index.d.ts +22 -0
  38. package/dist/index.d.ts.map +1 -0
  39. package/dist/index.js +216229 -0
  40. package/dist/index.js.map +1 -0
  41. package/dist/inspector/index.d.ts +232 -0
  42. package/dist/inspector/index.d.ts.map +1 -0
  43. package/dist/inspector/index.js +525 -0
  44. package/dist/inspector/index.js.map +1 -0
  45. package/dist/plugins/simplified-error-handler.d.ts +83 -0
  46. package/dist/plugins/simplified-error-handler.d.ts.map +1 -0
  47. package/dist/profiler/index.d.ts +21 -0
  48. package/dist/profiler/index.d.ts.map +1 -0
  49. package/dist/profiler/index.js +519 -0
  50. package/dist/profiler/index.js.map +1 -0
  51. package/dist/profiler/performance-optimizer.d.ts +115 -0
  52. package/dist/profiler/performance-optimizer.d.ts.map +1 -0
  53. package/dist/profiler/production-monitoring.d.ts +150 -0
  54. package/dist/profiler/production-monitoring.d.ts.map +1 -0
  55. package/dist/runtime/error-boundary.d.ts +302 -0
  56. package/dist/runtime/error-boundary.d.ts.map +1 -0
  57. package/dist/runtime/error-recovery.d.ts +267 -0
  58. package/dist/runtime/error-recovery.d.ts.map +1 -0
  59. package/dist/runtime/error-reporting.d.ts +287 -0
  60. package/dist/runtime/error-reporting.d.ts.map +1 -0
  61. package/dist/runtime/error-utils.d.ts +204 -0
  62. package/dist/runtime/error-utils.d.ts.map +1 -0
  63. package/dist/runtime/performance.d.ts +217 -0
  64. package/dist/runtime/performance.d.ts.map +1 -0
  65. package/dist/testing/index.d.ts +29 -0
  66. package/dist/testing/index.d.ts.map +1 -0
  67. package/dist/testing/index.js +47 -0
  68. package/dist/testing/index.js.map +1 -0
  69. package/dist/validation/debug-tools-stub.d.ts +67 -0
  70. package/dist/validation/debug-tools-stub.d.ts.map +1 -0
  71. package/dist/validation/enhanced-runtime.d.ts +310 -0
  72. package/dist/validation/enhanced-runtime.d.ts.map +1 -0
  73. package/dist/validation/error-reporting.d.ts +186 -0
  74. package/dist/validation/error-reporting.d.ts.map +1 -0
  75. package/package.json +78 -0
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Development Warning System - Tag Override Safety
3
+ *
4
+ * Provides helpful console warnings during development when components
5
+ * use tag overrides, particularly for potentially problematic combinations.
6
+ */
7
+ export declare class DevelopmentWarnings {
8
+ private static warningsShown;
9
+ /**
10
+ * Warn about element tag overrides in development
11
+ */
12
+ static warnElementOverride(componentType: string, originalTag: string, overrideTag: string): void;
13
+ /**
14
+ * Error for invalid HTML tags
15
+ */
16
+ static errorInvalidTag(tag: string, componentType: string): void;
17
+ /**
18
+ * Info message for semantic role application
19
+ */
20
+ static infoSemanticRole(tag: string, role: string): void;
21
+ /**
22
+ * Warn about potentially problematic tag combinations
23
+ */
24
+ static warnProblematicCombination(componentType: string, tag: string, issue: string, severity?: 'warning' | 'info'): void;
25
+ /**
26
+ * Warn about accessibility concerns
27
+ */
28
+ static warnAccessibility(componentType: string, tag: string, accessibilityIssue: string): void;
29
+ /**
30
+ * Clear all shown warnings (useful for testing)
31
+ */
32
+ static clearWarnings(): void;
33
+ /**
34
+ * Check if a warning has been shown
35
+ */
36
+ static hasWarningBeenShown(warningKey: string): boolean;
37
+ /**
38
+ * Get count of unique warnings shown
39
+ */
40
+ static getWarningCount(): number;
41
+ }
42
+ //# sourceMappingURL=development-warnings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"development-warnings.d.ts","sourceRoot":"","sources":["../../src/debug/development-warnings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAC,aAAa,CAAoB;IAEhD;;OAEG;IACH,MAAM,CAAC,mBAAmB,CACxB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAClB,IAAI;IAcP;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI;IAShE;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAMxD;;OAEG;IACH,MAAM,CAAC,0BAA0B,CAC/B,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,QAAQ,GAAE,SAAS,GAAG,MAAkB,GACvC,IAAI;IAYP;;OAEG;IACH,MAAM,CAAC,iBAAiB,CACtB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,EACX,kBAAkB,EAAE,MAAM,GACzB,IAAI;IAcP;;OAEG;IACH,MAAM,CAAC,aAAa,IAAI,IAAI;IAI5B;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAIvD;;OAEG;IACH,MAAM,CAAC,eAAe,IAAI,MAAM;CAGjC"}
@@ -0,0 +1,269 @@
1
+ /**
2
+ * Documentation Integration System - Phase 1D
3
+ *
4
+ * Context-aware help, intelligent documentation links,
5
+ * and comprehensive learning resource management.
6
+ */
7
+ export type ValidationErrorCategory = 'component' | 'modifier' | 'runtime' | 'reactive' | 'validation';
8
+ /**
9
+ * Documentation resource types
10
+ */
11
+ export type DocumentationType = 'guide' | 'api-reference' | 'tutorial' | 'example' | 'video' | 'troubleshooting' | 'best-practices';
12
+ /**
13
+ * Learning difficulty levels
14
+ */
15
+ export type DifficultyLevel = 'beginner' | 'intermediate' | 'advanced' | 'expert';
16
+ /**
17
+ * Documentation resource
18
+ */
19
+ export interface DocumentationResource {
20
+ id: string;
21
+ title: string;
22
+ description: string;
23
+ type: DocumentationType;
24
+ difficulty: DifficultyLevel;
25
+ url: string;
26
+ estimatedReadTime: number;
27
+ lastUpdated: string;
28
+ version: string;
29
+ tags: string[];
30
+ categories: string[];
31
+ relatedComponents: string[];
32
+ relatedModifiers: string[];
33
+ prerequisites: string[];
34
+ nextSteps: string[];
35
+ rating: number;
36
+ completionRate: number;
37
+ helpfulnessScore: number;
38
+ hasInteractiveExample: boolean;
39
+ hasVideoContent: boolean;
40
+ hasCodeSandbox: boolean;
41
+ isAccessible: boolean;
42
+ hasTranscript: boolean;
43
+ supportedLanguages: string[];
44
+ }
45
+ /**
46
+ * Context-aware documentation provider
47
+ */
48
+ export interface ContextualDocumentation {
49
+ primary: DocumentationResource;
50
+ related: DocumentationResource[];
51
+ quickHelp: string;
52
+ codeExamples: {
53
+ basic: string;
54
+ advanced: string;
55
+ realWorld: string;
56
+ };
57
+ commonPitfalls: {
58
+ issue: string;
59
+ solution: string;
60
+ example: string;
61
+ }[];
62
+ learningPath: {
63
+ current: DocumentationResource;
64
+ next: DocumentationResource[];
65
+ progress: number;
66
+ };
67
+ }
68
+ /**
69
+ * User learning profile for personalization
70
+ */
71
+ export interface UserLearningProfile {
72
+ id: string;
73
+ skillLevel: DifficultyLevel;
74
+ preferredLearningStyle: 'visual' | 'reading' | 'hands-on' | 'video';
75
+ completedResources: string[];
76
+ bookmarkedResources: string[];
77
+ learningGoals: string[];
78
+ weakAreas: string[];
79
+ strongAreas: string[];
80
+ averageReadTime: number;
81
+ preferredDocumentationTypes: DocumentationType[];
82
+ mostUsedComponents: string[];
83
+ mostUsedModifiers: string[];
84
+ enablePersonalization: boolean;
85
+ enableProgressTracking: boolean;
86
+ enableRecommendations: boolean;
87
+ }
88
+ /**
89
+ * Documentation integration configuration
90
+ */
91
+ export interface DocumentationConfig {
92
+ defaultDifficulty: DifficultyLevel;
93
+ preferredTypes: DocumentationType[];
94
+ maxRelatedItems: number;
95
+ enableLearningProfile: boolean;
96
+ enableRecommendations: boolean;
97
+ enableProgressTracking: boolean;
98
+ showEstimatedTime: boolean;
99
+ showRatings: boolean;
100
+ showPrerequisites: boolean;
101
+ groupByDifficulty: boolean;
102
+ enableInlineHelp: boolean;
103
+ enableContextualSuggestions: boolean;
104
+ enableLearningPaths: boolean;
105
+ enableOfflineMode: boolean;
106
+ cacheDocumentation: boolean;
107
+ offlineStorageLimit: number;
108
+ }
109
+ /**
110
+ * Comprehensive documentation database
111
+ */
112
+ export declare const documentationDatabase: Record<string, DocumentationResource>;
113
+ /**
114
+ * Context-aware documentation provider
115
+ */
116
+ export declare class DocumentationProvider {
117
+ private userProfile;
118
+ private usageStats;
119
+ /**
120
+ * Get contextual documentation for an error or component
121
+ */
122
+ getContextualDocumentation(context: {
123
+ component?: string;
124
+ modifier?: string;
125
+ errorType?: string;
126
+ category?: ValidationErrorCategory;
127
+ userLevel?: DifficultyLevel;
128
+ }): ContextualDocumentation | null;
129
+ /**
130
+ * Find relevant documentation resources
131
+ */
132
+ private findRelevantResources;
133
+ /**
134
+ * Select primary documentation resource
135
+ */
136
+ private selectPrimaryResource;
137
+ /**
138
+ * Calculate relevance score for a resource
139
+ */
140
+ private calculateRelevanceScore;
141
+ /**
142
+ * Select related resources
143
+ */
144
+ private selectRelatedResources;
145
+ /**
146
+ * Generate quick help text
147
+ */
148
+ private generateQuickHelp;
149
+ /**
150
+ * Generate contextual code examples
151
+ */
152
+ private generateCodeExamples;
153
+ /**
154
+ * Get common pitfalls for a resource
155
+ */
156
+ private getCommonPitfalls;
157
+ /**
158
+ * Generate learning path
159
+ */
160
+ private generateLearningPath;
161
+ /**
162
+ * Set user learning profile
163
+ */
164
+ setUserProfile(profile: UserLearningProfile): void;
165
+ /**
166
+ * Track resource usage
167
+ */
168
+ trackResourceUsage(resourceId: string): void;
169
+ /**
170
+ * Get personalized recommendations
171
+ */
172
+ getPersonalizedRecommendations(limit?: number): DocumentationResource[];
173
+ /**
174
+ * Calculate personalization score
175
+ */
176
+ private calculatePersonalizationScore;
177
+ /**
178
+ * Get documentation statistics
179
+ */
180
+ getStatistics(): {
181
+ totalResources: number;
182
+ resourcesByType: Record<DocumentationType, number>;
183
+ resourcesByDifficulty: Record<DifficultyLevel, number>;
184
+ totalUsages: number;
185
+ averageRating: number;
186
+ completionRates: {
187
+ average: number;
188
+ byDifficulty: Record<DifficultyLevel, number>;
189
+ };
190
+ };
191
+ /**
192
+ * Group resources by type
193
+ */
194
+ private groupResourcesByType;
195
+ /**
196
+ * Group resources by difficulty
197
+ */
198
+ private groupResourcesByDifficulty;
199
+ /**
200
+ * Calculate average rating
201
+ */
202
+ private calculateAverageRating;
203
+ /**
204
+ * Get completion rates
205
+ */
206
+ private getCompletionRates;
207
+ }
208
+ /**
209
+ * Configure documentation integration
210
+ */
211
+ export declare function configureDocumentationIntegration(config: Partial<DocumentationConfig>): void;
212
+ /**
213
+ * Get current documentation configuration
214
+ */
215
+ export declare function getDocumentationConfig(): DocumentationConfig;
216
+ declare const documentationProvider: DocumentationProvider;
217
+ /**
218
+ * Documentation Integration utilities
219
+ */
220
+ export declare const DocumentationIntegrationUtils: {
221
+ /**
222
+ * Get contextual documentation
223
+ */
224
+ getContextualDocumentation: (context: any) => ContextualDocumentation | null;
225
+ /**
226
+ * Get personalized recommendations
227
+ */
228
+ getRecommendations: (limit?: number) => DocumentationResource[];
229
+ /**
230
+ * Set user profile
231
+ */
232
+ setUserProfile: (profile: UserLearningProfile) => void;
233
+ /**
234
+ * Track resource usage
235
+ */
236
+ trackUsage: (resourceId: string) => void;
237
+ /**
238
+ * Configure integration
239
+ */
240
+ configure: typeof configureDocumentationIntegration;
241
+ /**
242
+ * Get configuration
243
+ */
244
+ getConfig: typeof getDocumentationConfig;
245
+ /**
246
+ * Get statistics
247
+ */
248
+ getStatistics: () => {
249
+ totalResources: number;
250
+ resourcesByType: Record<DocumentationType, number>;
251
+ resourcesByDifficulty: Record<DifficultyLevel, number>;
252
+ totalUsages: number;
253
+ averageRating: number;
254
+ completionRates: {
255
+ average: number;
256
+ byDifficulty: Record<DifficultyLevel, number>;
257
+ };
258
+ };
259
+ /**
260
+ * Get all resources
261
+ */
262
+ getAllResources: () => Record<string, DocumentationResource>;
263
+ /**
264
+ * Test documentation system
265
+ */
266
+ test: () => void;
267
+ };
268
+ export { documentationProvider };
269
+ //# sourceMappingURL=documentation-integration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentation-integration.d.ts","sourceRoot":"","sources":["../../src/debug/documentation-integration.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,MAAM,MAAM,uBAAuB,GAC/B,WAAW,GACX,UAAU,GACV,SAAS,GACT,UAAU,GACV,YAAY,CAAA;AAEhB;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,OAAO,GACP,eAAe,GACf,UAAU,GACV,SAAS,GACT,OAAO,GACP,iBAAiB,GACjB,gBAAgB,CAAA;AAEpB;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,UAAU,GACV,cAAc,GACd,UAAU,GACV,QAAQ,CAAA;AAEZ;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,iBAAiB,CAAA;IACvB,UAAU,EAAE,eAAe,CAAA;IAG3B,GAAG,EAAE,MAAM,CAAA;IACX,iBAAiB,EAAE,MAAM,CAAA;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IAGf,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,iBAAiB,EAAE,MAAM,EAAE,CAAA;IAC3B,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAG1B,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,SAAS,EAAE,MAAM,EAAE,CAAA;IAGnB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,gBAAgB,EAAE,MAAM,CAAA;IAGxB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,eAAe,EAAE,OAAO,CAAA;IACxB,cAAc,EAAE,OAAO,CAAA;IAGvB,YAAY,EAAE,OAAO,CAAA;IACrB,aAAa,EAAE,OAAO,CAAA;IACtB,kBAAkB,EAAE,MAAM,EAAE,CAAA;CAC7B;AAED;;GAEG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O,CAAC,oBAAoB;IA8B5B;;OAEG;IACH,cAAc,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI;IAIlD;;OAEG;IACH,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAK5C;;OAEG;IACH,8BAA8B,CAAC,KAAK,GAAE,MAAU,GAAG,qBAAqB,EAAE;IAsB1E;;OAEG;IACH,OAAO,CAAC,6BAA6B;IA0CrC;;OAEG;IACH,aAAa;;;;;;;qBAwDF,MAAM;0BACD,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC;;;IA3C/C;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAU5B;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAUlC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAS9B;;OAEG;IACH,OAAO,CAAC,kBAAkB;CA+B3B;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,GACnC,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,mBAAmB,CAE5D;AAGD,QAAA,MAAM,qBAAqB,uBAA8B,CAAA;AAEzD;;GAEG;AACH,eAAO,MAAM,6BAA6B;IACxC;;OAEG;0CACmC,GAAG;IAGzC;;OAEG;iCAC0B,MAAM;IAGnC;;OAEG;8BACuB,mBAAmB;IAG7C;;OAEG;6BACsB,MAAM;IAG/B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;qBA3FQ,MAAM;0BACD,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC;;;IA6F/C;;OAEG;;IAGH;;OAEG;;CAoCJ,CAAA;AAGD,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
@@ -0,0 +1,176 @@
1
+ /**
2
+ * Enhanced Error Messages and Developer Experience
3
+ *
4
+ * Provides better error messages, debugging aids, and developer-friendly
5
+ * error reporting for the TachUI framework.
6
+ */
7
+ import type { Modifier } from '@tachui/core';
8
+ import type { ComponentInstance } from '@tachui/core';
9
+ /**
10
+ * Enhanced error with developer-friendly context
11
+ */
12
+ export interface EnhancedTachUIError extends Error {
13
+ code: string;
14
+ category: 'modifier' | 'component' | 'runtime' | 'reactive' | 'validation';
15
+ severity: 'warning' | 'error' | 'fatal';
16
+ component?: string;
17
+ suggestion: string;
18
+ documentation?: string;
19
+ examples?: string[];
20
+ relatedErrors?: string[];
21
+ }
22
+ /**
23
+ * Developer experience error factory
24
+ */
25
+ export declare class DeveloperErrorFactory {
26
+ /**
27
+ * Create modifier validation error
28
+ */
29
+ static modifierValidationError(modifier: string, issue: string, component?: ComponentInstance): EnhancedTachUIError;
30
+ /**
31
+ * Create component validation error
32
+ */
33
+ static componentValidationError(componentType: string, prop: string, expectedType: string, actualValue: any): EnhancedTachUIError;
34
+ /**
35
+ * Create reactive system error
36
+ */
37
+ static reactiveSystemError(operation: string, issue: string, context?: string): EnhancedTachUIError;
38
+ /**
39
+ * Create runtime error
40
+ */
41
+ static runtimeError(operation: string, issue: string, component?: string): EnhancedTachUIError;
42
+ /**
43
+ * Get modifier-specific suggestion
44
+ */
45
+ private static getModifierSuggestion;
46
+ /**
47
+ * Get modifier examples
48
+ */
49
+ private static getModifierExamples;
50
+ /**
51
+ * Get component examples
52
+ */
53
+ private static getComponentExamples;
54
+ /**
55
+ * Get type conversion suggestion
56
+ */
57
+ private static getTypeConversionSuggestion;
58
+ /**
59
+ * Get reactive system suggestion
60
+ */
61
+ private static getReactiveSuggestion;
62
+ /**
63
+ * Get reactive examples
64
+ */
65
+ private static getReactiveExamples;
66
+ /**
67
+ * Get runtime suggestion
68
+ */
69
+ private static getRuntimeSuggestion;
70
+ }
71
+ /**
72
+ * Enhanced warning system
73
+ */
74
+ export declare class DeveloperWarnings {
75
+ private static warningsSeen;
76
+ /**
77
+ * Warn about deprecated API usage
78
+ */
79
+ static deprecation(oldAPI: string, newAPI: string, component?: string, willBeRemovedIn?: string): void;
80
+ /**
81
+ * Warn about performance issues
82
+ */
83
+ static performance(issue: string, suggestion: string, component?: string): void;
84
+ /**
85
+ * Warn about accessibility issues
86
+ */
87
+ static accessibility(issue: string, suggestion: string, component?: string): void;
88
+ /**
89
+ * Clear warning cache (for testing)
90
+ */
91
+ static clearWarnings(): void;
92
+ /**
93
+ * Get count of unique warnings shown
94
+ */
95
+ static getWarningCount(): number;
96
+ }
97
+ /**
98
+ * Type validation helpers
99
+ */
100
+ export declare class TypeValidation {
101
+ /**
102
+ * Validate component props with enhanced error messages
103
+ */
104
+ static validateComponentProps<T extends Record<string, any>>(componentType: string, props: T, schema: Record<keyof T, {
105
+ type: string;
106
+ required?: boolean;
107
+ validator?: (value: any) => boolean;
108
+ message?: string;
109
+ }>): void;
110
+ /**
111
+ * Validate type
112
+ */
113
+ private static validateType;
114
+ /**
115
+ * Validate modifier combination
116
+ */
117
+ static validateModifierCombination(modifiers: Modifier[]): void;
118
+ }
119
+ /**
120
+ * Formatted error message type
121
+ */
122
+ export interface FormattedErrorMessage {
123
+ code: string;
124
+ message: string;
125
+ suggestion: string;
126
+ severity: 'warning' | 'error' | 'fatal';
127
+ component?: string;
128
+ documentation?: string;
129
+ examples?: string[];
130
+ template?: {
131
+ severity: string;
132
+ message: string;
133
+ };
134
+ error?: {
135
+ message: string;
136
+ };
137
+ }
138
+ /**
139
+ * Developer experience utilities
140
+ */
141
+ export declare class DeveloperExperienceUtils {
142
+ /**
143
+ * Format error message for better developer experience
144
+ */
145
+ static formatError(error: EnhancedTachUIError): FormattedErrorMessage;
146
+ /**
147
+ * Get statistics about developer experience features
148
+ */
149
+ static getStatistics(): {
150
+ errorCount: number;
151
+ warningCount: number;
152
+ suggestionCount: number;
153
+ };
154
+ /**
155
+ * Get suggestions for a diagnostic
156
+ */
157
+ static getSuggestions(_code: string, _data?: any): any[];
158
+ /**
159
+ * Test developer experience features
160
+ */
161
+ static test(): Promise<void>;
162
+ }
163
+ /**
164
+ * Development mode utilities
165
+ */
166
+ export declare const devMode: {
167
+ /**
168
+ * Enable enhanced error reporting in development
169
+ */
170
+ enableEnhancedErrors(): void;
171
+ /**
172
+ * Log component tree for debugging
173
+ */
174
+ logComponentTree(root: any, depth?: number): void;
175
+ };
176
+ //# sourceMappingURL=enhanced-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enhanced-errors.d.ts","sourceRoot":"","sources":["../../src/debug/enhanced-errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAErD;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,KAAK;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,CAAA;IAC1E,QAAQ,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CACzB;AAED;;GAEG;AAEH,qBAAa,qBAAqB;IAChC;;OAEG;IACH,MAAM,CAAC,uBAAuB,CAC5B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,iBAAiB,GAC5B,mBAAmB;IAqBtB;;OAEG;IACH,MAAM,CAAC,wBAAwB,CAC7B,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,GAAG,GACf,mBAAmB;IAuBtB;;OAEG;IACH,MAAM,CAAC,mBAAmB,CACxB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,MAAM,GACf,mBAAm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