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.
Files changed (112) hide show
  1. package/dist/canvasframework.js +2 -0
  2. package/dist/canvasframework.js.LICENSE.txt +1 -0
  3. package/package.json +18 -17
  4. package/components/Accordion.js +0 -265
  5. package/components/AndroidDatePickerDialog.js +0 -406
  6. package/components/AppBar.js +0 -398
  7. package/components/AudioPlayer.js +0 -611
  8. package/components/Avatar.js +0 -202
  9. package/components/Banner.js +0 -342
  10. package/components/BottomNavigationBar.js +0 -433
  11. package/components/BottomSheet.js +0 -234
  12. package/components/Button.js +0 -360
  13. package/components/Camera.js +0 -644
  14. package/components/Card.js +0 -193
  15. package/components/Chart.js +0 -700
  16. package/components/Checkbox.js +0 -166
  17. package/components/Chip.js +0 -212
  18. package/components/CircularProgress.js +0 -327
  19. package/components/ContextMenu.js +0 -116
  20. package/components/DatePicker.js +0 -298
  21. package/components/Dialog.js +0 -337
  22. package/components/Divider.js +0 -125
  23. package/components/Drawer.js +0 -276
  24. package/components/FAB.js +0 -270
  25. package/components/FileUpload.js +0 -315
  26. package/components/FloatedCamera.js +0 -644
  27. package/components/IOSDatePickerWheel.js +0 -430
  28. package/components/ImageCarousel.js +0 -219
  29. package/components/ImageComponent.js +0 -223
  30. package/components/Input.js +0 -831
  31. package/components/InputDatalist.js +0 -723
  32. package/components/InputTags.js +0 -624
  33. package/components/List.js +0 -95
  34. package/components/ListItem.js +0 -269
  35. package/components/Modal.js +0 -364
  36. package/components/MorphingFAB.js +0 -428
  37. package/components/MultiSelectDialog.js +0 -206
  38. package/components/NumberInput.js +0 -271
  39. package/components/PasswordInput.js +0 -462
  40. package/components/ProgressBar.js +0 -88
  41. package/components/QRCodeReader.js +0 -539
  42. package/components/RadioButton.js +0 -151
  43. package/components/SearchInput.js +0 -315
  44. package/components/SegmentedControl.js +0 -357
  45. package/components/Select.js +0 -199
  46. package/components/SelectDialog.js +0 -255
  47. package/components/Slider.js +0 -113
  48. package/components/SliverAppBar.js +0 -139
  49. package/components/Snackbar.js +0 -243
  50. package/components/SpeedDialFAB.js +0 -397
  51. package/components/Stepper.js +0 -281
  52. package/components/SwipeableListItem.js +0 -327
  53. package/components/Switch.js +0 -147
  54. package/components/Table.js +0 -492
  55. package/components/Tabs.js +0 -423
  56. package/components/Text.js +0 -141
  57. package/components/TextField.js +0 -151
  58. package/components/TimePicker.js +0 -934
  59. package/components/Toast.js +0 -236
  60. package/components/TreeView.js +0 -420
  61. package/components/Video.js +0 -397
  62. package/components/View.js +0 -140
  63. package/components/VirtualList.js +0 -120
  64. package/core/CanvasFramework.js +0 -3034
  65. package/core/Component.js +0 -243
  66. package/core/ThemeManager.js +0 -358
  67. package/core/UIBuilder.js +0 -267
  68. package/core/WebGLCanvasAdapter.js +0 -782
  69. package/features/Column.js +0 -43
  70. package/features/Grid.js +0 -47
  71. package/features/LayoutComponent.js +0 -43
  72. package/features/OpenStreetMap.js +0 -310
  73. package/features/Positioned.js +0 -33
  74. package/features/PullToRefresh.js +0 -328
  75. package/features/Row.js +0 -40
  76. package/features/SignaturePad.js +0 -257
  77. package/features/Skeleton.js +0 -193
  78. package/features/Stack.js +0 -21
  79. package/index.js +0 -119
  80. package/manager/AccessibilityManager.js +0 -107
  81. package/manager/ErrorHandler.js +0 -59
  82. package/manager/FeatureFlags.js +0 -60
  83. package/manager/MemoryManager.js +0 -107
  84. package/manager/PerformanceMonitor.js +0 -84
  85. package/manager/SecurityManager.js +0 -54
  86. package/utils/AnimationEngine.js +0 -734
  87. package/utils/CryptoManager.js +0 -303
  88. package/utils/DataStore.js +0 -403
  89. package/utils/DevTools.js +0 -1618
  90. package/utils/DevToolsConsole.js +0 -201
  91. package/utils/EventBus.js +0 -407
  92. package/utils/FetchClient.js +0 -74
  93. package/utils/FirebaseAuth.js +0 -653
  94. package/utils/FirebaseCore.js +0 -246
  95. package/utils/FirebaseFirestore.js +0 -581
  96. package/utils/FirebaseFunctions.js +0 -97
  97. package/utils/FirebaseRealtimeDB.js +0 -498
  98. package/utils/FirebaseStorage.js +0 -612
  99. package/utils/FormValidator.js +0 -355
  100. package/utils/GeoLocationService.js +0 -62
  101. package/utils/I18n.js +0 -207
  102. package/utils/IndexedDBManager.js +0 -273
  103. package/utils/InspectionOverlay.js +0 -308
  104. package/utils/NotificationManager.js +0 -60
  105. package/utils/OfflineSyncManager.js +0 -342
  106. package/utils/PayPalPayment.js +0 -678
  107. package/utils/QueryBuilder.js +0 -478
  108. package/utils/SafeArea.js +0 -64
  109. package/utils/SecureStorage.js +0 -289
  110. package/utils/StateManager.js +0 -207
  111. package/utils/StripePayment.js +0 -552
  112. package/utils/WebSocketClient.js +0 -66
