sass-cms-template-common 0.0.6 → 0.0.8

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/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { AnchorHTMLAttributes } from 'react';
2
2
  import { AxiosInstance } from 'axios';
3
+ import { Context } from 'react';
3
4
  import { ElementType } from 'react';
4
5
  import { ForwardRefExoticComponent } from 'react';
5
6
  import { JSX } from 'react';
@@ -15,14 +16,34 @@ import { Theme } from '@mui/material/styles';
15
16
  */
16
17
  export declare const ACCOUNT_NAV_BLOCKS: NavBlock[];
17
18
 
18
- export declare function AppShell({ pathname, sites, children, notificationUnreadCount, notifications, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, LinkComponent, permissions, locale, language, messages, baseUrl, }: AppShellProps): JSX.Element;
19
+ /**
20
+ * Catálogo de mensajes del gestor por idioma. Cada gestor declara su propio
21
+ * `en` como fuente de la forma y valida `es`/`pt` con `satisfies typeof enTree`
22
+ * para garantizar que las tres lenguas comparten las mismas claves.
23
+ */
24
+ export declare type AppLocaleCatalog = Record<Locale, AppMessages>;
25
+
26
+ /**
27
+ * Nodo de un árbol de mensajes propio de un gestor: una hoja string o un
28
+ * sub-árbol anidable. Permite namespaces arbitrarios (`usuarios.*`, etc.)
29
+ * que la lib desconoce.
30
+ */
31
+ export declare type AppMessageNode = string | {
32
+ [key: string]: AppMessageNode;
33
+ };
34
+
35
+ /** Árbol de mensajes del gestor (namespaces → claves → string anidable). */
36
+ export declare type AppMessages = Record<string, AppMessageNode>;
37
+
38
+ export declare function AppShell({ pathname, sites, children, notificationUnreadCount, notificationsData, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, newContentGroups, previewFormats, operationPermissions, isAdmin, onNewContentSelect, onPreviewSelect, LinkComponent, permissions, locale, language, messages, appMessages, baseUrl, }: AppShellProps): JSX.Element;
19
39
 
