@sc4rfurryx/proteusjs 1.0.0

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 (82) hide show
  1. package/API.md +438 -0
  2. package/FEATURES.md +286 -0
  3. package/LICENSE +21 -0
  4. package/README.md +645 -0
  5. package/dist/.tsbuildinfo +1 -0
  6. package/dist/proteus.cjs.js +16014 -0
  7. package/dist/proteus.cjs.js.map +1 -0
  8. package/dist/proteus.d.ts +3018 -0
  9. package/dist/proteus.esm.js +16005 -0
  10. package/dist/proteus.esm.js.map +1 -0
  11. package/dist/proteus.esm.min.js +8 -0
  12. package/dist/proteus.esm.min.js.map +1 -0
  13. package/dist/proteus.js +16020 -0
  14. package/dist/proteus.js.map +1 -0
  15. package/dist/proteus.min.js +8 -0
  16. package/dist/proteus.min.js.map +1 -0
  17. package/package.json +98 -0
  18. package/src/__tests__/mvp-integration.test.ts +518 -0
  19. package/src/accessibility/AccessibilityEngine.ts +2106 -0
  20. package/src/accessibility/ScreenReaderSupport.ts +444 -0
  21. package/src/accessibility/__tests__/ScreenReaderSupport.test.ts +435 -0
  22. package/src/animations/FLIPAnimationSystem.ts +491 -0
  23. package/src/compatibility/BrowserCompatibility.ts +1076 -0
  24. package/src/containers/BreakpointSystem.ts +347 -0
  25. package/src/containers/ContainerBreakpoints.ts +726 -0
  26. package/src/containers/ContainerManager.ts +370 -0
  27. package/src/containers/ContainerUnits.ts +336 -0
  28. package/src/containers/ContextIsolation.ts +394 -0
  29. package/src/containers/ElementQueries.ts +411 -0
  30. package/src/containers/SmartContainer.ts +536 -0
  31. package/src/containers/SmartContainers.ts +376 -0
  32. package/src/containers/__tests__/ContainerBreakpoints.test.ts +411 -0
  33. package/src/containers/__tests__/SmartContainers.test.ts +281 -0
  34. package/src/content/ResponsiveImages.ts +570 -0
  35. package/src/core/EventSystem.ts +147 -0
  36. package/src/core/MemoryManager.ts +321 -0
  37. package/src/core/PerformanceMonitor.ts +238 -0
  38. package/src/core/PluginSystem.ts +275 -0
  39. package/src/core/ProteusJS.test.ts +164 -0
  40. package/src/core/ProteusJS.ts +962 -0
  41. package/src/developer/PerformanceProfiler.ts +567 -0
  42. package/src/developer/VisualDebuggingTools.ts +656 -0
  43. package/src/developer/ZeroConfigSystem.ts +593 -0
  44. package/src/index.ts +35 -0
  45. package/src/integration.test.ts +227 -0
  46. package/src/layout/AdaptiveGrid.ts +429 -0
  47. package/src/layout/ContentReordering.ts +532 -0
  48. package/src/layout/FlexboxEnhancer.ts +406 -0
  49. package/src/layout/FlowLayout.ts +545 -0
  50. package/src/layout/SpacingSystem.ts +512 -0
  51. package/src/observers/IntersectionObserverPolyfill.ts +289 -0
  52. package/src/observers/ObserverManager.ts +299 -0
  53. package/src/observers/ResizeObserverPolyfill.ts +179 -0
  54. package/src/performance/BatchDOMOperations.ts +519 -0
  55. package/src/performance/CSSOptimizationEngine.ts +646 -0
  56. package/src/performance/CacheOptimizationSystem.ts +601 -0
  57. package/src/performance/EfficientEventHandler.ts +740 -0
  58. package/src/performance/LazyEvaluationSystem.ts +532 -0
  59. package/src/performance/MemoryManagementSystem.ts +497 -0
  60. package/src/performance/PerformanceMonitor.ts +931 -0
  61. package/src/performance/__tests__/BatchDOMOperations.test.ts +309 -0
  62. package/src/performance/__tests__/EfficientEventHandler.test.ts +268 -0
  63. package/src/performance/__tests__/PerformanceMonitor.test.ts +422 -0
  64. package/src/polyfills/BrowserPolyfills.ts +586 -0
  65. package/src/polyfills/__tests__/BrowserPolyfills.test.ts +328 -0
  66. package/src/test/setup.ts +115 -0
  67. package/src/theming/SmartThemeSystem.ts +591 -0
  68. package/src/types/index.ts +134 -0
  69. package/src/typography/ClampScaling.ts +356 -0
  70. package/src/typography/FluidTypography.ts +759 -0
  71. package/src/typography/LineHeightOptimization.ts +430 -0
  72. package/src/typography/LineHeightOptimizer.ts +326 -0
  73. package/src/typography/TextFitting.ts +355 -0
  74. package/src/typography/TypographicScale.ts +428 -0
  75. package/src/typography/VerticalRhythm.ts +369 -0
  76. package/src/typography/__tests__/FluidTypography.test.ts +432 -0
  77. package/src/typography/__tests__/LineHeightOptimization.test.ts +436 -0
  78. package/src/utils/Logger.ts +173 -0
  79. package/src/utils/debounce.ts +259 -0
  80. package/src/utils/performance.ts +371 -0
  81. package/src/utils/support.ts +106 -0
  82. package/src/utils/version.ts +24 -0
