limbo-component 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.
- package/CHANGELOG.md +124 -0
- package/LICENSE +15 -0
- package/README.md +153 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.d.ts +239 -0
- package/dist/limbo.cjs.js +31 -0
- package/dist/limbo.cjs.map +1 -0
- package/dist/limbo.css +1 -0
- package/dist/limbo.es.js +40021 -0
- package/dist/limbo.es.map +1 -0
- package/dist/limbo.min.js +49 -0
- package/dist/limbo.min.js.map +1 -0
- package/dist/limbo.umd.js +58 -0
- package/dist/limbo.umd.js.map +1 -0
- package/dist/types/App.d.ts +18 -0
- package/dist/types/App.d.ts.map +1 -0
- package/dist/types/components/CropperView.d.ts +10 -0
- package/dist/types/components/CropperView.d.ts.map +1 -0
- package/dist/types/components/Gallery.d.ts +19 -0
- package/dist/types/components/Gallery.d.ts.map +1 -0
- package/dist/types/components/ImageCard.d.ts +16 -0
- package/dist/types/components/ImageCard.d.ts.map +1 -0
- package/dist/types/components/ImageManager.d.ts +5 -0
- package/dist/types/components/ImageManager.d.ts.map +1 -0
- package/dist/types/components/Loader.d.ts +4 -0
- package/dist/types/components/Loader.d.ts.map +1 -0
- package/dist/types/components/TabAI.d.ts +7 -0
- package/dist/types/components/TabAI.d.ts.map +1 -0
- package/dist/types/components/TabPortals.d.ts +6 -0
- package/dist/types/components/TabPortals.d.ts.map +1 -0
- package/dist/types/components/TabStock.d.ts +7 -0
- package/dist/types/components/TabStock.d.ts.map +1 -0
- package/dist/types/components/TabUpload.d.ts +10 -0
- package/dist/types/components/TabUpload.d.ts.map +1 -0
- package/dist/types/components/Tabs.d.ts +6 -0
- package/dist/types/components/Tabs.d.ts.map +1 -0
- package/dist/types/components/UploadForm.d.ts +7 -0
- package/dist/types/components/UploadForm.d.ts.map +1 -0
- package/dist/types/core/AutoInputManager.d.ts +221 -0
- package/dist/types/core/AutoInputManager.d.ts.map +1 -0
- package/dist/types/core/ConfigManager.d.ts +294 -0
- package/dist/types/core/ConfigManager.d.ts.map +1 -0
- package/dist/types/core/EventManager.d.ts +36 -0
- package/dist/types/core/EventManager.d.ts.map +1 -0
- package/dist/types/core/InstanceManager.d.ts +48 -0
- package/dist/types/core/InstanceManager.d.ts.map +1 -0
- package/dist/types/core/LimboCore.d.ts +92 -0
- package/dist/types/core/LimboCore.d.ts.map +1 -0
- package/dist/types/core/ModalManager.d.ts +140 -0
- package/dist/types/core/ModalManager.d.ts.map +1 -0
- package/dist/types/hooks/useAiImage.d.ts +10 -0
- package/dist/types/hooks/useAiImage.d.ts.map +1 -0
- package/dist/types/hooks/useAiServices.d.ts +7 -0
- package/dist/types/hooks/useAiServices.d.ts.map +1 -0
- package/dist/types/hooks/useContainerQuery.d.ts +28 -0
- package/dist/types/hooks/useContainerQuery.d.ts.map +1 -0
- package/dist/types/hooks/useCropper.d.ts +43 -0
- package/dist/types/hooks/useCropper.d.ts.map +1 -0
- package/dist/types/hooks/useDeleteImage.d.ts +7 -0
- package/dist/types/hooks/useDeleteImage.d.ts.map +1 -0
- package/dist/types/hooks/useExternalImages.d.ts +10 -0
- package/dist/types/hooks/useExternalImages.d.ts.map +1 -0
- package/dist/types/hooks/useImage.d.ts +6 -0
- package/dist/types/hooks/useImage.d.ts.map +1 -0
- package/dist/types/hooks/useImageParams.d.ts +8 -0
- package/dist/types/hooks/useImageParams.d.ts.map +1 -0
- package/dist/types/hooks/useImages.d.ts +8 -0
- package/dist/types/hooks/useImages.d.ts.map +1 -0
- package/dist/types/hooks/useIsAllowedAll.d.ts +7 -0
- package/dist/types/hooks/useIsAllowedAll.d.ts.map +1 -0
- package/dist/types/hooks/useMobileDetection.d.ts +32 -0
- package/dist/types/hooks/useMobileDetection.d.ts.map +1 -0
- package/dist/types/hooks/usePortalSources.d.ts +7 -0
- package/dist/types/hooks/usePortalSources.d.ts.map +1 -0
- package/dist/types/hooks/useStockImages.d.ts +10 -0
- package/dist/types/hooks/useStockImages.d.ts.map +1 -0
- package/dist/types/hooks/useStockServices.d.ts +7 -0
- package/dist/types/hooks/useStockServices.d.ts.map +1 -0
- package/dist/types/hooks/useUploadImage.d.ts +8 -0
- package/dist/types/hooks/useUploadImage.d.ts.map +1 -0
- package/dist/types/index-refactored.d.ts +9 -0
- package/dist/types/index-refactored.d.ts.map +1 -0
- package/dist/types/services/aiApi.d.ts +3 -0
- package/dist/types/services/aiApi.d.ts.map +1 -0
- package/dist/types/services/apiClient.d.ts +31 -0
- package/dist/types/services/apiClient.d.ts.map +1 -0
- package/dist/types/services/assetsApi.d.ts +48 -0
- package/dist/types/services/assetsApi.d.ts.map +1 -0
- package/dist/types/services/authService.d.ts +65 -0
- package/dist/types/services/authService.d.ts.map +1 -0
- package/dist/types/services/imageParamsApi.d.ts +5 -0
- package/dist/types/services/imageParamsApi.d.ts.map +1 -0
- package/dist/types/services/portalsApi.d.ts +3 -0
- package/dist/types/services/portalsApi.d.ts.map +1 -0
- package/dist/types/services/responseAdapters.d.ts +43 -0
- package/dist/types/services/responseAdapters.d.ts.map +1 -0
- package/dist/types/services/stockApi.d.ts +4 -0
- package/dist/types/services/stockApi.d.ts.map +1 -0
- package/dist/types/utils/ContainerQueryDetector.d.ts +45 -0
- package/dist/types/utils/ContainerQueryDetector.d.ts.map +1 -0
- package/dist/types/utils/CropperManager.d.ts +88 -0
- package/dist/types/utils/CropperManager.d.ts.map +1 -0
- package/dist/types/utils/ThemeManager.d.ts +1002 -0
- package/dist/types/utils/ThemeManager.d.ts.map +1 -0
- package/dist/types/utils/i18n.d.ts +255 -0
- package/dist/types/utils/i18n.d.ts.map +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
export class ConfigManager {
|
|
2
|
+
globalConfig: {};
|
|
3
|
+
defaults: {
|
|
4
|
+
container: string;
|
|
5
|
+
mode: string;
|
|
6
|
+
modeUI: string;
|
|
7
|
+
features: string[];
|
|
8
|
+
ui: {
|
|
9
|
+
showActions: string[];
|
|
10
|
+
hideActions: any[];
|
|
11
|
+
theme: string;
|
|
12
|
+
language: string;
|
|
13
|
+
compactMode: boolean;
|
|
14
|
+
showTabs: boolean;
|
|
15
|
+
showPreview: boolean;
|
|
16
|
+
};
|
|
17
|
+
cropper: {
|
|
18
|
+
quality: number;
|
|
19
|
+
format: string;
|
|
20
|
+
aspectRatio: any;
|
|
21
|
+
lockAspectRatio: boolean;
|
|
22
|
+
allowedAspectRatios: {
|
|
23
|
+
label: string;
|
|
24
|
+
value: string;
|
|
25
|
+
ratio: number;
|
|
26
|
+
}[];
|
|
27
|
+
showFreeAspectRatio: boolean;
|
|
28
|
+
};
|
|
29
|
+
validation: {
|
|
30
|
+
maxSize: string;
|
|
31
|
+
formats: string[];
|
|
32
|
+
minWidth: any;
|
|
33
|
+
minHeight: any;
|
|
34
|
+
maxWidth: any;
|
|
35
|
+
maxHeight: any;
|
|
36
|
+
};
|
|
37
|
+
return: {
|
|
38
|
+
format: string;
|
|
39
|
+
autoAssign: boolean;
|
|
40
|
+
includeMetadata: boolean;
|
|
41
|
+
};
|
|
42
|
+
autoInputs: {
|
|
43
|
+
dataset: string;
|
|
44
|
+
buttonText: string;
|
|
45
|
+
buttonStyle: string;
|
|
46
|
+
buttonClass: string;
|
|
47
|
+
scanOnLoad: boolean;
|
|
48
|
+
observeChanges: boolean;
|
|
49
|
+
};
|
|
50
|
+
presets: {
|
|
51
|
+
aspects: {
|
|
52
|
+
name: string;
|
|
53
|
+
ratio: string;
|
|
54
|
+
label: string;
|
|
55
|
+
}[];
|
|
56
|
+
sizes: {
|
|
57
|
+
name: string;
|
|
58
|
+
width: number;
|
|
59
|
+
height: number;
|
|
60
|
+
fit: string;
|
|
61
|
+
label: string;
|
|
62
|
+
}[];
|
|
63
|
+
required: any[];
|
|
64
|
+
lockUserCrop: boolean;
|
|
65
|
+
allowArbitrary: boolean;
|
|
66
|
+
defaultAspect: string;
|
|
67
|
+
defaultSize: string;
|
|
68
|
+
};
|
|
69
|
+
modal: {
|
|
70
|
+
size: string;
|
|
71
|
+
title: string;
|
|
72
|
+
backdrop: boolean;
|
|
73
|
+
closeOnEscape: boolean;
|
|
74
|
+
closeOnBackdrop: boolean;
|
|
75
|
+
showCloseButton: boolean;
|
|
76
|
+
};
|
|
77
|
+
callbacks: {};
|
|
78
|
+
autoDestroy: boolean;
|
|
79
|
+
debug: boolean;
|
|
80
|
+
apiEndpoint: any;
|
|
81
|
+
auth: {
|
|
82
|
+
apiKey: any;
|
|
83
|
+
publicKey: any;
|
|
84
|
+
portal: any;
|
|
85
|
+
authMode: string;
|
|
86
|
+
tokenStorage: string;
|
|
87
|
+
autoRefresh: boolean;
|
|
88
|
+
refreshBuffer: number;
|
|
89
|
+
};
|
|
90
|
+
apiKey: any;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Establecer configuración global
|
|
94
|
+
*/
|
|
95
|
+
setGlobal(config: any): this;
|
|
96
|
+
/**
|
|
97
|
+
* Obtener configuración global
|
|
98
|
+
*/
|
|
99
|
+
getGlobal(): {};
|
|
100
|
+
/**
|
|
101
|
+
* Fusionar configuraciones con prioridad
|
|
102
|
+
* Orden: defaults < global < instance
|
|
103
|
+
*/
|
|
104
|
+
merge(instanceConfig?: {}): {};
|
|
105
|
+
/**
|
|
106
|
+
* Fusión profunda de objetos
|
|
107
|
+
*/
|
|
108
|
+
_deepMerge(...objects: any[]): {};
|
|
109
|
+
/**
|
|
110
|
+
* Establecer defaults personalizados
|
|
111
|
+
*/
|
|
112
|
+
setDefaults(newDefaults: any): this;
|
|
113
|
+
/**
|
|
114
|
+
* Obtener defaults
|
|
115
|
+
*/
|
|
116
|
+
getDefaults(): any;
|
|
117
|
+
/**
|
|
118
|
+
* Restablecer defaults a valores originales
|
|
119
|
+
*/
|
|
120
|
+
resetDefaults(): this;
|
|
121
|
+
/**
|
|
122
|
+
* Obtener configuración específica por path
|
|
123
|
+
*/
|
|
124
|
+
get(path: any, config?: any): any;
|
|
125
|
+
/**
|
|
126
|
+
* Establecer configuración específica por path
|
|
127
|
+
*/
|
|
128
|
+
set(path: any, value: any): this;
|
|
129
|
+
/**
|
|
130
|
+
* Helper para obtener valor por path (ej: "ui.theme")
|
|
131
|
+
*/
|
|
132
|
+
_getValueByPath(obj: any, path: any): any;
|
|
133
|
+
/**
|
|
134
|
+
* Helper para establecer valor por path
|
|
135
|
+
*/
|
|
136
|
+
_setValueByPath(obj: any, path: any, value: any): void;
|
|
137
|
+
/**
|
|
138
|
+
* Obtener defaults originales (inmutable)
|
|
139
|
+
*/
|
|
140
|
+
_getOriginalDefaults(): {
|
|
141
|
+
container: string;
|
|
142
|
+
mode: string;
|
|
143
|
+
modeUI: string;
|
|
144
|
+
features: string[];
|
|
145
|
+
ui: {
|
|
146
|
+
showActions: string[];
|
|
147
|
+
hideActions: any[];
|
|
148
|
+
theme: string;
|
|
149
|
+
language: string;
|
|
150
|
+
compactMode: boolean;
|
|
151
|
+
showTabs: boolean;
|
|
152
|
+
showPreview: boolean;
|
|
153
|
+
};
|
|
154
|
+
interaction: {
|
|
155
|
+
allowSelection: boolean;
|
|
156
|
+
allowCropping: boolean;
|
|
157
|
+
requiresCropping: boolean;
|
|
158
|
+
selectionMode: string;
|
|
159
|
+
};
|
|
160
|
+
cropper: {
|
|
161
|
+
quality: number;
|
|
162
|
+
format: string;
|
|
163
|
+
aspectRatio: any;
|
|
164
|
+
lockAspectRatio: boolean;
|
|
165
|
+
allowedAspectRatios: {
|
|
166
|
+
label: string;
|
|
167
|
+
value: string;
|
|
168
|
+
ratio: number;
|
|
169
|
+
}[];
|
|
170
|
+
showFreeAspectRatio: boolean;
|
|
171
|
+
};
|
|
172
|
+
validation: {
|
|
173
|
+
maxSize: string;
|
|
174
|
+
formats: string[];
|
|
175
|
+
minWidth: any;
|
|
176
|
+
minHeight: any;
|
|
177
|
+
maxWidth: any;
|
|
178
|
+
maxHeight: any;
|
|
179
|
+
};
|
|
180
|
+
return: {
|
|
181
|
+
format: string;
|
|
182
|
+
autoAssign: boolean;
|
|
183
|
+
includeMetadata: boolean;
|
|
184
|
+
};
|
|
185
|
+
autoInputs: {
|
|
186
|
+
dataset: string;
|
|
187
|
+
buttonText: string;
|
|
188
|
+
buttonStyle: string;
|
|
189
|
+
buttonClass: string;
|
|
190
|
+
scanOnLoad: boolean;
|
|
191
|
+
observeChanges: boolean;
|
|
192
|
+
};
|
|
193
|
+
modal: {
|
|
194
|
+
size: string;
|
|
195
|
+
title: string;
|
|
196
|
+
backdrop: boolean;
|
|
197
|
+
closeOnEscape: boolean;
|
|
198
|
+
closeOnBackdrop: boolean;
|
|
199
|
+
showCloseButton: boolean;
|
|
200
|
+
};
|
|
201
|
+
i18n: {
|
|
202
|
+
locale: string;
|
|
203
|
+
messages: {};
|
|
204
|
+
autoDetect: boolean;
|
|
205
|
+
};
|
|
206
|
+
theme: {
|
|
207
|
+
colors: {};
|
|
208
|
+
spacing: {};
|
|
209
|
+
typography: {};
|
|
210
|
+
borderRadius: {};
|
|
211
|
+
shadows: {};
|
|
212
|
+
customProperties: {};
|
|
213
|
+
};
|
|
214
|
+
callbacks: {};
|
|
215
|
+
autoDestroy: boolean;
|
|
216
|
+
debug: boolean;
|
|
217
|
+
apiEndpoint: any;
|
|
218
|
+
auth: {
|
|
219
|
+
apiKey: any;
|
|
220
|
+
publicKey: any;
|
|
221
|
+
portal: any;
|
|
222
|
+
authMode: string;
|
|
223
|
+
tokenStorage: string;
|
|
224
|
+
autoRefresh: boolean;
|
|
225
|
+
refreshBuffer: number;
|
|
226
|
+
};
|
|
227
|
+
apiKey: any;
|
|
228
|
+
};
|
|
229
|
+
/**
|
|
230
|
+
* Validar presets de configuración
|
|
231
|
+
*/
|
|
232
|
+
_validatePresets(presets: any): any[];
|
|
233
|
+
/**
|
|
234
|
+
* Obtener preset por nombre
|
|
235
|
+
*/
|
|
236
|
+
getPreset(config: any, name: any, type?: string): any;
|
|
237
|
+
/**
|
|
238
|
+
* Validar si un preset es requerido
|
|
239
|
+
*/
|
|
240
|
+
isPresetRequired(config: any, presetName: any): any;
|
|
241
|
+
/**
|
|
242
|
+
* Obtener aspectos disponibles
|
|
243
|
+
*/
|
|
244
|
+
getAvailableAspects(config: any): any;
|
|
245
|
+
/**
|
|
246
|
+
* Obtener tamaños disponibles
|
|
247
|
+
*/
|
|
248
|
+
getAvailableSizes(config: any): any;
|
|
249
|
+
/**
|
|
250
|
+
* Crear instancia de i18n basada en configuración
|
|
251
|
+
*/
|
|
252
|
+
createI18n(config: any): I18n;
|
|
253
|
+
/**
|
|
254
|
+
* Validar configuración
|
|
255
|
+
*/
|
|
256
|
+
validate(config: any): {
|
|
257
|
+
isValid: boolean;
|
|
258
|
+
errors: any[];
|
|
259
|
+
};
|
|
260
|
+
/**
|
|
261
|
+
* Configurar autenticación JWT v2
|
|
262
|
+
* @param {string} apiKey - API Key para autenticación
|
|
263
|
+
* @param {string} publicKey - Public Key opcional para requests públicos
|
|
264
|
+
* @param {Object} options - Opciones adicionales de configuración JWT
|
|
265
|
+
*/
|
|
266
|
+
setJWTAuth(apiKey: string, publicKey?: string, options?: any): this;
|
|
267
|
+
/**
|
|
268
|
+
* Obtener configuración de autenticación actual
|
|
269
|
+
*/
|
|
270
|
+
getAuthConfig(mergedConfig?: any): {
|
|
271
|
+
authMode: any;
|
|
272
|
+
apiKey: any;
|
|
273
|
+
publicKey: any;
|
|
274
|
+
portal: any;
|
|
275
|
+
tokenStorage: any;
|
|
276
|
+
autoRefresh: boolean;
|
|
277
|
+
refreshBuffer: any;
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* Verificar si está usando autenticación JWT
|
|
281
|
+
*/
|
|
282
|
+
isJWTMode(mergedConfig?: any): boolean;
|
|
283
|
+
/**
|
|
284
|
+
* Verificar si está usando modo legacy
|
|
285
|
+
*/
|
|
286
|
+
isLegacyMode(mergedConfig?: any): boolean;
|
|
287
|
+
/**
|
|
288
|
+
* Migrar configuración legacy a JWT
|
|
289
|
+
* Helper para facilitar la migración gradual
|
|
290
|
+
*/
|
|
291
|
+
migrateToJWT(legacyApiKey?: any): this;
|
|
292
|
+
}
|
|
293
|
+
import { I18n } from '../utils/i18n.js';
|
|
294
|
+
//# sourceMappingURL=ConfigManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigManager.d.ts","sourceRoot":"","sources":["../../../src/core/ConfigManager.js"],"names":[],"mappings":"AAOA;IAEI,iBAAsB;IACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmHC;IAGH;;OAEG;IACH,6BAGC;IAED;;OAEG;IACH,gBAEC;IAED;;;OAGG;IACH,+BASC;IAED;;OAEG;IACH,kCAkBC;IAED;;OAEG;IACH,oCAGC;IAED;;OAEG;IACH,mBAEC;IAED;;OAEG;IACH,sBAGC;IAED;;OAEG;IACH,kCAGC;IAED;;OAEG;IACH,iCAGC;IAED;;OAEG;IACH,0CAIC;IAED;;OAEG;IACH,uDAWC;IAED;;OAEG;IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2HC;IAED;;OAEG;IACH,sCAyCC;IAED;;OAEG;IACH,sDAQC;IAED;;OAEG;IACH,oDAGC;IAED;;OAEG;IACH,sCAGC;IAED;;OAEG;IACH,oCAGC;IAED;;OAEG;IACH,8BAcC;IAED;;OAEG;IACH;;;MA0CC;IAED;;;;;OAKG;IACH,mBAJW,MAAM,cACN,MAAM,uBAiBhB;IAED;;OAEG;IACH;;;;;;;;MAWC;IAED;;OAEG;IACH,uCAGC;IAED;;OAEG;IACH,0CAGC;IAED;;;OAGG;IACH,uCAYC;CACF;qBA5kBoB,kBAAkB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 📡 GESTIÓN DE EVENTOS
|
|
3
|
+
* Responsabilidad única: Manejar todos los eventos del sistema
|
|
4
|
+
*/
|
|
5
|
+
export class EventManager {
|
|
6
|
+
listeners: Map<any, any>;
|
|
7
|
+
/**
|
|
8
|
+
* Emitir evento
|
|
9
|
+
*/
|
|
10
|
+
emit(eventName: any, data?: {}): void;
|
|
11
|
+
/**
|
|
12
|
+
* Añadir listener interno
|
|
13
|
+
*/
|
|
14
|
+
on(eventName: any, callback: any): () => void;
|
|
15
|
+
/**
|
|
16
|
+
* Remover listener
|
|
17
|
+
*/
|
|
18
|
+
off(eventName: any, callback: any): void;
|
|
19
|
+
/**
|
|
20
|
+
* Limpiar todos los listeners
|
|
21
|
+
*/
|
|
22
|
+
cleanup(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Emitir evento DOM personalizado
|
|
25
|
+
*/
|
|
26
|
+
_emitDOMEvent(eventName: any, data: any): void;
|
|
27
|
+
/**
|
|
28
|
+
* Ejecutar listeners internos
|
|
29
|
+
*/
|
|
30
|
+
_executeListeners(eventName: any, data: any): void;
|
|
31
|
+
/**
|
|
32
|
+
* Obtener estadísticas de eventos
|
|
33
|
+
*/
|
|
34
|
+
getStats(): {};
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=EventManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventManager.d.ts","sourceRoot":"","sources":["../../../src/core/EventManager.js"],"names":[],"mappings":"AACA;;;GAGG;AACH;IAEI,yBAA0B;IAG5B;;OAEG;IACH,sCAMC;IAED;;OAEG;IACH,8CAQC;IAED;;OAEG;IACH,yCAQC;IAED;;OAEG;IACH,gBAEC;IAED;;OAEG;IACH,+CAUC;IAED;;OAEG;IACH,mDAWC;IAED;;OAEG;IACH,eAMC;CACF"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 🏗️ GESTIÓN DE INSTANCIAS
|
|
3
|
+
* Responsabilidad única: Crear, gestionar y destruir instancias
|
|
4
|
+
*/
|
|
5
|
+
export class InstanceManager {
|
|
6
|
+
instances: Map<any, any>;
|
|
7
|
+
counter: number;
|
|
8
|
+
/**
|
|
9
|
+
* Crear nueva instancia
|
|
10
|
+
*/
|
|
11
|
+
create(config: any, eventManager: any, modalManager: any): LimboInstance;
|
|
12
|
+
/**
|
|
13
|
+
* Obtener instancia por ID
|
|
14
|
+
*/
|
|
15
|
+
get(instanceId: any): any;
|
|
16
|
+
/**
|
|
17
|
+
* Obtener todas las instancias
|
|
18
|
+
*/
|
|
19
|
+
getAll(): any[];
|
|
20
|
+
/**
|
|
21
|
+
* Obtener instancias activas (montadas)
|
|
22
|
+
*/
|
|
23
|
+
getActive(): any[];
|
|
24
|
+
/**
|
|
25
|
+
* Destruir instancia específica
|
|
26
|
+
*/
|
|
27
|
+
destroy(instanceId: any): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Destruir todas las instancias
|
|
30
|
+
*/
|
|
31
|
+
destroyAll(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Cleanup de instancias huérfanas (contenedores eliminados del DOM)
|
|
34
|
+
*/
|
|
35
|
+
cleanupOrphans(): number;
|
|
36
|
+
/**
|
|
37
|
+
* Estadísticas
|
|
38
|
+
*/
|
|
39
|
+
getStats(): {
|
|
40
|
+
total: number;
|
|
41
|
+
active: number;
|
|
42
|
+
embed: number;
|
|
43
|
+
modal: number;
|
|
44
|
+
button: number;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
import { LimboInstance } from './LimboInstance.js';
|
|
48
|
+
//# sourceMappingURL=InstanceManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InstanceManager.d.ts","sourceRoot":"","sources":["../../../src/core/InstanceManager.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH;IAEI,yBAA0B;IAC1B,gBAAgB;IAGlB;;OAEG;IACH,yEAOC;IAED;;OAEG;IACH,0BAEC;IAED;;OAEG;IACH,gBAEC;IAED;;OAEG;IACH,mBAEC;IAED;;OAEG;IACH,kCAQC;IAED;;OAEG;IACH,mBAGC;IAED;;OAEG;IACH,yBAYC;IAED;;OAEG;IACH;;;;;;MASC;CACF;8BAhG6B,oBAAoB"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 🎯 NÚCLEO DE LIMBO - Gestión centralizada
|
|
3
|
+
* Responsabilidad única: Coordinar todo el sistema
|
|
4
|
+
*/
|
|
5
|
+
export class LimboCore {
|
|
6
|
+
config: ConfigManager;
|
|
7
|
+
instances: InstanceManager;
|
|
8
|
+
autoInputs: AutoInputManager;
|
|
9
|
+
events: EventManager;
|
|
10
|
+
modals: ModalManager;
|
|
11
|
+
theme: ThemeManager;
|
|
12
|
+
containerQueryDetector: import("../utils/ContainerQueryDetector.js").ContainerQueryDetector;
|
|
13
|
+
/**
|
|
14
|
+
* Configuración global
|
|
15
|
+
*/
|
|
16
|
+
configure(options: any): ConfigManager;
|
|
17
|
+
/**
|
|
18
|
+
* Crear instancia manual
|
|
19
|
+
*/
|
|
20
|
+
create(options: any): import("./LimboInstance.js").LimboInstance;
|
|
21
|
+
/**
|
|
22
|
+
* Configurar inputs automáticos
|
|
23
|
+
*/
|
|
24
|
+
configureAutoInputs(options: any): AutoInputManager;
|
|
25
|
+
/**
|
|
26
|
+
* Configurar tema personalizado
|
|
27
|
+
*/
|
|
28
|
+
setTheme(themeConfig: any): this;
|
|
29
|
+
/**
|
|
30
|
+
* Obtener tema actual
|
|
31
|
+
*/
|
|
32
|
+
getTheme(): {
|
|
33
|
+
name: any;
|
|
34
|
+
theme: any;
|
|
35
|
+
isCustom: boolean;
|
|
36
|
+
variables: {};
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Escanear y activar todos los inputs automáticos
|
|
40
|
+
*/
|
|
41
|
+
scanAndActivate(selector?: any): {
|
|
42
|
+
found: number;
|
|
43
|
+
processed: number;
|
|
44
|
+
skipped: number;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Inicializar sistema de container queries para responsive dentro de modales
|
|
48
|
+
*/
|
|
49
|
+
_initializeContainerQueries(): void;
|
|
50
|
+
/**
|
|
51
|
+
* Re-escanear elementos dinámicos
|
|
52
|
+
*/
|
|
53
|
+
rescan(container?: Document): number;
|
|
54
|
+
/**
|
|
55
|
+
* Método legacy
|
|
56
|
+
*/
|
|
57
|
+
init(options: any): import("./LimboInstance.js").LimboInstance;
|
|
58
|
+
/**
|
|
59
|
+
* Obtener instancias activas
|
|
60
|
+
*/
|
|
61
|
+
getInstances(): any[];
|
|
62
|
+
/**
|
|
63
|
+
* Limpiar todo
|
|
64
|
+
*/
|
|
65
|
+
destroy(): void;
|
|
66
|
+
_mapLegacyOptions(options: any): {
|
|
67
|
+
container: any;
|
|
68
|
+
mode: string;
|
|
69
|
+
features: string[];
|
|
70
|
+
apiKey: any;
|
|
71
|
+
prod: any;
|
|
72
|
+
url: any;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* 🆕 Configurar listeners internos del sistema
|
|
76
|
+
*/
|
|
77
|
+
_setupInternalListeners(): void;
|
|
78
|
+
/**
|
|
79
|
+
* 🆕 Manejar request de modal desde input automático
|
|
80
|
+
*/
|
|
81
|
+
_handleAutoInputModalRequest({ config, callback }: {
|
|
82
|
+
config: any;
|
|
83
|
+
callback: any;
|
|
84
|
+
}): void;
|
|
85
|
+
}
|
|
86
|
+
import { ConfigManager } from './ConfigManager.js';
|
|
87
|
+
import { InstanceManager } from './InstanceManager.js';
|
|
88
|
+
import { AutoInputManager } from './AutoInputManager.js';
|
|
89
|
+
import { EventManager } from './EventManager.js';
|
|
90
|
+
import { ModalManager } from './ModalManager.js';
|
|
91
|
+
import { ThemeManager } from '../utils/ThemeManager.js';
|
|
92
|
+
//# sourceMappingURL=LimboCore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LimboCore.d.ts","sourceRoot":"","sources":["../../../src/core/LimboCore.js"],"names":[],"mappings":"AASA;;;GAGG;AACH;IAEI,sBAAiC;IACjC,2BAAsC;IACtC,6BAAwC;IACxC,qBAAgC;IAChC,qBAAgC;IAChC,oBAA+B;IAC/B,4FAAoD;IAMtD;;OAEG;IACH,uCAcC;IAED;;OAEG;IACH,iEAGC;IAED;;OAEG;IACH,oDAEC;IAED;;OAEG;IACH,iCAaC;IAED;;OAEG;IACH;;;;;MAEC;IAED;;OAEG;IACH;;;;MA0CC;IAED;;OAEG;IACH,oCAWC;IAED;;OAEG;IACH,qCAmBC;IAED;;OAEG;IACH,+DAGC;IAED;;OAEG;IACH,sBAEC;IAED;;OAEG;IACH,gBAKC;IAED;;;;;;;MASC;IAED;;OAEG;IACH,gCAKC;IAED;;OAEG;IACH;;;aAmBC;CACF;8BAlP6B,oBAAoB;gCAClB,sBAAsB;iCACrB,uBAAuB;6BAC3B,mBAAmB;6BACnB,mBAAmB;6BACnB,0BAA0B"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 🪟 GESTIÓN DE MODALES
|
|
3
|
+
* Responsabilidad única: Crear, mostrar y gestionar modales con accesibilidad
|
|
4
|
+
*/
|
|
5
|
+
export class ModalManager {
|
|
6
|
+
activeModals: Set<any>;
|
|
7
|
+
zIndexBase: number;
|
|
8
|
+
focusableSelectors: string;
|
|
9
|
+
initialized: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Crear y mostrar modal
|
|
12
|
+
*/
|
|
13
|
+
createModal(config: any): Modal;
|
|
14
|
+
/**
|
|
15
|
+
* Cerrar modal específico
|
|
16
|
+
*/
|
|
17
|
+
closeModal(modalId: any): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Cerrar todos los modales
|
|
20
|
+
*/
|
|
21
|
+
closeAllModals(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Obtener modal activo (último abierto)
|
|
24
|
+
*/
|
|
25
|
+
getActiveModal(): any;
|
|
26
|
+
/**
|
|
27
|
+
* Obtener estadísticas
|
|
28
|
+
*/
|
|
29
|
+
getStats(): {
|
|
30
|
+
active: number;
|
|
31
|
+
nextZIndex: number;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Generar ID único para modal
|
|
35
|
+
*/
|
|
36
|
+
_generateModalId(): string;
|
|
37
|
+
/**
|
|
38
|
+
* Buscar modal por ID
|
|
39
|
+
*/
|
|
40
|
+
_findModal(modalId: any): any;
|
|
41
|
+
/**
|
|
42
|
+
* Obtener siguiente z-index
|
|
43
|
+
*/
|
|
44
|
+
_getNextZIndex(): number;
|
|
45
|
+
/**
|
|
46
|
+
* Remover modal del registro (llamado por Modal.destroy())
|
|
47
|
+
*/
|
|
48
|
+
_removeModal(modal: any): void;
|
|
49
|
+
/**
|
|
50
|
+
* Manejar eventos de teclado globales
|
|
51
|
+
*/
|
|
52
|
+
_handleGlobalKeydown(event: any): void;
|
|
53
|
+
/**
|
|
54
|
+
* Implementar tab trap para accesibilidad
|
|
55
|
+
*/
|
|
56
|
+
_handleTabTrap(event: any, modal: any): void;
|
|
57
|
+
/**
|
|
58
|
+
* Inicializar listeners globales
|
|
59
|
+
*/
|
|
60
|
+
_initGlobalListeners(): void;
|
|
61
|
+
globalKeydownHandler: (e: any) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Cleanup
|
|
64
|
+
*/
|
|
65
|
+
destroy(): void;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* 🎭 CLASE MODAL INDIVIDUAL
|
|
69
|
+
* Representa un modal específico con su contenido y estado
|
|
70
|
+
*/
|
|
71
|
+
declare class Modal {
|
|
72
|
+
constructor(id: any, config: any, manager: any);
|
|
73
|
+
id: any;
|
|
74
|
+
config: any;
|
|
75
|
+
manager: any;
|
|
76
|
+
element: HTMLDivElement;
|
|
77
|
+
backdrop: HTMLDivElement;
|
|
78
|
+
isOpen: boolean;
|
|
79
|
+
previousFocus: Element;
|
|
80
|
+
/**
|
|
81
|
+
* Crear estructura del modal
|
|
82
|
+
*/
|
|
83
|
+
_create(): void;
|
|
84
|
+
/**
|
|
85
|
+
* Crear backdrop
|
|
86
|
+
*/
|
|
87
|
+
_createBackdrop(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Crear estructura del modal
|
|
90
|
+
*/
|
|
91
|
+
/**
|
|
92
|
+
* Crear modal principal
|
|
93
|
+
*/
|
|
94
|
+
_createModal(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Crear cabecera del modal
|
|
97
|
+
*/
|
|
98
|
+
_createHeader(): void;
|
|
99
|
+
/**
|
|
100
|
+
* Crear cuerpo del modal
|
|
101
|
+
*/
|
|
102
|
+
_createBody(): void;
|
|
103
|
+
/**
|
|
104
|
+
* Adjuntar eventos
|
|
105
|
+
*/
|
|
106
|
+
_attachEvents(): void;
|
|
107
|
+
_originalBodyOverflow: string;
|
|
108
|
+
/**
|
|
109
|
+
* Abrir modal
|
|
110
|
+
*/
|
|
111
|
+
open(): this;
|
|
112
|
+
/**
|
|
113
|
+
* Cerrar modal
|
|
114
|
+
*/
|
|
115
|
+
close(): this;
|
|
116
|
+
/**
|
|
117
|
+
* Destruir modal
|
|
118
|
+
*/
|
|
119
|
+
destroy(): void;
|
|
120
|
+
/**
|
|
121
|
+
* Obtener contenedor del cuerpo para React
|
|
122
|
+
*/
|
|
123
|
+
getBodyContainer(): Element;
|
|
124
|
+
/**
|
|
125
|
+
* Obtener elementos focusables
|
|
126
|
+
*/
|
|
127
|
+
getFocusableElements(): any[];
|
|
128
|
+
/**
|
|
129
|
+
* Getters
|
|
130
|
+
*/
|
|
131
|
+
getId(): any;
|
|
132
|
+
isOpened(): boolean;
|
|
133
|
+
getConfig(): any;
|
|
134
|
+
/**
|
|
135
|
+
* Cleanup interno
|
|
136
|
+
*/
|
|
137
|
+
_cleanup(): void;
|
|
138
|
+
}
|
|
139
|
+
export {};
|
|
140
|
+
//# sourceMappingURL=ModalManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalManager.d.ts","sourceRoot":"","sources":["../../../src/core/ModalManager.js"],"names":[],"mappings":"AACA;;;GAGG;AACH;IAEI,uBAA6B;IAC7B,mBAAuB;IACvB,2BAOY;IACZ,qBAAwB;IAK1B;;OAEG;IACH,gCAIC;IAED;;OAEG;IACH,kCAOC;IAED;;OAEG;IACH,uBAGC;IAED;;OAEG;IACH,sBAEC;IAED;;OAEG;IACH;;;MAKC;IAED;;OAEG;IACH,2BAEC;IAED;;OAEG;IACH,8BAEC;IAED;;OAEG;IACH,yBAEC;IAED;;OAEG;IACH,+BAEC;IAED;;OAEG;IACH,uCAcC;IAED;;OAEG;IACH,6CAoBC;IAED;;OAEG;IACH,6BAMC;IAHC,uCAA+D;IAKjE;;OAEG;IACH,gBASC;CACF;AAED;;;GAGG;AACH;IACE,gDAuBC;IAtBC,QAAY;IACZ,YAaC;IACD,aAAsB;IACtB,wBAAmB;IACnB,yBAAoB;IACpB,gBAAmB;IACnB,uBAAyB;IAK3B;;OAEG;IACH,gBAIC;IAED;;OAEG;IACH,wBAuBC;IAED;;OAEG;IACD;;KAEC;IACH,qBAwEC;IAED;;OAEG;IACH,sBA6EC;IAED;;OAEG;IACH,oBA0BC;IAED;;OAEG;IACH,sBAGC;IADC,8BAAyD;IAG3D;;OAEG;IACH,aA4DC;IAED;;OAEG;IACH,cAyCC;IAED;;OAEG;IACH,gBAQC;IAED;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,8BAEC;IAED;;OAEG;IACH,aAEC;IAED,oBAEC;IAED,iBAEC;IAED;;OAEG;IACH,iBAiBC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default function useAiImage(apiKey: any, prod?: boolean): {
|
|
2
|
+
generate: (params: any) => Promise<any>;
|
|
3
|
+
loading: boolean;
|
|
4
|
+
error: any;
|
|
5
|
+
image: any;
|
|
6
|
+
reset: () => void;
|
|
7
|
+
services: any[];
|
|
8
|
+
fetchServices: () => Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useAiImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAiImage.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAiImage.js"],"names":[],"mappings":"AAGA;;;;;;;;EAyCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAiServices.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAiServices.js"],"names":[],"mappings":"AAMA;;;;;EA4CC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook para detectar el tamaño del contenedor y aplicar estilos responsive
|
|
3
|
+
* dentro de modales o contenedores con tamaño limitado
|
|
4
|
+
*
|
|
5
|
+
* @param {Object} options - Configuración del hook
|
|
6
|
+
* @param {number} options.mobileBreakpoint - Breakpoint para móvil (default: 768)
|
|
7
|
+
* @param {number} options.tabletBreakpoint - Breakpoint para tablet (default: 1024)
|
|
8
|
+
* @param {boolean} options.observeResize - Si debe observar cambios de tamaño (default: true)
|
|
9
|
+
* @returns {Object} Estado responsive y referencia del elemento
|
|
10
|
+
*/
|
|
11
|
+
export function useContainerQuery(options?: {
|
|
12
|
+
mobileBreakpoint: number;
|
|
13
|
+
tabletBreakpoint: number;
|
|
14
|
+
observeResize: boolean;
|
|
15
|
+
}): any;
|
|
16
|
+
/**
|
|
17
|
+
* Hook simplificado solo para detección móvil dentro de contenedores
|
|
18
|
+
* @param {number} breakpoint - Breakpoint móvil (default: 768)
|
|
19
|
+
* @returns {Object} Estado móvil y referencia
|
|
20
|
+
*/
|
|
21
|
+
export function useContainerMobile(breakpoint?: number): any;
|
|
22
|
+
/**
|
|
23
|
+
* Hook para obtener solo el ancho del contenedor
|
|
24
|
+
* @returns {Object} Ancho del contenedor y referencia
|
|
25
|
+
*/
|
|
26
|
+
export function useContainerWidth(): any;
|
|
27
|
+
export default useContainerQuery;
|
|
28
|
+
//# sourceMappingURL=useContainerQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useContainerQuery.d.ts","sourceRoot":"","sources":["../../../src/hooks/useContainerQuery.js"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,4CALG;IAAwB,gBAAgB,EAAhC,MAAM;IACU,gBAAgB,EAAhC,MAAM;IACW,aAAa,EAA9B,OAAO;CACf,OAyHF;AAED;;;;GAIG;AACH,gDAHW,MAAM,OAehB;AAED;;;GAGG;AACH,yCASC"}
|