20
40
  export declare type AppShellProps = {
21
41
  pathname: string;
22
42
  sites: SiteSection[];
23
43
  children: ReactNode;
24
44
  notificationUnreadCount: number;
25
- notifications: DashboardNotification[];
45
+ /** Respuesta cruda de `POST /dashboard/notification` (newsTask/expireTask/videos). */
46
+ notificationsData?: DashboardNotificationsResponse | null;
26
47
  profile: ProfileGetResponse;
27
48
  primaryLogo: ReactNode;
28
49
  brandLogo?: ReactNode;
@@ -30,15 +51,40 @@ export declare type AppShellProps = {
30
51
  getPublicationHref: (publication: Publication) => string;
31
52
  resolvePublicationImageUrl?: (imagePath: string) => string;
32
53
  profileAvatarOptions?: ProfileAvatarOptions;
54
+ /** Dominio del CMS Angular legacy (deploy nuevo) para enlaces de perfil. */
55
+ legacyBaseUrl?: string;
56
+ /**
57
+ * Origen del CMS (JSP) para Ayuda/Preview. Si se omite, se usa `baseUrl`.
58
+ */
59
+ cmsBaseUrl?: string;
60
+ /** Sesión para el redirect al admin viejo (token, sitio, publicación, usuario). */
61
+ legacySession?: LegacyAdminSession;
62
+ /** Columnas/ítems del menú "Nuevo". Por defecto, la estructura del CMS legacy. */
63
+ newContentGroups?: NewContentGroup[];
64
+ /** Formatos del menú de previsualización. Por defecto, Desktop/Mobile/Tablet. */
65
+ previewFormats?: PreviewFormat[];
66
+ /** Operaciones concedidas al usuario (`POST /auth/permissions`). */
67
+ operationPermissions?: string[];
68
+ /** Si el usuario es administrador (ve todos los ítems del menú "Nuevo"). */
69
+ isAdmin?: boolean;
70
+ /** Fallback (sin sesión) del clic en un ítem del menú "Nuevo" (recibe su `id`). */
71
+ onNewContentSelect?: (itemId: string) => void;
72
+ /** Integración: clic en un formato de previsualización (recibe su `id`). */
73
+ onPreviewSelect?: (formatId: string) => void;
33
74
  LinkComponent?: CmsLinkComponent;
34
75
  permissions: Array<NavItemPermissions>;
35
76
  locale?: Locale | string;
36
77
  /** Alias de `locale`. */
37
78
  language?: Locale | string;
38
79
  messages?: CmsMessagesOverride;
80
+ /** Catálogo de mensajes propio del gestor (namespaces libres, es/en/pt). */
81
+ appMessages?: AppLocaleCatalog;
39
82
  baseUrl: string;
40
83
  };
41
84
 
85
+ /** Traductor genérico de claves del gestor por ruta con puntos (`ns.clave`). */
86
+ export declare type AppTranslate = (path: string, params?: TranslationParams) => string;
87
+
42
88
  /** Audio del VFS. Los metadatos exactos no están detallados en el doc. */
43
89
  declare interface Audio_2 {
44
90
  [key: string]: unknown;
@@ -219,6 +265,27 @@ export declare interface AuthSessionResult extends CmsResponse {
219
265
  /** Respuesta de POST /auth/setNewPassword. */
220
266
  export declare type AuthSetNewPasswordResponse = AuthSessionResult;
221
267
 
268
+ /** Propiedades comunes a todos los campos de la configuración. */
269
+ declare type BaseFieldConfig = {
270
+ /** Identificador único del campo (clave en `FieldValues`). */
271
+ name: string;
272
+ /** Etiqueta (ya traducida). Se muestra arriba del control. */
273
+ label?: ReactNode;
274
+ /** Placeholder (ya traducido). */
275
+ placeholder?: string;
276
+ /** Texto de ayuda bajo el control (ya traducido). */
277
+ hint?: ReactNode;
278
+ /** Deshabilita el control. */
279
+ disabled?: boolean;
280
+ /**
281
+ * Columnas que ocupa en la grilla del modal (1, 2 o 3).
282
+ * En el panel lateral (drawer) siempre ocupa el ancho completo.
283
+ */
284
+ span?: 1 | 2 | 3;
285
+ /** Base para los `data-testid`. */
286
+ testId?: string;
287
+ };
288
+
222
289
  /**
223
290
  * Botón primario con menú desplegable integrado, en forma de píldora dividida.
224
291
  * Combina un botón principal de acción (emite `onAction`) con una flecha que
@@ -248,6 +315,22 @@ export declare type BtnDropdownProps = {
248
315
  testId?: string;
249
316
  };
250
317
 
318
+ /**
319
+ * Construye el catálogo estándar de campos de "Búsqueda avanzada" del CMS con
320
+ * los textos por defecto de la librería (resueltos al idioma activo). Es lo que
321
+ * usa `CmsAdvancedSearch` cuando el consumidor no pasa `fields`.
322
+ *
323
+ * Los campos de datos (sección, categoría, creador, autor, grupos, zona) traen
324
+ * `options: []`: sus etiquetas/placeholder vienen traducidos de la lib, pero las
325
+ * opciones reales las inyecta cada gestor (son datos del backend). Los campos de
326
+ * enum fijo (tipo, estados, orden, prioridad, dirección) sí traen sus opciones
327
+ * por defecto, también traducidas.
328
+ *
329
+ * @param t - Traductor de la lib (`useCmsTranslation().t`).
330
+ * @returns Lista de campos lista para `CmsAdvancedSearch`.
331
+ */
332
+ export declare function buildDefaultSearchFields(t: CmsTranslator): FieldConfig[];
333
+
251
334
  /** Filtro de POST /categories/get. */
252
335
  export declare interface CategoriesGetFilter {
253
336
  /**
@@ -305,6 +388,10 @@ export declare interface Category {
305
388
  [key: string]: unknown;
306
389
  }
307
390
 
391
+ export declare type CheckboxFieldConfig = BaseFieldConfig & {
392
+ kind: 'checkbox';
393
+ };
394
+
308
395
  /** Cuerpo de la respuesta de POST /ckeditor/adminConfiguration. */
309
396
  export declare interface CkeditorAdminConfigurationResponse extends CmsResponse {
310
397
  ckeditorParams?: CkeditorParams;
@@ -393,6 +480,55 @@ export declare interface CkeditorPrompt {
393
480
  [key: string]: unknown;
394
481
  }
395
482
 
483
+ /**
484
+ * Contenedor de "Búsqueda avanzada" reutilizable y declarativo. Recibe una lista
485
+ * de `fields` y los renderiza en una grilla, manejando el estado del formulario
486
+ * internamente. Se presenta como modal centrado o panel lateral derecho según
487
+ * `variant`. El mismo componente sirve a cualquier gestor: solo cambian los
488
+ * campos que se le pasan.
489
+ */
490
+ export declare function CmsAdvancedSearch({ open, onClose, variant, title, titleIcon, fields, initialValues, onApply, onReset, applyLabel, resetLabel, closeAriaLabel, columns, drawerWidth, testId, }: CmsAdvancedSearchProps): JSX.Element;
491
+
492
+ export declare type CmsAdvancedSearchProps = {
493
+ /** Si el contenedor está abierto. */
494
+ open: boolean;
495
+ /** Callback al cerrar (botón X, scrim o Escape). */
496
+ onClose: () => void;
497
+ /** Modal centrado o panel lateral derecho. Por defecto `modal`. */
498
+ variant?: CmsAdvancedSearchVariant;
499
+ /** Título. Por defecto el de la lib ("Búsqueda avanzada", según idioma). */
500
+ title?: ReactNode;
501
+ /** Ícono de la cabecera. Por defecto un embudo de filtro. */
502
+ titleIcon?: ReactNode;
503
+ /**
504
+ * Campos a mostrar. Si se omite, usa el catálogo estándar de la lib
505
+ * (`buildDefaultSearchFields`) ya traducido. Cada gestor puede pasar solo los
506
+ * campos que necesita o partir del catálogo por defecto y ajustar opciones.
507
+ */
508
+ fields?: FieldConfig[];
509
+ /** Valores iniciales (al abrir se sincroniza el borrador con estos). */
510
+ initialValues?: FieldValues;
511
+ /** Callback al aplicar, con los valores del formulario. */
512
+ onApply: (values: FieldValues) => void;
513
+ /** Callback al restablecer (luego de limpiar el borrador). */
514
+ onReset?: () => void;
515
+ /** Texto del botón aplicar. Por defecto el de la lib. */
516
+ applyLabel?: ReactNode;
517
+ /** Texto del botón restablecer. Por defecto el de la lib. */
518
+ resetLabel?: ReactNode;
519
+ /** `aria-label` del botón cerrar. Por defecto el de la lib. */
520
+ closeAriaLabel?: string;
521
+ /** Columnas de la grilla en variante modal. Por defecto `3`. */
522
+ columns?: number;
523
+ /** Ancho del panel lateral. Por defecto `360`. */
524
+ drawerWidth?: number | string;
525
+ /** Base para los `data-testid`. */
526
+ testId?: string;
527
+ };
528
+
529
+ /** Presentación del contenedor de búsqueda avanzada. */
530
+ export declare type CmsAdvancedSearchVariant = 'modal' | 'drawer';
531
+
396
532
  /**
397
533
  * Servicios HTTP del módulo `audios` del CMS (solo endpoints JSON POST).
398
534
  *
@@ -521,6 +657,25 @@ export declare class CmsCategoriesServices {
521
657
  testCategories: (filter?: CategoriesTestFilter) => Promise<CategoriesTestResponse>;
522
658
  }
523
659
 
660
+ /**
661
+ * Checkbox con etiqueta. Activo = cuadro relleno con el color primario y check
662
+ * blanco (íconos por defecto de MUI, sin override). Controlado y reutilizable.
663
+ */
664
+ export declare function CmsCheckboxField({ value, onChange, label, disabled, testId, }: CmsCheckboxFieldProps): JSX.Element;
665
+
666
+ export declare type CmsCheckboxFieldProps = {
667
+ /** Estado actual (controlado). */
668
+ value: boolean;
669
+ /** Callback con el nuevo estado. */
670
+ onChange: (value: boolean) => void;
671
+ /** Etiqueta a la derecha del checkbox (ya traducida). */
672
+ label?: ReactNode;
673
+ /** Deshabilita el control. */
674
+ disabled?: boolean;
675
+ /** Base para los `data-testid`. */
676
+ testId?: string;
677
+ };
678
+
524
679
  /**
525
680
  * Servicios HTTP del módulo `ckeditor` del CMS (solo endpoints JSON POST).
526
681
  *
@@ -557,6 +712,17 @@ export declare const cmsColors: {
557
712
  readonly secondary: "#D8E2FF";
558
713
  /** Hover sobre superficies secundarias (opciones de desplegable). */
559
714
  readonly secondaryHover: "#E1E2EA";
715
+ /**
716
+ * Texto / íconos sobre el contenedor `secondary` (chips de filtro activos,
717
+ * opciones marcadas en multiselect, etiquetas). Equivale al
718
+ * `onSecondaryContainer` de Material 3.
719
+ */
720
+ readonly onSecondaryContainer: "#2C4678";
721
+ /**
722
+ * Secundario sólido (tono fuerte de la paleta secundaria). Se usa, p. ej.,
723
+ * para resaltar el borde del avatar al hacer hover sobre una fila.
724
+ */
725
+ readonly secondaryStrong: "#455E91";
560
726
  /** Borde por defecto de controles tipo select. */
561
727
  readonly controlBorder: "#727784";
562
728
  /** Texto por defecto de controles tipo select. */
@@ -573,12 +739,29 @@ export declare const cmsColors: {
573
739
  readonly iconButtonIcon: "#929193";
574
740
  /** Fondo de menús flotantes (perfil, selector de sitios). */
575
741
  readonly menuSurface: "#ECEDF6";
742
+ /** Fondo de la opción activa/hover dentro de un menú desplegable simple. */
743
+ readonly menuItemActive: "#E1E2EB";
576
744
  /** Hover neutro sobre superficies claras (sidebar, top bar). */
577
745
  readonly surfaceHover: "#E3E2E6";
746
+ /** Texto tenue del índice alfabético (letras inactivas A–Z del listado). */
747
+ readonly alphabetIdle: "#B4BEDA";
578
748
  /** Texto fuerte (títulos de ítems, nombre de perfil). */
579
749
  readonly textStrong: "#191C22";
580
750
  /** Texto de navegación / secundario. */
581
751
  readonly textNav: "#414752";
752
+ /** Texto atenuado: títulos de sección, encabezados de columna (gris claro). */
753
+ readonly textMuted: "#94A2AA";
754
+ /**
755
+ * Azul para enlaces de texto y botones tipo texto (p. ej. el label
756
+ * "Cancelar" del modal de confirmación y los enlaces dentro de descripciones).
757
+ */
758
+ readonly link: "#004F99";
759
+ /** Acento de acción destructiva (CTA "Desactivar/Resetear", badge de riesgo). */
760
+ readonly danger: "#BA1A1A";
761
+ /** Hover del acento destructivo. */
762
+ readonly dangerHover: "#93000A";
763
+ /** Acento de acción positiva (badge de "Activar"). */
764
+ readonly success: "#1E8E3E";
582
765
  /** Bordes y divisores sutiles. */
583
766
  readonly border: "#C1C6D4";
584
767
  /** Fondo del avatar de perfil. */
@@ -589,6 +772,34 @@ export declare const cmsColors: {
589
772
  readonly white: "#FFFFFF";
590
773
  };
591
774
 
775
+ /**
776
+ * Combobox de una sola opción con búsqueda escribiendo (equivale al campo
777
+ * "Creador" / "Autor" del diseño). Internamente usa `Autocomplete` de MUI pero
778
+ * expone una API por `value: string`. Controlado y reutilizable.
779
+ */
780
+ export declare function CmsComboboxField({ value, onChange, options, label, placeholder, hint, noOptionsText, disabled, testId, }: CmsComboboxFieldProps): JSX.Element;
781
+
782
+ export declare type CmsComboboxFieldProps = {
783
+ /** Valor seleccionado (value de la opción; vacío = ninguno). */
784
+ value: string;
785
+ /** Callback con el nuevo value (o '' al limpiar). */
786
+ onChange: (value: string) => void;
787
+ /** Opciones disponibles. */
788
+ options: FieldOption[];
789
+ /** Etiqueta superior (ya traducida). */
790
+ label?: ReactNode;
791
+ /** Placeholder (ya traducido). */
792
+ placeholder?: string;
793
+ /** Texto de ayuda bajo el control. */
794
+ hint?: ReactNode;
795
+ /** Texto cuando no hay coincidencias (ya traducido). */
796
+ noOptionsText?: ReactNode;
797
+ /** Deshabilita el control. */
798
+ disabled?: boolean;
799
+ /** Base para los `data-testid`. */
800
+ testId?: string;
801
+ };
802
+
592
803
  /**
593
804
  * Servicios HTTP del módulo `comments` del CMS.
594
805
  *
@@ -662,6 +873,70 @@ export declare class CmsCommonServices {
662
873
  getSitesAndPublications: () => Promise<SitesAndPublicationsResult>;
663
874
  }
664
875
 
876
+ /** Color del botón "Confirmar/Enviar": CTA primario (azul) o destructivo (rojo). */
877
+ declare type CmsConfirmColor = 'primary' | 'danger';
878
+
879
+ /**
880
+ * Modal de confirmación reutilizable: ícono, título, descripción y 1–2 botones,
881
+ * todo opcional. Contenido alineado a la izquierda, acciones a la derecha y "X"
882
+ * de cerrar dentro del modal. Réplica funcional del `confirm-modal` del Angular
883
+ * legacy (`cmsmedios-ux`) con MUI + el theme de la lib. Los textos (i18n) los
884
+ * pasa el gestor; este componente solo presenta.
885
+ */
886
+ export declare function CmsConfirmDialog({ open, onClose, icon, iconColor, title, description, showClose, closeAriaLabel, cancelLabel, onCancel, confirmLabel, onConfirm, confirmIcon, confirmColor, cancelDisabled, confirmDisabled, fullWidthActions, actionsAlign, width, minWidth, minHeight, disableBackdropClose, testId, }: CmsConfirmDialogProps): JSX.Element;
887
+
888
+ export declare type CmsConfirmDialogProps = {
889
+ /** Si el modal está abierto. */
890
+ open: boolean;
891
+ /** Callback al cerrar (botón X, scrim o Escape). */
892
+ onClose: () => void;
893
+ /** Ícono opcional (se muestra en un badge circular sobre el título). */
894
+ icon?: ReactNode;
895
+ /** Color de acento del badge del ícono. Por defecto el texto de navegación. */
896
+ iconColor?: string;
897
+ /** Título opcional. Product Sans 32/400. Admite `\n` para saltos de línea. */
898
+ title?: ReactNode;
899
+ /**
900
+ * Descripción opcional. Roboto 14/400. Puede incluir negrita (`<b>`/`<strong>`)
901
+ * y enlaces (`<a>`); ambos se estilan según el diseño.
902
+ */
903
+ description?: ReactNode;
904
+ /** Muestra el botón "X" de cerrar (dentro, arriba a la derecha). Por defecto `true`. */
905
+ showClose?: boolean;
906
+ /** `aria-label` del botón cerrar. */
907
+ closeAriaLabel?: string;
908
+ /** Label del botón "Cancelar". Si se omite, no se muestra. */
909
+ cancelLabel?: ReactNode;
910
+ /** Acción del botón "Cancelar". Por defecto cierra el modal (`onClose`). */
911
+ onCancel?: () => void;
912
+ /** Label del botón "Confirmar/Enviar". Si se omite, no se muestra. */
913
+ confirmLabel?: ReactNode;
914
+ /** Acción del botón "Confirmar/Enviar". */
915
+ onConfirm?: () => void;
916
+ /** Ícono opcional al inicio del botón "Confirmar/Enviar". */
917
+ confirmIcon?: ReactNode;
918
+ /** Color del botón "Confirmar/Enviar": `primary` (azul) o `danger` (rojo). */
919
+ confirmColor?: CmsConfirmColor;
920
+ /** Deshabilita el botón "Cancelar". */
921
+ cancelDisabled?: boolean;
922
+ /** Deshabilita el botón "Confirmar/Enviar". */
923
+ confirmDisabled?: boolean;
924
+ /** Los botones reparten el ancho del modal. Por defecto `false`. */
925
+ fullWidthActions?: boolean;
926
+ /** Alineación de los botones. Por defecto `end` (a la derecha). */
927
+ actionsAlign?: CmsDialogActionsAlign;
928
+ /** Ancho fijo del modal. Si se omite, crece con el contenido (respetando `minWidth`). */
929
+ width?: number | string;
930
+ /** Ancho mínimo del modal. Por defecto `420`. */
931
+ minWidth?: number | string;
932
+ /** Alto mínimo del modal (crece con el contenido). Por defecto `280`. */
933
+ minHeight?: number | string;
934
+ /** Evita cerrar al hacer clic fuera o con Escape (p. ej. mientras carga). */
935
+ disableBackdropClose?: boolean;
936
+ /** Base para los `data-testid`. */
937
+ testId?: string;
938
+ };
939
+
665
940
  /**
666
941
  * Servicios HTTP del módulo `contributions` del CMS.
667
942
  *
@@ -714,6 +989,71 @@ export declare class CmsDashboardServices {
714
989
  getNotifications: () => Promise<DashboardNotificationsResponse>;
715
990
  }
716
991
 
992
+ /**
993
+ * Campo de fecha con calendario Material 3 propio (no el selector nativo del
994
+ * navegador, que no se puede estilar). El valor se maneja en ISO `AAAA-MM-DD` y
995
+ * se muestra como `dd/mm/aaaa`. Los meses y días se rotulan según el idioma del
996
+ * provider. Controlado y reutilizable.
997
+ */
998
+ export declare function CmsDateField({ value, onChange, label, hint, disabled, testId, }: CmsDateFieldProps): JSX.Element;
999
+
1000
+ export declare type CmsDateFieldProps = {
1001
+ /** Valor en formato ISO `AAAA-MM-DD` (controlado; vacío = sin fecha). */
1002
+ value: string;
1003
+ /** Callback con la nueva fecha ISO (o '' al limpiar). */
1004
+ onChange: (value: string) => void;
1005
+ /** Etiqueta superior (ya traducida). */
1006
+ label?: ReactNode;
1007
+ /** Texto de ayuda bajo el control. */
1008
+ hint?: ReactNode;
1009
+ /** Deshabilita el control. */
1010
+ disabled?: boolean;
1011
+ /** Base para los `data-testid`. */
1012
+ testId?: string;
1013
+ };
1014
+
1015
+ /**
1016
+ * Fila de acciones del modal de confirmación. Muestra 1 o 2 botones según los
1017
+ * labels que reciba: el de "Cancelar" (tipo texto) y/o el de "Confirmar/Enviar"
1018
+ * (CTA primario o destructivo, con ícono opcional). Reutilizable de forma
1019
+ * independiente del modal.
1020
+ */
1021
+ export declare function CmsDialogActions({ cancelLabel, onCancel, confirmLabel, onConfirm, confirmIcon, confirmColor, cancelDisabled, confirmDisabled, fullWidth, align, testId, }: CmsDialogActionsProps): JSX.Element | null;
1022
+
1023
+ /** Alineación horizontal de la fila de botones. */
1024
+ declare type CmsDialogActionsAlign = 'start' | 'center' | 'end' | 'between';
1025
+
1026
+ export declare type CmsDialogActionsProps = {
1027
+ /** Label del botón "Cancelar". Si se omite, ese botón no se muestra. */
1028
+ cancelLabel?: ReactNode;
1029
+ /** Acción del botón "Cancelar". */
1030
+ onCancel?: () => void;
1031
+ /** Label del botón "Confirmar/Enviar". Si se omite, ese botón no se muestra. */
1032
+ confirmLabel?: ReactNode;
1033
+ /** Acción del botón "Confirmar/Enviar". */
1034
+ onConfirm?: () => void;
1035
+ /** Ícono opcional al inicio del botón "Confirmar/Enviar". */
1036
+ confirmIcon?: ReactNode;
1037
+ /** Color del botón "Confirmar/Enviar": `primary` (azul) o `danger` (rojo). */
1038
+ confirmColor?: CmsConfirmColor;
1039
+ /** Deshabilita el botón "Cancelar". */
1040
+ cancelDisabled?: boolean;
1041
+ /** Deshabilita el botón "Confirmar/Enviar". */
1042
+ confirmDisabled?: boolean;
1043
+ /**
1044
+ * Si los botones crecen para repartir el ancho del contenedor padre. Por
1045
+ * defecto `true`. Con un solo botón, ocupa todo el ancho disponible.
1046
+ */
1047
+ fullWidth?: boolean;
1048
+ /** Alineación horizontal de los botones. Por defecto `end`. */
1049
+ align?: CmsDialogActionsAlign;
1050
+ /** Base para los `data-testid`. */
1051
+ testId?: string;
1052
+ };
1053
+
1054
+ /** Severidad de feedback derivada de un código de error. */
1055
+ export declare type CmsErrorSeverity = 'warning' | 'error';
1056
+
717
1057
  /** Evento del CMS. La forma exacta depende del recurso. */
718
1058
  export declare interface CmsEvent {
719
1059
  [key: string]: unknown;
@@ -754,6 +1094,19 @@ export declare class CmsFileExplorerServices {
754
1094
  getFolders: (path: string) => Promise<FileExplorerGetFoldersResponse>;
755
1095
  }
756
1096
 
1097
+ /**
1098
+ * Inyecta los `@font-face` de Roboto y Product Sans como estilos globales.
1099
+ * Va montado dentro de los providers MUI de la lib, así cada gestor que los use
1100
+ * tiene las fuentes disponibles sin configurar nada.
1101
+ */
1102
+ export declare function CmsFontFaces(): JSX.Element;
1103
+
1104
+ /**
1105
+ * Reglas `@font-face` de todas las fuentes del CMS, listas para inyectarse como
1106
+ * estilos globales (ver el componente `CmsFontFaces`).
1107
+ */
1108
+ export declare const cmsFontFaces: string;
1109
+
757
1110
  /**
758
1111
  * Servicios HTTP de la raíz del módulo `general` del CMS que usan POST con body
759
1112
  * JSON y objeto `authentication`.
@@ -770,7 +1123,7 @@ export declare class CmsGeneralServices {
770
1123
  updateCDN: (path: string) => Promise<CmsResponse>;
771
1124
  }
772
1125
 
773
- export declare function CmsI18nProvider({ locale, language, messages, catalog, children, }: CmsI18nProviderProps): JSX.Element;
1126
+ export declare function CmsI18nProvider({ locale, language, messages, catalog, appMessages, children, }: CmsI18nProviderProps): JSX.Element;
774
1127
 
775
1128
  export declare type CmsI18nProviderProps = {
776
1129
  locale?: Locale | string;
@@ -778,6 +1131,8 @@ export declare type CmsI18nProviderProps = {
778
1131
  language?: Locale | string;
779
1132
  messages?: CmsMessagesOverride;
780
1133
  catalog?: LocaleCatalog;
1134
+ /** Catálogo de mensajes propio del gestor (namespaces libres, es/en/pt). */
1135
+ appMessages?: AppLocaleCatalog;
781
1136
  children: ReactNode;
782
1137
  };
783
1138
 
@@ -868,6 +1223,34 @@ export declare type CmsMuiProviderProps = {
868
1223
  children: ReactNode;
869
1224
  };
870
1225
 
1226
+ /**
1227
+ * Campo de selección múltiple con chips y checkboxes en el desplegable
1228
+ * (equivale al campo "Estados" del diseño). Internamente usa `Autocomplete`
1229
+ * múltiple de MUI pero expone una API por `value: string[]`. Reutilizable.
1230
+ */
1231
+ export declare function CmsMultiSelectField({ value, onChange, options, label, placeholder, hint, noOptionsText, disabled, testId, }: CmsMultiSelectFieldProps): JSX.Element;
1232
+
1233
+ export declare type CmsMultiSelectFieldProps = {
1234
+ /** Valores seleccionados (controlado). */
1235
+ value: string[];
1236
+ /** Callback con los nuevos valores. */
1237
+ onChange: (value: string[]) => void;
1238
+ /** Opciones disponibles. */
1239
+ options: FieldOption[];
1240
+ /** Etiqueta superior (ya traducida). */
1241
+ label?: ReactNode;
1242
+ /** Placeholder cuando no hay selección (ya traducido). */
1243
+ placeholder?: string;
1244
+ /** Texto de ayuda bajo el control. */
1245
+ hint?: ReactNode;
1246
+ /** Texto cuando no hay coincidencias (ya traducido). */
1247
+ noOptionsText?: ReactNode;
1248
+ /** Deshabilita el control. */
1249
+ disabled?: boolean;
1250
+ /** Base para los `data-testid`. */
1251
+ testId?: string;
1252
+ };
1253
+
871
1254
  /**
872
1255
  * Servicios HTTP del módulo `news` del CMS (core + publish, unpublish, pin,
873
1256
  * massive, freshness, views y analytics).
@@ -1013,6 +1396,33 @@ export declare class CmsNotificationServices {
1013
1396
  getTopics: () => Promise<NotificationTopicsResponse>;
1014
1397
  }
1015
1398
 
1399
+ /**
1400
+ * Campo numérico con la estética estándar del CMS. Mantiene el valor como string
1401
+ * para permitir el estado vacío. Controlado y reutilizable.
1402
+ */
1403
+ export declare function CmsNumberField({ value, onChange, label, placeholder, hint, min, max, disabled, testId, }: CmsNumberFieldProps): JSX.Element;
1404
+
1405
+ export declare type CmsNumberFieldProps = {
1406
+ /** Valor actual como string (controlado; vacío = sin valor). */
1407
+ value: string;
1408
+ /** Callback con el nuevo valor (string para permitir el campo vacío). */
1409
+ onChange: (value: string) => void;
1410
+ /** Etiqueta superior (ya traducida). */
1411
+ label?: ReactNode;
1412
+ /** Placeholder (ya traducido). */
1413
+ placeholder?: string;
1414
+ /** Texto de ayuda bajo el control. */
1415
+ hint?: ReactNode;
1416
+ /** Valor mínimo permitido. */
1417
+ min?: number;
1418
+ /** Valor máximo permitido. */
1419
+ max?: number;
1420
+ /** Deshabilita el control. */
1421
+ disabled?: boolean;
1422
+ /** Base para los `data-testid`. */
1423
+ testId?: string;
1424
+ };
1425
+
1016
1426
  /**
1017
1427
  * Servicios HTTP del módulo `people` (personas: periodistas, columnistas) del CMS.
1018
1428
  *
@@ -1336,6 +1746,71 @@ export declare interface CmsResponse {
1336
1746
  error?: string;
1337
1747
  }
1338
1748
 
1749
+ /** Envelope mínimo que `notifyCmsResponse` sabe interpretar. */
1750
+ export declare interface CmsResponseLike {
1751
+ status?: 'ok' | 'fail' | 'error' | string;
1752
+ errorCode?: string | number | Array<string | number>;
1753
+ error?: string;
1754
+ }
1755
+
1756
+ /**
1757
+ * Buscador del CMS: input con lupa opcional, botón de limpiar y botón opcional
1758
+ * de "opciones avanzadas" (tres puntos) que el consumidor cablea a un modal o
1759
+ * panel lateral. Replica el comportamiento del `app-search` del Angular legacy
1760
+ * (incluido el modo `collapsible` que crece al enfocar y colapsa al vaciarse).
1761
+ *
1762
+ * Es presentacional y controlado: el texto y los textos visibles vienen por
1763
+ * props; la decisión de qué abrir en "avanzadas" vive en el gestor.
1764
+ */
1765
+ export declare function CmsSearchField({ value, onChange, onSearch, onClear, placeholder, showIcon, showAdvanced, advancedActive, onAdvancedClick, collapsible, width, grow, maxWidth, endGap, advancedAriaLabel, clearAriaLabel, ariaLabel, testId, }: CmsSearchFieldProps): JSX.Element;
1766
+
1767
+ export declare type CmsSearchFieldProps = {
1768
+ /** Valor del texto de búsqueda (controlado). */
1769
+ value: string;
1770
+ /** Callback en cada cambio del texto. */
1771
+ onChange: (value: string) => void;
1772
+ /** Callback al presionar Enter (búsqueda). */
1773
+ onSearch?: (value: string) => void;
1774
+ /** Callback al limpiar el campo. Si no se pasa, igual limpia `value`. */
1775
+ onClear?: () => void;
1776
+ /** Placeholder del input (ya traducido y modificable por el consumidor). */
1777
+ placeholder?: string;
1778
+ /** Muestra la lupa a la izquierda. Por defecto `true`. */
1779
+ showIcon?: boolean;
1780
+ /** Muestra el botón de opciones avanzadas (tres puntos). Por defecto `false`. */
1781
+ showAdvanced?: boolean;
1782
+ /** Marca el botón de avanzadas como activo (hay filtros aplicados). */
1783
+ advancedActive?: boolean;
1784
+ /** Callback al hacer clic en opciones avanzadas (abre modal o panel). */
1785
+ onAdvancedClick?: () => void;
1786
+ /**
1787
+ * Modo "crece/colapsa" como el `app-search` del Angular: arranca como un botón
1788
+ * con lupa y se expande al hacer foco; colapsa al perder foco si está vacío.
1789
+ * Por defecto `false` (input siempre expandido).
1790
+ */
1791
+ collapsible?: boolean;
1792
+ /** Ancho del input cuando está expandido. */
1793
+ width?: number | string;
1794
+ /**
1795
+ * Crece al enfocar hasta llenar el espacio disponible del contenedor (como el
1796
+ * buscador clásico del CMS), dejando `endGap` px antes del borde. En reposo
1797
+ * queda alineado a la derecha con ancho `width`. Por defecto `false`.
1798
+ */
1799
+ grow?: boolean;
1800
+ /** Ancho máximo opcional cuando `grow` está activo (por defecto sin tope). */
1801
+ maxWidth?: number | string;
1802
+ /** Espacio mínimo a la derecha cuando `grow` está activo. Por defecto `40`. */
1803
+ endGap?: number;
1804
+ /** `aria-label` del botón de avanzadas. */
1805
+ advancedAriaLabel?: string;
1806
+ /** `aria-label` del botón de limpiar. */
1807
+ clearAriaLabel?: string;
1808
+ /** `aria-label` del input. */
1809
+ ariaLabel?: string;
1810
+ /** Base para los `data-testid`. */
1811
+ testId?: string;
1812
+ };
1813
+
1339
1814
  /**
1340
1815
  * Servicios HTTP del módulo `sections` del CMS.
1341
1816
  *
@@ -1362,6 +1837,37 @@ export declare class CmsSectionsServices {
1362
1837
  updateSection: (section: SectionInput) => Promise<CmsResponse>;
1363
1838
  }
1364
1839
 
1840
+ /**
1841
+ * Selector de una sola opción tipo formulario (subrayado M3). A diferencia de
1842
+ * `SelectDropdown` (píldora para filtros de listado), este es un campo de
1843
+ * formulario con etiqueta arriba. El menú resalta la opción activa en
1844
+ * `secondary`, hace hover en `secondaryHover`, deja aire entre el borde del
1845
+ * contenedor y el resaltado, y marca la activa con un check. Controlado y
1846
+ * reutilizable.
1847
+ */
1848
+ export declare function CmsSelectField({ value, onChange, options, label, placeholder, hint, disabled, showCheck, testId, }: CmsSelectFieldProps): JSX.Element;
1849
+
1850
+ export declare type CmsSelectFieldProps = {
1851
+ /** Valor seleccionado (controlado; vacío = ninguno). */
1852
+ value: string;
1853
+ /** Callback con el nuevo valor. */
1854
+ onChange: (value: string) => void;
1855
+ /** Opciones disponibles. */
1856
+ options: FieldOption[];
1857
+ /** Etiqueta superior (ya traducida). */
1858
+ label?: ReactNode;
1859
+ /** Placeholder mostrado cuando no hay valor (ya traducido). */
1860
+ placeholder?: string;
1861
+ /** Texto de ayuda bajo el control. */
1862
+ hint?: ReactNode;
1863
+ /** Deshabilita el control. */
1864
+ disabled?: boolean;
1865
+ /** Muestra el check en la opción activa. Por defecto `true`. */
1866
+ showCheck?: boolean;
1867
+ /** Base para los `data-testid`. */
1868
+ testId?: string;
1869
+ };
1870
+
1365
1871
  export declare type CmsShadows = typeof shadows;
1366
1872
 
1367
1873
  /**
@@ -1379,6 +1885,40 @@ export declare class CmsSitesServices {
1379
1885
 
1380
1886
  export declare type CmsSizes = typeof sizes;
1381
1887
 
1888
+ /**
1889
+ * Campo de etiquetas libres: se escribe y se presiona Enter para agregar chips
1890
+ * (equivale al campo "Etiquetas" del diseño). Internamente usa `Autocomplete`
1891
+ * `freeSolo` múltiple. Controlado y reutilizable.
1892
+ */
1893
+ export declare function CmsTagsField({ value, onChange, label, placeholder, hint, suggestions, startIcon, chipSx, disabled, testId, }: CmsTagsFieldProps): JSX.Element;
1894
+
1895
+ export declare type CmsTagsFieldProps = {
1896
+ /** Etiquetas actuales (controlado). */
1897
+ value: string[];
1898
+ /** Callback con las nuevas etiquetas. */
1899
+ onChange: (value: string[]) => void;
1900
+ /** Etiqueta superior (ya traducida). */
1901
+ label?: ReactNode;
1902
+ /** Placeholder cuando no hay etiquetas (ya traducido). */
1903
+ placeholder?: string;
1904
+ /** Texto de ayuda bajo el control. */
1905
+ hint?: ReactNode;
1906
+ /** Sugerencias opcionales para el autocompletado. */
1907
+ suggestions?: string[];
1908
+ /** Ícono opcional a la izquierda del control (p. ej. una etiqueta/lupa). */
1909
+ startIcon?: ReactNode;
1910
+ /**
1911
+ * `sx` de los chips de etiqueta. Si se pasa, **reemplaza** el estilo por
1912
+ * defecto (`fieldStyles.sxChip`, primario tenue), permitiendo p. ej. usar el
1913
+ * color secundario.
1914
+ */
1915
+ chipSx?: SxProps<Theme>;
1916
+ /** Deshabilita el control. */
1917
+ disabled?: boolean;
1918
+ /** Base para los `data-testid`. */
1919
+ testId?: string;
1920
+ };
1921
+
1382
1922
  /**
1383
1923
  * Servicios HTTP del módulo `tags` del CMS.
1384
1924
  *
@@ -1416,6 +1956,100 @@ export declare class CmsTagsServices {
1416
1956
  changeStatus: (tag: TagChangeStatusInput) => Promise<TagChangeStatusResponse>;
1417
1957
  }
1418
1958
 
1959
+ /**
1960
+ * Campo de texto de una línea con la estética estándar del CMS (etiqueta arriba,
1961
+ * subrayado inferior). Controlado: el consumidor pasa `value` y `onChange`.
1962
+ * Reutilizable en cualquier formulario.
1963
+ */
1964
+ export declare function CmsTextField({ value, onChange, label, placeholder, hint, type, disabled, testId, }: CmsTextFieldProps): JSX.Element;
1965
+
1966
+ export declare type CmsTextFieldProps = {
1967
+ /** Valor actual (controlado). */
1968
+ value: string;
1969
+ /** Callback con el nuevo texto. */
1970
+ onChange: (value: string) => void;
1971
+ /** Etiqueta superior (ya traducida). */
1972
+ label?: ReactNode;
1973
+ /** Placeholder (ya traducido). */
1974
+ placeholder?: string;
1975
+ /** Texto de ayuda bajo el control. */
1976
+ hint?: ReactNode;
1977
+ /** Tipo HTML del input. Por defecto `text`. */
1978
+ type?: 'text' | 'email' | 'url';
1979
+ /** Deshabilita el control. */
1980
+ disabled?: boolean;
1981
+ /** Base para los `data-testid`. */
1982
+ testId?: string;
1983
+ };
1984
+
1985
+ export declare function CmsToast({ item, t, localeTag, appVersion, onClose, }: CmsToastProps): JSX.Element;
1986
+
1987
+ export declare interface CmsToastApi {
1988
+ /** Toast de éxito (verde). */
1989
+ success: (message: string, options?: ToastOptions) => string;
1990
+ /** Toast informativo (azul). */
1991
+ info: (message: string, options?: ToastOptions) => string;
1992
+ /** Toast de advertencia (ámbar) — condición esperada/accionable. */
1993
+ warning: (message: string, options?: ToastOptions) => string;
1994
+ /** Toast de error (rojo, grande, con detalle copiable). */
1995
+ error: (message: string, options?: ToastErrorOptions) => string;
1996
+ /** Atajo genérico. */
1997
+ show: (severity: ToastSeverity, message: string, options?: ToastErrorOptions) => string;
1998
+ /** Cierra un toast por id; sin id, cierra todos. */
1999
+ dismiss: (id?: string) => void;
2000
+ /**
2001
+ * Interpreta un envelope `CmsResponse` y dispara el toast adecuado:
2002
+ * - `status: 'ok'` → success.
2003
+ * - fallo → severidad por código (`resolveErrorSeverity`) y mensaje legible
2004
+ * (`getCommonError` → `error` crudo → default i18n).
2005
+ */
2006
+ notifyCmsResponse: (response: CmsResponseLike | null | undefined, options?: NotifyCmsResponseOptions) => string;
2007
+ }
2008
+
2009
+ export declare const CmsToastContext: Context<CmsToastContextValue | null>;
2010
+
2011
+ export declare interface CmsToastContextValue {
2012
+ /** Encola un toast ya normalizado. Devuelve su id. */
2013
+ enqueue: (item: Omit<ToastItem, 'id'>) => string;
2014
+ /** Cierra un toast por id; sin id, cierra todos. */
2015
+ dismiss: (id?: string) => void;
2016
+ /** Translator resuelto al locale del provider (para resolver mensajes). */
2017
+ t: CmsTranslator;
2018
+ /** Locale activo del provider. */
2019
+ locale: Locale;
2020
+ }
2021
+
2022
+ export declare interface CmsToastProps {
2023
+ item: ToastItem;
2024
+ t: CmsTranslator;
2025
+ /** Tag BCP 47 para formatear la fecha del detalle del error. */
2026
+ localeTag: string;
2027
+ /** Versión a mostrar en el detalle del error (app o lib). */
2028
+ appVersion: string;
2029
+ onClose: (id: string) => void;
2030
+ }
2031
+
2032
+ /**
2033
+ * Provee el sistema de toasts a toda la app. Renderiza una pila fija (abajo a
2034
+ * la izquierda) y expone `useCmsToast()` para disparar feedback de operaciones.
2035
+ *
2036
+ * El mecanismo vive en la lib; el **disparo** lo hace el gestor (catch de un
2037
+ * server action / handler de mutación).
2038
+ */
2039
+ export declare function CmsToastProvider({ children, locale, language, appVersion, max, }: CmsToastProviderProps): JSX.Element;
2040
+
2041
+ export declare interface CmsToastProviderProps {
2042
+ children: ReactNode;
2043
+ /** Locale del usuario (sale de `profile.locale` en el gestor). */
2044
+ locale?: Locale | string;
2045
+ /** Alias de `locale`. */
2046
+ language?: Locale | string;
2047
+ /** Versión a mostrar en el detalle del toast de error. Default: `LIB_VERSION`. */
2048
+ appVersion?: string;
2049
+ /** Máximo de toasts simultáneos (se descarta el más viejo). Default: 4. */
2050
+ max?: number;
2051
+ }
2052
+
1419
2053
  /**
1420
2054
  * Servicios HTTP del módulo `transcribe` del CMS.
1421
2055
  *
@@ -1436,13 +2070,30 @@ export declare class CmsTranscribeServices {
1436
2070
 
1437
2071
  export declare type CmsTranslator = {
1438
2072
  messages: CmsMessages;
2073
+ /** Árbol de mensajes del gestor ya resuelto al locale activo (con fallback en). */
2074
+ appMessages: AppMessages;
1439
2075
  navigation: (module: NavigationModule | string) => string;
1440
2076
  sidebar: (key: SidebarMessageKey) => string;
1441
2077
  topBar: (key: TopBarMessageKey) => string;
2078
+ newMenu: (key: NewMenuMessageKey) => string;
2079
+ previewMenu: (key: PreviewMenuMessageKey) => string;
1442
2080
  profileMenu: (key: ProfileMenuMessageKey) => string;
1443
2081
  notificationsMenu: (key: NotificationsMenuMessageKey, params?: {
1444
2082
  count?: number;
1445
2083
  }) => string;
2084
+ toast: (key: ToastMessageKey) => string;
2085
+ userAvatar: (key: UserAvatarMessageKey) => string;
2086
+ /**
2087
+ * Resuelve una clave propia del gestor por ruta con puntos
2088
+ * (p. ej. `t.app('usuarios.modal.deactivate.title')`). Si falta, devuelve la
2089
+ * ruta tal cual (útil para detectar claves ausentes en desarrollo).
2090
+ */
2091
+ app: AppTranslate;
2092
+ /**
2093
+ * Devuelve un traductor del gestor con un namespace fijado:
2094
+ * `const tu = t.scoped('usuarios'); tu('modal.deactivate.title')`.
2095
+ */
2096
+ scoped: (namespace: string) => AppTranslate;
1446
2097
  };
1447
2098
 
1448
2099
  /**
@@ -1553,11 +2204,11 @@ export declare class CmsUsersServices {
1553
2204
  addPin: (pin: string) => Promise<UserPinAddResponse>;
1554
2205
  /** POST /users/pin/delete — elimina uno o más pins por ID. */
1555
2206
  deletePins: (ids: number[]) => Promise<CmsResponse>;
1556
- /** POST /users/action/setStatus — activa o desactiva un usuario. */
2207
+ /** POST /users/actions/setStatus — activa o desactiva un usuario. */
1557
2208
  setUserStatus: (username: string, action: UserStatusAction) => Promise<CmsResponse>;
1558
- /** POST /users/action/resetPass — restablece la contraseña de un usuario. */
2209
+ /** POST /users/actions/resetPass — restablece la contraseña de un usuario. */
1559
2210
  resetPassword: (username: string) => Promise<CmsResponse>;
1560
- /** POST /users/action/resetMfa — resetea la configuración MFA de un usuario. */
2211
+ /** POST /users/actions/resetMfa — resetea la configuración MFA de un usuario. */
1561
2212
  resetMfa: (username: string, reason: string) => Promise<CmsResponse>;
1562
2213
  }
1563
2214
 
@@ -1721,6 +2372,11 @@ export declare class CmsZonesServices {
1721
2372
  orderZones: (ids: number[]) => Promise<CmsResponse>;
1722
2373
  }
1723
2374
 
2375
+ export declare type ComboboxFieldConfig = BaseFieldConfig & {
2376
+ kind: 'combobox';
2377
+ options: FieldOption[];
2378
+ };
2379
+
1724
2380
  /** Comentario del CMS. La forma exacta no está documentada. */
1725
2381
  declare interface Comment_2 {
1726
2382
  commentId?: string;
@@ -1851,6 +2507,60 @@ export declare interface CommentUserGetResponse extends CmsResponse {
1851
2507
  phonenumber?: string;
1852
2508
  }
1853
2509
 
2510
+ /**
2511
+ * CMS error code → readable message map (English).
2512
+ *
2513
+ * English counterpart of {@link commonErrorsEs}. See that file for the key
2514
+ * convention and the `código → código+'a'` fallback handled by
2515
+ * `getCommonError`.
2516
+ */
2517
+ export declare const commonErrorsEn: Record<string, string>;
2518
+
2519
+ /**
2520
+ * Mapa de códigos de error del CMS → mensaje legible (español).
2521
+ *
2522
+ * Equivalente al `CommonErrorsEs` del Angular legacy (`cmsmedios-ux`). Es la
2523
+ * base compartida por todos los gestores; **se va ampliando** con cada código
2524
+ * nuevo que se aprenda durante el desarrollo (ver CLAUDE.md raíz).
2525
+ *
2526
+ * Convención de claves: el código tal cual lo devuelve el webservice
2527
+ * (`000.005`, `999.000`, …). Algunos mensajes genéricos usan el sufijo `a`
2528
+ * (`999.002a`) por compatibilidad con el legacy; `getCommonError` resuelve el
2529
+ * fallback `código → código+'a'` automáticamente.
2530
+ */
2531
+ export declare const commonErrorsEs: Record<string, string>;
2532
+
2533
+ /**
2534
+ * Mapa de código de erro do CMS → mensagem legível (português).
2535
+ *
2536
+ * Equivalente em português de {@link commonErrorsEs}.
2537
+ */
2538
+ export declare const commonErrorsPt: Record<string, string>;
2539
+
2540
+ export declare type ConfidenceColors = typeof confidenceColors;
2541
+
2542
+ /**
2543
+ * Colores de un badge de confianza/score por nivel. `bg` = fondo del badge;
2544
+ * `on` = texto. (Score de IA, relevancia, etc.)
2545
+ */
2546
+ export declare const confidenceColors: {
2547
+ /** Alto, ≥85% (verde). */
2548
+ readonly high: {
2549
+ readonly bg: "#D7F5DD";
2550
+ readonly on: "#0D5B2B";
2551
+ };
2552
+ /** Medio, 70–84% (ámbar). */
2553
+ readonly medium: {
2554
+ readonly bg: "#FFF0C8";
2555
+ readonly on: "#6B4D00";
2556
+ };
2557
+ /** Bajo, <70% (gris). */
2558
+ readonly low: {
2559
+ readonly bg: "#E7E8EE";
2560
+ readonly on: "#43474E";
2561
+ };
2562
+ };
2563
+
1854
2564
  /**
1855
2565
  * Contribución a actualizar (POST /contributions/edit).
1856
2566
  *
@@ -1896,7 +2606,36 @@ export declare interface CountNotificationsResponse {
1896
2606
 
1897
2607
  export declare function createAppTheme(): Theme;
1898
2608
 
1899
- export declare function createTranslator(messages: CmsMessages): CmsTranslator;
2609
+ export declare function createTranslator(messages: CmsMessages, appMessages?: AppMessages): CmsTranslator;
2610
+
2611
+ /**
2612
+ * Estado compartido de la foto del usuario logueado.
2613
+ *
2614
+ * Es el equivalente React del `updateImageProfile` (BehaviorSubject) del CMS
2615
+ * Angular legacy: cuando el usuario cambia su foto de perfil, la pantalla de
2616
+ * edición llama a `setPhoto(...)` y todos los avatares marcados como
2617
+ * `isCurrentUser` se actualizan al instante, sin recargar ni hacer
2618
+ * prop-drilling.
2619
+ */
2620
+ export declare interface CurrentUserPhotoContextValue {
2621
+ /** Foto actual del usuario logueado: ruta/URL, '' o 'noPicture'. `null` = sin valor todavía. */
2622
+ photo: string | null;
2623
+ /** Notifica una foto nueva (o '' / 'noPicture' al borrarla). */
2624
+ setPhoto: (photo: string | null) => void;
2625
+ }
2626
+
2627
+ /**
2628
+ * Provider de la foto del usuario logueado. Montarlo por encima de los avatares
2629
+ * que representan al usuario actual (típicamente en el `AppShell` o el layout de
2630
+ * la cuenta), sembrado con `profile.image`.
2631
+ */
2632
+ export declare function CurrentUserPhotoProvider({ initialPhoto, children, }: CurrentUserPhotoProviderProps): JSX.Element;
2633
+
2634
+ export declare interface CurrentUserPhotoProviderProps {
2635
+ /** Foto inicial del usuario logueado (p. ej. `profile.image`). */
2636
+ initialPhoto?: string | null;
2637
+ children: ReactNode;
2638
+ }
1900
2639
 
1901
2640
  /** Cuerpo de la respuesta de POST /dashboard/countNotifications. */
1902
2641
  export declare interface DashboardCountNotificationsResponse extends CmsResponse {
@@ -1961,6 +2700,10 @@ export declare interface DashboardVideoNotification {
1961
2700
  [key: string]: unknown;
1962
2701
  }
1963
2702
 
2703
+ export declare type DateFieldConfig = BaseFieldConfig & {
2704
+ kind: 'date';
2705
+ };
2706
+
1964
2707
  declare type DeepStringMap<T> = {
1965
2708
  [K in keyof T]: T[K] extends Record<string, unknown> ? {
1966
2709
  [K2 in keyof T[K]]: string;
@@ -1969,6 +2712,27 @@ declare type DeepStringMap<T> = {
1969
2712
 
1970
2713
  export declare const DEFAULT_LOCALE: Locale;
1971
2714
 
2715
+ /**
2716
+ * Estructura por defecto del menú "Nuevo", equivalente al `newContent` del
2717
+ * header de cmsmedios (frecuentes / otros / videos) con sus permisos. El gestor
2718
+ * puede sobreescribirla por props si su producto difiere.
2719
+ */
2720
+ export declare const DEFAULT_NEW_CONTENT_GROUPS: NewContentGroup[];
2721
+
2722
+ /**
2723
+ * Formatos por defecto con la ruta EXACTA de cmsmedios. El redirect (form POST
2724
+ * al CMS, como Ayuda) arma el campo `r` con `submitLegacyAdminPage`:
2725
+ * - Desktop → `r = /index.html`
2726
+ * - Mobile → `r = /preview/mobile.html?path=/index.html`
2727
+ * - Tablet → `r = /preview/tablet.html?path=/index.html`
2728
+ *
2729
+ * `path` es la ruta de la publicación (`/index.html` para la principal). El
2730
+ * `queryString` del device, al contener `/`, dispara la rama "redirect" de
2731
+ * cmsmedios (`<queryString>?path=<path>`). El gestor puede sobrescribir estos
2732
+ * formatos con los de `POST /news/previewFormats` por publicación.
2733
+ */
2734
+ export declare const DEFAULT_PREVIEW_FORMATS: PreviewFormat[];
2735
+
1972
2736
  export declare const DEFAULT_SITE_ID = "bluestack-es";
1973
2737
 
1974
2738
  export declare const DefaultCmsLink: ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement> & {
@@ -2099,7 +2863,31 @@ export declare const enMessages: {
2099
2863
  readonly new: "New";
2100
2864
  readonly language: "Language";
2101
2865
  readonly analytics: "Analytics";
2866
+ readonly preview: "Preview";
2102
2867
  readonly help: "Help";
2868
+ readonly publication: "Publication";
2869
+ };
2870
+ readonly newMenu: {
2871
+ readonly frequentsTitle: "Frequent";
2872
+ readonly othersTitle: "Others";
2873
+ readonly videosTitle: "Videos";
2874
+ readonly post: "New Post";
2875
+ readonly trivia: "New Trivia";
2876
+ readonly poll: "New Poll";
2877
+ readonly listicle: "New Listicle";
2878
+ readonly tag: "New Tag";
2879
+ readonly gamecast: "New Gamecast";
2880
+ readonly liveblog: "New LiveBlog";
2881
+ readonly aiPost: "New AI Post";
2882
+ readonly aiListicle: "New AI Listicle";
2883
+ readonly videoNative: "New Video Native";
2884
+ readonly videoEmbedded: "New Video Embedded";
2885
+ readonly videoYoutube: "New Video Youtube";
2886
+ };
2887
+ readonly previewMenu: {
2888
+ readonly desktop: "Preview Desktop";
2889
+ readonly mobile: "Preview Mobile";
2890
+ readonly tablet: "Preview Tablet";
2103
2891
  };
2104
2892
  readonly profileMenu: {
2105
2893
  readonly ariaLabel: "My profile";
@@ -2112,6 +2900,98 @@ export declare const enMessages: {
2112
2900
  readonly unreadCount: "{count} unread";
2113
2901
  readonly empty: "No notifications";
2114
2902
  readonly ariaLabel: "Notifications";
2903
+ readonly close: "Close";
2904
+ readonly today: "Today";
2905
+ readonly yesterday: "Yesterday";
2906
+ readonly assignedBefore: "You have";
2907
+ readonly assignedAfter: "new assigned topics.";
2908
+ readonly pendingBefore: "You have";
2909
+ readonly pendingAfter: "assigned topics about to expire.";
2910
+ readonly assignedToday: "Assigned today";
2911
+ readonly assignedYesterday: "Assigned yesterday";
2912
+ readonly assignedOn: "Assigned on";
2913
+ readonly expires: "Due";
2914
+ };
2915
+ readonly search: {
2916
+ readonly placeholder: "Search…";
2917
+ readonly inputAriaLabel: "Search";
2918
+ readonly clearAriaLabel: "Clear search";
2919
+ readonly advancedAriaLabel: "Advanced search";
2920
+ readonly title: "Advanced search";
2921
+ readonly apply: "Apply";
2922
+ readonly reset: "Reset";
2923
+ readonly close: "Close";
2924
+ readonly noOptions: "No matches";
2925
+ readonly dateToday: "Today";
2926
+ readonly dateClear: "Clear";
2927
+ readonly dateOpenAriaLabel: "Open calendar";
2928
+ readonly prevMonthAriaLabel: "Previous month";
2929
+ readonly nextMonthAriaLabel: "Next month";
2930
+ };
2931
+ readonly searchFields: {
2932
+ readonly text: "Text";
2933
+ readonly textPlaceholder: "Title, summary or body";
2934
+ readonly type: "Type";
2935
+ readonly typePlaceholder: "All types";
2936
+ readonly section: "Section";
2937
+ readonly sectionPlaceholder: "All sections";
2938
+ readonly category: "Category";
2939
+ readonly categoryPlaceholder: "All categories";
2940
+ readonly states: "Statuses";
2941
+ readonly statesPlaceholder: "All statuses";
2942
+ readonly creator: "Creator";
2943
+ readonly creatorPlaceholder: "Type to search a creator";
2944
+ readonly author: "Author";
2945
+ readonly authorPlaceholder: "Type to search an author";
2946
+ readonly tags: "Tags";
2947
+ readonly tagsPlaceholder: "Type and press Enter";
2948
+ readonly groups: "Groups";
2949
+ readonly groupsPlaceholder: "All groups";
2950
+ readonly amount: "Amount to show";
2951
+ readonly amountPlaceholder: "e.g. 50";
2952
+ readonly dateFrom: "Date from";
2953
+ readonly dateTo: "Date to";
2954
+ readonly sortBy: "Sort by";
2955
+ readonly sortByPlaceholder: "Relevance";
2956
+ readonly zone: "Zone";
2957
+ readonly zonePlaceholder: "Any zone";
2958
+ readonly priority: "Priority";
2959
+ readonly priorityPlaceholder: "All";
2960
+ readonly order: "Order";
2961
+ readonly orderPlaceholder: "Descending";
2962
+ readonly includeDrafts: "Include drafts";
2963
+ readonly includeHistory: "Include historical content";
2964
+ };
2965
+ readonly searchOptions: {
2966
+ readonly typeNews: "Article";
2967
+ readonly typeList: "List note";
2968
+ readonly typeLiveblog: "LiveBlog";
2969
+ readonly statePublished: "Published";
2970
+ readonly stateDraft: "In drafting";
2971
+ readonly stateScheduled: "Scheduled";
2972
+ readonly stateReview: "In review";
2973
+ readonly stateDone: "Finished";
2974
+ readonly sortRelevance: "Relevance";
2975
+ readonly sortDate: "Date";
2976
+ readonly sortTitle: "Title";
2977
+ readonly orderDesc: "Descending";
2978
+ readonly orderAsc: "Ascending";
2979
+ readonly priorityHigh: "High (1–10)";
2980
+ readonly priorityMid: "Medium (11–30)";
2981
+ readonly priorityLow: "Low (31+)";
2982
+ };
2983
+ readonly toast: {
2984
+ readonly close: "Close";
2985
+ readonly copyDetail: "Copy error detail";
2986
+ readonly copied: "Copied";
2987
+ readonly defaultSuccess: "Operation completed successfully.";
2988
+ readonly defaultError: "An error occurred in the service.";
2989
+ readonly defaultWarning: "Please review the request.";
2990
+ readonly defaultInfo: "Information";
2991
+ };
2992
+ readonly userAvatar: {
2993
+ readonly alt: "User avatar";
2994
+ readonly unknownUser: "Unknown user";
2115
2995
  };
2116
2996
  };
2117
2997
 
@@ -2167,7 +3047,31 @@ export declare const esMessages: {
2167
3047
  new: string;
2168
3048
  language: string;
2169
3049
  analytics: string;
3050
+ preview: string;
2170
3051
  help: string;
3052
+ publication: string;
3053
+ };
3054
+ newMenu: {
3055
+ frequentsTitle: string;
3056
+ othersTitle: string;
3057
+ videosTitle: string;
3058
+ post: string;
3059
+ trivia: string;
3060
+ poll: string;
3061
+ listicle: string;
3062
+ tag: string;
3063
+ gamecast: string;
3064
+ liveblog: string;
3065
+ aiPost: string;
3066
+ aiListicle: string;
3067
+ videoNative: string;
3068
+ videoEmbedded: string;
3069
+ videoYoutube: string;
3070
+ };
3071
+ previewMenu: {
3072
+ desktop: string;
3073
+ mobile: string;
3074
+ tablet: string;
2171
3075
  };
2172
3076
  profileMenu: {
2173
3077
  ariaLabel: string;
@@ -2180,6 +3084,98 @@ export declare const esMessages: {
2180
3084
  unreadCount: string;
2181
3085
  empty: string;
2182
3086
  ariaLabel: string;
3087
+ close: string;
3088
+ today: string;
3089
+ yesterday: string;
3090
+ assignedBefore: string;
3091
+ assignedAfter: string;
3092
+ pendingBefore: string;
3093
+ pendingAfter: string;
3094
+ assignedToday: string;
3095
+ assignedYesterday: string;
3096
+ assignedOn: string;
3097
+ expires: string;
3098
+ };
3099
+ search: {
3100
+ placeholder: string;
3101
+ inputAriaLabel: string;
3102
+ clearAriaLabel: string;
3103
+ advancedAriaLabel: string;
3104
+ title: string;
3105
+ apply: string;
3106
+ reset: string;
3107
+ close: string;
3108
+ noOptions: string;
3109
+ dateToday: string;
3110
+ dateClear: string;
3111
+ dateOpenAriaLabel: string;
3112
+ prevMonthAriaLabel: string;
3113
+ nextMonthAriaLabel: string;
3114
+ };
3115
+ searchFields: {
3116
+ text: string;
3117
+ textPlaceholder: string;
3118
+ type: string;
3119
+ typePlaceholder: string;
3120
+ section: string;
3121
+ sectionPlaceholder: string;
3122
+ category: string;
3123
+ categoryPlaceholder: string;
3124
+ states: string;
3125
+ statesPlaceholder: string;
3126
+ creator: string;
3127
+ creatorPlaceholder: string;
3128
+ author: string;
3129
+ authorPlaceholder: string;
3130
+ tags: string;
3131
+ tagsPlaceholder: string;
3132
+ groups: string;
3133
+ groupsPlaceholder: string;
3134
+ amount: string;
3135
+ amountPlaceholder: string;
3136
+ dateFrom: string;
3137
+ dateTo: string;
3138
+ sortBy: string;
3139
+ sortByPlaceholder: string;
3140
+ zone: string;
3141
+ zonePlaceholder: string;
3142
+ priority: string;
3143
+ priorityPlaceholder: string;
3144
+ order: string;
3145
+ orderPlaceholder: string;
3146
+ includeDrafts: string;
3147
+ includeHistory: string;
3148
+ };
3149
+ searchOptions: {
3150
+ typeNews: string;
3151
+ typeList: string;
3152
+ typeLiveblog: string;
3153
+ statePublished: string;
3154
+ stateDraft: string;
3155
+ stateScheduled: string;
3156
+ stateReview: string;
3157
+ stateDone: string;
3158
+ sortRelevance: string;
3159
+ sortDate: string;
3160
+ sortTitle: string;
3161
+ orderDesc: string;
3162
+ orderAsc: string;
3163
+ priorityHigh: string;
3164
+ priorityMid: string;
3165
+ priorityLow: string;
3166
+ };
3167
+ toast: {
3168
+ close: string;
3169
+ copyDetail: string;
3170
+ copied: string;
3171
+ defaultSuccess: string;
3172
+ defaultError: string;
3173
+ defaultWarning: string;
3174
+ defaultInfo: string;
3175
+ };
3176
+ userAvatar: {
3177
+ alt: string;
3178
+ unknownUser: string;
2183
3179
  };
2184
3180
  };
2185
3181
 
@@ -2221,32 +3217,226 @@ export declare interface EventsGetFilters {
2221
3217
  position?: string;
2222
3218
  }
2223
3219
 
2224
- /** Cuerpo de la respuesta de POST /events/get. */
2225
- export declare interface EventsGetResponse extends CmsResponse {
2226
- /** Colección de eventos que cumplen los filtros. */
2227
- events: CmsEvent[];
2228
- total?: number;
2229
- [key: string]: unknown;
2230
- }
3220
+ /** Cuerpo de la respuesta de POST /events/get. */
3221
+ export declare interface EventsGetResponse extends CmsResponse {
3222
+ /** Colección de eventos que cumplen los filtros. */
3223
+ events: CmsEvent[];
3224
+ total?: number;
3225
+ [key: string]: unknown;
3226
+ }
3227
+
3228
+ /** Archivo del VFS devuelto por POST /fileExplorer/getFiles. */
3229
+ export declare interface ExplorerFile {
3230
+ path?: string;
3231
+ name?: string;
3232
+ title?: string;
3233
+ /** Tipo de recurso (ej. "image", "plain"). */
3234
+ type?: string;
3235
+ /** Fecha de última modificación (ej. "10/06/2024 03:45"). */
3236
+ dateLastModified?: string;
3237
+ [key: string]: unknown;
3238
+ }
3239
+
3240
+ /** Carpeta del VFS devuelta por POST /fileExplorer/getFolders. */
3241
+ export declare interface ExplorerFolder {
3242
+ path?: string;
3243
+ name?: string;
3244
+ [key: string]: unknown;
3245
+ }
3246
+
3247
+ export declare type FeedbackBadgeColors = typeof feedbackBadgeColors;
3248
+
3249
+ /**
3250
+ * Colores del círculo de ícono del toast por severidad. `bg` = fondo del
3251
+ * círculo; `on` = color del ícono. Contenedores tonales claros con ícono
3252
+ * oscuro (misma familia que Material 3), legibles sobre la superficie oscura.
3253
+ */
3254
+ export declare const feedbackBadgeColors: {
3255
+ /** Éxito: círculo verde menta con check verde oscuro. */
3256
+ readonly success: {
3257
+ readonly bg: "#92F7B7";
3258
+ readonly on: "#002112";
3259
+ };
3260
+ /** Advertencia: círculo ámbar con ícono marrón. */
3261
+ readonly warning: {
3262
+ readonly bg: "#FFDDB0";
3263
+ readonly on: "#5F4200";
3264
+ };
3265
+ /** Error: círculo rosado con ícono rojo oscuro. */
3266
+ readonly error: {
3267
+ readonly bg: "#FFDAD6";
3268
+ readonly on: "#93000A";
3269
+ };
3270
+ /** Info: círculo azul tonal con ícono azul oscuro. */
3271
+ readonly info: {
3272
+ readonly bg: "#D8E2FF";
3273
+ readonly on: "#001551";
3274
+ };
3275
+ };
3276
+
3277
+ export declare type FeedbackColors = typeof feedbackColors;
3278
+
3279
+ /**
3280
+ * Colores de feedback de operaciones (toasts/notificaciones).
3281
+ *
3282
+ * El toast usa una superficie oscura (estilo de diseño del CMS) con texto
3283
+ * claro y un ícono de acento por severidad. Los acentos replican los del
3284
+ * Angular legacy (`cmsmedios-ux`): éxito verde, advertencia ámbar, error rojo.
3285
+ */
3286
+ export declare const feedbackColors: {
3287
+ /** Fondo oscuro del toast (común a todas las severidades). */
3288
+ readonly surface: "#2E2E2E";
3289
+ /** Texto/íconos sobre la superficie oscura. */
3290
+ readonly onSurface: "#FFFFFF";
3291
+ /** Texto secundario (detalle, url, versión) sobre la superficie oscura. */
3292
+ readonly onSurfaceMuted: "#C7C7C7";
3293
+ /** Acento de éxito (verde). */
3294
+ readonly success: "#00C853";
3295
+ /** Acento de advertencia (ámbar). */
3296
+ readonly warning: "#FFAB00";
3297
+ /** Acento de error (rojo). */
3298
+ readonly error: "#FF1744";
3299
+ /** Acento informativo (azul). */
3300
+ readonly info: "#2196F3";
3301
+ /** Enlace (url del recurso) sobre la superficie oscura del toast. */
3302
+ readonly link: "#9ECAFF";
3303
+ /** Fondo sutil del detalle crudo del servidor del toast de error. */
3304
+ readonly overlay: "#3B3B3B";
3305
+ /** Texto atenuado del toast de error (descripción, chip de versión, fecha). */
3306
+ readonly onSurfaceSoft: "#F0F0F7";
3307
+ /** Fondo del chip de versión (blanco translúcido sobre la superficie oscura). */
3308
+ readonly versionChipBg: "#F0F0F71A";
3309
+ /** Punto separador entre versión y fecha (blanco translúcido). */
3310
+ readonly separator: "#F0F0F7B3";
3311
+ };
3312
+
3313
+ /**
3314
+ * Configuración de un campo del formulario de búsqueda avanzada.
3315
+ * Unión discriminada por `kind`: el contenedor renderiza el componente de campo
3316
+ * que corresponda. Así un gestor "arma" su modal pasando solo los campos que
3317
+ * necesita (`fields: FieldConfig[]`).
3318
+ */
3319
+ export declare type FieldConfig = TextFieldConfig | NumberFieldConfig | DateFieldConfig | SelectFieldConfig | MultiSelectFieldConfig | ComboboxFieldConfig | TagsFieldConfig | CheckboxFieldConfig;
3320
+
3321
+ /** Tipos de campo soportados por el contenedor de búsqueda avanzada. */
3322
+ export declare type FieldKind = 'text' | 'number' | 'date' | 'select' | 'multiselect' | 'combobox' | 'tags' | 'checkbox';
3323
+
3324
+ /**
3325
+ * Opción de un campo con opciones (select / combobox / multiselect).
3326
+ * Mismo formato que el resto de la librería: `value` se compara/emite y `label`
3327
+ * es el texto (ya traducido) a mostrar.
3328
+ */
3329
+ export declare type FieldOption = {
3330
+ /** Valor que se emite y se compara. */
3331
+ value: string;
3332
+ /** Texto o nodo (ya traducido) a mostrar. */
3333
+ label: ReactNode;
3334
+ /** Si es `false` la opción no se renderiza. Por defecto `true`. */
3335
+ show?: boolean;
3336
+ /** Deshabilita la opción individual. */
3337
+ disabled?: boolean;
3338
+ /**
3339
+ * Color del puntito que precede a la opción (multiselección). Si se omite, la
3340
+ * opción no muestra puntito. Útil para estados con color.
3341
+ */
3342
+ color?: string;
3343
+ };
3344
+
3345
+ /**
3346
+ * Renderiza el componente de campo que corresponde a una `FieldConfig`,
3347
+ * resolviendo el tipo de valor por cada `kind`. Es el puente entre la
3348
+ * configuración declarativa del modal y los componentes de campo concretos.
3349
+ */
3350
+ export declare function FieldRenderer({ field, value, onChange }: FieldRendererProps): JSX.Element | null;
3351
+
3352
+ export declare type FieldRendererProps = {
3353
+ /** Configuración del campo a renderizar. */
3354
+ field: FieldConfig;
3355
+ /** Valor actual del campo. */
3356
+ value: FieldValue | undefined;
3357
+ /** Callback con el nuevo valor del campo. */
3358
+ onChange: (value: FieldValue) => void;
3359
+ };
3360
+
3361
+ /**
3362
+ * Envoltorio común de un campo: etiqueta arriba + control + ayuda abajo.
3363
+ *
3364
+ * Centraliza la disposición vertical y la tipografía de la etiqueta para que
3365
+ * todos los campos del CMS se vean idénticos. Se exporta para poder construir
3366
+ * campos a medida que respeten el mismo layout.
3367
+ */
3368
+ export declare function FieldShell({ label, htmlFor, hint, children }: FieldShellProps): JSX.Element;
3369
+
3370
+ export declare type FieldShellProps = {
3371
+ /** Etiqueta superior (ya traducida). Si se omite no se renderiza. */
3372
+ label?: ReactNode;
3373
+ /** `htmlFor` para asociar la etiqueta al control. */
3374
+ htmlFor?: string;
3375
+ /** Texto de ayuda bajo el control. */
3376
+ hint?: ReactNode;
3377
+ /** El control del campo. */
3378
+ children: ReactNode;
3379
+ };
2231
3380
 
2232
- /** Archivo del VFS devuelto por POST /fileExplorer/getFiles. */
2233
- export declare interface ExplorerFile {
2234
- path?: string;
2235
- name?: string;
2236
- title?: string;
2237
- /** Tipo de recurso (ej. "image", "plain"). */
2238
- type?: string;
2239
- /** Fecha de última modificación (ej. "10/06/2024 03:45"). */
2240
- dateLastModified?: string;
2241
- [key: string]: unknown;
2242
- }
3381
+ /**
3382
+ * Estilos compartidos de los campos de formulario del CMS.
3383
+ *
3384
+ * Replican la estética "Material 3 standard" del diseño de referencia
3385
+ * (etiqueta arriba en gris, control con subrayado inferior; el subrayado pasa a
3386
+ * `primary` al enfocar). Viven juntos para que todos los campos
3387
+ * (`CmsTextField`, `CmsSelectField`, etc.) compartan exactamente el mismo look y
3388
+ * puedan reutilizarse en cualquier formulario de cualquier gestor.
3389
+ */
3390
+ export declare const fieldStyles: {
3391
+ /** Contenedor vertical: etiqueta + control + ayuda. */
3392
+ sxField: SxProps<Theme>;
3393
+ /** Etiqueta superior (gris, label-medium). */
3394
+ sxLabel: SxProps<Theme>;
3395
+ /** Texto de ayuda bajo el control. */
3396
+ sxHint: SxProps<Theme>;
3397
+ /**
3398
+ * `sx` para los controles basados en `TextField variant="standard"`
3399
+ * (texto, número, fecha, select) y para el `renderInput` de los
3400
+ * `Autocomplete` (combobox, tags, multiselect). Unifica subrayado,
3401
+ * tipografía y color del placeholder.
3402
+ */
3403
+ sxStandard: SxProps<Theme>;
3404
+ /**
3405
+ * Chips de los campos multiselección / etiquetas: fondo secundario, texto
3406
+ * sobre contenedor secundario y radio "redondo cuadrado".
3407
+ */
3408
+ sxChip: SxProps<Theme>;
3409
+ /** Paper del desplegable de los `Autocomplete` (con aire vertical). */
3410
+ sxAutocompletePaper: SxProps<Theme>;
3411
+ /**
3412
+ * Listbox de los `Autocomplete`: opciones "embutidas" (con aire lateral y
3413
+ * radio), hover en `secondaryHover` y opción activa en `secondary`.
3414
+ */
3415
+ sxAutocompleteListbox: SxProps<Theme>;
3416
+ /**
3417
+ * Paper del menú de `CmsSelectField`. Con padding propio para que las opciones
3418
+ * queden "embutidas" (hay aire entre el borde del contenedor y el resaltado de
3419
+ * cada opción), igual que el diseño de referencia.
3420
+ */
3421
+ sxSelectMenuPaper: SxProps<Theme>;
3422
+ /** Lista del menú del select (sin padding; el aire lo pone el paper). */
3423
+ sxSelectList: SxProps<Theme>;
3424
+ /**
3425
+ * Opción del menú del select: redondeada, hover en `secondaryHover`, activa en
3426
+ * `secondary` (y su hover también `secondaryHover`). El check va a la derecha.
3427
+ */
3428
+ sxSelectItem: SxProps<Theme>;
3429
+ /** Check de la opción activa del select. */
3430
+ sxSelectCheck: SxProps<Theme>;
3431
+ /** Etiqueta del checkbox (alineada al control). */
3432
+ sxCheckboxLabel: SxProps<Theme>;
3433
+ };
2243
3434
 
2244
- /** Carpeta del VFS devuelta por POST /fileExplorer/getFolders. */
2245
- export declare interface ExplorerFolder {
2246
- path?: string;
2247
- name?: string;
2248
- [key: string]: unknown;
2249
- }
3435
+ /** Valor que puede contener un campo del formulario de búsqueda. */
3436
+ export declare type FieldValue = string | string[] | boolean;
3437
+
3438
+ /** Mapa `nombre del campo` → `valor`. Es lo que emite el modal al aplicar. */
3439
+ export declare type FieldValues = Record<string, FieldValue>;
2250
3440
 
2251
3441
  /** Cuerpo de la respuesta de POST /fileExplorer/getFiles. */
2252
3442
  export declare interface FileExplorerGetFilesResponse extends CmsResponse {
@@ -2264,8 +3454,41 @@ export declare function findPublicationBySlug(sites: SiteSection[], slug: string
2264
3454
 
2265
3455
  export declare function findPublicationLabel(sites: SiteSection[], publicationId: string): string;
2266
3456
 
3457
+ /**
3458
+ * Familias tipográficas del CMS. `roboto` = texto general (default del theme);
3459
+ * `productSans` = marca / títulos. Las `@font-face` que las cargan viven en
3460
+ * `theme/fonts.ts` y se inyectan vía el provider MUI. Usar estas variables en
3461
+ * lugar de strings sueltos (mismo criterio que con los colores).
3462
+ */
3463
+ export declare const fontFamilies: {
3464
+ readonly roboto: "\"Roboto\",\"Helvetica\",\"Arial\",sans-serif";
3465
+ readonly productSans: "\"Product Sans\",\"Roboto\",\"Helvetica\",\"Arial\",sans-serif";
3466
+ /** Monoespaciada (url del toast de error, fragmentos de código). */
3467
+ readonly mono: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
3468
+ };
3469
+
3470
+ /**
3471
+ * Formatea un instante (epoch ms) en la zona horaria del sitio, de forma
3472
+ * estable entre navegadores.
3473
+ *
3474
+ * @param epochMs Instante en milisegundos (UTC).
3475
+ * @param gmtRedaction Offset GMT de la publicación.
3476
+ * @param localeTag Tag BCP 47 (p. ej. `"es-AR"`); usar `getIntlLocaleTag(locale)`.
3477
+ * @param options Opciones de `Intl.DateTimeFormat` (se fuerza `timeZone: 'UTC'`).
3478
+ */
3479
+ export declare function formatSiteDateTime(epochMs: number, gmtRedaction: string | null | undefined, localeTag: string, options?: Intl.DateTimeFormatOptions): string;
3480
+
2267
3481
  export declare function getAllPublications(sites: SiteSection[]): Publication[];
2268
3482
 
3483
+ /**
3484
+ * Resuelve el mensaje legible de un código de error en el idioma indicado.
3485
+ * Aplica el fallback legacy `código → código+'a'` (p. ej. `999.002` → `999.002a`)
3486
+ * y, si el idioma no tiene el código, cae a inglés. Devuelve `undefined` si el
3487
+ * código es desconocido (el caller debe usar entonces el `error` crudo o un
3488
+ * mensaje genérico).
3489
+ */
3490
+ export declare function getCommonError(errorCode: string | number | Array<string | number> | null | undefined, locale?: Locale): string | undefined;
3491
+
2269
3492
  export declare function getDefaultPublicationSlug(sites: SiteSection[]): string;
2270
3493
 
2271
3494
  /** BCP 47 tag for `Intl` / `toLocaleString` formatting. */
@@ -2275,6 +3498,16 @@ export declare function getProfileAvatarSrc(profile: ProfileGetResponse, options
2275
3498
 
2276
3499
  export declare function getProfileDisplayName(profile: ProfileGetResponse): string;
2277
3500
 
3501
+ /**
3502
+ * Hora actual del sitio (equivalente al `getFormattedRedactionTimeUTC` del CMS
3503
+ * Angular): "ahora" formateado en la zona de redacción de la publicación.
3504
+ *
3505
+ * @param gmtRedaction Offset GMT de la publicación.
3506
+ * @param localeTag Tag BCP 47 (p. ej. `"es-AR"`).
3507
+ * @param options Opciones de `Intl.DateTimeFormat`.
3508
+ */
3509
+ export declare function getSiteNow(gmtRedaction: string | null | undefined, localeTag: string, options?: Intl.DateTimeFormatOptions): string;
3510
+
2278
3511
  declare interface IAudiosServices {
2279
3512
  axiosApi: AxiosInstance;
2280
3513
  authentication: Authentication;
@@ -2584,6 +3817,19 @@ declare interface INotificationServices {
2584
3817
  authentication: Authentication;
2585
3818
  }
2586
3819
 
3820
+ export declare type InterestColors = typeof interestColors;
3821
+
3822
+ /**
3823
+ * Feedback de interés del usuario sobre un ítem (me gusta / no me gusta).
3824
+ * Tonos semánticos; los fondos de hover se derivan con `alpha()` en el `sx`.
3825
+ */
3826
+ export declare const interestColors: {
3827
+ /** Me gusta (verde). */
3828
+ readonly like: "#1E8E3E";
3829
+ /** No me gusta (rojo). */
3830
+ readonly dislike: "#D93025";
3831
+ };
3832
+
2587
3833
  declare interface IPeopleServices {
2588
3834
  axiosApi: AxiosInstance;
2589
3835
  authentication: Authentication;
@@ -2634,6 +3880,22 @@ declare interface ISitesServices {
2634
3880
  authentication: Authentication;
2635
3881
  }
2636
3882
 
3883
+ /**
3884
+ * Decide si un ítem es visible según los permisos de operación del usuario.
3885
+ *
3886
+ * - Si `operationPermissions` es `undefined`, no hay gating (se muestra todo);
3887
+ * útil para maquetado/mock antes de cablear `/auth/permissions`.
3888
+ * - Si el usuario es admin, ve todo.
3889
+ * - Si el ítem no declara permiso, se muestra.
3890
+ * - Con un array de permisos, se exigen todos.
3891
+ *
3892
+ * @param item - Ítem a evaluar.
3893
+ * @param operationPermissions - Nombres de operaciones concedidas al usuario.
3894
+ * @param isAdmin - Si el usuario es administrador.
3895
+ * @returns `true` si el ítem debe mostrarse.
3896
+ */
3897
+ export declare function isNewContentItemVisible(item: NewContentItem, operationPermissions: string[] | undefined, isAdmin: boolean | undefined): boolean;
3898
+
2637
3899
  declare interface ITagsServices {
2638
3900
  axiosApi: AxiosInstance;
2639
3901
  authentication: Authentication;
@@ -2683,6 +3945,35 @@ declare interface IZonesServices {
2683
3945
  authentication: Authentication;
2684
3946
  }
2685
3947
 
3948
+ /** Parámetros de dispositivo para la previsualización (protocolo/queryString). */
3949
+ export declare type LegacyAdminDevice = {
3950
+ /** `'https'` (por defecto) o `'http'`. */
3951
+ protocol?: string;
3952
+ /** QueryString específico del formato de preview (viene del backend). */
3953
+ queryString?: string;
3954
+ };
3955
+
3956
+ /**
3957
+ * Redirección al admin viejo del CMS (JSP) replicando el `openExternalPage()` de
3958
+ * cmsmedios-ux: en vez de un enlace, se arma y envía un formulario POST oculto
3959
+ * al endpoint `auth/adminBack/login`, que re-establece la sesión en la pestaña
3960
+ * nueva y luego redirige a la ruta pedida (campo `r`).
3961
+ *
3962
+ * Es código de navegador (usa `document`): debe llamarse desde un handler de
3963
+ * cliente, no en SSR.
3964
+ */
3965
+ /** Datos de sesión que el form POST envía al admin viejo. */
3966
+ export declare type LegacyAdminSession = {
3967
+ /** Token de autenticación (se envía en base64, igual que el Angular legacy). */
3968
+ token: string;
3969
+ browserId: string;
3970
+ siteName: string;
3971
+ publication: string | number;
3972
+ userName: string;
3973
+ /** Proyecto del CMS. Por defecto `'Offline'`. */
3974
+ project?: string;
3975
+ };
3976
+
2686
3977
  export declare const LIB_VERSION: "0.0.0";
2687
3978
 
2688
3979
  export declare type Locale = (typeof SUPPORTED_LOCALES)[number];
@@ -2696,6 +3987,13 @@ declare type MenuOrigin = {
2696
3987
  horizontal: 'left' | 'center' | 'right';
2697
3988
  };
2698
3989
 
3990
+ /**
3991
+ * Resuelve el árbol de mensajes del gestor para el locale activo, usando `en`
3992
+ * como fallback (igual criterio que `mergeMessages`). Devuelve `{}` si no se
3993
+ * pasó catálogo del gestor.
3994
+ */
3995
+ export declare function mergeAppMessages(locale: Locale, appCatalog?: AppLocaleCatalog): AppMessages;
3996
+
2699
3997
  /** Deep-merge custom overrides on top of the locale catalog entry. */
2700
3998
  export declare function mergeMessages(locale: Locale, catalog: LocaleCatalog, overrides?: CmsMessagesOverride): CmsMessages;
2701
3999
 
@@ -2704,6 +4002,11 @@ export declare interface ModulesAvailableResponse {
2704
4002
  modules: NavItemPermissions[];
2705
4003
  }
2706
4004
 
4005
+ export declare type MultiSelectFieldConfig = BaseFieldConfig & {
4006
+ kind: 'multiselect';
4007
+ options: FieldOption[];
4008
+ };
4009
+
2707
4010
  export declare type NavBlock = NavLinkItem;
2708
4011
 
2709
4012
  export declare type NavigationModule = keyof CmsMessages['navigation'];
@@ -2725,6 +4028,68 @@ export declare type NavLinkItem = {
2725
4028
  defaultOpen?: boolean;
2726
4029
  };
2727
4030
 
4031
+ /** Columna del menú "Nuevo" (Frecuentes / Otros / Videos). */
4032
+ export declare type NewContentGroup = {
4033
+ /** Clave i18n del título de la columna (namespace `newMenu`). */
4034
+ titleKey: NewMenuMessageKey;
4035
+ items: NewContentItem[];
4036
+ };
4037
+
4038
+ /**
4039
+ * Ítem del menú "Nuevo" (botón "+"). Replica la estructura del header del CMS
4040
+ * Angular legacy (`newContent` de cmsmedios): cada ítem declara su clave i18n y
4041
+ * el/los permiso(s) de operación que habilitan su visibilidad.
4042
+ */
4043
+ export declare type NewContentItem = {
4044
+ /** Identificador estable; lo recibe `onNewContentSelect` al hacer clic. */
4045
+ id: string;
4046
+ /** Clave i18n del namespace `newMenu`. */
4047
+ labelKey: NewMenuMessageKey;
4048
+ /**
4049
+ * Permiso(s) de operación requeridos (p. ej. `NEWS_CREATE`). Si es un array,
4050
+ * se exigen TODOS (criterio NAA-4038 del Angular legacy). Si se omite, el ítem
4051
+ * no requiere permiso.
4052
+ */
4053
+ permission?: string | string[];
4054
+ };
4055
+
4056
+ /**
4057
+ * Menú desplegable del botón "Nuevo" (+) del header. Replica las tres columnas
4058
+ * del header de cmsmedios (Frecuentes / Otros / Videos) con visibilidad por
4059
+ * permisos. El comportamiento de cada ítem lo resuelve el gestor.
4060
+ */
4061
+ export declare function NewContentMenu({ groups, operationPermissions, isAdmin, legacyBaseUrl, getRedirectPath, onSelect, }: NewContentMenuProps): JSX.Element;
4062
+
4063
+ export declare type NewContentMenuProps = {
4064
+ /** Columnas e ítems del menú. Por defecto, la estructura del CMS legacy. */
4065
+ groups?: NewContentGroup[];
4066
+ /**
4067
+ * Nombres de operaciones concedidas al usuario (de `POST /auth/permissions`).
4068
+ * Si se omite, no hay filtrado por permisos (se muestran todos los ítems).
4069
+ */
4070
+ operationPermissions?: string[];
4071
+ /** Si el usuario es administrador (ve todos los ítems). */
4072
+ isAdmin?: boolean;
4073
+ /**
4074
+ * Dominio del deploy nuevo (master) al que se redirige, p. ej.
4075
+ * `https://master.d1c5iid93veq15.amplifyapp.com`. Se navega a
4076
+ * `<legacyBaseUrl><getRedirectPath(id)>` en una pestaña nueva.
4077
+ */
4078
+ legacyBaseUrl?: string;
4079
+ /**
4080
+ * Ruta/parámetro por ítem que se concatena a `legacyBaseUrl`. Por defecto
4081
+ * `/?new=<id>`: el deploy destino lee `new` y dispara la creación.
4082
+ */
4083
+ getRedirectPath?: (itemId: string) => string;
4084
+ /**
4085
+ * Fallback cuando no hay `legacyBaseUrl`: se invoca con el `id` del ítem
4086
+ * (punto de integración para maquetado).
4087
+ */
4088
+ onSelect?: (itemId: string) => void;
4089
+ };
4090
+
4091
+ export declare type NewMenuMessageKey = keyof CmsMessages['newMenu'];
4092
+
2728
4093
  /** Cuerpo de la respuesta de POST /news/edit/adminNewsConfiguration. */
2729
4094
  export declare interface NewsAdminConfigurationResponse extends CmsResponse {
2730
4095
  [key: string]: unknown;
@@ -3182,6 +4547,13 @@ export declare type NextCmsMuiProviderProps = {
3182
4547
  children: ReactNode;
3183
4548
  };
3184
4549
 
4550
+ /**
4551
+ * Normaliza un `errorCode` que puede venir como string, número o array (el CMS
4552
+ * devuelve un array de códigos cuando hay varias violaciones de contraseña).
4553
+ * Devuelve el primer código no vacío.
4554
+ */
4555
+ export declare function normalizeErrorCode(errorCode: string | number | Array<string | number> | null | undefined): string | undefined;
4556
+
3185
4557
  /** Normaliza códigos BCP 47 o variantes (`es-MX`, `pt_BR`) al `Locale` soportado. */
3186
4558
  export declare function normalizeLocale(value?: string | null): Locale;
3187
4559
 
@@ -3193,6 +4565,34 @@ export declare interface NotificationAdminConfigurationResponse extends CmsRespo
3193
4565
  types?: NotificationSendType[];
3194
4566
  }
3195
4567
 
4568
+ export declare type NotificationColors = typeof notificationColors;
4569
+
4570
+ /**
4571
+ * Colores del avatar de ícono de cada tarjeta del centro de notificaciones
4572
+ * (campanita del TopBar). `bg` = fondo del contenedor cuadrado; `on` =
4573
+ * color del ícono. Replican los del centro de notificaciones del diseño
4574
+ * (mockup "Gestión de Noticias"): temas asignados en azul (misma familia
4575
+ * secundaria), actividades por vencer en naranja y notificaciones de sistema
4576
+ * (videos) en verde. Semánticos y reutilizables por cualquier gestor.
4577
+ */
4578
+ export declare const notificationColors: {
4579
+ /** Temas asignados (azul): mismo contenedor secundario que los chips activos. */
4580
+ readonly assigned: {
4581
+ readonly bg: "#D8E2FF";
4582
+ readonly on: "#2C4678";
4583
+ };
4584
+ /** Actividades por vencer (naranja). El `on` se reutiliza para la fecha de vencimiento. */
4585
+ readonly pending: {
4586
+ readonly bg: "#FFE2D5";
4587
+ readonly on: "#B3300A";
4588
+ };
4589
+ /** Notificaciones del sistema / videos (verde). */
4590
+ readonly system: {
4591
+ readonly bg: "#DCEFE0";
4592
+ readonly on: "#11663B";
4593
+ };
4594
+ };
4595
+
3196
4596
  /** Topic devuelto por notification/adminConfiguration (`{ name, value }`). */
3197
4597
  export declare interface NotificationConfigTopic {
3198
4598
  name: string;
@@ -3235,13 +4635,21 @@ export declare interface NotificationsListResponse {
3235
4635
  total?: number;
3236
4636
  }
3237
4637
 
3238
- export declare function NotificationsMenu({ unreadCount, notifications, }: NotificationsMenuProps): JSX.Element;
4638
+ export declare function NotificationsMenu({ unreadCount, notificationsData, masterBaseUrl, currentPublicationId, gmtRedaction, }: NotificationsMenuProps): JSX.Element;
3239
4639
 
3240
4640
  export declare type NotificationsMenuMessageKey = keyof CmsMessages['notificationsMenu'];
3241
4641
 
3242
4642
  export declare type NotificationsMenuProps = {
4643
+ /** Total de no leídas (badge de la campanita). */
3243
4644
  unreadCount: number;
3244
- notifications: DashboardNotification[];
4645
+ /** Respuesta cruda de `POST /dashboard/notification` (newsTask/expireTask/videos). */
4646
+ notificationsData?: DashboardNotificationsResponse | null;
4647
+ /** Dominio de `master` (Angular) para la redirección de los temas. */
4648
+ masterBaseUrl?: string;
4649
+ /** Id de la publicación activa (fallback de la redirección). */
4650
+ currentPublicationId?: number | string;
4651
+ /** Offset GMT de la publicación (para mostrar las fechas en zona de redacción). */
4652
+ gmtRedaction?: string | null;
3245
4653
  };
3246
4654
 
3247
4655
  /** Topic devuelto por notification/topics (`{ name, description }`). */
@@ -3256,6 +4664,49 @@ export declare interface NotificationTopicsResponse extends CmsResponse {
3256
4664
  topics?: NotificationTopic[];
3257
4665
  }
3258
4666
 
4667
+ /** Opciones del atajo `notifyCmsResponse`. */
4668
+ export declare interface NotifyCmsResponseOptions {
4669
+ /** URL del servicio invocado (para el detalle del error). */
4670
+ service?: string;
4671
+ /** Parámetros enviados al servicio (para el detalle del error). */
4672
+ params?: unknown;
4673
+ /** Mensaje a mostrar cuando `status === 'ok'`. Default: i18n `toast.defaultSuccess`. */
4674
+ successMessage?: string;
4675
+ /** Título del toast de éxito. */
4676
+ successTitle?: string;
4677
+ }
4678
+
4679
+ export declare type NumberFieldConfig = BaseFieldConfig & {
4680
+ kind: 'number';
4681
+ min?: number;
4682
+ max?: number;
4683
+ };
4684
+
4685
+ /**
4686
+ * Utilidades de hora del sitio (zona de redacción de la publicación).
4687
+ *
4688
+ * El backend entrega en cada `Publication` un offset GMT fijo
4689
+ * (`gmtRedaction`, p. ej. `"-3"` / `"+0"`) — NO una zona IANA. Por eso la
4690
+ * conversión se hace con un offset fijo y no contempla horario de verano
4691
+ * (DST). Es el equivalente, en React, de lo que en el CMS Angular hacía
4692
+ * `settings.service` (`getFormattedRedactionTimeStamp` /
4693
+ * `getFormattedRedactionTimeUTC`).
4694
+ *
4695
+ * El criterio: un timestamp del CMS es un instante en UTC (epoch ms). Para
4696
+ * mostrarlo "como lo ve la redacción" se desplaza el instante por el offset y
4697
+ * se formatea en `timeZone: 'UTC'`, de modo que el resultado es estable e
4698
+ * independiente de la zona horaria del navegador.
4699
+ */
4700
+ /**
4701
+ * Convierte el offset GMT de una publicación a minutos.
4702
+ * Acepta `"-3"`, `"+3"`, `"3"`, `"+5:30"`, tolera prefijos `GMT`/`UTC` y
4703
+ * espacios. Si el valor no es interpretable, devuelve `0` (UTC).
4704
+ *
4705
+ * @param gmt Offset tal como llega en `Publication.gmtRedaction`.
4706
+ * @returns Offset en minutos respecto de UTC (negativo al oeste de Greenwich).
4707
+ */
4708
+ export declare function parseGmtOffsetMinutes(gmt: string | null | undefined): number;
4709
+
3259
4710
  export declare function parsePublicationSlug(slug: string): number;
3260
4711
 
3261
4712
  /** Filtros de POST /contributions/paymentGateways/get. */
@@ -3648,6 +5099,52 @@ export declare interface PollUnpublishResponse extends CmsResponse {
3648
5099
  [key: string]: unknown;
3649
5100
  }
3650
5101
 
5102
+ /**
5103
+ * Formato de previsualización (Desktop / Mobile / Tablet…). En el CMS legacy la
5104
+ * lista es dinámica (`POST /news/previewFormats`); acá se reciben por props.
5105
+ */
5106
+ export declare type PreviewFormat = {
5107
+ /** Identificador estable; lo recibe `onSelect` al hacer clic. */
5108
+ id: string;
5109
+ /** Clave i18n del namespace `previewMenu` (cuando el texto es conocido). */
5110
+ labelKey?: PreviewMenuMessageKey;
5111
+ /** Texto ya resuelto (cuando el nombre viene dinámico del backend). */
5112
+ label?: string;
5113
+ /**
5114
+ * Ruta de preview de la publicación (campo `r` del form), p. ej.
5115
+ * `/sites/<sitio>/index.html`. Viene de `POST /news/previewFormats`. Si está
5116
+ * presente (con sesión), el clic redirige al admin viejo; si no, usa `onSelect`.
5117
+ */
5118
+ path?: string;
5119
+ /** QueryString del dispositivo (de `POST /news/previewFormats`). */
5120
+ queryString?: string;
5121
+ /** Protocolo del preview (`'https'` por defecto). */
5122
+ protocol?: string;
5123
+ };
5124
+
5125
+ /**
5126
+ * Menú desplegable del botón de previsualización (icono de dispositivos) del
5127
+ * header. Usa el `SimpleDropdown` de la lib. Igual que en cmsmedios, solo se
5128
+ * renderiza si hay al menos un formato disponible.
5129
+ */
5130
+ export declare function PreviewMenu({ formats, cmsBaseUrl, legacySession, onSelect, }: PreviewMenuProps): JSX.Element | null;
5131
+
5132
+ export declare type PreviewMenuMessageKey = keyof CmsMessages['previewMenu'];
5133
+
5134
+ export declare type PreviewMenuProps = {
5135
+ /** Formatos de preview. Por defecto, Desktop / Mobile / Tablet. */
5136
+ formats?: PreviewFormat[];
5137
+ /** Origen del CMS (JSP) para el redirect al admin viejo. */
5138
+ cmsBaseUrl?: string;
5139
+ /** Sesión para el form POST del redirect (token, sitio, etc.). */
5140
+ legacySession?: LegacyAdminSession;
5141
+ /**
5142
+ * Punto de integración: se invoca con el `id` del formato cuando no se puede
5143
+ * redirigir directo (falta `path`/sesión). El gestor arma la URL y redirige.
5144
+ */
5145
+ onSelect?: (formatId: string) => void;
5146
+ };
5147
+
3651
5148
  /** Plan de productividad. La forma exacta depende del recurso y del formato pedido. */
3652
5149
  export declare interface ProductivityPlan {
3653
5150
  [key: string]: unknown;
@@ -3975,13 +5472,15 @@ export declare interface ProfileGetResponse {
3975
5472
  documentation: unknown[];
3976
5473
  }
3977
5474
 
3978
- export declare function ProfileMenu({ profile, avatarOptions }: ProfileMenuProps): JSX.Element;
5475
+ export declare function ProfileMenu({ profile, avatarOptions, legacyBaseUrl, }: ProfileMenuProps): JSX.Element;
3979
5476
 
3980
5477
  export declare type ProfileMenuMessageKey = keyof CmsMessages['profileMenu'];
3981
5478
 
3982
5479
  export declare type ProfileMenuProps = {
3983
5480
  profile: ProfileGetResponse;
3984
5481
  avatarOptions?: ProfileAvatarOptions;
5482
+ /** Dominio del CMS Angular legacy para "Mi Perfil" / "Vista Webmaster". */
5483
+ legacyBaseUrl?: string;
3985
5484
  };
3986
5485
 
3987
5486
  /** Cuerpo de la respuesta de POST /profile/moduleAlerts/hide. */
@@ -4101,7 +5600,31 @@ export declare const ptMessages: {
4101
5600
  new: string;
4102
5601
  language: string;
4103
5602
  analytics: string;
5603
+ preview: string;
4104
5604
  help: string;
5605
+ publication: string;
5606
+ };
5607
+ newMenu: {
5608
+ frequentsTitle: string;
5609
+ othersTitle: string;
5610
+ videosTitle: string;
5611
+ post: string;
5612
+ trivia: string;
5613
+ poll: string;
5614
+ listicle: string;
5615
+ tag: string;
5616
+ gamecast: string;
5617
+ liveblog: string;
5618
+ aiPost: string;
5619
+ aiListicle: string;
5620
+ videoNative: string;
5621
+ videoEmbedded: string;
5622
+ videoYoutube: string;
5623
+ };
5624
+ previewMenu: {
5625
+ desktop: string;
5626
+ mobile: string;
5627
+ tablet: string;
4105
5628
  };
4106
5629
  profileMenu: {
4107
5630
  ariaLabel: string;
@@ -4114,6 +5637,98 @@ export declare const ptMessages: {
4114
5637
  unreadCount: string;
4115
5638
  empty: string;
4116
5639
  ariaLabel: string;
5640
+ close: string;
5641
+ today: string;
5642
+ yesterday: string;
5643
+ assignedBefore: string;
5644
+ assignedAfter: string;
5645
+ pendingBefore: string;
5646
+ pendingAfter: string;
5647
+ assignedToday: string;
5648
+ assignedYesterday: string;
5649
+ assignedOn: string;
5650
+ expires: string;
5651
+ };
5652
+ search: {
5653
+ placeholder: string;
5654
+ inputAriaLabel: string;
5655
+ clearAriaLabel: string;
5656
+ advancedAriaLabel: string;
5657
+ title: string;
5658
+ apply: string;
5659
+ reset: string;
5660
+ close: string;
5661
+ noOptions: string;
5662
+ dateToday: string;
5663
+ dateClear: string;
5664
+ dateOpenAriaLabel: string;
5665
+ prevMonthAriaLabel: string;
5666
+ nextMonthAriaLabel: string;
5667
+ };
5668
+ searchFields: {
5669
+ text: string;
5670
+ textPlaceholder: string;
5671
+ type: string;
5672
+ typePlaceholder: string;
5673
+ section: string;
5674
+ sectionPlaceholder: string;
5675
+ category: string;
5676
+ categoryPlaceholder: string;
5677
+ states: string;
5678
+ statesPlaceholder: string;
5679
+ creator: string;
5680
+ creatorPlaceholder: string;
5681
+ author: string;
5682
+ authorPlaceholder: string;
5683
+ tags: string;
5684
+ tagsPlaceholder: string;
5685
+ groups: string;
5686
+ groupsPlaceholder: string;
5687
+ amount: string;
5688
+ amountPlaceholder: string;
5689
+ dateFrom: string;
5690
+ dateTo: string;
5691
+ sortBy: string;
5692
+ sortByPlaceholder: string;
5693
+ zone: string;
5694
+ zonePlaceholder: string;
5695
+ priority: string;
5696
+ priorityPlaceholder: string;
5697
+ order: string;
5698
+ orderPlaceholder: string;
5699
+ includeDrafts: string;
5700
+ includeHistory: string;
5701
+ };
5702
+ searchOptions: {
5703
+ typeNews: string;
5704
+ typeList: string;
5705
+ typeLiveblog: string;
5706
+ statePublished: string;
5707
+ stateDraft: string;
5708
+ stateScheduled: string;
5709
+ stateReview: string;
5710
+ stateDone: string;
5711
+ sortRelevance: string;
5712
+ sortDate: string;
5713
+ sortTitle: string;
5714
+ orderDesc: string;
5715
+ orderAsc: string;
5716
+ priorityHigh: string;
5717
+ priorityMid: string;
5718
+ priorityLow: string;
5719
+ };
5720
+ toast: {
5721
+ close: string;
5722
+ copyDetail: string;
5723
+ copied: string;
5724
+ defaultSuccess: string;
5725
+ defaultError: string;
5726
+ defaultWarning: string;
5727
+ defaultInfo: string;
5728
+ };
5729
+ userAvatar: {
5730
+ alt: string;
5731
+ unknownUser: string;
4117
5732
  };
4118
5733
  };
4119
5734
 
@@ -4149,6 +5764,12 @@ export declare interface Publication {
4149
5764
  timeFormat: string;
4150
5765
  type: string;
4151
5766
  updateAdmin: PublicationUpdateAdmin;
5767
+ /**
5768
+ * Sub-sitios (multisitio) de esta publicación. Opcional: hoy el servicio no
5769
+ * lo devuelve y las publicaciones se listan planas. Cuando el backend lo
5770
+ * incluya, el selector los muestra como filas hijas expandibles con contador.
5771
+ */
5772
+ children?: Publication[];
4152
5773
  }
4153
5774
 
4154
5775
  /**
@@ -4209,6 +5830,8 @@ export declare const radii: {
4209
5830
  readonly lg: "14px";
4210
5831
  /** Píldoras grandes / menús redondeados (M3). */
4211
5832
  readonly xl: "28px";
5833
+ /** Diálogos / modales de confirmación. */
5834
+ readonly dialog: "24px";
4212
5835
  /** Píldora completa. */
4213
5836
  readonly pill: "999px";
4214
5837
  };
@@ -4382,6 +6005,9 @@ export declare function resolveCmsAssetUrl(path: string, cmsOrigin?: string): st
4382
6005
 
4383
6006
  export declare function resolveCmsOrigin(cmsOrigin?: string): string;
4384
6007
 
6008
+ /** Devuelve la severidad de toast para un código de error (`warning`/`error`). */
6009
+ export declare function resolveErrorSeverity(errorCode: string | number | Array<string | number> | null | undefined): CmsErrorSeverity;
6010
+
4385
6011
  /** Sección de una publicación del CMS (forma devuelta por get/exist). */
4386
6012
  export declare interface Section {
4387
6013
  id?: number;
@@ -4446,7 +6072,7 @@ export declare interface SectionsGetResponse extends CmsResponse {
4446
6072
  * "Todos / Activos / Inactivos"), reutilizable desde cualquier app que consuma
4447
6073
  * la librería.
4448
6074
  */
4449
- export declare function SelectDropdown({ value, options, onChange, highlighted, showIcons, minWidth, disabled, placeholder, ariaLabel, testId, }: SelectDropdownProps): JSX.Element;
6075
+ export declare function SelectDropdown({ value, options, onChange, highlighted, showIcons, minWidth, disabled, placeholder, prefix, ariaLabel, testId, }: SelectDropdownProps): JSX.Element;
4450
6076
 
4451
6077
  export declare type SelectDropdownProps = {
4452
6078
  /** Valor seleccionado actualmente. */
@@ -4471,12 +6097,25 @@ export declare type SelectDropdownProps = {
4471
6097
  disabled?: boolean;
4472
6098
  /** Texto a mostrar cuando ningún valor coincide. */
4473
6099
  placeholder?: ReactNode;
6100
+ /**
6101
+ * Prefijo fijo antes del valor seleccionado en el disparador (p. ej.
6102
+ * "Estado:"). Solo aparece en el trigger, no en el menú. El prefijo va en peso
6103
+ * normal y el valor seleccionado en negrita.
6104
+ */
6105
+ prefix?: ReactNode;
4474
6106
  /** `aria-label` del disparador (accesibilidad). */
4475
6107
  ariaLabel?: string;
4476
6108
  /** Valor base para los `data-testid`. */
4477
6109
  testId?: string;
4478
6110
  };
4479
6111
 
6112
+ export declare type SelectFieldConfig = BaseFieldConfig & {
6113
+ kind: 'select';
6114
+ options: FieldOption[];
6115
+ /** Muestra el check en la opción activa. Por defecto `true`. */
6116
+ showCheck?: boolean;
6117
+ };
6118
+
4480
6119
  /** Opción de un `SelectDropdown`. */
4481
6120
  export declare type SelectOption = {
4482
6121
  /** Valor que se emite en `onChange` y se compara con `value`. */
@@ -4485,6 +6124,13 @@ export declare type SelectOption = {
4485
6124
  label: ReactNode;
4486
6125
  /** Ícono opcional a la izquierda del label. */
4487
6126
  icon?: ReactNode;
6127
+ /**
6128
+ * Color del ícono de esta opción (en el disparador y en el menú). Acepta un
6129
+ * valor de variable del theme (`cmsColors.*`, `feedbackColors.*`) o un path
6130
+ * del tema MUI (p. ej. `'m3.onSurfaceVariant'`). Si se omite, el ícono usa el
6131
+ * gris por defecto (`m3.onSurfaceVariant`).
6132
+ */
6133
+ iconColor?: string;
4488
6134
  /** Si es `false` la opción no se renderiza. Por defecto `true`. */
4489
6135
  show?: boolean;
4490
6136
  };
@@ -4497,7 +6143,7 @@ export declare type SelectOption = {
4497
6143
  * compartidos y reutilizables: cualquier proyecto que consuma la librería puede
4498
6144
  * importarlo para construir un trigger/menú coherente con el sistema.
4499
6145
  *
4500
- * Reglas de color (todas con variables de `tokens.ts`):
6146
+ * Reglas de color (todas con variables de `variables.ts`):
4501
6147
  * - Trigger por defecto: borde `controlBorder` (#727784), texto `controlText`
4502
6148
  * (#000) en negrita, fondo transparente; hover → `controlHoverBg` (#F9F9FF).
4503
6149
  * - Trigger activo (abierto) o resaltado (valor activo): fondo `secondary`
@@ -4530,6 +6176,8 @@ export declare const shadows: {
4530
6176
  readonly menu: "0px 1px 3px 0px rgba(0, 0, 0, 0.30), 0px 4px 8px 3px rgba(0, 0, 0, 0.15)";
4531
6177
  /** Paper suave y difuso (dropdowns genéricos). */
4532
6178
  readonly menuSoft: "0 10px 30px rgba(0, 0, 0, 0.18)";
6179
+ /** Desplegable de opciones (M3 Elevation Light/5): dos capas suaves. */
6180
+ readonly menuDropdown: "0px 4px 4px 0px rgba(0, 0, 0, 0.30), 0px 8px 12px 6px rgba(0, 0, 0, 0.15)";
4533
6181
  /** Submenús flotantes del sidebar. */
4534
6182
  readonly flyout: "0px 8px 16px rgba(0, 0, 0, 0.18)";
4535
6183
  };
@@ -4640,8 +6288,76 @@ export declare const sizes: {
4640
6288
  readonly buttonHeight: 40;
4641
6289
  /** Alto de botones/triggers compactos (selector de sitios). */
4642
6290
  readonly buttonHeightSm: 34;
6291
+ /** Alto del campo buscador (`CmsSearchField`). */
6292
+ readonly searchHeight: 48;
6293
+ };
6294
+
6295
+ export declare type SourceColors = typeof sourceColors;
6296
+
6297
+ /**
6298
+ * Colores de marca por fuente de origen (puntos/indicadores de fuente en
6299
+ * filtros y chips). **Valores placeholder**: ajustar a los oficiales cuando se
6300
+ * definan. Semánticos y reutilizables por cualquier gestor.
6301
+ */
6302
+ export declare const sourceColors: {
6303
+ /** RSS (naranja). */
6304
+ readonly rss: "#FB923C";
6305
+ /** Google Trends (azul). */
6306
+ readonly gtrends: "#4285F4";
6307
+ /** Search Console (verde). */
6308
+ readonly sconsole: "#0F9D58";
6309
+ /** X / Twitter (negro). */
6310
+ readonly x: "#111111";
6311
+ };
6312
+
6313
+ export declare type StateColors = typeof stateColors;
6314
+
6315
+ /**
6316
+ * Colores de estado editorial para los chips de estado en listados de
6317
+ * contenido (sugerencias de CoPilot, noticias, etc.). `bg` = contenedor;
6318
+ * `on` = texto/ícono sobre el contenedor. Semánticos y reutilizables por
6319
+ * cualquier gestor (no atados a un componente puntual).
6320
+ */
6321
+ export declare const stateColors: {
6322
+ /** Activo / publicado (verde). */
6323
+ readonly active: {
6324
+ readonly bg: "#D6F4DE";
6325
+ readonly on: "#1D6B2E";
6326
+ };
6327
+ /** Generando con IA (azul Bluestack tonal). */
6328
+ readonly generating: {
6329
+ readonly bg: "#DCE3FF";
6330
+ readonly on: "#001551";
6331
+ };
6332
+ /** Asignado / en redacción (púrpura, distinto de la familia IA). */
6333
+ readonly assigned: {
6334
+ readonly bg: "#EADDFF";
6335
+ readonly on: "#4F378A";
6336
+ };
6337
+ /** Descartado / archivado (neutral). */
6338
+ readonly discarded: {
6339
+ readonly bg: "#ECEDF6";
6340
+ readonly on: "#43474E";
6341
+ };
4643
6342
  };
4644
6343
 
6344
+ /**
6345
+ * Arma y envía el formulario POST que abre una ruta del admin viejo en una
6346
+ * pestaña nueva, pasando la sesión del usuario (igual que cmsmedios).
6347
+ *
6348
+ * @param params.cmsBaseUrl - Origen del CMS (p. ej. `https://dev.cms-medios.com`).
6349
+ * @param params.path - Ruta destino dentro del CMS (campo `r`).
6350
+ * @param params.session - Datos de sesión a enviar (token, sitio, etc.).
6351
+ * @param params.device - Opcional: protocolo/queryString del preview.
6352
+ * @returns void
6353
+ */
6354
+ export declare function submitLegacyAdminPage(params: {
6355
+ cmsBaseUrl: string;
6356
+ path: string;
6357
+ session: LegacyAdminSession;
6358
+ device?: LegacyAdminDevice;
6359
+ }): void;
6360
+
4645
6361
  /** Filtros de POST /contributions/getSuscriptions. */
4646
6362
  export declare interface SubscriptionsGetFilters {
4647
6363
  /** Filtra por estado de la suscripción. */
@@ -4743,6 +6459,10 @@ export declare interface TagsAdminConfigurationResponse extends CmsResponse {
4743
6459
  [key: string]: unknown;
4744
6460
  }
4745
6461
 
6462
+ export declare type TagsFieldConfig = BaseFieldConfig & {
6463
+ kind: 'tags';
6464
+ };
6465
+
4746
6466
  /** Filtros de POST /tags/get. */
4747
6467
  export declare interface TagsGetFilters {
4748
6468
  /** Tipo de términos: "claves" (default) o "ingredientes". */
@@ -4834,7 +6554,60 @@ export declare interface TagUpdateInput {
4834
6554
  [key: string]: unknown;
4835
6555
  }
4836
6556
 
4837
- export declare function TopBar({ sites, sidebarOpen, onToggleSidebar, notificationUnreadCount, notifications, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, }: TopBarProps): JSX.Element;
6557
+ export declare type TextFieldConfig = BaseFieldConfig & {
6558
+ kind: 'text';
6559
+ /** Tipo HTML del input de texto. Por defecto `text`. */
6560
+ type?: 'text' | 'email' | 'url';
6561
+ };
6562
+
6563
+ /**
6564
+ * Detalle extra que enriquece el toast de error (replica el toast de error del
6565
+ * Angular legacy: detalle copiable con url/servicio/params/versión).
6566
+ */
6567
+ export declare interface ToastErrorDetail {
6568
+ /** Código de error del CMS. Se usa para mapear mensaje y severidad. */
6569
+ errorCode?: string | number | Array<string | number>;
6570
+ /** Texto crudo del error devuelto por el servidor. */
6571
+ error?: string;
6572
+ /** URL del servicio que falló (para el bloque copiable). */
6573
+ service?: string;
6574
+ /** Parámetros del request que falló (para el bloque copiable). */
6575
+ params?: unknown;
6576
+ }
6577
+
6578
+ /** Opciones del toast de error (comunes + detalle copiable). */
6579
+ export declare interface ToastErrorOptions extends ToastOptions, ToastErrorDetail {
6580
+ }
6581
+
6582
+ /** Item de toast ya normalizado y encolado por el provider. */
6583
+ export declare interface ToastItem {
6584
+ id: string;
6585
+ severity: ToastSeverity;
6586
+ message: string;
6587
+ title?: string;
6588
+ /** Null = no autocierra. */
6589
+ duration: number | null;
6590
+ /** Solo presente en toasts de error (habilita el bloque copiable). */
6591
+ detail?: ToastErrorDetail;
6592
+ }
6593
+
6594
+ export declare type ToastMessageKey = keyof CmsMessages['toast'];
6595
+
6596
+ /** Opciones comunes a cualquier toast. */
6597
+ export declare interface ToastOptions {
6598
+ /** Título opcional (en negrita, arriba del mensaje). */
6599
+ title?: string;
6600
+ /**
6601
+ * Milisegundos antes de autocerrarse. `null` o `0` = no se cierra solo
6602
+ * (requiere cierre manual). Si se omite, se usa el default por severidad.
6603
+ */
6604
+ duration?: number | null;
6605
+ }
6606
+
6607
+ /** Severidad visual de un toast. */
6608
+ export declare type ToastSeverity = 'success' | 'error' | 'warning' | 'info';
6609
+
6610
+ export declare function TopBar({ sites, sidebarOpen, onToggleSidebar, notificationUnreadCount, notificationsData, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, newContentGroups, previewFormats, operationPermissions, isAdmin, onNewContentSelect, onPreviewSelect, }: TopBarProps): JSX.Element;
4838
6611
 
4839
6612
  export declare type TopBarMessageKey = keyof CmsMessages['topBar'];
4840
6613
 
@@ -4843,7 +6616,8 @@ export declare type TopBarProps = {
4843
6616
  sidebarOpen: boolean;
4844
6617
  onToggleSidebar: () => void;
4845
6618
  notificationUnreadCount: number;
4846
- notifications: DashboardNotification[];
6619
+ /** Respuesta cruda de `POST /dashboard/notification` (newsTask/expireTask/videos). */
6620
+ notificationsData?: DashboardNotificationsResponse | null;
4847
6621
  profile: ProfileGetResponse;
4848
6622
  primaryLogo: ReactNode;
4849
6623
  brandLogo?: ReactNode;
@@ -4851,8 +6625,47 @@ export declare type TopBarProps = {
4851
6625
  getPublicationHref: (publication: Publication) => string;
4852
6626
  resolvePublicationImageUrl?: (imagePath: string) => string;
4853
6627
  profileAvatarOptions?: ProfileAvatarOptions;
6628
+ /** Dominio del CMS Angular legacy (deploy nuevo) para enlaces de perfil. */
6629
+ legacyBaseUrl?: string;
6630
+ /**
6631
+ * Origen del CMS (JSP), p. ej. `https://dev.cms-medios.com`. Se usa para Ayuda
6632
+ * y Preview, que redirigen al admin viejo (NO al deploy de `legacyBaseUrl`).
6633
+ */
6634
+ cmsBaseUrl?: string;
6635
+ /**
6636
+ * Sesión para el redirect al admin viejo (token, sitio, publicación, usuario).
6637
+ * Si se pasa, Ayuda/Preview usan el form POST de cmsmedios; si no, Ayuda cae a
6638
+ * un enlace simple al CMS.
6639
+ */
6640
+ legacySession?: LegacyAdminSession;
6641
+ /** Columnas/ítems del menú "Nuevo". Por defecto, la estructura del CMS legacy. */
6642
+ newContentGroups?: NewContentGroup[];
6643
+ /** Formatos del menú de previsualización. Por defecto, Desktop/Mobile/Tablet. */
6644
+ previewFormats?: PreviewFormat[];
6645
+ /**
6646
+ * Operaciones concedidas al usuario (`POST /auth/permissions`). Si se omite,
6647
+ * no se filtra el menú "Nuevo" por permisos.
6648
+ */
6649
+ operationPermissions?: string[];
6650
+ /** Si el usuario es administrador (ve todos los ítems del menú "Nuevo"). */
6651
+ isAdmin?: boolean;
6652
+ /** Fallback (sin sesión) del clic en un ítem del menú "Nuevo" (recibe su `id`). */
6653
+ onNewContentSelect?: (itemId: string) => void;
6654
+ /** Integración: clic en un formato de previsualización (recibe su `id`). */
6655
+ onPreviewSelect?: (formatId: string) => void;
4854
6656
  };
4855
6657
 
6658
+ /**
6659
+ * Desplaza un instante (epoch ms en UTC) al "reloj de pared" de la zona de
6660
+ * redacción del sitio. El número resultante, formateado con `timeZone: 'UTC'`,
6661
+ * muestra la hora local del sitio sin importar la zona del navegador.
6662
+ *
6663
+ * @param epochMs Instante en milisegundos (UTC).
6664
+ * @param gmtRedaction Offset GMT de la publicación.
6665
+ * @returns Epoch ms desplazado por el offset del sitio.
6666
+ */
6667
+ export declare function toSiteWallClock(epochMs: number, gmtRedaction: string | null | undefined): number;
6668
+
4856
6669
  /**
4857
6670
  * Cuerpo de la respuesta de POST /transcribe/get.
4858
6671
  *
@@ -4867,6 +6680,9 @@ export declare interface TranscriptionGetResponse extends CmsResponse {
4867
6680
  [key: string]: unknown;
4868
6681
  }
4869
6682
 
6683
+ /** Parámetros de interpolación para placeholders `{nombre}` en un mensaje. */
6684
+ export declare type TranslationParams = Record<string, string | number>;
6685
+
4870
6686
  /** Trivia del CMS. La forma exacta depende del recurso y del formato pedido. */
4871
6687
  export declare interface Trivia {
4872
6688
  [key: string]: unknown;
@@ -5094,6 +6910,11 @@ export declare interface UploadResponse extends CmsResponse {
5094
6910
  [key: string]: unknown;
5095
6911
  }
5096
6912
 
6913
+ /**
6914
+ * Hook para disparar toasts. Debe usarse dentro de `CmsToastProvider`.
6915
+ */
6916
+ export declare function useCmsToast(): CmsToastApi;
6917
+
5097
6918
  export declare function useCmsTranslation(options?: UseCmsTranslationOptions): {
5098
6919
  locale: "pt" | "es" | "en";
5099
6920
  t: CmsTranslator;
@@ -5103,6 +6924,61 @@ export declare type UseCmsTranslationOptions = {
5103
6924
  locale?: Locale;
5104
6925
  messages?: CmsMessagesOverride;
5105
6926
  catalog?: LocaleCatalog;
6927
+ /** Catálogo propio del gestor cuando se usa el hook fuera del provider. */
6928
+ appMessages?: AppLocaleCatalog;
6929
+ };
6930
+
6931
+ /**
6932
+ * Acceso al estado compartido de la foto del usuario logueado.
6933
+ *
6934
+ * Devuelve `null` si no hay provider montado: así `UserAvatar` y la pantalla de
6935
+ * perfil funcionan también sin el provider (caso tabla de usuarios, donde cada
6936
+ * avatar es otro usuario y no necesita actualización en vivo).
6937
+ */
6938
+ export declare function useCurrentUserPhoto(): CurrentUserPhotoContextValue | null;
6939
+
6940
+ /**
6941
+ * Avatar de usuario compartible: muestra la foto del usuario y, si no tiene,
6942
+ * el ícono `PersonOutlined` sobre fondo secundario. Incluye tooltip con el
6943
+ * nombre y textos traducidos (es/en/pt). Reacciona al cambio de la prop `photo`;
6944
+ * para el usuario logueado, reacciona además al `CurrentUserPhotoProvider`.
6945
+ */
6946
+ export declare function UserAvatar({ photo, description, username, size, showTooltip, cmsOrigin, crossOrigin, isCurrentUser, onClick, testId, }: UserAvatarProps): JSX.Element;
6947
+
6948
+ export declare type UserAvatarMessageKey = keyof CmsMessages['userAvatar'];
6949
+
6950
+ export declare type UserAvatarProps = {
6951
+ /**
6952
+ * Foto del usuario: ruta relativa, URL absoluta, `''` o `'noPicture'`
6953
+ * (misma forma que el campo `photo` en cmsmedios). Si falta o es `'noPicture'`,
6954
+ * se muestra el ícono de persona sobre fondo secundario.
6955
+ */
6956
+ photo?: string | null;
6957
+ /** Nombre legible del usuario (campo `description` en cmsmedios). Tooltip + alt. */
6958
+ description?: string;
6959
+ /** Login del usuario (campo `username`). Fallback del nombre. */
6960
+ username?: string;
6961
+ /** Diámetro del avatar en px. Por defecto 32. */
6962
+ size?: number;
6963
+ /** Muestra el tooltip con el nombre al pasar el mouse. Por defecto `true`. */
6964
+ showTooltip?: boolean;
6965
+ /** Origen del CMS para resolver rutas relativas de la foto. */
6966
+ cmsOrigin?: string;
6967
+ /**
6968
+ * `crossOrigin` del `<img>`. Sin valor por defecto (lo más seguro para mostrar).
6969
+ * El `TopBar` de la lib usa `'anonymous'`; pasarlo si el CMS lo requiere.
6970
+ */
6971
+ crossOrigin?: 'anonymous' | 'use-credentials';
6972
+ /**
6973
+ * Marca este avatar como el del usuario logueado: así reacciona al cambio de
6974
+ * foto de perfil emitido por `CurrentUserPhotoProvider` (equivalente al
6975
+ * `updateImageProfile` del Angular legacy). Sin provider, usa la prop `photo`.
6976
+ */
6977
+ isCurrentUser?: boolean;
6978
+ /** Acción al hacer clic. Si se define, el avatar muestra cursor de puntero. */
6979
+ onClick?: () => void;
6980
+ /** Base para el `data-testid` (`avatar-<testId>`). */
6981
+ testId?: string;
5106
6982
  };
5107
6983
 
5108
6984
  /** Grupo del sistema devuelto por POST /users/groups/get. */
@@ -5208,9 +7084,29 @@ export declare interface UsersPublicationResponse extends CmsResponse {
5208
7084
  /** Estado posible de un usuario del sistema. */
5209
7085
  export declare type UserStatus = 'active' | 'block' | 'pending';
5210
7086
 
5211
- /** Acción soportada por POST /users/action/setStatus. */
7087
+ /** Acción soportada por POST /users/actions/setStatus. */
5212
7088
  export declare type UserStatusAction = 'activate' | 'deactivate';
5213
7089
 
7090
+ export declare type UserStatusColors = typeof userStatusColors;
7091
+
7092
+ /**
7093
+ * Colores del chip de estado de cuenta de usuario (activo / inactivo).
7094
+ * `bg` = contenedor; `on` = texto e ícono sobre el contenedor. El texto/ícono
7095
+ * es el mismo verde oscuro en ambos estados. Semánticos y reutilizables.
7096
+ */
7097
+ export declare const userStatusColors: {
7098
+ /** Activo: contenedor verde menta. */
7099
+ readonly active: {
7100
+ readonly bg: "#92F7B7";
7101
+ readonly on: "#002112";
7102
+ };
7103
+ /** Inactivo: contenedor neutro. */
7104
+ readonly inactive: {
7105
+ readonly bg: "#E1E2E9";
7106
+ readonly on: "#002112";
7107
+ };
7108
+ };
7109
+
5214
7110
  /** Video del CMS. La forma exacta depende del recurso y del formato pedido. */
5215
7111
  export declare interface Video {
5216
7112
  [key: string]: unknown;