@@ -0,0 +1,3018 @@
1
+ interface ThemeState {
2
+ currentScheme: string;
3
+ systemPreference: 'light' | 'dark';
4
+ userPreference: string | null;
5
+ contrastLevel: 'normal' | 'high' | 'low';
6
+ reducedMotion: boolean;
7
+ highContrast: boolean;
8
+ }
9
+
10
+ interface LazyMetrics {
11
+ totalComponents: number;
12
+ activatedComponents: number;
13
+ pendingComponents: number;
14
+ cacheHits: number;
15
+ cacheMisses: number;
16
+ averageActivationTime: number;
17
+ idleCallbacksUsed: number;
18
+ }
19
+
20
+ interface OptimizationMetrics {
21
+ originalSize: number;
22
+ optimizedSize: number;
23
+ compressionRatio: number;
24
+ rulesRemoved: number;
25
+ duplicatesFound: number;
26
+ customPropertiesOptimized: number;
27
+ criticalRulesExtracted: number;
28
+ }
29
+
30
+ /**
31
+ * PerformanceMonitor - Comprehensive performance monitoring and optimization
32
+ * Tracks frame rates, memory usage, and provides optimization recommendations
33
+ */
34
+ interface PerformanceMetrics$1 {
35
+ frameRate: number;
36
+ averageFPS: number;
37
+ averageFrameTime: number;
38
+ memoryUsage: {
39
+ used: number;
40
+ total: number;
41
+ percentage: number;
42
+ };
43
+ domNodes: number;
44
+ eventListeners: number;
45
+ observers: number;
46
+ cacheHitRate: number;
47
+ operationsPerSecond: number;
48
+ lastMeasurement: number;
49
+ }
50
+ interface PerformanceThresholds {
51
+ minFrameRate: number;
52
+ maxFrameTime: number;
53
+ maxMemoryUsage: number;
54
+ maxDOMNodes: number;
55
+ maxEventListeners: number;
56
+ }
57
+ interface PerformanceAlert {
58
+ type: 'warning' | 'critical';
59
+ metric: string;
60
+ value: number;
61
+ threshold: number;
62
+ message: string;
63
+ timestamp: number;
64
+ suggestions: string[];
65
+ }
66
+ interface PerformanceSnapshot {
67
+ timestamp: number;
68
+ metrics: PerformanceMetrics$1;
69
+ bottlenecks: string[];
70
+ memoryLeaks: boolean;
71
+ }
72
+ interface BottleneckInfo {
73
+ type: 'dom' | 'memory' | 'cpu' | 'network';
74
+ severity: 'low' | 'medium' | 'high';
75
+ description: string;
76
+ impact: number;
77
+ suggestions: string[];
78
+ }
79
+ declare class PerformanceMonitor {
80
+ private metrics;
81
+ private thresholds;
82
+ private alerts;
83
+ private isMonitoring;
84
+ private rafId;
85
+ private lastFrameTime;
86
+ private frameCount;
87
+ private bottleneckDetector;
88
+ private memoryOptimizer;
89
+ private performanceHistory;
90
+ private callbacks;
91
+ private measurementInterval;
92
+ private detailedProfiling;
93
+ private frameTimes;
94
+ private operationCount;
95
+ private lastOperationTime;
96
+ constructor(thresholds?: Partial<PerformanceThresholds>);
97
+ /**
98
+ * Start performance monitoring (alias for start)
99
+ */
100
+ startMonitoring(): void;
101
+ /**
102
+ * Start performance monitoring
103
+ */
104
+ start(): void;
105
+ /**
106
+ * Stop performance monitoring
107
+ */
108
+ stop(): void;
109
+ /**
110
+ * Destroy the performance monitor and clean up all resources
111
+ */
112
+ destroy(): void;
113
+ /**
114
+ * Start frame rate monitoring
115
+ */
116
+ startFrameRateMonitoring(): void;
117
+ /**
118
+ * Stop frame rate monitoring
119
+ */
120
+ stopFrameRateMonitoring(): void;
121
+ /**
122
+ * Measure operation performance
123
+ */
124
+ measureOperation<T>(name: string, operation: () => Promise<T> | T): Promise<{
125
+ result: T;
126
+ duration: number;
127
+ name: string;
128
+ }>;
129
+ /**
130
+ * Detect performance bottlenecks
131
+ */
132
+ detectBottlenecks(): Array<{
133
+ type: string;
134
+ severity: 'low' | 'medium' | 'high';
135
+ description: string;
136
+ }>;
137
+ /**
138
+ * Get current performance metrics
139
+ */
140
+ getMetrics(): PerformanceMetrics$1;
141
+ /**
142
+ * Get performance alerts
143
+ */
144
+ getAlerts(): PerformanceAlert[];
145
+ /**
146
+ * Clear performance alerts
147
+ */
148
+ clearAlerts(): void;
149
+ /**
150
+ * Add performance monitoring callback
151
+ */
152
+ addCallback(id: string, callback: (metrics: PerformanceMetrics$1) => void): void;
153
+ /**
154
+ * Remove performance monitoring callback
155
+ */
156
+ removeCallback(id: string): void;
157
+ /**
158
+ * Record an operation for performance tracking
159
+ */
160
+ recordOperation(): void;
161
+ /**
162
+ * Update cache hit rate
163
+ */
164
+ updateCacheHitRate(hits: number, total: number): void;
165
+ /**
166
+ * Force immediate metrics update
167
+ */
168
+ updateMetrics(): void;
169
+ /**
170
+ * Get performance recommendations
171
+ */
172
+ getRecommendations(): string[];
173
+ /**
174
+ * Start frame rate monitoring
175
+ */
176
+ private startFrameMonitoring;
177
+ /**
178
+ * Start memory monitoring
179
+ */
180
+ private startMemoryMonitoring;
181
+ /**
182
+ * Update frame-related metrics
183
+ */
184
+ private updateFrameMetrics;
185
+ /**
186
+ * Update memory-related metrics
187
+ */
188
+ private updateMemoryMetrics;
189
+ /**
190
+ * Update DOM-related metrics
191
+ */
192
+ private updateDOMMetrics;
193
+ /**
194
+ * Update operation metrics
195
+ */
196
+ private updateOperationMetrics;
197
+ /**
198
+ * Estimate number of event listeners
199
+ */
200
+ private estimateEventListeners;
201
+ /**
202
+ * Count active observers
203
+ */
204
+ private countObservers;
205
+ /**
206
+ * Check performance thresholds and generate alerts
207
+ */
208
+ private checkThresholds;
209
+ /**
210
+ * Add performance alert
211
+ */
212
+ private addAlert;
213
+ /**
214
+ * Notify callbacks of metrics update
215
+ */
216
+ private notifyCallbacks;
217
+ /**
218
+ * Create initial metrics object
219
+ */
220
+ private createInitialMetrics;
221
+ /**
222
+ * Advanced performance monitoring methods
223
+ */
224
+ /**
225
+ * Enable detailed profiling with comprehensive metrics
226
+ */
227
+ enableDetailedProfiling(enable?: boolean): void;
228
+ /**
229
+ * Start advanced monitoring with bottleneck detection
230
+ */
231
+ private startAdvancedMonitoring;
232
+ /**
233
+ * Stop advanced monitoring
234
+ */
235
+ private stopAdvancedMonitoring;
236
+ /**
237
+ * Get comprehensive performance snapshot
238
+ */
239
+ getPerformanceSnapshot(): PerformanceSnapshot;
240
+ /**
241
+ * Get performance history for analysis
242
+ */
243
+ getPerformanceHistory(): PerformanceSnapshot[];
244
+ /**
245
+ * Analyze performance trends
246
+ */
247
+ analyzePerformanceTrends(): {
248
+ frameRateTrend: 'improving' | 'degrading' | 'stable';
249
+ memoryTrend: 'improving' | 'degrading' | 'stable';
250
+ overallHealth: 'good' | 'warning' | 'critical';
251
+ };
252
+ /**
253
+ * Calculate trend slope for a series of values
254
+ */
255
+ private calculateTrend;
256
+ /**
257
+ * Optimize performance based on current metrics
258
+ */
259
+ optimizePerformance(): void;
260
+ /**
261
+ * Optimize DOM performance
262
+ */
263
+ private optimizeDOM;
264
+ /**
265
+ * Generate performance report
266
+ */
267
+ generatePerformanceReport(): {
268
+ summary: string;
269
+ metrics: PerformanceMetrics$1;
270
+ bottlenecks: BottleneckInfo[];
271
+ trends: {
272
+ frameRateTrend: 'improving' | 'degrading' | 'stable';
273
+ memoryTrend: 'improving' | 'degrading' | 'stable';
274
+ overallHealth: 'good' | 'warning' | 'critical';
275
+ };
276
+ recommendations: string[];
277
+ };
278
+ }
279
+
280
+ interface BatchMetrics {
281
+ totalOperations: number;
282
+ readOperations: number;
283
+ writeOperations: number;
284
+ batchesProcessed: number;
285
+ averageBatchTime: number;
286
+ layoutThrashes: number;
287
+ preventedThrashes: number;
288
+ }
289
+
290
+ interface PerformanceMetrics {
291
+ frameTime: number;
292
+ fps: number;
293
+ operationsPerFrame: number;
294
+ queueSize: number;
295
+ droppedFrames: number;
296
+ averageLatency: number;
297
+ }
298
+
299
+ /**
300
+ * Browser support detection utilities
301
+ */
302
+ interface SupportInfo {
303
+ resizeObserver: boolean;
304
+ intersectionObserver: boolean;
305
+ containerQueries: boolean;
306
+ cssClamp: boolean;
307
+ cssCustomProperties: boolean;
308
+ webWorkers: boolean;
309
+ requestAnimationFrame: boolean;
310
+ passiveEventListeners: boolean;
311
+ }
312
+ /**
313
+ * Check if the current environment supports ProteusJS features
314
+ */
315
+ declare function isSupported(): boolean;
316
+
317
+ /**
318
+ * Core type definitions for ProteusJS
319
+ */
320
+ interface ProteusConfig {
321
+ debug?: boolean;
322
+ performance?: 'low' | 'medium' | 'high';
323
+ accessibility?: boolean;
324
+ autoInit?: boolean;
325
+ containers?: ContainerConfig;
326
+ typography?: TypographyConfig;
327
+ layout?: LayoutConfig;
328
+ animations?: AnimationConfig;
329
+ theming?: ThemingConfig;
330
+ }
331
+ interface ContainerConfig {
332
+ autoDetect?: boolean;
333
+ breakpoints?: Record<string, string>;
334
+ units?: boolean;
335
+ isolation?: boolean;
336
+ polyfill?: boolean;
337
+ }
338
+ interface BreakpointConfig$1 {
339
+ [key: string]: string | number;
340
+ }
341
+ interface TypographyConfig {
342
+ fluidScaling?: boolean;
343
+ autoOptimize?: boolean;
344
+ accessibility?: boolean;
345
+ scale?: {
346
+ ratio?: number;
347
+ base?: string;
348
+ levels?: number;
349
+ };
350
+ lineHeight?: {
351
+ auto?: boolean;
352
+ density?: 'compact' | 'comfortable' | 'spacious';
353
+ };
354
+ }
355
+ interface LayoutConfig {
356
+ grid?: {
357
+ auto?: boolean;
358
+ masonry?: boolean;
359
+ gap?: 'fluid' | string;
360
+ };
361
+ flexbox?: {
362
+ enhanced?: boolean;
363
+ autoWrap?: boolean;
364
+ };
365
+ spacing?: {
366
+ scale?: 'minor-third' | 'major-third' | 'perfect-fourth' | 'golden-ratio';
367
+ density?: 'compact' | 'comfortable' | 'spacious';
368
+ };
369
+ }
370
+ interface AnimationConfig {
371
+ enabled?: boolean;
372
+ respectMotionPreferences?: boolean;
373
+ duration?: number;
374
+ easing?: string;
375
+ flip?: boolean;
376
+ microInteractions?: boolean;
377
+ }
378
+ interface ThemingConfig {
379
+ darkMode?: {
380
+ auto?: boolean;
381
+ schedule?: string;
382
+ transition?: 'instant' | 'smooth';
383
+ };
384
+ contrast?: {
385
+ adaptive?: boolean;
386
+ level?: 'AA' | 'AAA';
387
+ };
388
+ }
389
+ interface AccessibilityConfig$1 {
390
+ screenReader?: boolean;
391
+ keyboardNavigation?: boolean;
392
+ colorCompliance?: 'AA' | 'AAA';
393
+ motionPreferences?: boolean;
394
+ announcements?: boolean;
395
+ }
396
+ interface PerformanceConfig {
397
+ targetFrameRate?: number;
398
+ memoryManagement?: boolean;
399
+ lazyEvaluation?: boolean;
400
+ caching?: boolean;
401
+ monitoring?: boolean;
402
+ }
403
+ interface ProteusEvent {
404
+ type: string;
405
+ target: Element;
406
+ detail?: any;
407
+ timestamp: number;
408
+ }
409
+ type ResizeCallback = (entry: ResizeObserverEntry) => void;
410
+ type IntersectionCallback = (entry: IntersectionObserverEntry) => void;
411
+
412
+ /**
413
+ * Observer Manager for ProteusJS
414
+ * Manages ResizeObserver and IntersectionObserver instances efficiently
415
+ */
416
+
417
+ declare class ObserverManager {
418
+ private resizeObservers;
419
+ private intersectionObservers;
420
+ private resizeEntries;
421
+ private intersectionEntries;
422
+ private isPolyfillMode;
423
+ constructor();
424
+ /**
425
+ * Observe element for resize changes
426
+ */
427
+ observeResize(element: Element, callback: ResizeCallback, options?: ResizeObserverOptions): () => void;
428
+ /**
429
+ * Observe element for intersection changes
430
+ */
431
+ observeIntersection(element: Element, callback: IntersectionCallback, options?: IntersectionObserverInit): () => void;
432
+ /**
433
+ * Stop observing element for resize changes
434
+ */
435
+ unobserveResize(element: Element): void;
436
+ /**
437
+ * Stop observing element for intersection changes
438
+ */
439
+ unobserveIntersection(element: Element): void;
440
+ /**
441
+ * Get total number of observed elements
442
+ */
443
+ getObservedElementCount(): number;
444
+ /**
445
+ * Get number of active observers
446
+ */
447
+ getObserverCount(): number;
448
+ /**
449
+ * Check if element is being observed for resize
450
+ */
451
+ isObservingResize(element: Element): boolean;
452
+ /**
453
+ * Check if element is being observed for intersection
454
+ */
455
+ isObservingIntersection(element: Element): boolean;
456
+ /**
457
+ * Disconnect all observers and clean up
458
+ */
459
+ destroy(): void;
460
+ /**
461
+ * Get debug information
462
+ */
463
+ getDebugInfo(): object;
464
+ /**
465
+ * Check if polyfills are needed and set up accordingly
466
+ */
467
+ private checkPolyfillNeeds;
468
+ /**
469
+ * Set up ResizeObserver polyfill
470
+ */
471
+ private setupResizeObserverPolyfill;
472
+ /**
473
+ * Set up IntersectionObserver polyfill
474
+ */
475
+ private setupIntersectionObserverPolyfill;
476
+ /**
477
+ * Create a new ResizeObserver instance
478
+ */
479
+ private createResizeObserver;
480
+ /**
481
+ * Create a new IntersectionObserver instance
482
+ */
483
+ private createIntersectionObserver;
484
+ /**
485
+ * Generate key for ResizeObserver based on options
486
+ */
487
+ private getResizeObserverKey;
488
+ /**
489
+ * Generate key for IntersectionObserver based on options
490
+ */
491
+ private getIntersectionObserverKey;
492
+ /**
493
+ * Clean up ResizeObserver if no longer needed
494
+ */
495
+ private cleanupResizeObserver;
496
+ /**
497
+ * Clean up IntersectionObserver if no longer needed
498
+ */
499
+ private cleanupIntersectionObserver;
500
+ }
501
+
502
+ /**
503
+ * Memory Manager for ProteusJS
504
+ * Prevents memory leaks and manages resource cleanup
505
+ */
506
+ interface ManagedResource {
507
+ id: string;
508
+ type: 'observer' | 'listener' | 'timer' | 'animation' | 'cache';
509
+ cleanup: () => void;
510
+ element?: Element;
511
+ timestamp: number;
512
+ }
513
+ declare class MemoryManager {
514
+ private resources;
515
+ private elementResources;
516
+ private mutationObserver;
517
+ private cleanupInterval;
518
+ private isMonitoring;
519
+ constructor();
520
+ /**
521
+ * Register a resource for automatic cleanup
522
+ */
523
+ register(resource: Omit<ManagedResource, 'timestamp'>): string;
524
+ /**
525
+ * Unregister and cleanup a resource
526
+ */
527
+ unregister(resourceId: string): boolean;
528
+ /**
529
+ * Cleanup all resources associated with an element
530
+ */
531
+ cleanupElement(element: Element): number;
532
+ /**
533
+ * Cleanup resources by type
534
+ */
535
+ cleanupByType(type: ManagedResource['type']): number;
536
+ /**
537
+ * Cleanup old resources based on age
538
+ */
539
+ cleanupOldResources(maxAge?: number): number;
540
+ /**
541
+ * Force garbage collection if available
542
+ */
543
+ forceGarbageCollection(): void;
544
+ /**
545
+ * Get memory usage information
546
+ */
547
+ getMemoryInfo(): object;
548
+ /**
549
+ * Check for potential memory leaks
550
+ */
551
+ detectLeaks(): string[];
552
+ /**
553
+ * Cleanup all resources and stop monitoring
554
+ */
555
+ destroy(): void;
556
+ /**
557
+ * Start monitoring for memory leaks
558
+ */
559
+ startMonitoring(): void;
560
+ /**
561
+ * Stop monitoring
562
+ */
563
+ stopMonitoring(): void;
564
+ /**
565
+ * Setup DOM mutation observer to detect removed elements
566
+ */
567
+ private setupDOMObserver;
568
+ /**
569
+ * Handle element removal from DOM
570
+ */
571
+ private handleElementRemoval;
572
+ /**
573
+ * Start periodic cleanup
574
+ */
575
+ private startPeriodicCleanup;
576
+ }
577
+
578
+ /**
579
+ * SmartContainer - Intelligent container management for ProteusJS
580
+ * Automatically detects and manages container-aware responsive behavior
581
+ */
582
+
583
+ interface ContainerState {
584
+ width: number;
585
+ height: number;
586
+ aspectRatio: number;
587
+ containerType: 'inline-size' | 'size' | 'block-size';
588
+ activeBreakpoints: string[];
589
+ lastUpdate: number;
590
+ }
591
+ interface ContainerOptions {
592
+ breakpoints?: BreakpointConfig$1;
593
+ containerType?: 'inline-size' | 'size' | 'block-size' | 'auto';
594
+ debounceMs?: number;
595
+ callbacks?: {
596
+ resize?: (state: ContainerState) => void;
597
+ breakpointChange?: (breakpoint: string, active: boolean) => void;
598
+ };
599
+ cssClasses?: boolean;
600
+ units?: boolean;
601
+ announceChanges?: boolean;
602
+ }
603
+ declare class SmartContainer {
604
+ private element;
605
+ private options;
606
+ private state;
607
+ private observerManager;
608
+ private memoryManager;
609
+ private unobserveResize;
610
+ private debouncedUpdate;
611
+ private isActive;
612
+ private liveRegion;
613
+ constructor(element: Element, options: ContainerOptions | undefined, observerManager: ObserverManager, memoryManager: MemoryManager);
614
+ /**
615
+ * Start observing the container
616
+ */
617
+ activate(): void;
618
+ /**
619
+ * Stop observing the container
620
+ */
621
+ deactivate(): void;
622
+ /**
623
+ * Get current container state
624
+ */
625
+ getState(): ContainerState;
626
+ /**
627
+ * Get container element
628
+ */
629
+ getElement(): Element;
630
+ /**
631
+ * Update breakpoints configuration
632
+ */
633
+ updateBreakpoints(breakpoints: BreakpointConfig$1): void;
634
+ /**
635
+ * Check if a breakpoint is currently active
636
+ */
637
+ isBreakpointActive(breakpoint: string): boolean;
638
+ /**
639
+ * Get container dimensions in various units
640
+ */
641
+ getDimensions(): {
642
+ px: {
643
+ width: number;
644
+ height: number;
645
+ };
646
+ cw: {
647
+ width: number;
648
+ height: number;
649
+ };
650
+ ch: {
651
+ width: number;
652
+ height: number;
653
+ };
654
+ cmin: number;
655
+ cmax: number;
656
+ };
657
+ /**
658
+ * Handle resize events
659
+ */
660
+ private handleResize;
661
+ /**
662
+ * Update container state
663
+ */
664
+ private updateState;
665
+ /**
666
+ * Create initial container state
667
+ */
668
+ private createInitialState;
669
+ /**
670
+ * Auto-detect optimal container type
671
+ */
672
+ private detectContainerType;
673
+ /**
674
+ * Set up native container query support if available
675
+ */
676
+ private setupContainerQuery;
677
+ /**
678
+ * Calculate active breakpoints based on current dimensions
679
+ */
680
+ private calculateActiveBreakpoints;
681
+ /**
682
+ * Get relevant dimension based on container type
683
+ */
684
+ private getRelevantDimension;
685
+ /**
686
+ * Parse breakpoint value to pixels
687
+ */
688
+ private parseBreakpointValue;
689
+ /**
690
+ * Update CSS classes for breakpoints
691
+ */
692
+ private updateCSSClasses;
693
+ /**
694
+ * Remove all CSS classes
695
+ */
696
+ private removeCSSClasses;
697
+ /**
698
+ * Update container units as CSS custom properties
699
+ */
700
+ private updateContainerUnits;
701
+ /**
702
+ * Notify breakpoint changes
703
+ */
704
+ private notifyBreakpointChanges;
705
+ /**
706
+ * Generate unique container name
707
+ */
708
+ private generateContainerName;
709
+ /**
710
+ * Get CSS class prefix
711
+ */
712
+ private getClassPrefix;
713
+ /**
714
+ * Get unique element identifier
715
+ */
716
+ private getElementId;
717
+ /**
718
+ * Setup announcement functionality for breakpoint changes
719
+ */
720
+ private setupAnnouncements;
721
+ /**
722
+ * Announce a message to screen readers
723
+ */
724
+ private announce;
725
+ /**
726
+ * Announce breakpoint changes to screen readers
727
+ */
728
+ private announceBreakpointChanges;
729
+ }
730
+
731
+ /**
732
+ * Clamp-Based Scaling System for ProteusJS
733
+ * Implements intelligent font scaling using CSS clamp() with JavaScript fallbacks
734
+ */
735
+ interface ScalingConfig {
736
+ minSize: number;
737
+ maxSize: number;
738
+ minContainer: number;
739
+ maxContainer: number;
740
+ unit: 'px' | 'rem' | 'em';
741
+ containerUnit: 'px' | 'cw' | 'ch' | 'cmin' | 'cmax';
742
+ curve: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'custom';
743
+ customCurve?: (progress: number) => number;
744
+ }
745
+
746
+ /**
747
+ * Typographic Scale Generator for ProteusJS
748
+ * Creates harmonious type scales with mathematical ratios and baseline grid alignment
749
+ */
750
+ interface ScaleConfig {
751
+ ratio: number | string;
752
+ baseSize: number;
753
+ baseUnit?: 'px' | 'rem' | 'em';
754
+ levels?: number;
755
+ steps?: number;
756
+ direction?: 'up' | 'down' | 'both';
757
+ roundToGrid?: boolean;
758
+ gridSize?: number;
759
+ reverse?: boolean;
760
+ }
761
+ interface ScaleLevel {
762
+ level: number;
763
+ size: number;
764
+ ratio: number;
765
+ cssValue: string;
766
+ name?: string;
767
+ }
768
+ interface TypeScale {
769
+ config: ScaleConfig;
770
+ levels: ScaleLevel[];
771
+ cssCustomProperties: Record<string, string>;
772
+ cssClasses: Record<string, string>;
773
+ }
774
+
775
+ /**
776
+ * Adaptive Grid System for ProteusJS
777
+ * Container-aware CSS Grid with auto-column calculation and masonry support
778
+ */
779
+ interface GridConfig {
780
+ minColumnWidth: number;
781
+ maxColumns: number;
782
+ gap: number | 'fluid';
783
+ aspectRatio?: number;
784
+ masonry: boolean;
785
+ autoFlow: 'row' | 'column' | 'row dense' | 'column dense';
786
+ alignment: {
787
+ justify: 'start' | 'end' | 'center' | 'stretch' | 'space-around' | 'space-between' | 'space-evenly';
788
+ align: 'start' | 'end' | 'center' | 'stretch';
789
+ };
790
+ responsive: boolean;
791
+ breakpoints?: Record<string, Partial<GridConfig>>;
792
+ }
793
+ interface GridState {
794
+ columns: number;
795
+ rows: number;
796
+ gap: number;
797
+ itemWidth: number;
798
+ itemHeight: number;
799
+ containerWidth: number;
800
+ containerHeight: number;
801
+ }
802
+ declare class AdaptiveGrid {
803
+ private element;
804
+ private config;
805
+ private state;
806
+ private resizeObserver;
807
+ private mutationObserver;
808
+ constructor(element: Element, config?: Partial<GridConfig>);
809
+ /**
810
+ * Initialize and activate the grid
811
+ */
812
+ activate(): void;
813
+ /**
814
+ * Deactivate and clean up the grid
815
+ */
816
+ deactivate(): void;
817
+ /**
818
+ * Update grid configuration
819
+ */
820
+ updateConfig(newConfig: Partial<GridConfig>): void;
821
+ /**
822
+ * Get current grid state
823
+ */
824
+ getState(): GridState;
825
+ /**
826
+ * Force grid recalculation
827
+ */
828
+ recalculate(): void;
829
+ /**
830
+ * Add items to the grid
831
+ */
832
+ addItems(items: Element[]): void;
833
+ /**
834
+ * Remove items from the grid
835
+ */
836
+ removeItems(items: Element[]): void;
837
+ /**
838
+ * Get optimal column count for container width
839
+ */
840
+ calculateOptimalColumns(containerWidth: number): number;
841
+ /**
842
+ * Setup initial grid styles
843
+ */
844
+ private setupGrid;
845
+ /**
846
+ * Setup regular CSS Grid
847
+ */
848
+ private setupRegularGrid;
849
+ /**
850
+ * Setup masonry grid using CSS Grid Level 3 or fallback
851
+ */
852
+ private setupMasonryGrid;
853
+ /**
854
+ * Update grid layout
855
+ */
856
+ private updateGrid;
857
+ /**
858
+ * Apply calculated grid styles
859
+ */
860
+ private applyGridStyles;
861
+ /**
862
+ * Prepare individual grid item
863
+ */
864
+ private prepareGridItem;
865
+ /**
866
+ * Implement JavaScript masonry layout
867
+ */
868
+ private implementJavaScriptMasonry;
869
+ /**
870
+ * Update masonry layout
871
+ */
872
+ private updateMasonryLayout;
873
+ /**
874
+ * Setup observers for responsive behavior
875
+ */
876
+ private setupObservers;
877
+ /**
878
+ * Clean up observers
879
+ */
880
+ private cleanupObservers;
881
+ /**
882
+ * Remove grid styles
883
+ */
884
+ private removeGridStyles;
885
+ /**
886
+ * Get active configuration based on container width
887
+ */
888
+ private getActiveConfig;
889
+ /**
890
+ * Get gap value in pixels
891
+ */
892
+ private getGapValue;
893
+ /**
894
+ * Get number of grid items
895
+ */
896
+ private getItemCount;
897
+ /**
898
+ * Check if native masonry is supported
899
+ */
900
+ private supportsMasonry;
901
+ /**
902
+ * Create initial state
903
+ */
904
+ private createInitialState;
905
+ }
906
+
907
+ /**
908
+ * Event System for ProteusJS
909
+ * Handles all internal and external events
910
+ */
911
+
912
+ type EventCallback = (event: ProteusEvent) => void;
913
+ declare class EventSystem {
914
+ private listeners;
915
+ private initialized;
916
+ /**
917
+ * Initialize the event system
918
+ */
919
+ init(): void;
920
+ /**
921
+ * Add event listener
922
+ */
923
+ on(eventType: string, callback: EventCallback): () => void;
924
+ /**
925
+ * Add one-time event listener
926
+ */
927
+ once(eventType: string, callback: EventCallback): () => void;
928
+ /**
929
+ * Remove event listener
930
+ */
931
+ off(eventType: string, callback?: EventCallback): void;
932
+ /**
933
+ * Emit event
934
+ */
935
+ emit(eventType: string, detail?: any, target?: Element): void;
936
+ /**
937
+ * Get all event types with listeners
938
+ */
939
+ getEventTypes(): string[];
940
+ /**
941
+ * Get listener count for event type
942
+ */
943
+ getListenerCount(eventType: string): number;
944
+ /**
945
+ * Check if event type has listeners
946
+ */
947
+ hasListeners(eventType: string): boolean;
948
+ /**
949
+ * Clear all listeners
950
+ */
951
+ clear(): void;
952
+ /**
953
+ * Destroy the event system
954
+ */
955
+ destroy(): void;
956
+ /**
957
+ * Get debug information
958
+ */
959
+ getDebugInfo(): object;
960
+ }
961
+
962
+ /**
963
+ * Plugin System for ProteusJS
964
+ * Enables extensibility and modular architecture
965
+ */
966
+ interface ProteusPlugin {
967
+ name: string;
968
+ version: string;
969
+ dependencies?: string[];
970
+ install: (proteus: any) => void;
971
+ uninstall?: (proteus: any) => void;
972
+ config?: Record<string, any>;
973
+ }
974
+ declare class PluginSystem {
975
+ private plugins;
976
+ private installedPlugins;
977
+ private proteus;
978
+ private initialized;
979
+ constructor(proteus: any);
980
+ /**
981
+ * Initialize the plugin system
982
+ */
983
+ init(): void;
984
+ /**
985
+ * Register a plugin
986
+ */
987
+ register(plugin: ProteusPlugin): this;
988
+ /**
989
+ * Install a plugin
990
+ */
991
+ install(pluginName: string): this;
992
+ /**
993
+ * Uninstall a plugin
994
+ */
995
+ uninstall(pluginName: string): this;
996
+ /**
997
+ * Check if a plugin is installed
998
+ */
999
+ isInstalled(pluginName: string): boolean;
1000
+ /**
1001
+ * Get list of registered plugins
1002
+ */
1003
+ getRegisteredPlugins(): string[];
1004
+ /**
1005
+ * Get list of installed plugins
1006
+ */
1007
+ getInstalledPlugins(): string[];
1008
+ /**
1009
+ * Get plugin information
1010
+ */
1011
+ getPluginInfo(pluginName: string): ProteusPlugin | undefined;
1012
+ /**
1013
+ * Install multiple plugins in dependency order
1014
+ */
1015
+ installMany(pluginNames: string[]): this;
1016
+ /**
1017
+ * Destroy the plugin system
1018
+ */
1019
+ destroy(): void;
1020
+ /**
1021
+ * Validate plugin structure
1022
+ */
1023
+ private validatePlugin;
1024
+ /**
1025
+ * Get plugins that depend on the given plugin
1026
+ */
1027
+ private getDependents;
1028
+ /**
1029
+ * Sort plugins by dependency order
1030
+ */
1031
+ private sortByDependencies;
1032
+ }
1033
+
1034
+ /**
1035
+ * Container Manager for ProteusJS
1036
+ * Manages multiple SmartContainer instances and provides the main API
1037
+ */
1038
+
1039
+ declare class ContainerManager {
1040
+ private containers;
1041
+ private observerManager;
1042
+ private memoryManager;
1043
+ private eventSystem;
1044
+ private config;
1045
+ private autoDetectionEnabled;
1046
+ constructor(config: ContainerConfig, observerManager: ObserverManager, memoryManager: MemoryManager, eventSystem: EventSystem);
1047
+ /**
1048
+ * Create and manage a container
1049
+ */
1050
+ container(selector: string | Element | Element[], options?: ContainerOptions): SmartContainer | SmartContainer[];
1051
+ /**
1052
+ * Remove container management from element(s)
1053
+ */
1054
+ removeContainer(selector: string | Element | Element[]): boolean;
1055
+ /**
1056
+ * Get container instance for element
1057
+ */
1058
+ getContainer(element: Element): SmartContainer | undefined;
1059
+ /**
1060
+ * Get all managed containers
1061
+ */
1062
+ getAllContainers(): SmartContainer[];
1063
+ /**
1064
+ * Get containers by breakpoint
1065
+ */
1066
+ getContainersByBreakpoint(breakpoint: string): SmartContainer[];
1067
+ /**
1068
+ * Update global breakpoints
1069
+ */
1070
+ updateGlobalBreakpoints(breakpoints: BreakpointConfig$1): void;
1071
+ /**
1072
+ * Enable automatic container detection
1073
+ */
1074
+ enableAutoDetection(): void;
1075
+ /**
1076
+ * Disable automatic container detection
1077
+ */
1078
+ disableAutoDetection(): void;
1079
+ /**
1080
+ * Manually scan for containers
1081
+ */
1082
+ scanForContainers(): void;
1083
+ /**
1084
+ * Get container statistics
1085
+ */
1086
+ getStats(): object;
1087
+ /**
1088
+ * Destroy all containers and clean up
1089
+ */
1090
+ destroy(): void;
1091
+ /**
1092
+ * Normalize selector to array of elements
1093
+ */
1094
+ private normalizeSelector;
1095
+ /**
1096
+ * Find potential container elements
1097
+ */
1098
+ private findContainerCandidates;
1099
+ /**
1100
+ * Extract container options from element attributes
1101
+ */
1102
+ private extractOptionsFromElement;
1103
+ /**
1104
+ * Set up mutation observer for auto-detection
1105
+ */
1106
+ private setupMutationObserver;
1107
+ }
1108
+
1109
+ /**
1110
+ * Enhanced Flexbox System for ProteusJS
1111
+ * Container query integration with intelligent flex calculations
1112
+ */
1113
+ interface FlexboxConfig {
1114
+ direction: 'row' | 'column' | 'row-reverse' | 'column-reverse';
1115
+ wrap: 'nowrap' | 'wrap' | 'wrap-reverse' | 'auto';
1116
+ justify: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
1117
+ align: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
1118
+ gap: number | 'fluid';
1119
+ responsive: boolean;
1120
+ autoWrap: boolean;
1121
+ minItemWidth?: number;
1122
+ maxItemWidth?: number;
1123
+ itemGrowRatio?: number;
1124
+ itemShrinkRatio?: number;
1125
+ breakpoints?: Record<string, Partial<FlexboxConfig>>;
1126
+ }
1127
+ interface FlexItemConfig {
1128
+ grow: number;
1129
+ shrink: number;
1130
+ basis: string | number;
1131
+ order?: number;
1132
+ alignSelf?: 'auto' | 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
1133
+ responsive?: boolean;
1134
+ }
1135
+ interface FlexboxState {
1136
+ containerWidth: number;
1137
+ containerHeight: number;
1138
+ itemCount: number;
1139
+ wrappedLines: number;
1140
+ optimalItemWidth: number;
1141
+ actualGap: number;
1142
+ overflow: boolean;
1143
+ }
1144
+ declare class FlexboxEnhancer {
1145
+ private element;
1146
+ private config;
1147
+ private state;
1148
+ private resizeObserver;
1149
+ private mutationObserver;
1150
+ constructor(element: Element, config?: Partial<FlexboxConfig>);
1151
+ /**
1152
+ * Activate the enhanced flexbox
1153
+ */
1154
+ activate(): void;
1155
+ /**
1156
+ * Deactivate and clean up
1157
+ */
1158
+ deactivate(): void;
1159
+ /**
1160
+ * Update flexbox configuration
1161
+ */
1162
+ updateConfig(newConfig: Partial<FlexboxConfig>): void;
1163
+ /**
1164
+ * Get current flexbox state
1165
+ */
1166
+ getState(): FlexboxState;
1167
+ /**
1168
+ * Configure individual flex item
1169
+ */
1170
+ configureItem(item: Element, config: FlexItemConfig): void;
1171
+ /**
1172
+ * Auto-configure all flex items
1173
+ */
1174
+ autoConfigureItems(): void;
1175
+ /**
1176
+ * Detect if wrapping is needed
1177
+ */
1178
+ shouldWrap(): boolean;
1179
+ /**
1180
+ * Calculate optimal space distribution
1181
+ */
1182
+ calculateSpaceDistribution(): {
1183
+ itemWidth: number;
1184
+ gap: number;
1185
+ remainingSpace: number;
1186
+ };
1187
+ /**
1188
+ * Calculate items per line for wrapped layout
1189
+ */
1190
+ calculateItemsPerLine(): number;
1191
+ /**
1192
+ * Setup initial flexbox styles
1193
+ */
1194
+ private setupFlexbox;
1195
+ /**
1196
+ * Update flexbox layout
1197
+ */
1198
+ private updateFlexbox;
1199
+ /**
1200
+ * Apply flexbox styles
1201
+ */
1202
+ private applyFlexboxStyles;
1203
+ /**
1204
+ * Calculate optimal item configuration
1205
+ */
1206
+ private calculateOptimalItemConfig;
1207
+ /**
1208
+ * Calculate number of wrapped lines
1209
+ */
1210
+ private calculateWrappedLines;
1211
+ /**
1212
+ * Check if content overflows
1213
+ */
1214
+ private checkOverflow;
1215
+ /**
1216
+ * Get active configuration based on container width
1217
+ */
1218
+ private getActiveConfig;
1219
+ /**
1220
+ * Get gap value in pixels
1221
+ */
1222
+ private getGapValue;
1223
+ /**
1224
+ * Setup observers for responsive behavior
1225
+ */
1226
+ private setupObservers;
1227
+ /**
1228
+ * Clean up observers
1229
+ */
1230
+ private cleanupObservers;
1231
+ /**
1232
+ * Remove flexbox styles
1233
+ */
1234
+ private removeFlexboxStyles;
1235
+ /**
1236
+ * Create initial state
1237
+ */
1238
+ private createInitialState;
1239
+ }
1240
+
1241
+ /**
1242
+ * Flow Layout Engine for ProteusJS
1243
+ * Natural content flow with reading pattern optimization
1244
+ */
1245
+ interface FlowConfig {
1246
+ pattern: 'z-pattern' | 'f-pattern' | 'gutenberg' | 'natural' | 'custom' | 'auto';
1247
+ direction: 'ltr' | 'rtl' | 'auto';
1248
+ language: string;
1249
+ accessibility: boolean;
1250
+ focusManagement: boolean;
1251
+ skipLinks: boolean;
1252
+ landmarks: boolean;
1253
+ readingOrder: 'visual' | 'logical' | 'auto';
1254
+ customFlow?: FlowStep[];
1255
+ }
1256
+ interface FlowStep {
1257
+ selector: string;
1258
+ priority: number;
1259
+ region: 'header' | 'main' | 'content' | 'footer' | 'navigation' | 'sidebar';
1260
+ tabIndex?: number;
1261
+ ariaLabel?: string;
1262
+ landmark?: string;
1263
+ }
1264
+ interface FlowState {
1265
+ currentPattern: string;
1266
+ direction: 'ltr' | 'rtl';
1267
+ focusableElements: Element[];
1268
+ tabOrder: Element[];
1269
+ landmarks: Map<string, Element>;
1270
+ skipTargets: Element[];
1271
+ }
1272
+ declare class FlowLayout {
1273
+ private element;
1274
+ private config;
1275
+ private state;
1276
+ private mutationObserver;
1277
+ private static readonly READING_PATTERNS;
1278
+ private static readonly RTL_LANGUAGES;
1279
+ constructor(element: Element, config?: Partial<FlowConfig>);
1280
+ /**
1281
+ * Activate the flow layout
1282
+ */
1283
+ activate(): void;
1284
+ /**
1285
+ * Deactivate and clean up
1286
+ */
1287
+ deactivate(): void;
1288
+ /**
1289
+ * Update flow configuration
1290
+ */
1291
+ updateConfig(newConfig: Partial<FlowConfig>): void;
1292
+ /**
1293
+ * Get current flow state
1294
+ */
1295
+ getState(): FlowState;
1296
+ /**
1297
+ * Manually set tab order
1298
+ */
1299
+ setTabOrder(elements: Element[]): void;
1300
+ /**
1301
+ * Add skip link
1302
+ */
1303
+ addSkipLink(target: Element, label: string): void;
1304
+ /**
1305
+ * Analyze content structure
1306
+ */
1307
+ private analyzeContent;
1308
+ /**
1309
+ * Apply flow pattern
1310
+ */
1311
+ private applyFlowPattern;
1312
+ /**
1313
+ * Setup accessibility features
1314
+ */
1315
+ private setupAccessibility;
1316
+ /**
1317
+ * Detect reading direction
1318
+ */
1319
+ private detectReadingDirection;
1320
+ /**
1321
+ * Find all focusable elements
1322
+ */
1323
+ private findFocusableElements;
1324
+ /**
1325
+ * Identify semantic landmarks
1326
+ */
1327
+ private identifyLandmarks;
1328
+ /**
1329
+ * Determine optimal reading pattern
1330
+ */
1331
+ private determineOptimalPattern;
1332
+ /**
1333
+ * Sort elements by pattern priority
1334
+ */
1335
+ private sortElementsByPattern;
1336
+ /**
1337
+ * Apply visual flow styles
1338
+ */
1339
+ private applyVisualFlow;
1340
+ /**
1341
+ * Set logical tab order
1342
+ */
1343
+ private setLogicalTabOrder;
1344
+ /**
1345
+ * Add landmark roles and labels
1346
+ */
1347
+ private addLandmarks;
1348
+ /**
1349
+ * Add default skip links
1350
+ */
1351
+ private addDefaultSkipLinks;
1352
+ /**
1353
+ * Set reading order for screen readers
1354
+ */
1355
+ private setReadingOrder;
1356
+ /**
1357
+ * Generate landmark label
1358
+ */
1359
+ private generateLandmarkLabel;
1360
+ /**
1361
+ * Add CSS for flow layout
1362
+ */
1363
+ private addFlowCSS;
1364
+ /**
1365
+ * Ensure element has an ID
1366
+ */
1367
+ private ensureId;
1368
+ /**
1369
+ * Setup observers
1370
+ */
1371
+ private setupObservers;
1372
+ /**
1373
+ * Clean up observers
1374
+ */
1375
+ private cleanupObservers;
1376
+ /**
1377
+ * Remove flow styles
1378
+ */
1379
+ private removeFlowStyles;
1380
+ /**
1381
+ * Remove accessibility features
1382
+ */
1383
+ private removeAccessibilityFeatures;
1384
+ /**
1385
+ * Create initial state
1386
+ */
1387
+ private createInitialState;
1388
+ }
1389
+
1390
+ /**
1391
+ * Responsive Spacing System for ProteusJS
1392
+ * Fluid spacing with proportional scaling and accessibility compliance
1393
+ */
1394
+ interface SpacingConfig {
1395
+ baseSize: number;
1396
+ scale: 'minor-second' | 'major-second' | 'minor-third' | 'major-third' | 'perfect-fourth' | 'golden-ratio' | number;
1397
+ density: 'compact' | 'comfortable' | 'spacious';
1398
+ containerAware: boolean;
1399
+ accessibility: boolean;
1400
+ touchTargets: boolean;
1401
+ minTouchSize: number;
1402
+ maxSpacing: number;
1403
+ responsive: boolean;
1404
+ breakpoints?: Record<string, Partial<SpacingConfig>>;
1405
+ }
1406
+ interface SpacingScale {
1407
+ xs: number;
1408
+ sm: number;
1409
+ md: number;
1410
+ lg: number;
1411
+ xl: number;
1412
+ xxl: number;
1413
+ }
1414
+ interface SpacingState {
1415
+ currentScale: SpacingScale;
1416
+ containerSize: number;
1417
+ scaleFactor: number;
1418
+ touchCompliant: boolean;
1419
+ appliedSpacing: Map<Element, string>;
1420
+ }
1421
+ declare class SpacingSystem {
1422
+ private element;
1423
+ private config;
1424
+ private state;
1425
+ private resizeObserver;
1426
+ private static readonly SCALE_RATIOS;
1427
+ private static readonly DENSITY_MULTIPLIERS;
1428
+ private static readonly WCAG_MIN_TOUCH_SIZE;
1429
+ constructor(element: Element, config?: Partial<SpacingConfig>);
1430
+ /**
1431
+ * Activate the spacing system
1432
+ */
1433
+ activate(): void;
1434
+ /**
1435
+ * Deactivate and clean up
1436
+ */
1437
+ deactivate(): void;
1438
+ /**
1439
+ * Update spacing configuration
1440
+ */
1441
+ updateConfig(newConfig: Partial<SpacingConfig>): void;
1442
+ /**
1443
+ * Get current spacing state
1444
+ */
1445
+ getState(): SpacingState;
1446
+ /**
1447
+ * Apply spacing to specific element
1448
+ */
1449
+ applyToElement(element: Element, spacingType: keyof SpacingScale): void;
1450
+ /**
1451
+ * Apply margin spacing
1452
+ */
1453
+ applyMargin(element: Element, spacing: keyof SpacingScale | number): void;
1454
+ /**
1455
+ * Apply padding spacing
1456
+ */
1457
+ applyPadding(element: Element, spacing: keyof SpacingScale | number): void;
1458
+ /**
1459
+ * Apply gap spacing (for flex/grid)
1460
+ */
1461
+ applyGap(element: Element, spacing: keyof SpacingScale | number): void;
1462
+ /**
1463
+ * Ensure touch target compliance
1464
+ */
1465
+ ensureTouchTargets(): void;
1466
+ /**
1467
+ * Generate spacing scale
1468
+ */
1469
+ generateScale(): SpacingScale;
1470
+ /**
1471
+ * Calculate optimal spacing for content
1472
+ */
1473
+ calculateOptimalSpacing(contentType: 'text' | 'interactive' | 'layout' | 'component'): keyof SpacingScale;
1474
+ /**
1475
+ * Validate accessibility compliance
1476
+ */
1477
+ validateAccessibility(): {
1478
+ compliant: boolean;
1479
+ issues: string[];
1480
+ };
1481
+ /**
1482
+ * Setup initial spacing
1483
+ */
1484
+ private setupSpacing;
1485
+ /**
1486
+ * Calculate spacing values
1487
+ */
1488
+ private calculateSpacing;
1489
+ /**
1490
+ * Apply spacing to elements
1491
+ */
1492
+ private applySpacing;
1493
+ /**
1494
+ * Calculate container-based multiplier
1495
+ */
1496
+ private calculateContainerMultiplier;
1497
+ /**
1498
+ * Get active configuration based on container width
1499
+ */
1500
+ private getActiveConfig;
1501
+ /**
1502
+ * Find interactive elements
1503
+ */
1504
+ private findInteractiveElements;
1505
+ /**
1506
+ * Make element touch compliant
1507
+ */
1508
+ private makeTouchCompliant;
1509
+ /**
1510
+ * Validate touch compliance
1511
+ */
1512
+ private validateTouchCompliance;
1513
+ /**
1514
+ * Add spacing CSS utilities
1515
+ */
1516
+ private addSpacingCSS;
1517
+ /**
1518
+ * Setup observers
1519
+ */
1520
+ private setupObservers;
1521
+ /**
1522
+ * Clean up observers
1523
+ */
1524
+ private cleanupObservers;
1525
+ /**
1526
+ * Remove spacing
1527
+ */
1528
+ private removeSpacing;
1529
+ /**
1530
+ * Create initial state
1531
+ */
1532
+ private createInitialState;
1533
+ }
1534
+
1535
+ /**
1536
+ * Smart Content Reordering for ProteusJS
1537
+ * Priority-based reordering with accessibility and FLIP animations
1538
+ */
1539
+ interface ReorderConfig {
1540
+ priorities: Map<Element, number>;
1541
+ breakpoints: Record<string, ReorderRule[]>;
1542
+ accessibility: boolean;
1543
+ animations: boolean;
1544
+ focusManagement: boolean;
1545
+ preserveTabOrder: boolean;
1546
+ animationDuration: number;
1547
+ easing: string;
1548
+ }
1549
+ interface ReorderRule {
1550
+ selector: string;
1551
+ priority: number;
1552
+ condition?: 'min-width' | 'max-width' | 'aspect-ratio';
1553
+ value?: number;
1554
+ action: 'move-first' | 'move-last' | 'move-before' | 'move-after' | 'hide' | 'show';
1555
+ target?: string;
1556
+ }
1557
+ interface FLIPState {
1558
+ element: Element;
1559
+ first: DOMRect;
1560
+ last: DOMRect;
1561
+ invert: {
1562
+ x: number;
1563
+ y: number;
1564
+ };
1565
+ play: boolean;
1566
+ }
1567
+ interface ReorderState {
1568
+ originalOrder: Element[];
1569
+ currentOrder: Element[];
1570
+ activeRules: ReorderRule[];
1571
+ focusedElement: Element | null;
1572
+ animating: boolean;
1573
+ flipStates: Map<Element, FLIPState>;
1574
+ }
1575
+ declare class ContentReordering {
1576
+ private element;
1577
+ private config;
1578
+ private state;
1579
+ private resizeObserver;
1580
+ private mutationObserver;
1581
+ constructor(element: Element, config?: Partial<ReorderConfig>);
1582
+ /**
1583
+ * Activate content reordering
1584
+ */
1585
+ activate(): void;
1586
+ /**
1587
+ * Deactivate and restore original order
1588
+ */
1589
+ deactivate(): void;
1590
+ /**
1591
+ * Update reordering configuration
1592
+ */
1593
+ updateConfig(newConfig: Partial<ReorderConfig>): void;
1594
+ /**
1595
+ * Set element priority
1596
+ */
1597
+ setPriority(element: Element, priority: number): void;
1598
+ /**
1599
+ * Add reorder rule
1600
+ */
1601
+ addRule(breakpoint: string, rule: ReorderRule): void;
1602
+ /**
1603
+ * Get current reorder state
1604
+ */
1605
+ getState(): ReorderState;
1606
+ /**
1607
+ * Manually reorder elements
1608
+ */
1609
+ reorder(newOrder: Element[]): void;
1610
+ /**
1611
+ * Restore original order
1612
+ */
1613
+ restoreOriginalOrder(): void;
1614
+ /**
1615
+ * Setup initial reordering
1616
+ */
1617
+ private setupReordering;
1618
+ /**
1619
+ * Capture the original DOM order
1620
+ */
1621
+ private captureOriginalOrder;
1622
+ /**
1623
+ * Apply reordering based on current configuration
1624
+ */
1625
+ private applyReordering;
1626
+ /**
1627
+ * Get active rules for current container width
1628
+ */
1629
+ private getActiveRules;
1630
+ /**
1631
+ * Calculate new element order
1632
+ */
1633
+ private calculateNewOrder;
1634
+ /**
1635
+ * Check if rule should be applied
1636
+ */
1637
+ private shouldApplyRule;
1638
+ /**
1639
+ * Apply a single reorder rule
1640
+ */
1641
+ private applyRule;
1642
+ /**
1643
+ * Animate reordering using FLIP technique
1644
+ */
1645
+ private animateReorder;
1646
+ /**
1647
+ * Apply new order without animation
1648
+ */
1649
+ private applyOrder;
1650
+ /**
1651
+ * Preserve focus during reordering
1652
+ */
1653
+ private preserveFocus;
1654
+ /**
1655
+ * Restore focus after reordering
1656
+ */
1657
+ private restoreFocus;
1658
+ /**
1659
+ * Update accessibility attributes
1660
+ */
1661
+ private updateAccessibility;
1662
+ /**
1663
+ * Update tab order to match visual order
1664
+ */
1665
+ private updateTabOrder;
1666
+ /**
1667
+ * Check if element is focusable
1668
+ */
1669
+ private isFocusable;
1670
+ /**
1671
+ * Announce changes to screen readers
1672
+ */
1673
+ private announceChanges;
1674
+ /**
1675
+ * Check if two arrays are equal
1676
+ */
1677
+ private arraysEqual;
1678
+ /**
1679
+ * Setup observers
1680
+ */
1681
+ private setupObservers;
1682
+ /**
1683
+ * Clean up observers
1684
+ */
1685
+ private cleanupObservers;
1686
+ /**
1687
+ * Create initial state
1688
+ */
1689
+ private createInitialState;
1690
+ }
1691
+
1692
+ /**
1693
+ * Responsive Images System for ProteusJS
1694
+ * Next-generation image optimization with container-based sizing
1695
+ */
1696
+ interface ImageConfig {
1697
+ formats: ('webp' | 'avif' | 'jpeg' | 'png')[];
1698
+ sizes: number[];
1699
+ quality: number;
1700
+ lazyLoading: boolean;
1701
+ artDirection: boolean;
1702
+ containerBased: boolean;
1703
+ placeholder: 'blur' | 'color' | 'svg' | 'none';
1704
+ placeholderColor?: string;
1705
+ fadeInDuration: number;
1706
+ retina: boolean;
1707
+ progressive: boolean;
1708
+ }
1709
+ interface ImageSource {
1710
+ src: string;
1711
+ format: string;
1712
+ width: number;
1713
+ height: number;
1714
+ quality: number;
1715
+ media?: string;
1716
+ }
1717
+ interface ImageState {
1718
+ loaded: boolean;
1719
+ loading: boolean;
1720
+ error: boolean;
1721
+ currentSrc: string;
1722
+ containerSize: {
1723
+ width: number;
1724
+ height: number;
1725
+ };
1726
+ optimalSource: ImageSource | null;
1727
+ intersecting: boolean;
1728
+ }
1729
+ declare class ResponsiveImages {
1730
+ private element;
1731
+ private config;
1732
+ private state;
1733
+ private resizeObserver;
1734
+ private intersectionObserver;
1735
+ private sources;
1736
+ private static readonly FORMAT_SUPPORT;
1737
+ private static readonly MIME_TYPES;
1738
+ constructor(element: Element, config?: Partial<ImageConfig>);
1739
+ /**
1740
+ * Activate responsive image system
1741
+ */
1742
+ activate(): void;
1743
+ /**
1744
+ * Deactivate and clean up
1745
+ */
1746
+ deactivate(): void;
1747
+ /**
1748
+ * Update image configuration
1749
+ */
1750
+ updateConfig(newConfig: Partial<ImageConfig>): void;
1751
+ /**
1752
+ * Get current image state
1753
+ */
1754
+ getState(): ImageState;
1755
+ /**
1756
+ * Force image load
1757
+ */
1758
+ load(): void;
1759
+ /**
1760
+ * Preload image
1761
+ */
1762
+ preload(): Promise<void>;
1763
+ /**
1764
+ * Setup initial image
1765
+ */
1766
+ private setupImage;
1767
+ /**
1768
+ * Detect browser format support
1769
+ */
1770
+ private detectFormatSupport;
1771
+ /**
1772
+ * Test if browser supports image format
1773
+ */
1774
+ private testFormatSupport;
1775
+ /**
1776
+ * Generate image sources
1777
+ */
1778
+ private generateSources;
1779
+ /**
1780
+ * Get optimal image source
1781
+ */
1782
+ private getOptimalSource;
1783
+ /**
1784
+ * Load image
1785
+ */
1786
+ private loadImage;
1787
+ /**
1788
+ * Apply loaded image
1789
+ */
1790
+ private applyImage;
1791
+ /**
1792
+ * Add placeholder
1793
+ */
1794
+ private addPlaceholder;
1795
+ /**
1796
+ * Add blur placeholder
1797
+ */
1798
+ private addBlurPlaceholder;
1799
+ /**
1800
+ * Add SVG placeholder
1801
+ */
1802
+ private addSvgPlaceholder;
1803
+ /**
1804
+ * Remove placeholder
1805
+ */
1806
+ private removePlaceholder;
1807
+ /**
1808
+ * Handle image loading error
1809
+ */
1810
+ private handleImageError;
1811
+ /**
1812
+ * Setup image element
1813
+ */
1814
+ private setupImageElement;
1815
+ /**
1816
+ * Update image based on container size
1817
+ */
1818
+ private updateImage;
1819
+ /**
1820
+ * Get base source URL
1821
+ */
1822
+ private getBaseSrc;
1823
+ /**
1824
+ * Generate source URL with format and size
1825
+ */
1826
+ private generateSrcUrl;
1827
+ /**
1828
+ * Calculate height based on width (maintaining aspect ratio)
1829
+ */
1830
+ private calculateHeight;
1831
+ /**
1832
+ * Check if format is supported
1833
+ */
1834
+ private isFormatSupported;
1835
+ /**
1836
+ * Setup observers
1837
+ */
1838
+ private setupObservers;
1839
+ /**
1840
+ * Clean up observers
1841
+ */
1842
+ private cleanupObservers;
1843
+ /**
1844
+ * Remove image features
1845
+ */
1846
+ private removeImageFeatures;
1847
+ /**
1848
+ * Create initial state
1849
+ */
1850
+ private createInitialState;
1851
+ }
1852
+
1853
+ /**
1854
+ * Comprehensive Accessibility Engine for ProteusJS
1855
+ * WCAG compliance, screen reader support, and cognitive accessibility
1856
+ */
1857
+ interface AccessibilityConfig {
1858
+ wcagLevel: 'AA' | 'AAA';
1859
+ screenReader: boolean;
1860
+ keyboardNavigation: boolean;
1861
+ motionPreferences: boolean;
1862
+ colorCompliance: boolean;
1863
+ cognitiveAccessibility: boolean;
1864
+ announcements: boolean;
1865
+ focusManagement: boolean;
1866
+ skipLinks: boolean;
1867
+ landmarks: boolean;
1868
+ autoLabeling: boolean;
1869
+ enhanceErrorMessages: boolean;
1870
+ showReadingTime: boolean;
1871
+ simplifyContent: boolean;
1872
+ readingLevel: 'elementary' | 'middle' | 'high' | 'college';
1873
+ }
1874
+ interface AccessibilityState {
1875
+ prefersReducedMotion: boolean;
1876
+ prefersHighContrast: boolean;
1877
+ screenReaderActive: boolean;
1878
+ keyboardUser: boolean;
1879
+ focusVisible: boolean;
1880
+ currentFocus: Element | null;
1881
+ announcements: string[];
1882
+ violations: AccessibilityViolation[];
1883
+ }
1884
+ interface AccessibilityViolation {
1885
+ type: 'color-contrast' | 'focus-management' | 'aria-labels' | 'keyboard-navigation' | 'motion-sensitivity' | 'text-alternatives' | 'semantic-structure' | 'timing' | 'seizures';
1886
+ element: Element;
1887
+ description: string;
1888
+ severity: 'error' | 'warning' | 'info';
1889
+ wcagCriterion: string;
1890
+ impact: 'minor' | 'moderate' | 'serious' | 'critical';
1891
+ helpUrl?: string;
1892
+ suggestions: string[];
1893
+ }
1894
+ interface AccessibilityReport {
1895
+ score: number;
1896
+ level: 'AA' | 'AAA';
1897
+ violations: AccessibilityViolation[];
1898
+ passes: number;
1899
+ incomplete: number;
1900
+ summary: {
1901
+ total: number;
1902
+ errors: number;
1903
+ warnings: number;
1904
+ info: number;
1905
+ };
1906
+ recommendations: string[];
1907
+ }
1908
+ declare class AccessibilityEngine {
1909
+ private element;
1910
+ private config;
1911
+ private state;
1912
+ private liveRegion;
1913
+ private focusTracker;
1914
+ private colorAnalyzer;
1915
+ private motionManager;
1916
+ constructor(element: Element, config?: Partial<AccessibilityConfig>);
1917
+ /**
1918
+ * Activate accessibility features
1919
+ */
1920
+ activate(): void;
1921
+ /**
1922
+ * Validate a single element for accessibility issues
1923
+ */
1924
+ validateElement(element: Element, options?: {
1925
+ level?: 'A' | 'AA' | 'AAA';
1926
+ }): any;
1927
+ /**
1928
+ * Validate a container for accessibility issues
1929
+ */
1930
+ validateContainer(container: Element): any;
1931
+ /**
1932
+ * Audit an entire page for accessibility
1933
+ */
1934
+ auditPage(page: Element): any;
1935
+ /**
1936
+ * Setup responsive breakpoint announcements
1937
+ */
1938
+ private setupResponsiveAnnouncements;
1939
+ /**
1940
+ * Get current breakpoint based on viewport width
1941
+ */
1942
+ private getCurrentBreakpoint;
1943
+ /**
1944
+ * Get breakpoint name from width
1945
+ */
1946
+ private getBreakpointFromWidth;
1947
+ /**
1948
+ * Add content simplification indicators and tools
1949
+ */
1950
+ private addContentSimplification;
1951
+ /**
1952
+ * Toggle between original and simplified content
1953
+ */
1954
+ private toggleContentSimplification;
1955
+ /**
1956
+ * Simplify text based on reading level
1957
+ */
1958
+ private simplifyText;
1959
+ /**
1960
+ * Generate audit recommendations based on issues
1961
+ */
1962
+ private generateAuditRecommendations;
1963
+ /**
1964
+ * Destroy the accessibility engine
1965
+ */
1966
+ destroy(): void;
1967
+ /**
1968
+ * Deactivate and clean up
1969
+ */
1970
+ deactivate(): void;
1971
+ /**
1972
+ * Get accessibility state
1973
+ */
1974
+ getState(): AccessibilityState;
1975
+ /**
1976
+ * Auto-fix common accessibility issues
1977
+ */
1978
+ autoFixIssues(): void;
1979
+ /**
1980
+ * Fix heading hierarchy issues
1981
+ */
1982
+ private fixHeadingHierarchy;
1983
+ /**
1984
+ * Fix color contrast issues
1985
+ */
1986
+ private fixColorContrastIssues;
1987
+ /**
1988
+ * Generate comprehensive WCAG compliance report
1989
+ */
1990
+ generateComplianceReport(): AccessibilityReport;
1991
+ /**
1992
+ * Audit semantic structure (headings, landmarks, etc.)
1993
+ */
1994
+ private auditSemanticStructure;
1995
+ /**
1996
+ * Audit text alternatives for images and media
1997
+ */
1998
+ private auditTextAlternatives;
1999
+ /**
2000
+ * Audit timing and time limits
2001
+ */
2002
+ private auditTiming;
2003
+ /**
2004
+ * Announce message to screen readers
2005
+ */
2006
+ announce(message: string, priority?: 'polite' | 'assertive'): void;
2007
+ /**
2008
+ * Audit accessibility compliance
2009
+ */
2010
+ auditAccessibility(): AccessibilityViolation[];
2011
+ /**
2012
+ * Fix accessibility violations automatically
2013
+ */
2014
+ fixViolations(): void;
2015
+ /**
2016
+ * Detect user preferences
2017
+ */
2018
+ private detectUserPreferences;
2019
+ /**
2020
+ * Setup screen reader support
2021
+ */
2022
+ private setupScreenReaderSupport;
2023
+ /**
2024
+ * Setup keyboard navigation
2025
+ */
2026
+ private setupKeyboardNavigation;
2027
+ /**
2028
+ * Setup motion preferences
2029
+ */
2030
+ private setupMotionPreferences;
2031
+ /**
2032
+ * Setup color compliance
2033
+ */
2034
+ private setupColorCompliance;
2035
+ /**
2036
+ * Setup cognitive accessibility
2037
+ */
2038
+ private setupCognitiveAccessibility;
2039
+ /**
2040
+ * Detect screen reader
2041
+ */
2042
+ private detectScreenReader;
2043
+ /**
2044
+ * Generate ARIA labels automatically
2045
+ */
2046
+ private generateAriaLabels;
2047
+ /**
2048
+ * Setup semantic landmarks
2049
+ */
2050
+ private setupLandmarks;
2051
+ /**
2052
+ * Add skip links
2053
+ */
2054
+ private addSkipLinks;
2055
+ /**
2056
+ * Add individual skip link
2057
+ */
2058
+ private addSkipLink;
2059
+ /**
2060
+ * Enhance focus visibility
2061
+ */
2062
+ private enhanceFocusVisibility;
2063
+ /**
2064
+ * Add reading time estimates
2065
+ */
2066
+ private addReadingTimeEstimates;
2067
+ /**
2068
+ * Enhance form validation
2069
+ */
2070
+ private enhanceFormValidation;
2071
+ /**
2072
+ * Link input to error message using aria-describedby
2073
+ */
2074
+ private linkInputToErrorMessage;
2075
+ /**
2076
+ * Set up comprehensive error message linking for an input
2077
+ */
2078
+ private setupErrorMessageLinking;
2079
+ /**
2080
+ * Find error messages associated with an input
2081
+ */
2082
+ private findErrorMessagesForInput;
2083
+ /**
2084
+ * Perform comprehensive input validation
2085
+ */
2086
+ private performInputValidation;
2087
+ /**
2088
+ * Validate input value based on type and constraints
2089
+ */
2090
+ private validateInputValue;
2091
+ /**
2092
+ * Add progress indicators
2093
+ */
2094
+ private addProgressIndicators;
2095
+ /**
2096
+ * Audit ARIA labels
2097
+ */
2098
+ private auditAriaLabels;
2099
+ /**
2100
+ * Audit keyboard navigation
2101
+ */
2102
+ private auditKeyboardNavigation;
2103
+ /**
2104
+ * Audit labels (wrapper for existing auditAriaLabels)
2105
+ */
2106
+ private auditLabels;
2107
+ /**
2108
+ * Get maximum possible violations for score calculation
2109
+ */
2110
+ private getMaxPossibleViolations;
2111
+ /**
2112
+ * Generate recommendations based on violations
2113
+ */
2114
+ private generateRecommendations;
2115
+ /**
2116
+ * Fix individual violation
2117
+ */
2118
+ private fixViolation;
2119
+ /**
2120
+ * Fix ARIA label
2121
+ */
2122
+ private fixAriaLabel;
2123
+ /**
2124
+ * Fix keyboard access
2125
+ */
2126
+ private fixKeyboardAccess;
2127
+ /**
2128
+ * Generate input label
2129
+ */
2130
+ private generateInputLabel;
2131
+ /**
2132
+ * Check if content is icon-only (emojis, symbols, etc.)
2133
+ */
2134
+ private isIconOnlyContent;
2135
+ /**
2136
+ * Check if element is interactive (clickable/focusable)
2137
+ */
2138
+ private isInteractiveElement;
2139
+ /**
2140
+ * Check if element has meaningful text content
2141
+ */
2142
+ private hasTextContent;
2143
+ /**
2144
+ * Calculate contrast ratio between foreground and background colors
2145
+ */
2146
+ private calculateContrastRatio;
2147
+ /**
2148
+ * Generate button label
2149
+ */
2150
+ private generateButtonLabel;
2151
+ /**
2152
+ * Generate image alt text
2153
+ */
2154
+ private generateImageAlt;
2155
+ /**
2156
+ * Check if element has associated label
2157
+ */
2158
+ private hasAssociatedLabel;
2159
+ /**
2160
+ * Check if element is interactive
2161
+ */
2162
+ private isInteractive;
2163
+ /**
2164
+ * Count words in text
2165
+ */
2166
+ private countWords;
2167
+ /**
2168
+ * Ensure element has ID
2169
+ */
2170
+ private ensureId;
2171
+ /**
2172
+ * Clean up accessibility features
2173
+ */
2174
+ private cleanupAccessibilityFeatures;
2175
+ /**
2176
+ * Create initial state
2177
+ */
2178
+ private createInitialState;
2179
+ }
2180
+
2181
+ /**
2182
+ * FluidTypography - Intelligent fluid typography system
2183
+ * Provides clamp-based scaling, container-relative typography, and accessibility compliance
2184
+ */
2185
+
2186
+ interface FluidConfig {
2187
+ minSize: number;
2188
+ maxSize: number;
2189
+ minViewport?: number;
2190
+ maxViewport?: number;
2191
+ scalingFunction?: 'linear' | 'exponential';
2192
+ accessibility?: 'none' | 'AA' | 'AAA';
2193
+ enforceAccessibility?: boolean;
2194
+ respectUserPreferences?: boolean;
2195
+ }
2196
+ interface ContainerBasedConfig {
2197
+ minSize: number;
2198
+ maxSize: number;
2199
+ containerElement?: Element;
2200
+ minContainerWidth?: number;
2201
+ maxContainerWidth?: number;
2202
+ accessibility?: 'none' | 'AA' | 'AAA';
2203
+ }
2204
+ interface TextFittingConfig {
2205
+ maxWidth: number;
2206
+ minSize: number;
2207
+ maxSize: number;
2208
+ allowOverflow?: boolean;
2209
+ wordBreak?: 'normal' | 'break-all' | 'keep-all';
2210
+ }
2211
+ declare class FluidTypography {
2212
+ private appliedElements;
2213
+ private resizeObserver;
2214
+ private containerConfigs;
2215
+ private performanceMonitor?;
2216
+ constructor();
2217
+ /**
2218
+ * Set performance monitor for integration
2219
+ */
2220
+ setPerformanceMonitor(monitor: PerformanceMonitor): void;
2221
+ /**
2222
+ * Generate a typographic scale
2223
+ */
2224
+ generateTypographicScale(config: {
2225
+ baseSize: number;
2226
+ ratio: number;
2227
+ steps?: number;
2228
+ }): number[];
2229
+ /**
2230
+ * Apply fluid scaling using CSS clamp()
2231
+ */
2232
+ applyFluidScaling(element: Element, config: FluidConfig): void;
2233
+ /**
2234
+ * Apply container-based typography scaling
2235
+ */
2236
+ applyContainerBasedScaling(element: Element, config: ContainerBasedConfig): void;
2237
+ /**
2238
+ * Fit text to container width
2239
+ */
2240
+ fitTextToContainer(element: Element, config: TextFittingConfig): void;
2241
+ /**
2242
+ * Remove fluid typography from element
2243
+ */
2244
+ removeFluidScaling(element: Element): void;
2245
+ /**
2246
+ * Clean up resources
2247
+ */
2248
+ destroy(): void;
2249
+ /**
2250
+ * Setup ResizeObserver for container-based scaling
2251
+ */
2252
+ private setupResizeObserver;
2253
+ /**
2254
+ * Handle container resize for container-based scaling
2255
+ */
2256
+ private handleContainerResize;
2257
+ /**
2258
+ * Update container-based scaling when container resizes
2259
+ */
2260
+ private updateContainerBasedScaling;
2261
+ /**
2262
+ * Generate CSS clamp() value
2263
+ */
2264
+ private generateClampValue;
2265
+ /**
2266
+ * Generate linear clamp value
2267
+ */
2268
+ private generateLinearClamp;
2269
+ /**
2270
+ * Generate exponential clamp value
2271
+ */
2272
+ private generateExponentialClamp;
2273
+ /**
2274
+ * Validate that a clamp value is properly formatted
2275
+ */
2276
+ private isValidClampValue;
2277
+ /**
2278
+ * Enforce accessibility constraints on font sizes
2279
+ */
2280
+ private enforceAccessibilityConstraints;
2281
+ /**
2282
+ * Apply user preference scaling
2283
+ */
2284
+ private applyUserPreferences;
2285
+ /**
2286
+ * Apply font size to element
2287
+ */
2288
+ private applyFontSize;
2289
+ /**
2290
+ * Safely get computed font size with fallbacks
2291
+ */
2292
+ private getComputedFontSize;
2293
+ /**
2294
+ * Find the nearest container element
2295
+ */
2296
+ private findNearestContainer;
2297
+ /**
2298
+ * Calculate optimal text size to fit within width
2299
+ */
2300
+ private calculateOptimalTextSize;
2301
+ /**
2302
+ * Production-grade font optimization with performance considerations
2303
+ */
2304
+ optimizeFontPerformance(element: Element): void;
2305
+ /**
2306
+ * Enhanced line height optimization for better readability
2307
+ */
2308
+ private optimizeLineHeightForElement;
2309
+ /**
2310
+ * Optimize font loading for performance
2311
+ */
2312
+ private optimizeFontLoading;
2313
+ /**
2314
+ * Check if font is a system font
2315
+ */
2316
+ private isSystemFont;
2317
+ /**
2318
+ * Add performance hints for better rendering
2319
+ */
2320
+ private addPerformanceHints;
2321
+ /**
2322
+ * Check if element is likely to be animated
2323
+ */
2324
+ private isAnimatedElement;
2325
+ /**
2326
+ * Apply font smoothing for better text rendering
2327
+ */
2328
+ private applyFontSmoothing;
2329
+ /**
2330
+ * Record performance metrics for monitoring
2331
+ */
2332
+ recordPerformanceMetrics(element: Element, clampValue: string): void;
2333
+ }
2334
+
2335
+ /**
2336
+ * ContainerBreakpoints - Breakpoint management system for container queries
2337
+ * Handles breakpoint registration, monitoring, and callback execution
2338
+ */
2339
+
2340
+ interface BreakpointMap {
2341
+ [key: string]: string;
2342
+ }
2343
+ interface BreakpointConfig {
2344
+ element: Element;
2345
+ breakpoints: BreakpointMap;
2346
+ callback?: BreakpointCallback;
2347
+ currentBreakpoint?: string;
2348
+ parsedBreakpoints: ParsedBreakpoint[];
2349
+ }
2350
+ interface ParsedBreakpoint {
2351
+ name: string;
2352
+ value: number;
2353
+ unit: string;
2354
+ type: 'min' | 'max';
2355
+ originalValue: string;
2356
+ }
2357
+ interface BreakpointCallbackData {
2358
+ width: number;
2359
+ height: number;
2360
+ breakpoint: string;
2361
+ previousBreakpoint?: string;
2362
+ element: Element;
2363
+ }
2364
+ type BreakpointCallback = (breakpoint: string, data: BreakpointCallbackData) => void;
2365
+ declare class ContainerBreakpoints {
2366
+ private breakpoints;
2367
+ private observer;
2368
+ private idCounter;
2369
+ private cssRules;
2370
+ private performanceMonitor?;
2371
+ private performanceMetrics;
2372
+ constructor();
2373
+ /**
2374
+ * Set performance monitor for integration
2375
+ */
2376
+ setPerformanceMonitor(monitor: PerformanceMonitor): void;
2377
+ /**
2378
+ * Register breakpoints for a container element (alias for register)
2379
+ */
2380
+ registerContainer(element: Element, breakpoints: BreakpointMap, callback?: BreakpointCallback): string;
2381
+ /**
2382
+ * Register breakpoints for a container element
2383
+ */
2384
+ register(element: Element, breakpoints: BreakpointMap, callback?: BreakpointCallback): string;
2385
+ /**
2386
+ * Update container breakpoints (alias for updateElement)
2387
+ */
2388
+ updateContainer(element: Element): void;
2389
+ /**
2390
+ * Unregister breakpoints for an element
2391
+ */
2392
+ unregister(id: string): void;
2393
+ /**
2394
+ * Get current breakpoint for a registered element
2395
+ */
2396
+ getCurrentBreakpoint(id: string): string | null;
2397
+ /**
2398
+ * Update breakpoints for a specific element
2399
+ */
2400
+ updateElement(element: Element): void;
2401
+ /**
2402
+ * Get all registered breakpoint configurations
2403
+ */
2404
+ getAllConfigs(): Map<string, BreakpointConfig>;
2405
+ /**
2406
+ * Setup ResizeObserver to monitor element size changes
2407
+ */
2408
+ private setupResizeObserver;
2409
+ /**
2410
+ * Generate unique ID for breakpoint registration
2411
+ */
2412
+ private generateId;
2413
+ /**
2414
+ * Parse breakpoint values into standardized format
2415
+ */
2416
+ private parseBreakpoints;
2417
+ /**
2418
+ * Parse individual breakpoint value
2419
+ */
2420
+ private parseBreakpointValue;
2421
+ /**
2422
+ * Update breakpoint for a specific configuration
2423
+ */
2424
+ private updateBreakpoint;
2425
+ /**
2426
+ * Determine which breakpoint applies to the current width
2427
+ */
2428
+ private determineBreakpoint;
2429
+ /**
2430
+ * Update CSS classes on element based on current breakpoint
2431
+ */
2432
+ private updateBreakpointClasses;
2433
+ /**
2434
+ * Remove all breakpoint classes from element
2435
+ */
2436
+ private removeBreakpointClasses;
2437
+ /**
2438
+ * Dispatch custom breakpoint change event
2439
+ */
2440
+ private dispatchBreakpointEvent;
2441
+ /**
2442
+ * Get performance metrics
2443
+ */
2444
+ getMetrics(): {
2445
+ totalRegistrations: number;
2446
+ activeElements: number;
2447
+ averageBreakpoints: number;
2448
+ breakpointDistribution: Record<string, number>;
2449
+ };
2450
+ /**
2451
+ * Register multiple breakpoint sets at once
2452
+ */
2453
+ registerMultiple(registrations: Array<{
2454
+ element: Element;
2455
+ breakpoints: BreakpointMap;
2456
+ callback?: BreakpointCallback;
2457
+ }>): string[];
2458
+ /**
2459
+ * Unregister all breakpoints for an element
2460
+ */
2461
+ unregisterElement(element: Element): void;
2462
+ /**
2463
+ * Get all active breakpoints across all elements
2464
+ */
2465
+ getAllActiveBreakpoints(): Array<{
2466
+ id: string;
2467
+ element: Element;
2468
+ breakpoint: string;
2469
+ width: number;
2470
+ height: number;
2471
+ }>;
2472
+ /**
2473
+ * Force update all breakpoints
2474
+ */
2475
+ updateAll(): void;
2476
+ /**
2477
+ * Setup performance monitoring for container queries
2478
+ */
2479
+ private setupPerformanceMonitoring;
2480
+ /**
2481
+ * Inject base CSS for container query functionality
2482
+ */
2483
+ private injectBaseCSS;
2484
+ /**
2485
+ * Generate responsive CSS classes for a container
2486
+ */
2487
+ generateResponsiveCSS(elementId: string, breakpoints: BreakpointMap): void;
2488
+ /**
2489
+ * Parse container query string
2490
+ */
2491
+ private parseContainerQuery;
2492
+ /**
2493
+ * Inject container-specific CSS
2494
+ */
2495
+ private injectContainerCSS;
2496
+ /**
2497
+ * Record performance metrics
2498
+ */
2499
+ private recordPerformanceMetric;
2500
+ /**
2501
+ * Get performance metrics
2502
+ */
2503
+ getPerformanceMetrics(): typeof this.performanceMetrics;
2504
+ /**
2505
+ * Enable debug mode for container queries
2506
+ */
2507
+ enableDebugMode(enable?: boolean): void;
2508
+ /**
2509
+ * Cleanup resources when destroying
2510
+ */
2511
+ destroy(): void;
2512
+ }
2513
+
2514
+ /**
2515
+ * Comprehensive Browser Compatibility System for ProteusJS
2516
+ * Feature detection, polyfills, and graceful degradation
2517
+ */
2518
+ interface BrowserInfo {
2519
+ name: string;
2520
+ version: string;
2521
+ engine: string;
2522
+ platform: string;
2523
+ mobile: boolean;
2524
+ supported: boolean;
2525
+ }
2526
+ interface FeatureSupport {
2527
+ containerQueries: boolean;
2528
+ clampFunction: boolean;
2529
+ customProperties: boolean;
2530
+ flexbox: boolean;
2531
+ grid: boolean;
2532
+ intersectionObserver: boolean;
2533
+ resizeObserver: boolean;
2534
+ mutationObserver: boolean;
2535
+ requestAnimationFrame: boolean;
2536
+ webAnimations: boolean;
2537
+ prefersReducedMotion: boolean;
2538
+ prefersColorScheme: boolean;
2539
+ viewportUnits: boolean;
2540
+ calc: boolean;
2541
+ transforms: boolean;
2542
+ transitions: boolean;
2543
+ animations: boolean;
2544
+ webFonts: boolean;
2545
+ fontDisplay: boolean;
2546
+ fontVariationSettings: boolean;
2547
+ }
2548
+ interface CompatibilityConfig {
2549
+ enablePolyfills: boolean;
2550
+ gracefulDegradation: boolean;
2551
+ fallbackStrategies: boolean;
2552
+ performanceOptimizations: boolean;
2553
+ legacySupport: boolean;
2554
+ modernFeatures: boolean;
2555
+ autoDetection: boolean;
2556
+ }
2557
+ interface PolyfillInfo {
2558
+ name: string;
2559
+ required: boolean;
2560
+ loaded: boolean;
2561
+ size: number;
2562
+ url?: string;
2563
+ fallback?: () => void;
2564
+ }
2565
+ declare class BrowserCompatibility {
2566
+ private browserInfo;
2567
+ private featureSupport;
2568
+ private config;
2569
+ private polyfills;
2570
+ private fallbacks;
2571
+ private modernFeatures;
2572
+ private legacyFeatures;
2573
+ constructor(config?: Partial<CompatibilityConfig>);
2574
+ /**
2575
+ * Initialize compatibility system
2576
+ */
2577
+ initializeCompatibility(): Promise<void>;
2578
+ /**
2579
+ * Detect browser information
2580
+ */
2581
+ private detectBrowser;
2582
+ /**
2583
+ * Check if browser is supported
2584
+ */
2585
+ private isBrowserSupported;
2586
+ /**
2587
+ * Detect feature support
2588
+ */
2589
+ private detectFeatures;
2590
+ /**
2591
+ * Check container queries support
2592
+ */
2593
+ private supportsContainerQueries;
2594
+ /**
2595
+ * Check clamp() function support
2596
+ */
2597
+ private supportsClamp;
2598
+ /**
2599
+ * Check CSS custom properties support
2600
+ */
2601
+ private supportsCustomProperties;
2602
+ /**
2603
+ * Check flexbox support
2604
+ */
2605
+ private supportsFlexbox;
2606
+ /**
2607
+ * Check CSS Grid support
2608
+ */
2609
+ private supportsGrid;
2610
+ /**
2611
+ * Check media query support
2612
+ */
2613
+ private supportsMediaQuery;
2614
+ /**
2615
+ * Check viewport units support
2616
+ */
2617
+ private supportsViewportUnits;
2618
+ /**
2619
+ * Check calc() function support
2620
+ */
2621
+ private supportsCalc;
2622
+ /**
2623
+ * Check CSS transforms support
2624
+ */
2625
+ private supportsTransforms;
2626
+ /**
2627
+ * Check CSS transitions support
2628
+ */
2629
+ private supportsTransitions;
2630
+ /**
2631
+ * Check CSS animations support
2632
+ */
2633
+ private supportsAnimations;
2634
+ /**
2635
+ * Check web fonts support
2636
+ */
2637
+ private supportsWebFonts;
2638
+ /**
2639
+ * Check font-display support
2640
+ */
2641
+ private supportsFontDisplay;
2642
+ /**
2643
+ * Check font-variation-settings support
2644
+ */
2645
+ private supportsFontVariationSettings;
2646
+ /**
2647
+ * Apply browser-specific fixes
2648
+ */
2649
+ private applyBrowserFixes;
2650
+ /**
2651
+ * Apply Internet Explorer specific fixes
2652
+ */
2653
+ private applyIEFixes;
2654
+ /**
2655
+ * Apply Safari specific fixes
2656
+ */
2657
+ private applySafariFixes;
2658
+ /**
2659
+ * Apply Firefox specific fixes
2660
+ */
2661
+ private applyFirefoxFixes;
2662
+ /**
2663
+ * Apply mobile browser fixes
2664
+ */
2665
+ private applyMobileFixes;
2666
+ /**
2667
+ * Load required polyfills
2668
+ */
2669
+ private loadPolyfills;
2670
+ /**
2671
+ * Load polyfill script
2672
+ */
2673
+ private loadPolyfillScript;
2674
+ /**
2675
+ * Add polyfill to the system
2676
+ */
2677
+ private addPolyfill;
2678
+ /**
2679
+ * Setup fallback strategies
2680
+ */
2681
+ private setupFallbacks;
2682
+ /**
2683
+ * Container queries fallback
2684
+ */
2685
+ private containerQueriesFallback;
2686
+ /**
2687
+ * Clamp function fallback
2688
+ */
2689
+ private clampFallback;
2690
+ /**
2691
+ * Custom properties fallback
2692
+ */
2693
+ private customPropertiesFallback;
2694
+ /**
2695
+ * Intersection Observer fallback
2696
+ */
2697
+ private intersectionObserverFallback;
2698
+ /**
2699
+ * Viewport units fallback
2700
+ */
2701
+ private viewportUnitsFallback;
2702
+ /**
2703
+ * Flexbox fallback
2704
+ */
2705
+ private flexboxFallback;
2706
+ /**
2707
+ * Apply performance optimizations
2708
+ */
2709
+ private applyPerformanceOptimizations;
2710
+ /**
2711
+ * Apply legacy browser optimizations
2712
+ */
2713
+ private applyLegacyOptimizations;
2714
+ /**
2715
+ * Apply mobile optimizations
2716
+ */
2717
+ private applyMobileOptimizations;
2718
+ /**
2719
+ * Apply feature-based optimizations
2720
+ */
2721
+ private applyFeatureBasedOptimizations;
2722
+ /**
2723
+ * Setup modern features
2724
+ */
2725
+ private setupModernFeatures;
2726
+ /**
2727
+ * Get browser information
2728
+ */
2729
+ getBrowserInfo(): BrowserInfo;
2730
+ /**
2731
+ * Get feature support information
2732
+ */
2733
+ getFeatureSupport(): FeatureSupport;
2734
+ /**
2735
+ * Check if specific feature is supported
2736
+ */
2737
+ isFeatureSupported(feature: keyof FeatureSupport): boolean;
2738
+ /**
2739
+ * Get compatibility report
2740
+ */
2741
+ getCompatibilityReport(): {
2742
+ browser: BrowserInfo;
2743
+ features: FeatureSupport;
2744
+ polyfills: PolyfillInfo[];
2745
+ modernFeatures: string[];
2746
+ legacyFeatures: string[];
2747
+ recommendations: string[];
2748
+ };
2749
+ /**
2750
+ * Enable graceful degradation for specific feature
2751
+ */
2752
+ enableGracefulDegradation(feature: string, fallback: () => void): void;
2753
+ /**
2754
+ * Cleanup compatibility system
2755
+ */
2756
+ destroy(): void;
2757
+ }
2758
+
2759
+ declare class ProteusJS {
2760
+ private static instance;
2761
+ private config;
2762
+ private eventSystem;
2763
+ private pluginSystem;
2764
+ private performanceMonitor;
2765
+ private memoryManager;
2766
+ private observerManager;
2767
+ private containerManager;
2768
+ private clampScaling;
2769
+ private typographicScale;
2770
+ private textFitting;
2771
+ private lineHeightOptimizer;
2772
+ private verticalRhythm;
2773
+ private eventHandler;
2774
+ private batchDOM;
2775
+ private lazyEvaluation;
2776
+ private cssOptimizer;
2777
+ private themeSystem;
2778
+ private flipAnimations;
2779
+ private scrollAnimations;
2780
+ private memoryManagement;
2781
+ private cacheOptimization;
2782
+ private zeroConfig;
2783
+ private browserPolyfills;
2784
+ private fluidTypography;
2785
+ private containerBreakpoints;
2786
+ private accessibilityEngine;
2787
+ private browserCompatibility;
2788
+ private initialized;
2789
+ constructor(config?: ProteusConfig);
2790
+ /**
2791
+ * Public getters for subsystems
2792
+ */
2793
+ get typography(): FluidTypography;
2794
+ get containers(): ContainerBreakpoints;
2795
+ get performance(): PerformanceMonitor;
2796
+ get accessibility(): AccessibilityEngine;
2797
+ get compatibility(): BrowserCompatibility;
2798
+ /**
2799
+ * Get current configuration
2800
+ */
2801
+ getConfiguration(): Required<ProteusConfig>;
2802
+ /**
2803
+ * Initialize ProteusJS (async version)
2804
+ */
2805
+ initialize(): Promise<this>;
2806
+ /**
2807
+ * Initialize ProteusJS
2808
+ */
2809
+ init(): this;
2810
+ /**
2811
+ * Get browser capabilities
2812
+ */
2813
+ getBrowserCapabilities(): any;
2814
+ /**
2815
+ * Get performance metrics
2816
+ */
2817
+ getMetrics(): any;
2818
+ /**
2819
+ * Detect browser features
2820
+ */
2821
+ detectFeatures(): any;
2822
+ /**
2823
+ * Update live region for screen readers
2824
+ */
2825
+ updateLiveRegion(element: Element, message: string): void;
2826
+ /**
2827
+ * Destroy ProteusJS instance and clean up resources
2828
+ */
2829
+ destroy(): void;
2830
+ /**
2831
+ * Get current configuration
2832
+ */
2833
+ getConfig(): Required<ProteusConfig>;
2834
+ /**
2835
+ * Update configuration
2836
+ */
2837
+ updateConfig(newConfig: Partial<ProteusConfig>): this;
2838
+ /**
2839
+ * Get event system instance
2840
+ */
2841
+ getEventSystem(): EventSystem;
2842
+ /**
2843
+ * Get plugin system instance
2844
+ */
2845
+ getPluginSystem(): PluginSystem;
2846
+ /**
2847
+ * Get performance monitor instance
2848
+ */
2849
+ getPerformanceMonitor(): PerformanceMonitor;
2850
+ /**
2851
+ * Get memory manager instance
2852
+ */
2853
+ getMemoryManager(): MemoryManager;
2854
+ /**
2855
+ * Get observer manager instance
2856
+ */
2857
+ getObserverManager(): ObserverManager;
2858
+ /**
2859
+ * Get container manager instance
2860
+ */
2861
+ getContainerManager(): ContainerManager;
2862
+ /**
2863
+ * Create a container with responsive behavior
2864
+ */
2865
+ container(selector: string | Element | Element[], options?: ContainerOptions): SmartContainer | SmartContainer[];
2866
+ /**
2867
+ * Create fluid typography scaling
2868
+ */
2869
+ fluidType(selector: string | Element | Element[], config?: ScalingConfig): void;
2870
+ /**
2871
+ * Generate typographic scale
2872
+ */
2873
+ createTypeScale(config?: ScaleConfig): TypeScale | number[];
2874
+ /**
2875
+ * Create adaptive grid layout
2876
+ */
2877
+ createGrid(selector: string | Element, config?: Partial<GridConfig>): AdaptiveGrid | null;
2878
+ /**
2879
+ * Apply text fitting to elements
2880
+ */
2881
+ fitText(selector: string | Element | Element[], config?: any): void;
2882
+ /**
2883
+ * Apply vertical rhythm to elements
2884
+ */
2885
+ applyRhythm(selector: string | Element | Element[], _config?: unknown): void;
2886
+ /**
2887
+ * Create enhanced flexbox layout
2888
+ */
2889
+ createFlexbox(selector: string | Element, config?: any): FlexboxEnhancer | null;
2890
+ /**
2891
+ * Apply flow layout
2892
+ */
2893
+ applyFlow(selector: string | Element, config?: any): FlowLayout | null;
2894
+ /**
2895
+ * Apply spacing system
2896
+ */
2897
+ applySpacing(selector: string | Element, config?: any): SpacingSystem | null;
2898
+ /**
2899
+ * Enable content reordering
2900
+ */
2901
+ enableReordering(selector: string | Element, config?: any): ContentReordering | null;
2902
+ /**
2903
+ * Enable responsive images
2904
+ */
2905
+ responsiveImages(selector: string | Element | Element[], config?: any): ResponsiveImages | ResponsiveImages[] | undefined;
2906
+ /**
2907
+ * Enable accessibility features
2908
+ */
2909
+ enableAccessibility(selector: string | Element, config?: any): AccessibilityEngine | null;
2910
+ /**
2911
+ * Comprehensive setup for complete ProteusJS experience
2912
+ */
2913
+ setupComplete(config?: any): this;
2914
+ /**
2915
+ * Check if ProteusJS is initialized
2916
+ */
2917
+ isInitialized(): boolean;
2918
+ /**
2919
+ * Get library version
2920
+ */
2921
+ static getVersion(): string;
2922
+ /**
2923
+ * Get browser support information
2924
+ */
2925
+ static getSupportInfo(): SupportInfo;
2926
+ /**
2927
+ * Check if browser is supported
2928
+ */
2929
+ static isSupported(): boolean;
2930
+ /**
2931
+ * Get or create global instance
2932
+ */
2933
+ static getInstance(config?: ProteusConfig): ProteusJS;
2934
+ /**
2935
+ * Merge configuration with defaults
2936
+ */
2937
+ private mergeConfig;
2938
+ /**
2939
+ * Normalize selector to array of elements
2940
+ */
2941
+ private normalizeSelector;
2942
+ /**
2943
+ * Get performance metrics from event handler
2944
+ */
2945
+ getPerformanceMetrics(): {
2946
+ eventHandler: PerformanceMetrics;
2947
+ batchDOM: BatchMetrics;
2948
+ performanceMonitor: PerformanceMetrics$1;
2949
+ };
2950
+ /**
2951
+ * Efficiently observe element resize with batching
2952
+ */
2953
+ observeResize(selector: string | Element, callback: (entry: ResizeObserverEntry) => void, priority?: 'high' | 'normal' | 'low'): string | null;
2954
+ /**
2955
+ * Batch DOM style changes for performance
2956
+ */
2957
+ batchStyles(selector: string | Element, styles: Record<string, string>, priority?: 'high' | 'normal' | 'low'): Promise<void>;
2958
+ /**
2959
+ * Batch DOM measurements for performance
2960
+ */
2961
+ measureElement(selector: string | Element, measurements?: ('width' | 'height' | 'top' | 'left' | 'right' | 'bottom')[], priority?: 'high' | 'normal' | 'low'): Promise<Partial<DOMRect>>;
2962
+ /**
2963
+ * Set theme scheme
2964
+ */
2965
+ setTheme(scheme: string): this;
2966
+ /**
2967
+ * Toggle theme between light and dark
2968
+ */
2969
+ toggleTheme(): this;
2970
+ /**
2971
+ * Animate element with FLIP technique
2972
+ */
2973
+ animateElement(selector: string | Element, newPosition: () => void, options?: any): Promise<void>;
2974
+ /**
2975
+ * Add micro-interactions to elements
2976
+ */
2977
+ addMicroInteractions(selector: string | Element, type?: 'hover' | 'press' | 'focus' | 'ripple'): this;
2978
+ /**
2979
+ * Register lazy-loaded component
2980
+ */
2981
+ lazyLoad(selector: string | Element, activator: () => Promise<void>, options?: any): string | null;
2982
+ /**
2983
+ * Optimize CSS performance
2984
+ */
2985
+ optimizeCSS(): Promise<OptimizationMetrics>;
2986
+ /**
2987
+ * Get comprehensive performance metrics
2988
+ */
2989
+ getAdvancedMetrics(): {
2990
+ eventHandler: PerformanceMetrics;
2991
+ batchDOM: BatchMetrics;
2992
+ lazyEvaluation: LazyMetrics;
2993
+ cssOptimizer: OptimizationMetrics;
2994
+ themeSystem: ThemeState;
2995
+ flipAnimations: number;
2996
+ performanceMonitor: PerformanceMetrics$1;
2997
+ };
2998
+ }
2999
+
3000
+ /**
3001
+ * Version utilities for ProteusJS
3002
+ */
3003
+ declare const version = "1.0.0";
3004
+
3005
+ /**
3006
+ * ProteusJS - Dynamic Responsive Design Library
3007
+ * Shape-shifting responsive design that adapts like the sea god himself
3008
+ *
3009
+ * @version 1.0.0
3010
+ * @author ProteusJS Team
3011
+ * @license MIT
3012
+ */
3013
+
3014
+ declare const VERSION = "1.0.0";
3015
+ declare const LIBRARY_NAME = "ProteusJS";
3016
+
3017
+ export { LIBRARY_NAME, ProteusJS, VERSION, ProteusJS as default, isSupported, version };
3018
+ export type { AccessibilityConfig$1 as AccessibilityConfig, AnimationConfig, BreakpointConfig$1 as BreakpointConfig, ContainerConfig, LayoutConfig, PerformanceConfig, ProteusConfig, ProteusPlugin, TypographyConfig };