canvasframework 0.5.16 → 0.5.18
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/dist/canvasframework.js +2 -0
- package/dist/canvasframework.js.LICENSE.txt +1 -0
- package/package.json +18 -17
- package/components/Accordion.js +0 -265
- package/components/AndroidDatePickerDialog.js +0 -406
- package/components/AppBar.js +0 -398
- package/components/AudioPlayer.js +0 -611
- package/components/Avatar.js +0 -202
- package/components/Banner.js +0 -342
- package/components/BottomNavigationBar.js +0 -433
- package/components/BottomSheet.js +0 -234
- package/components/Button.js +0 -360
- package/components/Camera.js +0 -644
- package/components/Card.js +0 -193
- package/components/Chart.js +0 -700
- package/components/Checkbox.js +0 -166
- package/components/Chip.js +0 -212
- package/components/CircularProgress.js +0 -327
- package/components/ContextMenu.js +0 -116
- package/components/DatePicker.js +0 -298
- package/components/Dialog.js +0 -337
- package/components/Divider.js +0 -125
- package/components/Drawer.js +0 -276
- package/components/FAB.js +0 -270
- package/components/FileUpload.js +0 -315
- package/components/FloatedCamera.js +0 -644
- package/components/IOSDatePickerWheel.js +0 -430
- package/components/ImageCarousel.js +0 -219
- package/components/ImageComponent.js +0 -223
- package/components/Input.js +0 -831
- package/components/InputDatalist.js +0 -723
- package/components/InputTags.js +0 -624
- package/components/List.js +0 -95
- package/components/ListItem.js +0 -269
- package/components/Modal.js +0 -364
- package/components/MorphingFAB.js +0 -428
- package/components/MultiSelectDialog.js +0 -206
- package/components/NumberInput.js +0 -271
- package/components/PasswordInput.js +0 -462
- package/components/ProgressBar.js +0 -88
- package/components/QRCodeReader.js +0 -539
- package/components/RadioButton.js +0 -151
- package/components/SearchInput.js +0 -315
- package/components/SegmentedControl.js +0 -357
- package/components/Select.js +0 -199
- package/components/SelectDialog.js +0 -255
- package/components/Slider.js +0 -113
- package/components/SliverAppBar.js +0 -139
- package/components/Snackbar.js +0 -243
- package/components/SpeedDialFAB.js +0 -397
- package/components/Stepper.js +0 -281
- package/components/SwipeableListItem.js +0 -327
- package/components/Switch.js +0 -147
- package/components/Table.js +0 -492
- package/components/Tabs.js +0 -423
- package/components/Text.js +0 -141
- package/components/TextField.js +0 -151
- package/components/TimePicker.js +0 -934
- package/components/Toast.js +0 -236
- package/components/TreeView.js +0 -420
- package/components/Video.js +0 -397
- package/components/View.js +0 -140
- package/components/VirtualList.js +0 -120
- package/core/CanvasFramework.js +0 -3034
- package/core/Component.js +0 -243
- package/core/ThemeManager.js +0 -358
- package/core/UIBuilder.js +0 -267
- package/core/WebGLCanvasAdapter.js +0 -782
- package/features/Column.js +0 -43
- package/features/Grid.js +0 -47
- package/features/LayoutComponent.js +0 -43
- package/features/OpenStreetMap.js +0 -310
- package/features/Positioned.js +0 -33
- package/features/PullToRefresh.js +0 -328
- package/features/Row.js +0 -40
- package/features/SignaturePad.js +0 -257
- package/features/Skeleton.js +0 -193
- package/features/Stack.js +0 -21
- package/index.js +0 -119
- package/manager/AccessibilityManager.js +0 -107
- package/manager/ErrorHandler.js +0 -59
- package/manager/FeatureFlags.js +0 -60
- package/manager/MemoryManager.js +0 -107
- package/manager/PerformanceMonitor.js +0 -84
- package/manager/SecurityManager.js +0 -54
- package/utils/AnimationEngine.js +0 -734
- package/utils/CryptoManager.js +0 -303
- package/utils/DataStore.js +0 -403
- package/utils/DevTools.js +0 -1618
- package/utils/DevToolsConsole.js +0 -201
- package/utils/EventBus.js +0 -407
- package/utils/FetchClient.js +0 -74
- package/utils/FirebaseAuth.js +0 -653
- package/utils/FirebaseCore.js +0 -246
- package/utils/FirebaseFirestore.js +0 -581
- package/utils/FirebaseFunctions.js +0 -97
- package/utils/FirebaseRealtimeDB.js +0 -498
- package/utils/FirebaseStorage.js +0 -612
- package/utils/FormValidator.js +0 -355
- package/utils/GeoLocationService.js +0 -62
- package/utils/I18n.js +0 -207
- package/utils/IndexedDBManager.js +0 -273
- package/utils/InspectionOverlay.js +0 -308
- package/utils/NotificationManager.js +0 -60
- package/utils/OfflineSyncManager.js +0 -342
- package/utils/PayPalPayment.js +0 -678
- package/utils/QueryBuilder.js +0 -478
- package/utils/SafeArea.js +0 -64
- package/utils/SecureStorage.js +0 -289
- package/utils/StateManager.js +0 -207
- package/utils/StripePayment.js +0 -552
- package/utils/WebSocketClient.js +0 -66
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
// ==========================================
|
|
2
|
-
// 2. PERFORMANCE MONITORING
|
|
3
|
-
// ==========================================
|
|
4
|
-
|
|
5
|
-
class PerformanceMonitor {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.metrics = {
|
|
8
|
-
fps: 60,
|
|
9
|
-
frameTime: 0,
|
|
10
|
-
memoryUsage: 0,
|
|
11
|
-
renderTime: 0,
|
|
12
|
-
componentCount: 0
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
this.fpsHistory = [];
|
|
16
|
-
this.frameCount = 0;
|
|
17
|
-
this.lastTime = performance.now();
|
|
18
|
-
this.isMonitoring = false;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
startMonitoring() {
|
|
22
|
-
this.isMonitoring = true;
|
|
23
|
-
this.updateMetrics();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
stopMonitoring() {
|
|
27
|
-
this.isMonitoring = false;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
updateMetrics() {
|
|
31
|
-
if (!this.isMonitoring) return;
|
|
32
|
-
|
|
33
|
-
const now = performance.now();
|
|
34
|
-
const deltaTime = now - this.lastTime;
|
|
35
|
-
|
|
36
|
-
// Calculer FPS
|
|
37
|
-
this.frameCount++;
|
|
38
|
-
if (deltaTime >= 1000) {
|
|
39
|
-
this.metrics.fps = Math.round((this.frameCount * 1000) / deltaTime);
|
|
40
|
-
this.fpsHistory.push(this.metrics.fps);
|
|
41
|
-
|
|
42
|
-
// Garder seulement les 60 dernières secondes
|
|
43
|
-
if (this.fpsHistory.length > 60) {
|
|
44
|
-
this.fpsHistory.shift();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
this.frameCount = 0;
|
|
48
|
-
this.lastTime = now;
|
|
49
|
-
|
|
50
|
-
// Alerter si FPS < 30
|
|
51
|
-
if (this.metrics.fps < 30) {
|
|
52
|
-
console.warn('⚠️ Low FPS detected:', this.metrics.fps);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Mémoire (si disponible)
|
|
57
|
-
if (performance.memory) {
|
|
58
|
-
this.metrics.memoryUsage = Math.round(
|
|
59
|
-
performance.memory.usedJSHeapSize / 1048576
|
|
60
|
-
); // MB
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
requestAnimationFrame(() => this.updateMetrics());
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
measureRender(fn) {
|
|
67
|
-
const start = performance.now();
|
|
68
|
-
fn();
|
|
69
|
-
const end = performance.now();
|
|
70
|
-
this.metrics.renderTime = end - start;
|
|
71
|
-
return this.metrics.renderTime;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
getReport() {
|
|
75
|
-
return {
|
|
76
|
-
current: this.metrics,
|
|
77
|
-
averageFPS: this.fpsHistory.reduce((a, b) => a + b, 0) / this.fpsHistory.length,
|
|
78
|
-
minFPS: Math.min(...this.fpsHistory),
|
|
79
|
-
maxFPS: Math.max(...this.fpsHistory)
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export default PerformanceMonitor;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// ==========================================
|
|
2
|
-
// 5. SECURITY
|
|
3
|
-
// ==========================================
|
|
4
|
-
|
|
5
|
-
class SecurityManager {
|
|
6
|
-
static sanitizeInput(input) {
|
|
7
|
-
if (typeof input !== 'string') return input;
|
|
8
|
-
|
|
9
|
-
// Échapper les caractères HTML dangereux
|
|
10
|
-
return input
|
|
11
|
-
.replace(/&/g, '&')
|
|
12
|
-
.replace(/</g, '<')
|
|
13
|
-
.replace(/>/g, '>')
|
|
14
|
-
.replace(/"/g, '"')
|
|
15
|
-
.replace(/'/g, ''')
|
|
16
|
-
.replace(/\//g, '/');
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static validateUrl(url) {
|
|
20
|
-
try {
|
|
21
|
-
const parsed = new URL(url);
|
|
22
|
-
// Autoriser seulement http(s)
|
|
23
|
-
if (!['http:', 'https:'].includes(parsed.protocol)) {
|
|
24
|
-
throw new Error('Invalid protocol');
|
|
25
|
-
}
|
|
26
|
-
return true;
|
|
27
|
-
} catch {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
static rateLimit(fn, limit = 100, window = 1000) {
|
|
33
|
-
const calls = [];
|
|
34
|
-
|
|
35
|
-
return function(...args) {
|
|
36
|
-
const now = Date.now();
|
|
37
|
-
|
|
38
|
-
// Nettoyer les appels trop anciens
|
|
39
|
-
while (calls.length && calls[0] < now - window) {
|
|
40
|
-
calls.shift();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (calls.length >= limit) {
|
|
44
|
-
console.warn('⚠️ Rate limit exceeded');
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
calls.push(now);
|
|
49
|
-
return fn.apply(this, args);
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export default SecurityManager;
|