valtech-components 2.0.685 → 2.0.686

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.
@@ -43,7 +43,7 @@ export declare class RightsFooterComponent {
43
43
  /**
44
44
  * Computed helper for color prop in template.
45
45
  */
46
- propsColor: import("@angular/core").Signal<"medium" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | "light" | "dark">;
46
+ propsColor: import("@angular/core").Signal<"success" | "warning" | "medium" | "primary" | "secondary" | "tertiary" | "danger" | "light" | "dark">;
47
47
  /**
48
48
  * Computed helper for withMargin prop in template.
49
49
  */
@@ -90,9 +90,9 @@ export declare class ArticleComponent implements OnInit {
90
90
  contentInterpolation?: Record<string, string | number>;
91
91
  icon?: import("valtech-components").IconMetada;
92
92
  shape?: "round";
93
- size?: "small" | "large" | "default";
94
- fill?: "default" | "clear" | "outline" | "solid";
95
- type: "button" | "submit" | "reset";
93
+ size?: "default" | "small" | "large";
94
+ fill?: "clear" | "default" | "outline" | "solid";
95
+ type: "submit" | "button" | "reset";
96
96
  token?: string;
97
97
  ref?: any;
98
98
  handler?: (value: any) => any;
@@ -73,6 +73,8 @@ export declare class AvatarUploadComponent {
73
73
  onCropLoadFailed(): void;
74
74
  /** Handle image load error */
75
75
  onImageError(): void;
76
+ /** Timeout for upload operations (30 seconds) */
77
+ private static readonly UPLOAD_TIMEOUT_MS;
76
78
  /** Process cropped image and upload */
77
79
  private processAndUpload;
78
80
  /** Emit error event */
@@ -72,8 +72,8 @@ export declare class ToolbarComponent implements OnInit {
72
72
  };
73
73
  showFlags?: boolean;
74
74
  color: import("@ionic/core").Color;
75
- size?: "small" | "large" | "default";
76
- fill?: "default" | "clear" | "outline" | "solid";
75
+ size?: "default" | "small" | "large";
76
+ fill?: "clear" | "default" | "outline" | "solid";
77
77
  shape?: "round";
78
78
  expand?: "full" | "block";
79
79
  disabled?: boolean;
@@ -201,6 +201,28 @@ export declare class StorageService {
201
201
  * Verifica si un archivo es un documento.
202
202
  */
203
203
  isDocument(filename: string): boolean;
204
+ /**
205
+ * Construye la URL de avatar de un usuario.
206
+ *
207
+ * Los avatares se almacenan en paths predecibles: `users/{userId}/avatar.jpg`
208
+ * Esto permite que cualquier app pueda mostrar avatares sin pedir la URL al backend,
209
+ * solo necesita el userId.
210
+ *
211
+ * @param userId - ID del usuario (ULID)
212
+ * @param type - 'avatar' para imagen completa, 'thumb' para thumbnail
213
+ * @returns URL directa de Firebase Storage
214
+ *
215
+ * @example
216
+ * ```typescript
217
+ * // Mostrar avatar de cualquier usuario
218
+ * const avatarUrl = storage.getUserAvatarUrl('01ABCD...');
219
+ * const thumbUrl = storage.getUserAvatarUrl('01ABCD...', 'thumb');
220
+ *
221
+ * // Con cache-busting
222
+ * const freshUrl = storage.getUserAvatarUrl(userId) + `&t=${Date.now()}`;
223
+ * ```
224
+ */
225
+ getUserAvatarUrl(userId: string, type?: 'avatar' | 'thumb'): string;
204
226
  /**
205
227
  * Mapea el estado de la tarea de upload
206
228
  */
@@ -220,6 +220,12 @@ export interface StorageMetadata {
220
220
  customMetadata?: Record<string, string>;
221
221
  /** Control de caché HTTP */
222
222
  cacheControl?: string;
223
+ /**
224
+ * Skip the appId prefix for shared paths.
225
+ * Use this for cross-app paths like user avatars: `users/{userId}/avatar.jpg`
226
+ * @default false
227
+ */
228
+ skipPrefix?: boolean;
223
229
  }
224
230
  /**
225
231
  * Resultado de listar archivos en Storage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "2.0.685",
3
+ "version": "2.0.686",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"