@rakeyshgidwani/roger-ui-bank-theme-stan-design 0.2.9 → 0.2.11
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.
- package/CHANGELOG.md +1 -1
- package/dist/components/ui/accessibility-demo.esm.js +30 -24
- package/dist/components/ui/accessibility-demo.js +30 -24
- package/dist/components/ui/advanced-component-architecture-demo.esm.js +235 -179
- package/dist/components/ui/advanced-component-architecture-demo.js +235 -179
- package/dist/components/ui/advanced-transition-system-demo.esm.js +110 -64
- package/dist/components/ui/advanced-transition-system-demo.js +110 -64
- package/dist/components/ui/advanced-transition-system.esm.js +166 -122
- package/dist/components/ui/advanced-transition-system.js +166 -122
- package/dist/components/ui/animation/animated-container.esm.js +52 -29
- package/dist/components/ui/animation/animated-container.js +52 -29
- package/dist/components/ui/animation/staggered-container.esm.js +18 -9
- package/dist/components/ui/animation/staggered-container.js +18 -9
- package/dist/components/ui/animation-demo.esm.js +67 -35
- package/dist/components/ui/animation-demo.js +67 -35
- package/dist/components/ui/badge.esm.js +9 -6
- package/dist/components/ui/badge.js +9 -6
- package/dist/components/ui/battery-conscious-animation-demo.esm.js +122 -87
- package/dist/components/ui/battery-conscious-animation-demo.js +122 -87
- package/dist/components/ui/border-radius-shadow-demo.esm.js +23 -12
- package/dist/components/ui/border-radius-shadow-demo.js +23 -12
- package/dist/components/ui/button.esm.js +8 -2
- package/dist/components/ui/button.js +8 -2
- package/dist/components/ui/card.esm.js +33 -8
- package/dist/components/ui/card.js +33 -8
- package/dist/components/ui/checkbox.esm.js +3 -3
- package/dist/components/ui/checkbox.js +3 -3
- package/dist/components/ui/color-preview.esm.js +68 -45
- package/dist/components/ui/color-preview.js +68 -45
- package/dist/components/ui/data-display/chart.esm.js +112 -84
- package/dist/components/ui/data-display/chart.js +112 -84
- package/dist/components/ui/data-display/data-grid-simple.esm.js +1 -1
- package/dist/components/ui/data-display/data-grid-simple.js +1 -1
- package/dist/components/ui/data-display/data-grid.esm.js +80 -67
- package/dist/components/ui/data-display/data-grid.js +80 -67
- package/dist/components/ui/data-display/list.esm.js +53 -45
- package/dist/components/ui/data-display/list.js +53 -45
- package/dist/components/ui/data-display/table.esm.js +62 -54
- package/dist/components/ui/data-display/table.js +62 -54
- package/dist/components/ui/data-display/timeline.esm.js +39 -34
- package/dist/components/ui/data-display/timeline.js +39 -34
- package/dist/components/ui/data-display/tree.esm.js +116 -84
- package/dist/components/ui/data-display/tree.js +116 -84
- package/dist/components/ui/data-display/types.esm.js +389 -364
- package/dist/components/ui/data-display/types.js +389 -364
- package/dist/components/ui/enterprise-mobile-experience-demo.esm.js +120 -70
- package/dist/components/ui/enterprise-mobile-experience-demo.js +120 -70
- package/dist/components/ui/enterprise-mobile-experience.esm.js +124 -73
- package/dist/components/ui/enterprise-mobile-experience.js +124 -73
- package/dist/components/ui/feedback/alert.esm.js +22 -15
- package/dist/components/ui/feedback/alert.js +22 -15
- package/dist/components/ui/feedback/progress.esm.js +47 -24
- package/dist/components/ui/feedback/progress.js +47 -24
- package/dist/components/ui/feedback/skeleton.esm.js +39 -29
- package/dist/components/ui/feedback/skeleton.js +39 -29
- package/dist/components/ui/feedback/toast.esm.js +62 -38
- package/dist/components/ui/feedback/toast.js +62 -38
- package/dist/components/ui/feedback/types.esm.js +83 -83
- package/dist/components/ui/feedback/types.js +83 -83
- package/dist/components/ui/font-preview.esm.js +41 -39
- package/dist/components/ui/font-preview.js +41 -39
- package/dist/components/ui/form-demo.esm.js +150 -113
- package/dist/components/ui/form-demo.js +150 -113
- package/dist/components/ui/hardware-acceleration-demo.esm.js +137 -87
- package/dist/components/ui/hardware-acceleration-demo.js +137 -87
- package/dist/components/ui/input.esm.js +4 -1
- package/dist/components/ui/input.js +4 -1
- package/dist/components/ui/layout-demo.esm.js +81 -56
- package/dist/components/ui/layout-demo.js +81 -56
- package/dist/components/ui/layouts/adaptive-layout.esm.js +27 -8
- package/dist/components/ui/layouts/adaptive-layout.js +27 -8
- package/dist/components/ui/layouts/desktop-layout.esm.js +39 -19
- package/dist/components/ui/layouts/desktop-layout.js +39 -19
- package/dist/components/ui/layouts/mobile-layout.esm.js +19 -9
- package/dist/components/ui/layouts/mobile-layout.js +19 -9
- package/dist/components/ui/layouts/tablet-layout.esm.js +28 -14
- package/dist/components/ui/layouts/tablet-layout.js +28 -14
- package/dist/components/ui/mobile-form-validation.esm.js +120 -87
- package/dist/components/ui/mobile-form-validation.js +120 -87
- package/dist/components/ui/mobile-input-demo.esm.js +19 -13
- package/dist/components/ui/mobile-input-demo.js +19 -13
- package/dist/components/ui/mobile-input.esm.js +185 -120
- package/dist/components/ui/mobile-input.js +185 -120
- package/dist/components/ui/mobile-skeleton-loading-demo.esm.js +128 -111
- package/dist/components/ui/mobile-skeleton-loading-demo.js +128 -111
- package/dist/components/ui/navigation/breadcrumb.esm.js +17 -14
- package/dist/components/ui/navigation/breadcrumb.js +17 -14
- package/dist/components/ui/navigation/index.esm.js +0 -1
- package/dist/components/ui/navigation/index.js +0 -1
- package/dist/components/ui/navigation/menu.esm.js +49 -35
- package/dist/components/ui/navigation/menu.js +49 -35
- package/dist/components/ui/navigation/navigation-demo.esm.js +81 -74
- package/dist/components/ui/navigation/navigation-demo.js +81 -74
- package/dist/components/ui/navigation/pagination.esm.js +62 -50
- package/dist/components/ui/navigation/pagination.js +62 -50
- package/dist/components/ui/navigation/sidebar.esm.js +56 -42
- package/dist/components/ui/navigation/sidebar.js +56 -42
- package/dist/components/ui/navigation/stepper.esm.js +34 -23
- package/dist/components/ui/navigation/stepper.js +34 -23
- package/dist/components/ui/navigation/tabs.esm.js +32 -21
- package/dist/components/ui/navigation/tabs.js +32 -21
- package/dist/components/ui/navigation/types.esm.js +196 -195
- package/dist/components/ui/navigation/types.js +196 -195
- package/dist/components/ui/overlay/backdrop.esm.js +17 -16
- package/dist/components/ui/overlay/backdrop.js +17 -16
- package/dist/components/ui/overlay/focus-manager.esm.js +21 -19
- package/dist/components/ui/overlay/focus-manager.js +21 -19
- package/dist/components/ui/overlay/index.esm.js +0 -2
- package/dist/components/ui/overlay/index.js +0 -2
- package/dist/components/ui/overlay/modal.esm.js +38 -34
- package/dist/components/ui/overlay/modal.js +38 -34
- package/dist/components/ui/overlay/overlay-manager.esm.js +25 -20
- package/dist/components/ui/overlay/overlay-manager.js +25 -20
- package/dist/components/ui/overlay/popover.esm.js +74 -58
- package/dist/components/ui/overlay/popover.js +74 -58
- package/dist/components/ui/overlay/portal.esm.js +7 -7
- package/dist/components/ui/overlay/portal.js +7 -7
- package/dist/components/ui/overlay/tooltip.esm.js +54 -39
- package/dist/components/ui/overlay/tooltip.js +54 -39
- package/dist/components/ui/overlay/types.esm.js +132 -131
- package/dist/components/ui/overlay/types.js +132 -131
- package/dist/components/ui/performance-demo.esm.js +135 -88
- package/dist/components/ui/performance-demo.js +135 -88
- package/dist/components/ui/semantic-input-system-demo.esm.js +117 -80
- package/dist/components/ui/semantic-input-system-demo.js +117 -80
- package/dist/components/ui/theme-customizer.esm.js +84 -52
- package/dist/components/ui/theme-customizer.js +84 -52
- package/dist/components/ui/theme-preview.esm.js +95 -43
- package/dist/components/ui/theme-preview.js +95 -43
- package/dist/components/ui/theme-switcher.esm.js +70 -44
- package/dist/components/ui/theme-switcher.js +70 -44
- package/dist/components/ui/theme-toggle.esm.js +3 -3
- package/dist/components/ui/theme-toggle.js +3 -3
- package/dist/components/ui/token-demo.esm.js +33 -21
- package/dist/components/ui/token-demo.js +33 -21
- package/dist/components/ui/touch-demo.esm.js +102 -73
- package/dist/components/ui/touch-demo.js +102 -73
- package/dist/components/ui/touch-friendly-interface-demo.esm.js +102 -64
- package/dist/components/ui/touch-friendly-interface-demo.js +102 -64
- package/dist/components/ui/touch-friendly-interface.esm.js +85 -61
- package/dist/components/ui/touch-friendly-interface.js +85 -61
- package/dist/hooks/use-accessibility-support.esm.js +115 -85
- package/dist/hooks/use-accessibility-support.js +115 -85
- package/dist/hooks/use-adaptive-layout.esm.js +56 -33
- package/dist/hooks/use-adaptive-layout.js +56 -33
- package/dist/hooks/use-advanced-patterns.esm.js +57 -42
- package/dist/hooks/use-advanced-patterns.js +57 -42
- package/dist/hooks/use-advanced-transition-system.esm.js +112 -71
- package/dist/hooks/use-advanced-transition-system.js +112 -71
- package/dist/hooks/use-animation-profile.esm.js +63 -34
- package/dist/hooks/use-animation-profile.js +63 -34
- package/dist/hooks/use-battery-animations.esm.js +80 -55
- package/dist/hooks/use-battery-animations.js +80 -55
- package/dist/hooks/use-battery-conscious-loading.esm.js +166 -123
- package/dist/hooks/use-battery-conscious-loading.js +166 -123
- package/dist/hooks/use-battery-optimization.esm.js +78 -55
- package/dist/hooks/use-battery-optimization.js +78 -55
- package/dist/hooks/use-battery-status.esm.js +73 -51
- package/dist/hooks/use-battery-status.js +73 -51
- package/dist/hooks/use-component-performance.esm.js +62 -47
- package/dist/hooks/use-component-performance.js +62 -47
- package/dist/hooks/use-device-loading-states.esm.js +152 -109
- package/dist/hooks/use-device-loading-states.js +152 -109
- package/dist/hooks/use-device.esm.js +25 -14
- package/dist/hooks/use-device.js +25 -14
- package/dist/hooks/use-enterprise-mobile-experience.esm.js +137 -88
- package/dist/hooks/use-enterprise-mobile-experience.js +137 -88
- package/dist/hooks/use-form-feedback.esm.js +124 -81
- package/dist/hooks/use-form-feedback.js +124 -81
- package/dist/hooks/use-form-performance.esm.js +127 -92
- package/dist/hooks/use-form-performance.js +127 -92
- package/dist/hooks/use-frame-rate.esm.js +56 -37
- package/dist/hooks/use-frame-rate.js +56 -37
- package/dist/hooks/use-gestures.esm.js +96 -72
- package/dist/hooks/use-gestures.js +96 -72
- package/dist/hooks/use-hardware-acceleration.esm.js +65 -37
- package/dist/hooks/use-hardware-acceleration.js +65 -37
- package/dist/hooks/use-input-accessibility.esm.js +157 -119
- package/dist/hooks/use-input-accessibility.js +157 -119
- package/dist/hooks/use-input-performance.esm.js +139 -104
- package/dist/hooks/use-input-performance.js +139 -104
- package/dist/hooks/use-layout-performance.esm.js +50 -29
- package/dist/hooks/use-layout-performance.js +50 -29
- package/dist/hooks/use-loading-accessibility.esm.js +209 -169
- package/dist/hooks/use-loading-accessibility.js +209 -169
- package/dist/hooks/use-loading-performance.esm.js +117 -93
- package/dist/hooks/use-loading-performance.js +117 -93
- package/dist/hooks/use-memory-usage.esm.js +57 -38
- package/dist/hooks/use-memory-usage.js +57 -38
- package/dist/hooks/use-mobile-form-layout.esm.js +111 -74
- package/dist/hooks/use-mobile-form-layout.js +111 -74
- package/dist/hooks/use-mobile-form-validation.esm.js +211 -144
- package/dist/hooks/use-mobile-form-validation.js +211 -144
- package/dist/hooks/use-mobile-keyboard-optimization.esm.js +154 -113
- package/dist/hooks/use-mobile-keyboard-optimization.js +154 -113
- package/dist/hooks/use-mobile-layout.esm.js +73 -51
- package/dist/hooks/use-mobile-layout.js +73 -51
- package/dist/hooks/use-mobile-optimization.esm.js +72 -44
- package/dist/hooks/use-mobile-optimization.js +72 -44
- package/dist/hooks/use-mobile-skeleton.esm.js +97 -64
- package/dist/hooks/use-mobile-skeleton.js +97 -64
- package/dist/hooks/use-mobile-touch.esm.js +128 -93
- package/dist/hooks/use-mobile-touch.js +128 -93
- package/dist/hooks/use-performance-throttling.esm.js +72 -48
- package/dist/hooks/use-performance-throttling.js +72 -48
- package/dist/hooks/use-performance.esm.js +90 -52
- package/dist/hooks/use-performance.js +90 -52
- package/dist/hooks/use-reusable-architecture.esm.js +94 -65
- package/dist/hooks/use-reusable-architecture.js +94 -65
- package/dist/hooks/use-semantic-input-types.esm.js +166 -124
- package/dist/hooks/use-semantic-input-types.js +166 -124
- package/dist/hooks/use-semantic-input.esm.js +178 -126
- package/dist/hooks/use-semantic-input.js +178 -126
- package/dist/hooks/use-tablet-layout.esm.js +67 -38
- package/dist/hooks/use-tablet-layout.js +67 -38
- package/dist/hooks/use-touch-friendly-input.esm.js +193 -149
- package/dist/hooks/use-touch-friendly-input.js +193 -149
- package/dist/hooks/use-touch-friendly-interface.esm.js +99 -67
- package/dist/hooks/use-touch-friendly-interface.js +99 -67
- package/dist/hooks/use-touch-optimization.esm.js +99 -72
- package/dist/hooks/use-touch-optimization.js +99 -72
- package/dist/index.esm.js +157 -281
- package/dist/index.js +157 -281
- package/dist/lib/utils.esm.js +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/plugins/theme-css-generator.esm.js +104 -55
- package/dist/plugins/theme-css-generator.js +104 -55
- package/dist/provider.esm.js +4 -4
- package/dist/provider.js +4 -4
- package/dist/styles.css +1 -1
- package/dist/theme.esm.js +633 -468
- package/dist/theme.js +633 -468
- package/dist/themes/ThemeContext.esm.js +15 -15
- package/dist/themes/ThemeContext.js +15 -15
- package/dist/themes/ThemeProvider.esm.js +25 -22
- package/dist/themes/ThemeProvider.js +25 -22
- package/dist/themes/accessibility.esm.js +147 -108
- package/dist/themes/accessibility.js +147 -108
- package/dist/themes/aria-patterns.esm.js +198 -162
- package/dist/themes/aria-patterns.js +198 -162
- package/dist/themes/base-themes.esm.js +14 -11
- package/dist/themes/base-themes.js +14 -11
- package/dist/themes/colorManager.esm.js +101 -83
- package/dist/themes/colorManager.js +101 -83
- package/dist/themes/examples/dark-theme.esm.js +133 -103
- package/dist/themes/examples/dark-theme.js +133 -103
- package/dist/themes/examples/minimal-theme.esm.js +83 -61
- package/dist/themes/examples/minimal-theme.js +83 -61
- package/dist/themes/focus-management.esm.js +202 -143
- package/dist/themes/focus-management.js +202 -143
- package/dist/themes/fontLoader.esm.js +28 -19
- package/dist/themes/fontLoader.js +28 -19
- package/dist/themes/high-contrast.esm.js +152 -104
- package/dist/themes/high-contrast.js +152 -104
- package/dist/themes/index.esm.js +1 -1
- package/dist/themes/index.js +1 -1
- package/dist/themes/inheritance.esm.js +35 -27
- package/dist/themes/inheritance.js +35 -27
- package/dist/themes/keyboard-navigation.esm.js +152 -123
- package/dist/themes/keyboard-navigation.js +152 -123
- package/dist/themes/motion-reduction.esm.js +193 -133
- package/dist/themes/motion-reduction.js +193 -133
- package/dist/themes/navigation.esm.js +146 -146
- package/dist/themes/navigation.js +146 -146
- package/dist/themes/screen-reader.esm.js +159 -94
- package/dist/themes/screen-reader.js +159 -94
- package/dist/themes/systemThemeDetector.esm.js +42 -34
- package/dist/themes/systemThemeDetector.js +42 -34
- package/dist/themes/themeCSSUpdater.esm.js +21 -9
- package/dist/themes/themeCSSUpdater.js +21 -9
- package/dist/themes/themePersistence.esm.js +68 -47
- package/dist/themes/themePersistence.js +68 -47
- package/dist/themes/themes/stan-design.esm.js +633 -468
- package/dist/themes/themes/stan-design.js +633 -468
- package/dist/themes/types.esm.js +301 -287
- package/dist/themes/types.js +301 -287
- package/dist/themes/useSystemTheme.esm.js +4 -4
- package/dist/themes/useSystemTheme.js +4 -4
- package/dist/themes/useTheme.esm.js +4 -4
- package/dist/themes/useTheme.js +4 -4
- package/dist/themes/validation.esm.js +128 -77
- package/dist/themes/validation.js +128 -77
- package/dist/tokens/index.esm.js +1 -2
- package/dist/tokens/index.js +1 -2
- package/dist/tokens/tokenExporter.esm.js +87 -61
- package/dist/tokens/tokenExporter.js +87 -61
- package/dist/tokens/tokenGenerator.esm.js +86 -77
- package/dist/tokens/tokenGenerator.js +86 -77
- package/dist/tokens/tokenManager.esm.js +64 -51
- package/dist/tokens/tokenManager.js +64 -51
- package/dist/tokens/tokenValidator.esm.js +193 -147
- package/dist/tokens/tokenValidator.js +193 -147
- package/dist/tokens/types.esm.js +49 -35
- package/dist/tokens/types.js +49 -35
- package/dist/utils/bundle-analyzer.esm.js +83 -65
- package/dist/utils/bundle-analyzer.js +83 -65
- package/dist/utils/bundle-splitting.esm.js +142 -117
- package/dist/utils/bundle-splitting.js +142 -117
- package/dist/utils/lazy-loading.esm.js +132 -106
- package/dist/utils/lazy-loading.js +132 -106
- package/dist/utils/performance-monitor.esm.js +170 -129
- package/dist/utils/performance-monitor.js +170 -129
- package/dist/utils/tree-shaking.esm.js +69 -61
- package/dist/utils/tree-shaking.js +69 -61
- package/package.json +1 -1
- package/src/index.ts +146 -146
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from '../../hooks'
|
|
12
12
|
import { useDevice } from '../../hooks/use-device'
|
|
13
13
|
|
|
14
|
-
export const PerformanceDemo= () => {
|
|
14
|
+
export const PerformanceDemo: React.FC = () => {
|
|
15
15
|
const [activeTab, setActiveTab] = useState<'overview' | 'fps' | 'memory' | 'battery' | 'throttling'>('overview')
|
|
16
16
|
const [showRecommendations, setShowRecommendations] = useState(false)
|
|
17
17
|
|
|
@@ -24,46 +24,53 @@ export const PerformanceDemo= () => {
|
|
|
24
24
|
performanceMode,
|
|
25
25
|
getOptimizationRecommendations
|
|
26
26
|
} = usePerformance({
|
|
27
|
-
callbacks
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
callbacks: {
|
|
28
|
+
onFPSWarning: (fps) => console.warn(`FPS Warning: ${fps}`),
|
|
29
|
+
onMemoryWarning: (usage) => console.warn(`Memory Warning: ${(usage * 100).toFixed(1)}%`),
|
|
30
|
+
onBatteryLow: (level) => console.warn(`Battery Low: ${(level * 100).toFixed(1)}%`),
|
|
31
|
+
onPerformanceModeChange: (mode) => console.log(`Performance mode changed to: ${mode}`),
|
|
32
|
+
onThrottlingChange: (enabled, reason) => console.log(`Throttling ${enabled ? 'enabled' : 'disabled'}: ${reason}`)
|
|
32
33
|
}
|
|
33
34
|
})
|
|
34
35
|
|
|
35
36
|
// Specialized hooks
|
|
36
37
|
const {
|
|
37
|
-
metrics,
|
|
38
|
-
performanceScore,
|
|
39
|
-
getPerformanceInsights
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
metrics: fpsMetrics,
|
|
39
|
+
performanceScore: fpsScore,
|
|
40
|
+
getPerformanceInsights: getFPSInsights
|
|
41
|
+
} = useFrameRate({
|
|
42
|
+
callbacks: {
|
|
43
|
+
onFPSWarning: (fps) => console.warn(`Frame rate warning: ${fps} FPS`),
|
|
44
|
+
onFPSDrop: (fps, previous) => console.warn(`FPS drop detected: ${previous} → ${fps}`)
|
|
42
45
|
}
|
|
43
46
|
})
|
|
44
47
|
|
|
45
48
|
const {
|
|
46
|
-
metrics,
|
|
49
|
+
metrics: memoryMetrics,
|
|
47
50
|
memoryTrend,
|
|
48
51
|
memoryLeakDetected,
|
|
49
|
-
getOptimizationRecommendations,
|
|
50
|
-
getCleanupSuggestions
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
getOptimizationRecommendations: getMemoryRecommendations,
|
|
53
|
+
getCleanupSuggestions: getMemoryCleanupSuggestions
|
|
54
|
+
} = useMemoryUsage({
|
|
55
|
+
callbacks: {
|
|
56
|
+
onMemoryWarning: (usage) => console.warn(`Memory usage warning: ${(usage * 100).toFixed(1)}%`),
|
|
57
|
+
onMemoryLeakDetected: (trend) => console.warn(`Memory leak detected: ${trend} trend`)
|
|
53
58
|
}
|
|
54
59
|
})
|
|
55
60
|
|
|
56
61
|
const {
|
|
57
|
-
metrics,
|
|
62
|
+
metrics: batteryMetrics,
|
|
58
63
|
batteryLevel,
|
|
59
64
|
isCharging,
|
|
60
65
|
isLowPowerMode,
|
|
61
66
|
isCriticalBattery,
|
|
62
|
-
getOptimizationRecommendations,
|
|
63
|
-
getPowerSavingSuggestions,
|
|
64
|
-
getBatteryStatus
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
getOptimizationRecommendations: getBatteryRecommendations,
|
|
68
|
+
getPowerSavingSuggestions: getBatteryPowerSuggestions,
|
|
69
|
+
getBatteryStatus: getBatteryStatusText
|
|
70
|
+
} = useBatteryStatus({
|
|
71
|
+
callbacks: {
|
|
72
|
+
onBatteryLow: (level) => console.warn(`Battery low: ${(level * 100).toFixed(1)}%`),
|
|
73
|
+
onBatteryCritical: (level) => console.error(`Battery critical: ${(level * 100).toFixed(1)}%`)
|
|
67
74
|
}
|
|
68
75
|
})
|
|
69
76
|
|
|
@@ -76,42 +83,61 @@ export const PerformanceDemo= () => {
|
|
|
76
83
|
performanceSettings,
|
|
77
84
|
|
|
78
85
|
} = usePerformanceThrottling({
|
|
79
|
-
enablePerformanceMonitoring,
|
|
80
|
-
enableAutomaticThrottling,
|
|
81
|
-
enableUserExperienceOptimization,
|
|
82
|
-
enableBatteryPreservation
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
enablePerformanceMonitoring: true,
|
|
87
|
+
enableAutomaticThrottling: true,
|
|
88
|
+
enableUserExperienceOptimization: true,
|
|
89
|
+
enableBatteryPreservation: true
|
|
90
|
+
}, {
|
|
91
|
+
onPerformanceWarning: (metrics) => console.log('Performance warning:', metrics),
|
|
92
|
+
onThrottlingApplied: (level, reason) => console.log('Throttling applied:', level, reason),
|
|
93
|
+
onPerformanceRecovery: (metrics) => console.log('Performance recovery:', metrics),
|
|
94
|
+
onUserExperienceOptimized: (optimization) => console.log('User experience optimized:', optimization)
|
|
87
95
|
})
|
|
88
96
|
|
|
89
97
|
// Performance score color mapping
|
|
90
|
-
const getScoreColor = (score) => {
|
|
98
|
+
const getScoreColor = (score: string) => {
|
|
91
99
|
switch (score) {
|
|
92
|
-
case 'excellent'
|
|
100
|
+
case 'excellent': return 'text-green-600 bg-green-100'
|
|
101
|
+
case 'good': return 'text-blue-600 bg-blue-100'
|
|
102
|
+
case 'fair': return 'text-yellow-600 bg-yellow-100'
|
|
103
|
+
case 'poor': return 'text-red-600 bg-red-100'
|
|
104
|
+
default: return 'text-gray-600 bg-gray-100'
|
|
105
|
+
}
|
|
93
106
|
}
|
|
94
107
|
|
|
95
108
|
// Performance mode color mapping
|
|
96
|
-
const getModeColor = (mode) => {
|
|
109
|
+
const getModeColor = (mode: string) => {
|
|
97
110
|
switch (mode) {
|
|
98
|
-
case 'high'
|
|
111
|
+
case 'high': return 'text-green-600 bg-green-100'
|
|
112
|
+
case 'medium': return 'text-yellow-600 bg-yellow-100'
|
|
113
|
+
case 'low': return 'text-red-600 bg-red-100'
|
|
114
|
+
default: return 'text-gray-600 bg-gray-100'
|
|
115
|
+
}
|
|
99
116
|
}
|
|
100
117
|
|
|
101
118
|
// Throttling level color mapping
|
|
102
|
-
const getThrottlingColor = (level) => {
|
|
119
|
+
const getThrottlingColor = (level: string) => {
|
|
103
120
|
switch (level) {
|
|
104
|
-
case 'none'
|
|
121
|
+
case 'none': return 'text-green-600 bg-green-100'
|
|
122
|
+
case 'light': return 'text-blue-600 bg-blue-100'
|
|
123
|
+
case 'moderate': return 'text-yellow-600 bg-yellow-100'
|
|
124
|
+
case 'aggressive': return 'text-red-600 bg-red-100'
|
|
125
|
+
default: return 'text-gray-600 bg-gray-100'
|
|
126
|
+
}
|
|
105
127
|
}
|
|
106
128
|
|
|
107
129
|
// Memory trend icon
|
|
108
|
-
const getMemoryTrendIcon = (trend) => {
|
|
130
|
+
const getMemoryTrendIcon = (trend: string) => {
|
|
109
131
|
switch (trend) {
|
|
110
|
-
case 'increasing'
|
|
132
|
+
case 'increasing': return '📈'
|
|
133
|
+
case 'decreasing': return '📉'
|
|
134
|
+
case 'stable': return '➡️'
|
|
135
|
+
default: return '❓'
|
|
136
|
+
}
|
|
111
137
|
}
|
|
112
138
|
|
|
113
139
|
// Battery icon
|
|
114
|
-
const getBatteryIcon = (level, charging) => {
|
|
140
|
+
const getBatteryIcon = (level: number, charging: boolean) => {
|
|
115
141
|
if (charging) return '🔌'
|
|
116
142
|
if (level <= 0.15) return '🔴'
|
|
117
143
|
if (level <= 0.3) return '🟠'
|
|
@@ -120,11 +146,11 @@ export const PerformanceDemo= () => {
|
|
|
120
146
|
}
|
|
121
147
|
|
|
122
148
|
const tabs = [
|
|
123
|
-
{ id, label, icon},
|
|
124
|
-
{ id, label, icon},
|
|
125
|
-
{ id, label, icon},
|
|
126
|
-
{ id, label, icon},
|
|
127
|
-
{ id, label, icon}
|
|
149
|
+
{ id: 'overview', label: 'Overview', icon: '📊' },
|
|
150
|
+
{ id: 'fps', label: 'Frame Rate', icon: '🎬' },
|
|
151
|
+
{ id: 'memory', label: 'Memory', icon: '🧠' },
|
|
152
|
+
{ id: 'battery', label: 'Battery', icon: '🔋' },
|
|
153
|
+
{ id: 'throttling', label: 'Throttling', icon: '⚡' }
|
|
128
154
|
]
|
|
129
155
|
|
|
130
156
|
return (
|
|
@@ -134,7 +160,7 @@ export const PerformanceDemo= () => {
|
|
|
134
160
|
{tabs.map((tab) => (
|
|
135
161
|
<Button
|
|
136
162
|
key={tab.id}
|
|
137
|
-
variant={activeTab === tab.id ? 'default' }
|
|
163
|
+
variant={activeTab === tab.id ? 'default' : 'outline'}
|
|
138
164
|
size="sm"
|
|
139
165
|
onClick={() => setActiveTab(tab.id as any)}
|
|
140
166
|
className="flex items-center gap-2"
|
|
@@ -153,7 +179,7 @@ export const PerformanceDemo= () => {
|
|
|
153
179
|
<CardHeader>
|
|
154
180
|
<CardTitle className="flex items-center gap-2">
|
|
155
181
|
🎯 Performance Summary
|
|
156
|
-
<Badge variant={performanceMode === 'high' ? 'default' }>
|
|
182
|
+
<Badge variant={performanceMode === 'high' ? 'default' : 'secondary'}>
|
|
157
183
|
{performanceMode.toUpperCase()} MODE
|
|
158
184
|
</Badge>
|
|
159
185
|
</CardTitle>
|
|
@@ -162,7 +188,8 @@ export const PerformanceDemo= () => {
|
|
|
162
188
|
</CardDescription>
|
|
163
189
|
</CardHeader>
|
|
164
190
|
<CardContent className="space-y-4">
|
|
165
|
-
<div className="grid grid-cols-1 md
|
|
191
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
192
|
+
{/* FPS Status */}
|
|
166
193
|
<div className="text-center p-4 border rounded-lg">
|
|
167
194
|
<div className="text-2xl font-bold text-blue-600">{fpsMetrics.fps}</div>
|
|
168
195
|
<div className="text-sm text-gray-600">FPS</div>
|
|
@@ -174,13 +201,13 @@ export const PerformanceDemo= () => {
|
|
|
174
201
|
{/* Memory Status */}
|
|
175
202
|
<div className="text-center p-4 border rounded-lg">
|
|
176
203
|
<div className="text-2xl font-bold text-purple-600">
|
|
177
|
-
{memoryMetrics.memoryPercentage ? memoryMetrics.memoryPercentage.toFixed(1) }%
|
|
204
|
+
{memoryMetrics.memoryPercentage ? memoryMetrics.memoryPercentage.toFixed(1) : 'N/A'}%
|
|
178
205
|
</div>
|
|
179
206
|
<div className="text-sm text-gray-600">Memory Usage</div>
|
|
180
207
|
<div className="flex items-center justify-center gap-1 mt-2">
|
|
181
208
|
<span>{getMemoryTrendIcon(memoryTrend)}</span>
|
|
182
|
-
<Badge variant={memoryLeakDetected ? 'destructive' }>
|
|
183
|
-
{memoryLeakDetected ? 'Leak Detected' }
|
|
209
|
+
<Badge variant={memoryLeakDetected ? 'destructive' : 'secondary'}>
|
|
210
|
+
{memoryLeakDetected ? 'Leak Detected' : memoryTrend}
|
|
184
211
|
</Badge>
|
|
185
212
|
</div>
|
|
186
213
|
</div>
|
|
@@ -191,7 +218,7 @@ export const PerformanceDemo= () => {
|
|
|
191
218
|
{getBatteryIcon(batteryLevel || 1, isCharging)}
|
|
192
219
|
</div>
|
|
193
220
|
<div className="text-sm text-gray-600">Battery</div>
|
|
194
|
-
<Badge variant={isCriticalBattery ? 'destructive' }>
|
|
221
|
+
<Badge variant={isCriticalBattery ? 'destructive' : isLowPowerMode ? 'secondary' : 'default'}>
|
|
195
222
|
{getBatteryStatusText()}
|
|
196
223
|
</Badge>
|
|
197
224
|
</div>
|
|
@@ -216,13 +243,14 @@ export const PerformanceDemo= () => {
|
|
|
216
243
|
onClick={() => setShowRecommendations(!showRecommendations)}
|
|
217
244
|
className="w-full"
|
|
218
245
|
>
|
|
219
|
-
{showRecommendations ? 'Hide' } Performance Recommendations
|
|
246
|
+
{showRecommendations ? 'Hide' : 'Show'} Performance Recommendations
|
|
220
247
|
</Button>
|
|
221
248
|
|
|
222
249
|
{/* Performance Recommendations */}
|
|
223
250
|
{showRecommendations && (
|
|
224
251
|
<div className="space-y-3">
|
|
225
|
-
<h4 className="font-medium text-gray-900">Optimization Recommendations
|
|
252
|
+
<h4 className="font-medium text-gray-900">Optimization Recommendations:</h4>
|
|
253
|
+
<ul className="space-y-2 text-sm text-gray-700">
|
|
226
254
|
{getOptimizationRecommendations().map((rec, index) => (
|
|
227
255
|
<li key={index} className="flex items-start gap-2">
|
|
228
256
|
<span className="text-blue-500">•</span>
|
|
@@ -243,16 +271,18 @@ export const PerformanceDemo= () => {
|
|
|
243
271
|
</CardTitle>
|
|
244
272
|
</CardHeader>
|
|
245
273
|
<CardContent>
|
|
246
|
-
<div className="grid grid-cols-1 md
|
|
274
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-4 text-sm">
|
|
275
|
+
<div>
|
|
276
|
+
<span className="font-medium">Device Type:</span> {device.screenSize}
|
|
247
277
|
</div>
|
|
248
278
|
<div>
|
|
249
|
-
<span className="font-medium">Screen Size}
|
|
279
|
+
<span className="font-medium">Screen Size:</span> {device.screenSize}
|
|
250
280
|
</div>
|
|
251
281
|
<div>
|
|
252
|
-
<span className="font-medium">Orientation}
|
|
282
|
+
<span className="font-medium">Orientation:</span> {device.orientation}
|
|
253
283
|
</div>
|
|
254
284
|
<div>
|
|
255
|
-
<span className="font-medium">Touch Device}
|
|
285
|
+
<span className="font-medium">Touch Device:</span> {device.touchDevice ? 'Yes' : 'No'}
|
|
256
286
|
</div>
|
|
257
287
|
</div>
|
|
258
288
|
</CardContent>
|
|
@@ -275,7 +305,8 @@ export const PerformanceDemo= () => {
|
|
|
275
305
|
</CardDescription>
|
|
276
306
|
</CardHeader>
|
|
277
307
|
<CardContent className="space-y-4">
|
|
278
|
-
<div className="grid grid-cols-2 md
|
|
308
|
+
<div className="grid grid-cols-2 md:grid-cols-4 gap-4">
|
|
309
|
+
<div className="text-center p-3 border rounded-lg">
|
|
279
310
|
<div className="text-xl font-bold text-blue-600">{fpsMetrics.fps}</div>
|
|
280
311
|
<div className="text-xs text-gray-600">Current FPS</div>
|
|
281
312
|
</div>
|
|
@@ -294,7 +325,8 @@ export const PerformanceDemo= () => {
|
|
|
294
325
|
</div>
|
|
295
326
|
|
|
296
327
|
<div className="p-4 bg-blue-50 border border-blue-200 rounded-lg">
|
|
297
|
-
<h4 className="font-medium text-blue-800 mb-2">Performance Insights
|
|
328
|
+
<h4 className="font-medium text-blue-800 mb-2">Performance Insights:</h4>
|
|
329
|
+
<ul className="space-y-1 text-sm text-blue-700">
|
|
298
330
|
{getFPSInsights().map((insight, index) => (
|
|
299
331
|
<li key={index} className="flex items-start gap-2">
|
|
300
332
|
<span className="text-blue-500">•</span>
|
|
@@ -313,8 +345,8 @@ export const PerformanceDemo= () => {
|
|
|
313
345
|
<CardHeader>
|
|
314
346
|
<CardTitle className="flex items-center gap-2">
|
|
315
347
|
🧠 Memory Usage Monitoring
|
|
316
|
-
<Badge variant={memoryLeakDetected ? 'destructive' }>
|
|
317
|
-
{memoryLeakDetected ? 'LEAK DETECTED' )}
|
|
348
|
+
<Badge variant={memoryLeakDetected ? 'destructive' : 'secondary'}>
|
|
349
|
+
{memoryLeakDetected ? 'LEAK DETECTED' : memoryTrend.toUpperCase()}
|
|
318
350
|
</Badge>
|
|
319
351
|
</CardTitle>
|
|
320
352
|
<CardDescription>
|
|
@@ -322,28 +354,30 @@ export const PerformanceDemo= () => {
|
|
|
322
354
|
</CardDescription>
|
|
323
355
|
</CardHeader>
|
|
324
356
|
<CardContent className="space-y-4">
|
|
325
|
-
<div className="grid grid-cols-1 md
|
|
357
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
358
|
+
<div className="text-center p-3 border rounded-lg">
|
|
326
359
|
<div className="text-xl font-bold text-purple-600">
|
|
327
|
-
{memoryMetrics.memoryPercentage ? memoryMetrics.memoryPercentage.toFixed(1) }%
|
|
360
|
+
{memoryMetrics.memoryPercentage ? memoryMetrics.memoryPercentage.toFixed(1) : 'N/A'}%
|
|
328
361
|
</div>
|
|
329
362
|
<div className="text-xs text-gray-600">Usage</div>
|
|
330
363
|
</div>
|
|
331
364
|
<div className="text-center p-3 border rounded-lg">
|
|
332
365
|
<div className="text-xl font-bold text-blue-600">
|
|
333
|
-
{memoryMetrics.usedJSHeapSize ? (memoryMetrics.usedJSHeapSize / 1024 / 1024).toFixed(1) } MB
|
|
366
|
+
{memoryMetrics.usedJSHeapSize ? (memoryMetrics.usedJSHeapSize / 1024 / 1024).toFixed(1) : 'N/A'} MB
|
|
334
367
|
</div>
|
|
335
368
|
<div className="text-xs text-gray-600">Used</div>
|
|
336
369
|
</div>
|
|
337
370
|
<div className="text-center p-3 border rounded-lg">
|
|
338
371
|
<div className="text-xl font-bold text-green-600">
|
|
339
|
-
{memoryMetrics.jsHeapSizeLimit ? (memoryMetrics.jsHeapSizeLimit / 1024 / 1024).toFixed(1) } MB
|
|
372
|
+
{memoryMetrics.jsHeapSizeLimit ? (memoryMetrics.jsHeapSizeLimit / 1024 / 1024).toFixed(1) : 'N/A'} MB
|
|
340
373
|
</div>
|
|
341
374
|
<div className="text-xs text-gray-600">Limit</div>
|
|
342
375
|
</div>
|
|
343
376
|
</div>
|
|
344
377
|
|
|
345
378
|
<div className="p-4 bg-purple-50 border border-purple-200 rounded-lg">
|
|
346
|
-
<h4 className="font-medium text-purple-800 mb-2">Memory Optimization
|
|
379
|
+
<h4 className="font-medium text-purple-800 mb-2">Memory Optimization:</h4>
|
|
380
|
+
<ul className="space-y-1 text-sm text-purple-700">
|
|
347
381
|
{getMemoryRecommendations().map((rec, index) => (
|
|
348
382
|
<li key={index} className="flex items-start gap-2">
|
|
349
383
|
<span className="text-purple-500">•</span>
|
|
@@ -355,7 +389,8 @@ export const PerformanceDemo= () => {
|
|
|
355
389
|
|
|
356
390
|
{memoryLeakDetected && (
|
|
357
391
|
<div className="p-4 bg-red-50 border border-red-200 rounded-lg">
|
|
358
|
-
<h4 className="font-medium text-red-800 mb-2">Memory Leak Cleanup Suggestions
|
|
392
|
+
<h4 className="font-medium text-red-800 mb-2">Memory Leak Cleanup Suggestions:</h4>
|
|
393
|
+
<ul className="space-y-1 text-sm text-red-700">
|
|
359
394
|
{getMemoryCleanupSuggestions().map((suggestion, index) => (
|
|
360
395
|
<li key={index} className="flex items-start gap-2">
|
|
361
396
|
<span className="text-red-500">•</span>
|
|
@@ -375,7 +410,7 @@ export const PerformanceDemo= () => {
|
|
|
375
410
|
<CardHeader>
|
|
376
411
|
<CardTitle className="flex items-center gap-2">
|
|
377
412
|
🔋 Battery Status Monitoring
|
|
378
|
-
<Badge variant={isCriticalBattery ? 'destructive' }>
|
|
413
|
+
<Badge variant={isCriticalBattery ? 'destructive' : isLowPowerMode ? 'secondary' : 'default'}>
|
|
379
414
|
{getBatteryStatusText()}
|
|
380
415
|
</Badge>
|
|
381
416
|
</CardTitle>
|
|
@@ -384,16 +419,17 @@ export const PerformanceDemo= () => {
|
|
|
384
419
|
</CardDescription>
|
|
385
420
|
</CardHeader>
|
|
386
421
|
<CardContent className="space-y-4">
|
|
387
|
-
<div className="grid grid-cols-1 md
|
|
422
|
+
<div className="grid grid-cols-1 md:grid-cols-4 gap-4">
|
|
423
|
+
<div className="text-center p-3 border rounded-lg">
|
|
388
424
|
<div className="text-2xl">{getBatteryIcon(batteryLevel || 1, isCharging)}</div>
|
|
389
425
|
<div className="text-xl font-bold text-green-600">
|
|
390
|
-
{batteryLevel ? (batteryLevel * 100).toFixed(1) }%
|
|
426
|
+
{batteryLevel ? (batteryLevel * 100).toFixed(1) : 'N/A'}%
|
|
391
427
|
</div>
|
|
392
428
|
<div className="text-xs text-gray-600">Level</div>
|
|
393
429
|
</div>
|
|
394
430
|
<div className="text-center p-3 border rounded-lg">
|
|
395
431
|
<div className="text-xl font-bold text-blue-600">
|
|
396
|
-
{isCharging ? 'Yes' }
|
|
432
|
+
{isCharging ? 'Yes' : 'No'}
|
|
397
433
|
</div>
|
|
398
434
|
<div className="text-xs text-gray-600">Charging</div>
|
|
399
435
|
</div>
|
|
@@ -412,7 +448,8 @@ export const PerformanceDemo= () => {
|
|
|
412
448
|
</div>
|
|
413
449
|
|
|
414
450
|
<div className="p-4 bg-green-50 border border-green-200 rounded-lg">
|
|
415
|
-
<h4 className="font-medium text-green-800 mb-2">Battery Optimization
|
|
451
|
+
<h4 className="font-medium text-green-800 mb-2">Battery Optimization:</h4>
|
|
452
|
+
<ul className="space-y-1 text-sm text-green-700">
|
|
416
453
|
{getBatteryRecommendations().map((rec, index) => (
|
|
417
454
|
<li key={index} className="flex items-start gap-2">
|
|
418
455
|
<span className="text-green-500">•</span>
|
|
@@ -424,7 +461,8 @@ export const PerformanceDemo= () => {
|
|
|
424
461
|
|
|
425
462
|
{(isLowPowerMode || isCriticalBattery) && (
|
|
426
463
|
<div className="p-4 bg-yellow-50 border border-yellow-200 rounded-lg">
|
|
427
|
-
<h4 className="font-medium text-yellow-800 mb-2">Power Saving Suggestions
|
|
464
|
+
<h4 className="font-medium text-yellow-800 mb-2">Power Saving Suggestions:</h4>
|
|
465
|
+
<ul className="space-y-1 text-sm text-yellow-700">
|
|
428
466
|
{getBatteryPowerSuggestions().map((suggestion, index) => (
|
|
429
467
|
<li key={index} className="flex items-start gap-2">
|
|
430
468
|
<span className="text-yellow-500">•</span>
|
|
@@ -453,9 +491,10 @@ export const PerformanceDemo= () => {
|
|
|
453
491
|
</CardDescription>
|
|
454
492
|
</CardHeader>
|
|
455
493
|
<CardContent className="space-y-4">
|
|
456
|
-
<div className="grid grid-cols-1 md
|
|
494
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
495
|
+
<div className="text-center p-3 border rounded-lg">
|
|
457
496
|
<div className="text-xl font-bold text-blue-600">
|
|
458
|
-
{isThrottling ? 'Active' }
|
|
497
|
+
{isThrottling ? 'Active' : 'Inactive'}
|
|
459
498
|
</div>
|
|
460
499
|
<div className="text-xs text-gray-600">Throttling Status</div>
|
|
461
500
|
</div>
|
|
@@ -467,7 +506,7 @@ export const PerformanceDemo= () => {
|
|
|
467
506
|
</div>
|
|
468
507
|
<div className="text-center p-3 border rounded-lg">
|
|
469
508
|
<div className="text-xl font-bold text-green-600">
|
|
470
|
-
{performanceSettings.memoryOptimization ? 'Yes' }
|
|
509
|
+
{performanceSettings.memoryOptimization ? 'Yes' : 'No'}
|
|
471
510
|
</div>
|
|
472
511
|
<div className="text-xs text-gray-600">Battery Optimized</div>
|
|
473
512
|
</div>
|
|
@@ -483,7 +522,7 @@ export const PerformanceDemo= () => {
|
|
|
483
522
|
</div>
|
|
484
523
|
<div className="text-center p-3 border rounded-lg">
|
|
485
524
|
<div className="text-lg font-bold text-green-600">
|
|
486
|
-
{isThrottling ? 'Active' }
|
|
525
|
+
{isThrottling ? 'Active' : 'Inactive'}
|
|
487
526
|
</div>
|
|
488
527
|
<div className="text-xs text-gray-600">Throttling Status</div>
|
|
489
528
|
</div>
|
|
@@ -491,18 +530,23 @@ export const PerformanceDemo= () => {
|
|
|
491
530
|
|
|
492
531
|
{/* Performance Settings */}
|
|
493
532
|
<div className="space-y-2">
|
|
494
|
-
<h4 className="font-medium text-gray-900">Performance Settings
|
|
533
|
+
<h4 className="font-medium text-gray-900">Performance Settings:</h4>
|
|
534
|
+
<div className="grid grid-cols-2 gap-4 text-sm">
|
|
495
535
|
<div>
|
|
496
|
-
<span className="font-medium">Max Concurrent Animations
|
|
536
|
+
<span className="font-medium">Max Concurrent Animations:</span>
|
|
537
|
+
<div className="text-blue-600">{performanceSettings.maxConcurrentAnimations}</div>
|
|
497
538
|
</div>
|
|
498
539
|
<div>
|
|
499
|
-
<span className="font-medium">Frame Rate Limit
|
|
540
|
+
<span className="font-medium">Frame Rate Limit:</span>
|
|
541
|
+
<div className="text-blue-600">{performanceSettings.frameRateLimit}fps</div>
|
|
500
542
|
</div>
|
|
501
543
|
<div>
|
|
502
|
-
<span className="font-medium">Animation Quality
|
|
544
|
+
<span className="font-medium">Animation Quality:</span>
|
|
545
|
+
<div className="text-blue-600">{performanceSettings.animationQuality}</div>
|
|
503
546
|
</div>
|
|
504
547
|
<div>
|
|
505
|
-
<span className="font-medium">Memory Optimization
|
|
548
|
+
<span className="font-medium">Memory Optimization:</span>
|
|
549
|
+
<div className="text-blue-600">{performanceSettings.memoryOptimization ? 'Yes' : 'No'}</div>
|
|
506
550
|
</div>
|
|
507
551
|
</div>
|
|
508
552
|
</div>
|
|
@@ -510,17 +554,19 @@ export const PerformanceDemo= () => {
|
|
|
510
554
|
{/* Throttling Information */}
|
|
511
555
|
{isThrottling && (
|
|
512
556
|
<div className="p-4 bg-yellow-50 border border-yellow-200 rounded-lg">
|
|
513
|
-
<h4 className="font-medium text-yellow-800 mb-2">Throttling Information
|
|
514
|
-
|
|
515
|
-
<div><strong>
|
|
516
|
-
<div><strong>
|
|
557
|
+
<h4 className="font-medium text-yellow-800 mb-2">Throttling Information:</h4>
|
|
558
|
+
<div className="text-sm text-yellow-700 space-y-1">
|
|
559
|
+
<div><strong>Level:</strong> {throttleLevel}</div>
|
|
560
|
+
<div><strong>Performance Score:</strong> {metrics.performanceScore}</div>
|
|
561
|
+
<div><strong>FPS:</strong> {metrics.fps}</div>
|
|
517
562
|
</div>
|
|
518
563
|
</div>
|
|
519
564
|
)}
|
|
520
565
|
|
|
521
566
|
{/* Recommendations */}
|
|
522
567
|
<div className="p-4 bg-blue-50 border border-blue-200 rounded-lg">
|
|
523
|
-
<h4 className="font-medium text-blue-800 mb-2">Throttling Recommendations
|
|
568
|
+
<h4 className="font-medium text-blue-800 mb-2">Throttling Recommendations:</h4>
|
|
569
|
+
<ul className="space-y-1 text-sm text-blue-700">
|
|
524
570
|
{recommendations.map((rec, index) => (
|
|
525
571
|
<li key={index} className="flex items-start gap-2">
|
|
526
572
|
<span className="text-blue-500">•</span>
|
|
@@ -532,7 +578,8 @@ export const PerformanceDemo= () => {
|
|
|
532
578
|
|
|
533
579
|
{/* Optimization Suggestions */}
|
|
534
580
|
<div className="p-4 bg-green-50 border border-green-200 rounded-lg">
|
|
535
|
-
<h4 className="font-medium text-green-800 mb-2">Optimization Suggestions
|
|
581
|
+
<h4 className="font-medium text-green-800 mb-2">Optimization Suggestions:</h4>
|
|
582
|
+
<ul className="space-y-1 text-sm text-green-700">
|
|
536
583
|
{optimizations.map((suggestion, index) => (
|
|
537
584
|
<li key={index} className="flex items-start gap-2">
|
|
538
585
|
<span className="text-green-500">•</span>
|