package/core/UIBuilder.js DELETED
@@ -1,267 +0,0 @@
1
- // Import ALL components explicitly
2
- import Button from '../components/Button.js';
3
- import SegmentedControl from '../components/SegmentedControl.js';
4
- import Input from '../components/Input.js';
5
- import Slider from '../components/Slider.js';
6
- import Text from '../components/Text.js';
7
- import View from '../components/View.js';
8
- import Card from '../components/Card.js';
9
- import FAB from '../components/FAB.js';
10
- import SpeedDialFAB from '../components/SpeedDialFAB.js';
11
- import MorphingFAB from '../components/MorphingFAB.js';
12
- import CircularProgress from '../components/CircularProgress.js';
13
- import ImageComponent from '../components/ImageComponent.js';
14
- import DatePicker from '../components/DatePicker.js';
15
- import IOSDatePickerWheel from '../components/IOSDatePickerWheel.js';
16
- import AndroidDatePickerDialog from '../components/AndroidDatePickerDialog.js';
17
- import Avatar from '../components/Avatar.js';
18
- import Snackbar from '../components/Snackbar.js';
19
- import BottomNavigationBar from '../components/BottomNavigationBar.js';
20
- import Video from '../components/Video.js';
21
- import Modal from '../components/Modal.js';
22
- import Drawer from '../components/Drawer.js';
23
- import AppBar from '../components/AppBar.js';
24
- import Chip from '../components/Chip.js';
25
- import Stepper from '../components/Stepper.js';
26
- import Accordion from '../components/Accordion.js';
27
- import Tabs from '../components/Tabs.js';
28
- import Switch from '../components/Switch.js';
29
- import SwipeableListItem from '../components/SwipeableListItem.js';
30
- import ListItem from '../components/ListItem.js';
31
- import List from '../components/List.js';
32
- import VirtualList from '../components/VirtualList.js';
33
- import BottomSheet from '../components/BottomSheet.js';
34
- import ProgressBar from '../components/ProgressBar.js';
35
- import RadioButton from '../components/RadioButton.js';
36
- import Dialog from '../components/Dialog.js';
37
- import ContextMenu from '../components/ContextMenu.js';
38
- import Checkbox from '../components/Checkbox.js';
39
- import Toast from '../components/Toast.js';
40
- import NumberInput from '../components/NumberInput.js';
41
- import TextField from '../components/TextField.js';
42
- import SelectDialog from '../components/SelectDialog.js';
43
- import Select from '../components/Select.js';
44
- import MultiSelectDialog from '../components/MultiSelectDialog.js';
45
- import Divider from '../components/Divider.js';
46
- import FileUpload from '../components/FileUpload.js';
47
- import Table from '../components/Table.js';
48
- import TreeView from '../components/TreeView.js';
49
- import SearchInput from '../components/SearchInput.js';
50
- import ImageCarousel from '../components/ImageCarousel.js';
51
- import PasswordInput from '../components/PasswordInput.js';
52
- import InputTags from '../components/InputTags.js';
53
- import InputDatalist from '../components/InputDatalist.js';
54
- import Banner from '../components/Banner.js';
55
- import Chart from '../components/Chart.js';
56
- import SliverAppBar from '../components/SliverAppBar.js';
57
- import AudioPlayer from '../components/AudioPlayer.js';
58
- import Camera from '../components/Camera.js';
59
- import FloatedCamera from '../components/FloatedCamera.js';
60
- import TimePicker from '../components/TimePicker.js';
61
- import QRCodeReader from '../components/QRCodeReader.js';
62
-
63
- // Features
64
- import PullToRefresh from '../features/PullToRefresh.js';
65
- import Skeleton from '../features/Skeleton.js';
66
- import SignaturePad from '../features/SignaturePad.js';
67
- import OpenStreetMap from '../features/OpenStreetMap.js';
68
- import LayoutComponent from '../features/LayoutComponent.js';
69
- import Grid from '../features/Grid.js';
70
- import Row from '../features/Row.js';
71
- import Column from '../features/Column.js';
72
- import Positioned from '../features/Positioned.js';
73
- import Stack from '../features/Stack.js';
74
-
75
- /**
76
- * Map of all available components
77
- */
78
- const Components = {
79
- Button,
80
- SegmentedControl,
81
- Input,
82
- Slider,
83
- Text,
84
- View,
85
- Card,
86
- FAB,
87
- SpeedDialFAB,
88
- MorphingFAB,
89
- CircularProgress,
90
- ImageComponent,
91
- DatePicker,
92
- IOSDatePickerWheel,
93
- AndroidDatePickerDialog,
94
- Avatar,
95
- Snackbar,
96
- BottomNavigationBar,
97
- Video,
98
- Modal,
99
- Drawer,
100
- AppBar,
101
- SliverAppBar,
102
- Chip,
103
- Camera,
104
- Stepper,
105
- Accordion,
106
- Tabs,
107
- Switch,
108
- SwipeableListItem,
109
- ListItem,
110
- List,
111
- QRCodeReader,
112
- VirtualList,
113
- BottomSheet,
114
- ProgressBar,
115
- RadioButton,
116
- Dialog,
117
- TimePicker,
118
- ContextMenu,
119
- Checkbox,
120
- Toast,
121
- FloatedCamera,
122
- NumberInput,
123
- TextField,
124
- SelectDialog,
125
- Select,
126
- MultiSelectDialog,
127
- Divider,
128
- FileUpload,
129
- Table,
130
- AudioPlayer,
131
- TreeView,
132
- SearchInput,
133
- ImageCarousel,
134
- PasswordInput,
135
- InputTags,
136
- InputDatalist,
137
- PullToRefresh,
138
- Skeleton,
139
- SignaturePad,
140
- OpenStreetMap,
141
- LayoutComponent,
142
- Grid,
143
- Row,
144
- Column,
145
- Positioned,
146
- Banner,
147
- Chart,
148
- Stack
149
- };
150
-
151
- /**
152
- * Crée un objet ref pour stocker une référence
153
- */
154
- export function createRef() {
155
- return { current: null };
156
- }
157
-
158
- /**
159
- * DSL déclaratif pour CanvasFramework
160
- */
161
- class UIBuilder {
162
- constructor() {
163
- this._tree = null;
164
- }
165
-
166
- /* ============================
167
- BASE
168
- ============================ */
169
-
170
- _create(type, props = {}, children = []) {
171
- return { type, props, children };
172
- }
173
-
174
- mount(framework) {
175
- if (!this._tree) return;
176
- this._mountNode(framework, this._tree, null);
177
- }
178
-
179
- _mountNode(framework, node, parent = null) {
180
- if (!node) return null;
181
-
182
- const ComponentClass = Components[node.type];
183
- if (!ComponentClass) {
184
- console.warn(`UIBuilder: composant inconnu "${node.type}"`);
185
- return null;
186
- }
187
-
188
- // Extraire la ref des props si elle existe
189
- const { ref, ...componentProps } = node.props;
190
-
191
- const instance = new ComponentClass(framework, componentProps);
192
-
193
- // ✅ Si une ref est fournie, y stocker l'instance
194
- if (ref && typeof ref === 'object' && 'current' in ref) {
195
- ref.current = instance;
196
- }
197
-
198
- // ✅ Ajouter au framework UNIQUEMENT si ce n'est pas un enfant de Card
199
- const isChildOfCard = parent && parent.constructor?.name === 'Card';
200
- if (!isChildOfCard) {
201
- framework.add(instance);
202
- }
203
-
204
- // ✅ Ajouter au parent si parent existe et supporte add
205
- if (parent && typeof parent.add === 'function') {
206
- parent.add(instance);
207
- }
208
-
209
- // Monter les enfants
210
- if (node.children && node.children.length > 0) {
211
- node.children.forEach(child =>
212
- this._mountNode(framework, child, instance)
213
- );
214
- }
215
-
216
- return instance;
217
- }
218
-
219
- /* ============================
220
- ROOT
221
- ============================ */
222
-
223
- app(node) {
224
- this._tree = node;
225
- return this;
226
- }
227
- }
228
-
229
- /* ============================
230
- FACTORIES AUTOMATIQUES
231
- ============================ */
232
-
233
- const ui = new UIBuilder();
234
-
235
- // Génération automatique pour TOUS les composants
236
- Object.keys(Components).forEach((name) => {
237
- const factoryName = name.charAt(0).toLowerCase() + name.slice(1);
238
-
239
- const factory = (props = {}, children = []) => {
240
- // Ensure children is always an array
241
- const childArray = Array.isArray(children) ? children : (children ? [children] : []);
242
- return ui._create(name, props, childArray);
243
- };
244
-
245
- // Add both lowercase and uppercase versions
246
- ui[factoryName] = factory; // e.g., ui.text
247
- ui[name] = factory; // e.g., ui.Text
248
- });
249
-
250
- /* ============================
251
- ALIAS SUPPLÉMENTAIRES
252
- ============================ */
253
-
254
- // Ensure these exist even if they were auto-generated
255
- ui.column = ui.column || ((props = {}, children = []) =>
256
- ui._create('Column', props, Array.isArray(children) ? children : [children]));
257
-
258
- ui.row = ui.row || ((props = {}, children = []) =>
259
- ui._create('Row', props, Array.isArray(children) ? children : [children]));
260
-
261
- ui.stack = ui.stack || ((props = {}, children = []) =>
262
- ui._create('Stack', props, Array.isArray(children) ? children : [children]));
263
-
264
- ui.grid = ui.grid || ((props = {}, children = []) =>
265
- ui._create('Grid', props, Array.isArray(children) ? children : [children]));
266
-
267
- export default ui;