sass-cms-template-common 0.0.6 → 0.0.7

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,7 +16,26 @@ 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, notifications, 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;
@@ -30,15 +50,40 @@ export declare type AppShellProps = {
30
50
  getPublicationHref: (publication: Publication) => string;
31
51
  resolvePublicationImageUrl?: (imagePath: string) => string;
32
52
  profileAvatarOptions?: ProfileAvatarOptions;
53
+ /** Dominio del CMS Angular legacy (deploy nuevo) para enlaces de perfil. */
54
+ legacyBaseUrl?: string;
55
+ /**
56
+ * Origen del CMS (JSP) para Ayuda/Preview. Si se omite, se usa `baseUrl`.
57
+ */
58
+ cmsBaseUrl?: string;
59
+ /** Sesión para el redirect al admin viejo (token, sitio, publicación, usuario). */
60
+ legacySession?: LegacyAdminSession;
61
+ /** Columnas/ítems del menú "Nuevo". Por defecto, la estructura del CMS legacy. */
62
+ newContentGroups?: NewContentGroup[];
63
+ /** Formatos del menú de previsualización. Por defecto, Desktop/Mobile/Tablet. */
64
+ previewFormats?: PreviewFormat[];
65
+ /** Operaciones concedidas al usuario (`POST /auth/permissions`). */
66
+ operationPermissions?: string[];
67
+ /** Si el usuario es administrador (ve todos los ítems del menú "Nuevo"). */
68
+ isAdmin?: boolean;
69
+ /** Fallback (sin sesión) del clic en un ítem del menú "Nuevo" (recibe su `id`). */
70
+ onNewContentSelect?: (itemId: string) => void;
71
+ /** Integración: clic en un formato de previsualización (recibe su `id`). */
72
+ onPreviewSelect?: (formatId: string) => void;
33
73
  LinkComponent?: CmsLinkComponent;
34
74
  permissions: Array<NavItemPermissions>;
35
75
  locale?: Locale | string;
36
76
  /** Alias de `locale`. */
37
77
  language?: Locale | string;
38
78
  messages?: CmsMessagesOverride;
79
+ /** Catálogo de mensajes propio del gestor (namespaces libres, es/en/pt). */
80
+ appMessages?: AppLocaleCatalog;
39
81
  baseUrl: string;
40
82
  };
41
83
 
84
+ /** Traductor genérico de claves del gestor por ruta con puntos (`ns.clave`). */
85
+ export declare type AppTranslate = (path: string, params?: TranslationParams) => string;
86
+
42
87
  /** Audio del VFS. Los metadatos exactos no están detallados en el doc. */
43
88
  declare interface Audio_2 {
44
89
  [key: string]: unknown;
@@ -219,6 +264,27 @@ export declare interface AuthSessionResult extends CmsResponse {
219
264
  /** Respuesta de POST /auth/setNewPassword. */
220
265
  export declare type AuthSetNewPasswordResponse = AuthSessionResult;
221
266
 
267
+ /** Propiedades comunes a todos los campos de la configuración. */
268
+ declare type BaseFieldConfig = {
269
+ /** Identificador único del campo (clave en `FieldValues`). */
270
+ name: string;
271
+ /** Etiqueta (ya traducida). Se muestra arriba del control. */
272
+ label?: ReactNode;
273
+ /** Placeholder (ya traducido). */
274
+ placeholder?: string;
275
+ /** Texto de ayuda bajo el control (ya traducido). */
276
+ hint?: ReactNode;
277
+ /** Deshabilita el control. */
278
+ disabled?: boolean;
279
+ /**
280
+ * Columnas que ocupa en la grilla del modal (1, 2 o 3).
281
+ * En el panel lateral (drawer) siempre ocupa el ancho completo.
282
+ */
283
+ span?: 1 | 2 | 3;
284
+ /** Base para los `data-testid`. */
285
+ testId?: string;
286
+ };
287
+
222
288
  /**
223
289
  * Botón primario con menú desplegable integrado, en forma de píldora dividida.
224
290
  * Combina un botón principal de acción (emite `onAction`) con una flecha que
@@ -248,6 +314,22 @@ export declare type BtnDropdownProps = {
248
314
  testId?: string;
249
315
  };
250
316
 
317
+ /**
318
+ * Construye el catálogo estándar de campos de "Búsqueda avanzada" del CMS con
319
+ * los textos por defecto de la librería (resueltos al idioma activo). Es lo que
320
+ * usa `CmsAdvancedSearch` cuando el consumidor no pasa `fields`.
321
+ *
322
+ * Los campos de datos (sección, categoría, creador, autor, grupos, zona) traen
323
+ * `options: []`: sus etiquetas/placeholder vienen traducidos de la lib, pero las
324
+ * opciones reales las inyecta cada gestor (son datos del backend). Los campos de
325
+ * enum fijo (tipo, estados, orden, prioridad, dirección) sí traen sus opciones
326
+ * por defecto, también traducidas.
327
+ *
328
+ * @param t - Traductor de la lib (`useCmsTranslation().t`).
329
+ * @returns Lista de campos lista para `CmsAdvancedSearch`.
330
+ */
331
+ export declare function buildDefaultSearchFields(t: CmsTranslator): FieldConfig[];
332
+
251
333
  /** Filtro de POST /categories/get. */
252
334
  export declare interface CategoriesGetFilter {
253
335
  /**
@@ -305,6 +387,10 @@ export declare interface Category {
305
387
  [key: string]: unknown;
306
388
  }
307
389
 
390
+ export declare type CheckboxFieldConfig = BaseFieldConfig & {
391
+ kind: 'checkbox';
392
+ };
393
+
308
394
  /** Cuerpo de la respuesta de POST /ckeditor/adminConfiguration. */
309
395
  export declare interface CkeditorAdminConfigurationResponse extends CmsResponse {
310
396
  ckeditorParams?: CkeditorParams;
@@ -393,6 +479,55 @@ export declare interface CkeditorPrompt {
393
479
  [key: string]: unknown;
394
480
  }
395
481
 
482
+ /**
483
+ * Contenedor de "Búsqueda avanzada" reutilizable y declarativo. Recibe una lista
484
+ * de `fields` y los renderiza en una grilla, manejando el estado del formulario
485
+ * internamente. Se presenta como modal centrado o panel lateral derecho según
486
+ * `variant`. El mismo componente sirve a cualquier gestor: solo cambian los
487
+ * campos que se le pasan.
488
+ */
489
+ export declare function CmsAdvancedSearch({ open, onClose, variant, title, titleIcon, fields, initialValues, onApply, onReset, applyLabel, resetLabel, closeAriaLabel, columns, drawerWidth, testId, }: CmsAdvancedSearchProps): JSX.Element;
490
+
491
+ export declare type CmsAdvancedSearchProps = {
492
+ /** Si el contenedor está abierto. */
493
+ open: boolean;
494
+ /** Callback al cerrar (botón X, scrim o Escape). */
495
+ onClose: () => void;
496
+ /** Modal centrado o panel lateral derecho. Por defecto `modal`. */
497
+ variant?: CmsAdvancedSearchVariant;
498
+ /** Título. Por defecto el de la lib ("Búsqueda avanzada", según idioma). */
499
+ title?: ReactNode;
500
+ /** Ícono de la cabecera. Por defecto un embudo de filtro. */
501
+ titleIcon?: ReactNode;
502
+ /**
503
+ * Campos a mostrar. Si se omite, usa el catálogo estándar de la lib
504
+ * (`buildDefaultSearchFields`) ya traducido. Cada gestor puede pasar solo los
505
+ * campos que necesita o partir del catálogo por defecto y ajustar opciones.
506
+ */
507
+ fields?: FieldConfig[];
508
+ /** Valores iniciales (al abrir se sincroniza el borrador con estos). */
509
+ initialValues?: FieldValues;
510
+ /** Callback al aplicar, con los valores del formulario. */
511
+ onApply: (values: FieldValues) => void;
512
+ /** Callback al restablecer (luego de limpiar el borrador). */
513
+ onReset?: () => void;
514
+ /** Texto del botón aplicar. Por defecto el de la lib. */
515
+ applyLabel?: ReactNode;
516
+ /** Texto del botón restablecer. Por defecto el de la lib. */
517
+ resetLabel?: ReactNode;
518
+ /** `aria-label` del botón cerrar. Por defecto el de la lib. */
519
+ closeAriaLabel?: string;
520
+ /** Columnas de la grilla en variante modal. Por defecto `3`. */
521
+ columns?: number;
522
+ /** Ancho del panel lateral. Por defecto `360`. */
523
+ drawerWidth?: number | string;
524
+ /** Base para los `data-testid`. */
525
+ testId?: string;
526
+ };
527
+
528
+ /** Presentación del contenedor de búsqueda avanzada. */
529
+ export declare type CmsAdvancedSearchVariant = 'modal' | 'drawer';
530
+
396
531
  /**
397
532
  * Servicios HTTP del módulo `audios` del CMS (solo endpoints JSON POST).
398
533
  *
@@ -521,6 +656,25 @@ export declare class CmsCategoriesServices {
521
656
  testCategories: (filter?: CategoriesTestFilter) => Promise<CategoriesTestResponse>;
522
657
  }
523
658
 
659
+ /**
660
+ * Checkbox con etiqueta. Activo = cuadro relleno con el color primario y check
661
+ * blanco (íconos por defecto de MUI, sin override). Controlado y reutilizable.
662
+ */
663
+ export declare function CmsCheckboxField({ value, onChange, label, disabled, testId, }: CmsCheckboxFieldProps): JSX.Element;
664
+
665
+ export declare type CmsCheckboxFieldProps = {
666
+ /** Estado actual (controlado). */
667
+ value: boolean;
668
+ /** Callback con el nuevo estado. */
669
+ onChange: (value: boolean) => void;
670
+ /** Etiqueta a la derecha del checkbox (ya traducida). */
671
+ label?: ReactNode;
672
+ /** Deshabilita el control. */
673
+ disabled?: boolean;
674
+ /** Base para los `data-testid`. */
675
+ testId?: string;
676
+ };
677
+
524
678
  /**
525
679
  * Servicios HTTP del módulo `ckeditor` del CMS (solo endpoints JSON POST).
526
680
  *
@@ -557,6 +711,17 @@ export declare const cmsColors: {
557
711
  readonly secondary: "#D8E2FF";
558
712
  /** Hover sobre superficies secundarias (opciones de desplegable). */
559
713
  readonly secondaryHover: "#E1E2EA";
714
+ /**
715
+ * Texto / íconos sobre el contenedor `secondary` (chips de filtro activos,
716
+ * opciones marcadas en multiselect, etiquetas). Equivale al
717
+ * `onSecondaryContainer` de Material 3.
718
+ */
719
+ readonly onSecondaryContainer: "#2C4678";
720
+ /**
721
+ * Secundario sólido (tono fuerte de la paleta secundaria). Se usa, p. ej.,
722
+ * para resaltar el borde del avatar al hacer hover sobre una fila.
723
+ */
724
+ readonly secondaryStrong: "#455E91";
560
725
  /** Borde por defecto de controles tipo select. */
561
726
  readonly controlBorder: "#727784";
562
727
  /** Texto por defecto de controles tipo select. */
@@ -573,12 +738,29 @@ export declare const cmsColors: {
573
738
  readonly iconButtonIcon: "#929193";
574
739
  /** Fondo de menús flotantes (perfil, selector de sitios). */
575
740
  readonly menuSurface: "#ECEDF6";
741
+ /** Fondo de la opción activa/hover dentro de un menú desplegable simple. */
742
+ readonly menuItemActive: "#E1E2EB";
576
743
  /** Hover neutro sobre superficies claras (sidebar, top bar). */
577
744
  readonly surfaceHover: "#E3E2E6";
745
+ /** Texto tenue del índice alfabético (letras inactivas A–Z del listado). */
746
+ readonly alphabetIdle: "#B4BEDA";
578
747
  /** Texto fuerte (títulos de ítems, nombre de perfil). */
579
748
  readonly textStrong: "#191C22";
580
749
  /** Texto de navegación / secundario. */
581
750
  readonly textNav: "#414752";
751
+ /** Texto atenuado: títulos de sección, encabezados de columna (gris claro). */
752
+ readonly textMuted: "#94A2AA";
753
+ /**
754
+ * Azul para enlaces de texto y botones tipo texto (p. ej. el label
755
+ * "Cancelar" del modal de confirmación y los enlaces dentro de descripciones).
756
+ */
757
+ readonly link: "#004F99";
758
+ /** Acento de acción destructiva (CTA "Desactivar/Resetear", badge de riesgo). */
759
+ readonly danger: "#BA1A1A";
760
+ /** Hover del acento destructivo. */
761
+ readonly dangerHover: "#93000A";
762
+ /** Acento de acción positiva (badge de "Activar"). */
763
+ readonly success: "#1E8E3E";
582
764
  /** Bordes y divisores sutiles. */
583
765
  readonly border: "#C1C6D4";
584
766
  /** Fondo del avatar de perfil. */
@@ -589,6 +771,34 @@ export declare const cmsColors: {
589
771
  readonly white: "#FFFFFF";
590
772
  };
591
773
 
774
+ /**
775
+ * Combobox de una sola opción con búsqueda escribiendo (equivale al campo
776
+ * "Creador" / "Autor" del diseño). Internamente usa `Autocomplete` de MUI pero
777
+ * expone una API por `value: string`. Controlado y reutilizable.
778
+ */
779
+ export declare function CmsComboboxField({ value, onChange, options, label, placeholder, hint, noOptionsText, disabled, testId, }: CmsComboboxFieldProps): JSX.Element;
780
+
781
+ export declare type CmsComboboxFieldProps = {
782
+ /** Valor seleccionado (value de la opción; vacío = ninguno). */
783
+ value: string;
784
+ /** Callback con el nuevo value (o '' al limpiar). */
785
+ onChange: (value: string) => void;
786
+ /** Opciones disponibles. */
787
+ options: FieldOption[];
788
+ /** Etiqueta superior (ya traducida). */
789
+ label?: ReactNode;
790
+ /** Placeholder (ya traducido). */
791
+ placeholder?: string;
792
+ /** Texto de ayuda bajo el control. */
793
+ hint?: ReactNode;
794
+ /** Texto cuando no hay coincidencias (ya traducido). */
795
+ noOptionsText?: ReactNode;
796
+ /** Deshabilita el control. */
797
+ disabled?: boolean;
798
+ /** Base para los `data-testid`. */
799
+ testId?: string;
800
+ };
801
+
592
802
  /**
593
803
  * Servicios HTTP del módulo `comments` del CMS.
594
804
  *
@@ -662,6 +872,70 @@ export declare class CmsCommonServices {
662
872
  getSitesAndPublications: () => Promise<SitesAndPublicationsResult>;
663
873
  }
664
874
 
875
+ /** Color del botón "Confirmar/Enviar": CTA primario (azul) o destructivo (rojo). */
876
+ declare type CmsConfirmColor = 'primary' | 'danger';
877
+
878
+ /**
879
+ * Modal de confirmación reutilizable: ícono, título, descripción y 1–2 botones,
880
+ * todo opcional. Contenido alineado a la izquierda, acciones a la derecha y "X"
881
+ * de cerrar dentro del modal. Réplica funcional del `confirm-modal` del Angular
882
+ * legacy (`cmsmedios-ux`) con MUI + el theme de la lib. Los textos (i18n) los
883
+ * pasa el gestor; este componente solo presenta.
884
+ */
885
+ 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;
886
+
887
+ export declare type CmsConfirmDialogProps = {
888
+ /** Si el modal está abierto. */
889
+ open: boolean;
890
+ /** Callback al cerrar (botón X, scrim o Escape). */
891
+ onClose: () => void;
892
+ /** Ícono opcional (se muestra en un badge circular sobre el título). */
893
+ icon?: ReactNode;
894
+ /** Color de acento del badge del ícono. Por defecto el texto de navegación. */
895
+ iconColor?: string;
896
+ /** Título opcional. Product Sans 32/400. Admite `\n` para saltos de línea. */
897
+ title?: ReactNode;
898
+ /**
899
+ * Descripción opcional. Roboto 14/400. Puede incluir negrita (`<b>`/`<strong>`)
900
+ * y enlaces (`<a>`); ambos se estilan según el diseño.
901
+ */
902
+ description?: ReactNode;
903
+ /** Muestra el botón "X" de cerrar (dentro, arriba a la derecha). Por defecto `true`. */
904
+ showClose?: boolean;
905
+ /** `aria-label` del botón cerrar. */
906
+ closeAriaLabel?: string;
907
+ /** Label del botón "Cancelar". Si se omite, no se muestra. */
908
+ cancelLabel?: ReactNode;
909
+ /** Acción del botón "Cancelar". Por defecto cierra el modal (`onClose`). */
910
+ onCancel?: () => void;
911
+ /** Label del botón "Confirmar/Enviar". Si se omite, no se muestra. */
912
+ confirmLabel?: ReactNode;
913
+ /** Acción del botón "Confirmar/Enviar". */
914
+ onConfirm?: () => void;
915
+ /** Ícono opcional al inicio del botón "Confirmar/Enviar". */
916
+ confirmIcon?: ReactNode;
917
+ /** Color del botón "Confirmar/Enviar": `primary` (azul) o `danger` (rojo). */
918
+ confirmColor?: CmsConfirmColor;
919
+ /** Deshabilita el botón "Cancelar". */
920
+ cancelDisabled?: boolean;
921
+ /** Deshabilita el botón "Confirmar/Enviar". */
922
+ confirmDisabled?: boolean;
923
+ /** Los botones reparten el ancho del modal. Por defecto `false`. */
924
+ fullWidthActions?: boolean;
925
+ /** Alineación de los botones. Por defecto `end` (a la derecha). */
926
+ actionsAlign?: CmsDialogActionsAlign;
927
+ /** Ancho fijo del modal. Si se omite, crece con el contenido (respetando `minWidth`). */
928
+ width?: number | string;
929
+ /** Ancho mínimo del modal. Por defecto `420`. */
930
+ minWidth?: number | string;
931
+ /** Alto mínimo del modal (crece con el contenido). Por defecto `280`. */
932
+ minHeight?: number | string;
933
+ /** Evita cerrar al hacer clic fuera o con Escape (p. ej. mientras carga). */
934
+ disableBackdropClose?: boolean;
935
+ /** Base para los `data-testid`. */
936
+ testId?: string;
937
+ };
938
+
665
939
  /**
666
940
  * Servicios HTTP del módulo `contributions` del CMS.
667
941
  *
@@ -714,6 +988,71 @@ export declare class CmsDashboardServices {
714
988
  getNotifications: () => Promise<DashboardNotificationsResponse>;
715
989
  }
716
990
 
991
+ /**
992
+ * Campo de fecha con calendario Material 3 propio (no el selector nativo del
993
+ * navegador, que no se puede estilar). El valor se maneja en ISO `AAAA-MM-DD` y
994
+ * se muestra como `dd/mm/aaaa`. Los meses y días se rotulan según el idioma del
995
+ * provider. Controlado y reutilizable.
996
+ */
997
+ export declare function CmsDateField({ value, onChange, label, hint, disabled, testId, }: CmsDateFieldProps): JSX.Element;
998
+
999
+ export declare type CmsDateFieldProps = {
1000
+ /** Valor en formato ISO `AAAA-MM-DD` (controlado; vacío = sin fecha). */
1001
+ value: string;
1002
+ /** Callback con la nueva fecha ISO (o '' al limpiar). */
1003
+ onChange: (value: string) => void;
1004
+ /** Etiqueta superior (ya traducida). */
1005
+ label?: ReactNode;
1006
+ /** Texto de ayuda bajo el control. */
1007
+ hint?: ReactNode;
1008
+ /** Deshabilita el control. */
1009
+ disabled?: boolean;
1010
+ /** Base para los `data-testid`. */
1011
+ testId?: string;
1012
+ };
1013
+
1014
+ /**
1015
+ * Fila de acciones del modal de confirmación. Muestra 1 o 2 botones según los
1016
+ * labels que reciba: el de "Cancelar" (tipo texto) y/o el de "Confirmar/Enviar"
1017
+ * (CTA primario o destructivo, con ícono opcional). Reutilizable de forma
1018
+ * independiente del modal.
1019
+ */
1020
+ export declare function CmsDialogActions({ cancelLabel, onCancel, confirmLabel, onConfirm, confirmIcon, confirmColor, cancelDisabled, confirmDisabled, fullWidth, align, testId, }: CmsDialogActionsProps): JSX.Element | null;
1021
+
1022
+ /** Alineación horizontal de la fila de botones. */
1023
+ declare type CmsDialogActionsAlign = 'start' | 'center' | 'end' | 'between';
1024
+
1025
+ export declare type CmsDialogActionsProps = {
1026
+ /** Label del botón "Cancelar". Si se omite, ese botón no se muestra. */
1027
+ cancelLabel?: ReactNode;
1028
+ /** Acción del botón "Cancelar". */
1029
+ onCancel?: () => void;
1030
+ /** Label del botón "Confirmar/Enviar". Si se omite, ese botón no se muestra. */
1031
+ confirmLabel?: ReactNode;
1032
+ /** Acción del botón "Confirmar/Enviar". */
1033
+ onConfirm?: () => void;
1034
+ /** Ícono opcional al inicio del botón "Confirmar/Enviar". */
1035
+ confirmIcon?: ReactNode;
1036
+ /** Color del botón "Confirmar/Enviar": `primary` (azul) o `danger` (rojo). */
1037
+ confirmColor?: CmsConfirmColor;
1038
+ /** Deshabilita el botón "Cancelar". */
1039
+ cancelDisabled?: boolean;
1040
+ /** Deshabilita el botón "Confirmar/Enviar". */
1041
+ confirmDisabled?: boolean;
1042
+ /**
1043
+ * Si los botones crecen para repartir el ancho del contenedor padre. Por
1044
+ * defecto `true`. Con un solo botón, ocupa todo el ancho disponible.
1045
+ */
1046
+ fullWidth?: boolean;
1047
+ /** Alineación horizontal de los botones. Por defecto `end`. */
1048
+ align?: CmsDialogActionsAlign;
1049
+ /** Base para los `data-testid`. */
1050
+ testId?: string;
1051
+ };
1052
+
1053
+ /** Severidad de feedback derivada de un código de error. */
1054
+ export declare type CmsErrorSeverity = 'warning' | 'error';
1055
+
717
1056
  /** Evento del CMS. La forma exacta depende del recurso. */
718
1057
  export declare interface CmsEvent {
719
1058
  [key: string]: unknown;
@@ -754,6 +1093,19 @@ export declare class CmsFileExplorerServices {
754
1093
  getFolders: (path: string) => Promise<FileExplorerGetFoldersResponse>;
755
1094
  }
756
1095
 
1096
+ /**
1097
+ * Inyecta los `@font-face` de Roboto y Product Sans como estilos globales.
1098
+ * Va montado dentro de los providers MUI de la lib, así cada gestor que los use
1099
+ * tiene las fuentes disponibles sin configurar nada.
1100
+ */
1101
+ export declare function CmsFontFaces(): JSX.Element;
1102
+
1103
+ /**
1104
+ * Reglas `@font-face` de todas las fuentes del CMS, listas para inyectarse como
1105
+ * estilos globales (ver el componente `CmsFontFaces`).
1106
+ */
1107
+ export declare const cmsFontFaces: string;
1108
+
757
1109
  /**
758
1110
  * Servicios HTTP de la raíz del módulo `general` del CMS que usan POST con body
759
1111
  * JSON y objeto `authentication`.
@@ -770,7 +1122,7 @@ export declare class CmsGeneralServices {
770
1122
  updateCDN: (path: string) => Promise<CmsResponse>;
771
1123
  }
772
1124
 
773
- export declare function CmsI18nProvider({ locale, language, messages, catalog, children, }: CmsI18nProviderProps): JSX.Element;
1125
+ export declare function CmsI18nProvider({ locale, language, messages, catalog, appMessages, children, }: CmsI18nProviderProps): JSX.Element;
774
1126
 
775
1127
  export declare type CmsI18nProviderProps = {
776
1128
  locale?: Locale | string;
@@ -778,6 +1130,8 @@ export declare type CmsI18nProviderProps = {
778
1130
  language?: Locale | string;
779
1131
  messages?: CmsMessagesOverride;
780
1132
  catalog?: LocaleCatalog;
1133
+ /** Catálogo de mensajes propio del gestor (namespaces libres, es/en/pt). */
1134
+ appMessages?: AppLocaleCatalog;
781
1135
  children: ReactNode;
782
1136
  };
783
1137
 
@@ -868,6 +1222,34 @@ export declare type CmsMuiProviderProps = {
868
1222
  children: ReactNode;
869
1223
  };
870
1224
 
1225
+ /**
1226
+ * Campo de selección múltiple con chips y checkboxes en el desplegable
1227
+ * (equivale al campo "Estados" del diseño). Internamente usa `Autocomplete`
1228
+ * múltiple de MUI pero expone una API por `value: string[]`. Reutilizable.
1229
+ */
1230
+ export declare function CmsMultiSelectField({ value, onChange, options, label, placeholder, hint, noOptionsText, disabled, testId, }: CmsMultiSelectFieldProps): JSX.Element;
1231
+
1232
+ export declare type CmsMultiSelectFieldProps = {
1233
+ /** Valores seleccionados (controlado). */
1234
+ value: string[];
1235
+ /** Callback con los nuevos valores. */
1236
+ onChange: (value: string[]) => void;
1237
+ /** Opciones disponibles. */
1238
+ options: FieldOption[];
1239
+ /** Etiqueta superior (ya traducida). */
1240
+ label?: ReactNode;
1241
+ /** Placeholder cuando no hay selección (ya traducido). */
1242
+ placeholder?: string;
1243
+ /** Texto de ayuda bajo el control. */
1244
+ hint?: ReactNode;
1245
+ /** Texto cuando no hay coincidencias (ya traducido). */
1246
+ noOptionsText?: ReactNode;
1247
+ /** Deshabilita el control. */
1248
+ disabled?: boolean;
1249
+ /** Base para los `data-testid`. */
1250
+ testId?: string;
1251
+ };
1252
+
871
1253
  /**
872
1254
  * Servicios HTTP del módulo `news` del CMS (core + publish, unpublish, pin,
873
1255
  * massive, freshness, views y analytics).
@@ -1013,6 +1395,33 @@ export declare class CmsNotificationServices {
1013
1395
  getTopics: () => Promise<NotificationTopicsResponse>;
1014
1396
  }
1015
1397
 
1398
+ /**
1399
+ * Campo numérico con la estética estándar del CMS. Mantiene el valor como string
1400
+ * para permitir el estado vacío. Controlado y reutilizable.
1401
+ */
1402
+ export declare function CmsNumberField({ value, onChange, label, placeholder, hint, min, max, disabled, testId, }: CmsNumberFieldProps): JSX.Element;
1403
+
1404
+ export declare type CmsNumberFieldProps = {
1405
+ /** Valor actual como string (controlado; vacío = sin valor). */
1406
+ value: string;
1407
+ /** Callback con el nuevo valor (string para permitir el campo vacío). */
1408
+ onChange: (value: string) => void;
1409
+ /** Etiqueta superior (ya traducida). */
1410
+ label?: ReactNode;
1411
+ /** Placeholder (ya traducido). */
1412
+ placeholder?: string;
1413
+ /** Texto de ayuda bajo el control. */
1414
+ hint?: ReactNode;
1415
+ /** Valor mínimo permitido. */
1416
+ min?: number;
1417
+ /** Valor máximo permitido. */
1418
+ max?: number;
1419
+ /** Deshabilita el control. */
1420
+ disabled?: boolean;
1421
+ /** Base para los `data-testid`. */
1422
+ testId?: string;
1423
+ };
1424
+
1016
1425
  /**
1017
1426
  * Servicios HTTP del módulo `people` (personas: periodistas, columnistas) del CMS.
1018
1427
  *
@@ -1336,6 +1745,71 @@ export declare interface CmsResponse {
1336
1745
  error?: string;
1337
1746
  }
1338
1747
 
1748
+ /** Envelope mínimo que `notifyCmsResponse` sabe interpretar. */
1749
+ export declare interface CmsResponseLike {
1750
+ status?: 'ok' | 'fail' | 'error' | string;
1751
+ errorCode?: string | number | Array<string | number>;
1752
+ error?: string;
1753
+ }
1754
+
1755
+ /**
1756
+ * Buscador del CMS: input con lupa opcional, botón de limpiar y botón opcional
1757
+ * de "opciones avanzadas" (tres puntos) que el consumidor cablea a un modal o
1758
+ * panel lateral. Replica el comportamiento del `app-search` del Angular legacy
1759
+ * (incluido el modo `collapsible` que crece al enfocar y colapsa al vaciarse).
1760
+ *
1761
+ * Es presentacional y controlado: el texto y los textos visibles vienen por
1762
+ * props; la decisión de qué abrir en "avanzadas" vive en el gestor.
1763
+ */
1764
+ 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;
1765
+
1766
+ export declare type CmsSearchFieldProps = {
1767
+ /** Valor del texto de búsqueda (controlado). */
1768
+ value: string;
1769
+ /** Callback en cada cambio del texto. */
1770
+ onChange: (value: string) => void;
1771
+ /** Callback al presionar Enter (búsqueda). */
1772
+ onSearch?: (value: string) => void;
1773
+ /** Callback al limpiar el campo. Si no se pasa, igual limpia `value`. */
1774
+ onClear?: () => void;
1775
+ /** Placeholder del input (ya traducido y modificable por el consumidor). */
1776
+ placeholder?: string;
1777
+ /** Muestra la lupa a la izquierda. Por defecto `true`. */
1778
+ showIcon?: boolean;
1779
+ /** Muestra el botón de opciones avanzadas (tres puntos). Por defecto `false`. */
1780
+ showAdvanced?: boolean;
1781
+ /** Marca el botón de avanzadas como activo (hay filtros aplicados). */
1782
+ advancedActive?: boolean;
1783
+ /** Callback al hacer clic en opciones avanzadas (abre modal o panel). */
1784
+ onAdvancedClick?: () => void;
1785
+ /**
1786
+ * Modo "crece/colapsa" como el `app-search` del Angular: arranca como un botón
1787
+ * con lupa y se expande al hacer foco; colapsa al perder foco si está vacío.
1788
+ * Por defecto `false` (input siempre expandido).
1789
+ */
1790
+ collapsible?: boolean;
1791
+ /** Ancho del input cuando está expandido. */
1792
+ width?: number | string;
1793
+ /**
1794
+ * Crece al enfocar hasta llenar el espacio disponible del contenedor (como el
1795
+ * buscador clásico del CMS), dejando `endGap` px antes del borde. En reposo
1796
+ * queda alineado a la derecha con ancho `width`. Por defecto `false`.
1797
+ */
1798
+ grow?: boolean;
1799
+ /** Ancho máximo opcional cuando `grow` está activo (por defecto sin tope). */
1800
+ maxWidth?: number | string;
1801
+ /** Espacio mínimo a la derecha cuando `grow` está activo. Por defecto `40`. */
1802
+ endGap?: number;
1803
+ /** `aria-label` del botón de avanzadas. */
1804
+ advancedAriaLabel?: string;
1805
+ /** `aria-label` del botón de limpiar. */
1806
+ clearAriaLabel?: string;
1807
+ /** `aria-label` del input. */
1808
+ ariaLabel?: string;
1809
+ /** Base para los `data-testid`. */
1810
+ testId?: string;
1811
+ };
1812
+
1339
1813
  /**
1340
1814
  * Servicios HTTP del módulo `sections` del CMS.
1341
1815
  *
@@ -1362,6 +1836,37 @@ export declare class CmsSectionsServices {
1362
1836
  updateSection: (section: SectionInput) => Promise<CmsResponse>;
1363
1837
  }
1364
1838
 
1839
+ /**
1840
+ * Selector de una sola opción tipo formulario (subrayado M3). A diferencia de
1841
+ * `SelectDropdown` (píldora para filtros de listado), este es un campo de
1842
+ * formulario con etiqueta arriba. El menú resalta la opción activa en
1843
+ * `secondary`, hace hover en `secondaryHover`, deja aire entre el borde del
1844
+ * contenedor y el resaltado, y marca la activa con un check. Controlado y
1845
+ * reutilizable.
1846
+ */
1847
+ export declare function CmsSelectField({ value, onChange, options, label, placeholder, hint, disabled, showCheck, testId, }: CmsSelectFieldProps): JSX.Element;
1848
+
1849
+ export declare type CmsSelectFieldProps = {
1850
+ /** Valor seleccionado (controlado; vacío = ninguno). */
1851
+ value: string;
1852
+ /** Callback con el nuevo valor. */
1853
+ onChange: (value: string) => void;
1854
+ /** Opciones disponibles. */
1855
+ options: FieldOption[];
1856
+ /** Etiqueta superior (ya traducida). */
1857
+ label?: ReactNode;
1858
+ /** Placeholder mostrado cuando no hay valor (ya traducido). */
1859
+ placeholder?: string;
1860
+ /** Texto de ayuda bajo el control. */
1861
+ hint?: ReactNode;
1862
+ /** Deshabilita el control. */
1863
+ disabled?: boolean;
1864
+ /** Muestra el check en la opción activa. Por defecto `true`. */
1865
+ showCheck?: boolean;
1866
+ /** Base para los `data-testid`. */
1867
+ testId?: string;
1868
+ };
1869
+
1365
1870
  export declare type CmsShadows = typeof shadows;
1366
1871
 
1367
1872
  /**
@@ -1379,6 +1884,40 @@ export declare class CmsSitesServices {
1379
1884
 
1380
1885
  export declare type CmsSizes = typeof sizes;
1381
1886
 
1887
+ /**
1888
+ * Campo de etiquetas libres: se escribe y se presiona Enter para agregar chips
1889
+ * (equivale al campo "Etiquetas" del diseño). Internamente usa `Autocomplete`
1890
+ * `freeSolo` múltiple. Controlado y reutilizable.
1891
+ */
1892
+ export declare function CmsTagsField({ value, onChange, label, placeholder, hint, suggestions, startIcon, chipSx, disabled, testId, }: CmsTagsFieldProps): JSX.Element;
1893
+
1894
+ export declare type CmsTagsFieldProps = {
1895
+ /** Etiquetas actuales (controlado). */
1896
+ value: string[];
1897
+ /** Callback con las nuevas etiquetas. */
1898
+ onChange: (value: string[]) => void;
1899
+ /** Etiqueta superior (ya traducida). */
1900
+ label?: ReactNode;
1901
+ /** Placeholder cuando no hay etiquetas (ya traducido). */
1902
+ placeholder?: string;
1903
+ /** Texto de ayuda bajo el control. */
1904
+ hint?: ReactNode;
1905
+ /** Sugerencias opcionales para el autocompletado. */
1906
+ suggestions?: string[];
1907
+ /** Ícono opcional a la izquierda del control (p. ej. una etiqueta/lupa). */
1908
+ startIcon?: ReactNode;
1909
+ /**
1910
+ * `sx` de los chips de etiqueta. Si se pasa, **reemplaza** el estilo por
1911
+ * defecto (`fieldStyles.sxChip`, primario tenue), permitiendo p. ej. usar el
1912
+ * color secundario.
1913
+ */
1914
+ chipSx?: SxProps<Theme>;
1915
+ /** Deshabilita el control. */
1916
+ disabled?: boolean;
1917
+ /** Base para los `data-testid`. */
1918
+ testId?: string;
1919
+ };
1920
+
1382
1921
  /**
1383
1922
  * Servicios HTTP del módulo `tags` del CMS.
1384
1923
  *
@@ -1416,6 +1955,100 @@ export declare class CmsTagsServices {
1416
1955
  changeStatus: (tag: TagChangeStatusInput) => Promise<TagChangeStatusResponse>;
1417
1956
  }
1418
1957
 
1958
+ /**
1959
+ * Campo de texto de una línea con la estética estándar del CMS (etiqueta arriba,
1960
+ * subrayado inferior). Controlado: el consumidor pasa `value` y `onChange`.
1961
+ * Reutilizable en cualquier formulario.
1962
+ */
1963
+ export declare function CmsTextField({ value, onChange, label, placeholder, hint, type, disabled, testId, }: CmsTextFieldProps): JSX.Element;
1964
+
1965
+ export declare type CmsTextFieldProps = {
1966
+ /** Valor actual (controlado). */
1967
+ value: string;
1968
+ /** Callback con el nuevo texto. */
1969
+ onChange: (value: string) => void;
1970
+ /** Etiqueta superior (ya traducida). */
1971
+ label?: ReactNode;
1972
+ /** Placeholder (ya traducido). */
1973
+ placeholder?: string;
1974
+ /** Texto de ayuda bajo el control. */
1975
+ hint?: ReactNode;
1976
+ /** Tipo HTML del input. Por defecto `text`. */
1977
+ type?: 'text' | 'email' | 'url';
1978
+ /** Deshabilita el control. */
1979
+ disabled?: boolean;
1980
+ /** Base para los `data-testid`. */
1981
+ testId?: string;
1982
+ };
1983
+
1984
+ export declare function CmsToast({ item, t, localeTag, appVersion, onClose, }: CmsToastProps): JSX.Element;
1985
+
1986
+ export declare interface CmsToastApi {
1987
+ /** Toast de éxito (verde). */
1988
+ success: (message: string, options?: ToastOptions) => string;
1989
+ /** Toast informativo (azul). */
1990
+ info: (message: string, options?: ToastOptions) => string;
1991
+ /** Toast de advertencia (ámbar) — condición esperada/accionable. */
1992
+ warning: (message: string, options?: ToastOptions) => string;
1993
+ /** Toast de error (rojo, grande, con detalle copiable). */
1994
+ error: (message: string, options?: ToastErrorOptions) => string;
1995
+ /** Atajo genérico. */
1996
+ show: (severity: ToastSeverity, message: string, options?: ToastErrorOptions) => string;
1997
+ /** Cierra un toast por id; sin id, cierra todos. */
1998
+ dismiss: (id?: string) => void;
1999
+ /**
2000
+ * Interpreta un envelope `CmsResponse` y dispara el toast adecuado:
2001
+ * - `status: 'ok'` → success.
2002
+ * - fallo → severidad por código (`resolveErrorSeverity`) y mensaje legible
2003
+ * (`getCommonError` → `error` crudo → default i18n).
2004
+ */
2005
+ notifyCmsResponse: (response: CmsResponseLike | null | undefined, options?: NotifyCmsResponseOptions) => string;
2006
+ }
2007
+
2008
+ export declare const CmsToastContext: Context<CmsToastContextValue | null>;
2009
+
2010
+ export declare interface CmsToastContextValue {
2011
+ /** Encola un toast ya normalizado. Devuelve su id. */
2012
+ enqueue: (item: Omit<ToastItem, 'id'>) => string;
2013
+ /** Cierra un toast por id; sin id, cierra todos. */
2014
+ dismiss: (id?: string) => void;
2015
+ /** Translator resuelto al locale del provider (para resolver mensajes). */
2016
+ t: CmsTranslator;
2017
+ /** Locale activo del provider. */
2018
+ locale: Locale;
2019
+ }
2020
+
2021
+ export declare interface CmsToastProps {
2022
+ item: ToastItem;
2023
+ t: CmsTranslator;
2024
+ /** Tag BCP 47 para formatear la fecha del detalle del error. */
2025
+ localeTag: string;
2026
+ /** Versión a mostrar en el detalle del error (app o lib). */
2027
+ appVersion: string;
2028
+ onClose: (id: string) => void;
2029
+ }
2030
+
2031
+ /**
2032
+ * Provee el sistema de toasts a toda la app. Renderiza una pila fija (abajo a
2033
+ * la izquierda) y expone `useCmsToast()` para disparar feedback de operaciones.
2034
+ *
2035
+ * El mecanismo vive en la lib; el **disparo** lo hace el gestor (catch de un
2036
+ * server action / handler de mutación).
2037
+ */
2038
+ export declare function CmsToastProvider({ children, locale, language, appVersion, max, }: CmsToastProviderProps): JSX.Element;
2039
+
2040
+ export declare interface CmsToastProviderProps {
2041
+ children: ReactNode;
2042
+ /** Locale del usuario (sale de `profile.locale` en el gestor). */
2043
+ locale?: Locale | string;
2044
+ /** Alias de `locale`. */
2045
+ language?: Locale | string;
2046
+ /** Versión a mostrar en el detalle del toast de error. Default: `LIB_VERSION`. */
2047
+ appVersion?: string;
2048
+ /** Máximo de toasts simultáneos (se descarta el más viejo). Default: 4. */
2049
+ max?: number;
2050
+ }
2051
+
1419
2052
  /**
1420
2053
  * Servicios HTTP del módulo `transcribe` del CMS.
1421
2054
  *
@@ -1436,13 +2069,30 @@ export declare class CmsTranscribeServices {
1436
2069
 
1437
2070
  export declare type CmsTranslator = {
1438
2071
  messages: CmsMessages;
2072
+ /** Árbol de mensajes del gestor ya resuelto al locale activo (con fallback en). */
2073
+ appMessages: AppMessages;
1439
2074
  navigation: (module: NavigationModule | string) => string;
1440
2075
  sidebar: (key: SidebarMessageKey) => string;
1441
2076
  topBar: (key: TopBarMessageKey) => string;
2077
+ newMenu: (key: NewMenuMessageKey) => string;
2078
+ previewMenu: (key: PreviewMenuMessageKey) => string;
1442
2079
  profileMenu: (key: ProfileMenuMessageKey) => string;
1443
2080
  notificationsMenu: (key: NotificationsMenuMessageKey, params?: {
1444
2081
  count?: number;
1445
2082
  }) => string;
2083
+ toast: (key: ToastMessageKey) => string;
2084
+ userAvatar: (key: UserAvatarMessageKey) => string;
2085
+ /**
2086
+ * Resuelve una clave propia del gestor por ruta con puntos
2087
+ * (p. ej. `t.app('usuarios.modal.deactivate.title')`). Si falta, devuelve la
2088
+ * ruta tal cual (útil para detectar claves ausentes en desarrollo).
2089
+ */
2090
+ app: AppTranslate;
2091
+ /**
2092
+ * Devuelve un traductor del gestor con un namespace fijado:
2093
+ * `const tu = t.scoped('usuarios'); tu('modal.deactivate.title')`.
2094
+ */
2095
+ scoped: (namespace: string) => AppTranslate;
1446
2096
  };
1447
2097
 
1448
2098
  /**
@@ -1553,11 +2203,11 @@ export declare class CmsUsersServices {
1553
2203
  addPin: (pin: string) => Promise<UserPinAddResponse>;
1554
2204
  /** POST /users/pin/delete — elimina uno o más pins por ID. */
1555
2205
  deletePins: (ids: number[]) => Promise<CmsResponse>;
1556
- /** POST /users/action/setStatus — activa o desactiva un usuario. */
2206
+ /** POST /users/actions/setStatus — activa o desactiva un usuario. */
1557
2207
  setUserStatus: (username: string, action: UserStatusAction) => Promise<CmsResponse>;
1558
- /** POST /users/action/resetPass — restablece la contraseña de un usuario. */
2208
+ /** POST /users/actions/resetPass — restablece la contraseña de un usuario. */
1559
2209
  resetPassword: (username: string) => Promise<CmsResponse>;
1560
- /** POST /users/action/resetMfa — resetea la configuración MFA de un usuario. */
2210
+ /** POST /users/actions/resetMfa — resetea la configuración MFA de un usuario. */
1561
2211
  resetMfa: (username: string, reason: string) => Promise<CmsResponse>;
1562
2212
  }
1563
2213
 
@@ -1721,6 +2371,11 @@ export declare class CmsZonesServices {
1721
2371
  orderZones: (ids: number[]) => Promise<CmsResponse>;
1722
2372
  }
1723
2373
 
2374
+ export declare type ComboboxFieldConfig = BaseFieldConfig & {
2375
+ kind: 'combobox';
2376
+ options: FieldOption[];
2377
+ };
2378
+
1724
2379
  /** Comentario del CMS. La forma exacta no está documentada. */
1725
2380
  declare interface Comment_2 {
1726
2381
  commentId?: string;
@@ -1851,6 +2506,60 @@ export declare interface CommentUserGetResponse extends CmsResponse {
1851
2506
  phonenumber?: string;
1852
2507
  }
1853
2508
 
2509
+ /**
2510
+ * CMS error code → readable message map (English).
2511
+ *
2512
+ * English counterpart of {@link commonErrorsEs}. See that file for the key
2513
+ * convention and the `código → código+'a'` fallback handled by
2514
+ * `getCommonError`.
2515
+ */
2516
+ export declare const commonErrorsEn: Record<string, string>;
2517
+
2518
+ /**
2519
+ * Mapa de códigos de error del CMS → mensaje legible (español).
2520
+ *
2521
+ * Equivalente al `CommonErrorsEs` del Angular legacy (`cmsmedios-ux`). Es la
2522
+ * base compartida por todos los gestores; **se va ampliando** con cada código
2523
+ * nuevo que se aprenda durante el desarrollo (ver CLAUDE.md raíz).
2524
+ *
2525
+ * Convención de claves: el código tal cual lo devuelve el webservice
2526
+ * (`000.005`, `999.000`, …). Algunos mensajes genéricos usan el sufijo `a`
2527
+ * (`999.002a`) por compatibilidad con el legacy; `getCommonError` resuelve el
2528
+ * fallback `código → código+'a'` automáticamente.
2529
+ */
2530
+ export declare const commonErrorsEs: Record<string, string>;
2531
+
2532
+ /**
2533
+ * Mapa de código de erro do CMS → mensagem legível (português).
2534
+ *
2535
+ * Equivalente em português de {@link commonErrorsEs}.
2536
+ */
2537
+ export declare const commonErrorsPt: Record<string, string>;
2538
+
2539
+ export declare type ConfidenceColors = typeof confidenceColors;
2540
+
2541
+ /**
2542
+ * Colores de un badge de confianza/score por nivel. `bg` = fondo del badge;
2543
+ * `on` = texto. (Score de IA, relevancia, etc.)
2544
+ */
2545
+ export declare const confidenceColors: {
2546
+ /** Alto, ≥85% (verde). */
2547
+ readonly high: {
2548
+ readonly bg: "#D7F5DD";
2549
+ readonly on: "#0D5B2B";
2550
+ };
2551
+ /** Medio, 70–84% (ámbar). */
2552
+ readonly medium: {
2553
+ readonly bg: "#FFF0C8";
2554
+ readonly on: "#6B4D00";
2555
+ };
2556
+ /** Bajo, <70% (gris). */
2557
+ readonly low: {
2558
+ readonly bg: "#E7E8EE";
2559
+ readonly on: "#43474E";
2560
+ };
2561
+ };
2562
+
1854
2563
  /**
1855
2564
  * Contribución a actualizar (POST /contributions/edit).
1856
2565
  *
@@ -1896,7 +2605,36 @@ export declare interface CountNotificationsResponse {
1896
2605
 
1897
2606
  export declare function createAppTheme(): Theme;
1898
2607
 
1899
- export declare function createTranslator(messages: CmsMessages): CmsTranslator;
2608
+ export declare function createTranslator(messages: CmsMessages, appMessages?: AppMessages): CmsTranslator;
2609
+
2610
+ /**
2611
+ * Estado compartido de la foto del usuario logueado.
2612
+ *
2613
+ * Es el equivalente React del `updateImageProfile` (BehaviorSubject) del CMS
2614
+ * Angular legacy: cuando el usuario cambia su foto de perfil, la pantalla de
2615
+ * edición llama a `setPhoto(...)` y todos los avatares marcados como
2616
+ * `isCurrentUser` se actualizan al instante, sin recargar ni hacer
2617
+ * prop-drilling.
2618
+ */
2619
+ export declare interface CurrentUserPhotoContextValue {
2620
+ /** Foto actual del usuario logueado: ruta/URL, '' o 'noPicture'. `null` = sin valor todavía. */
2621
+ photo: string | null;
2622
+ /** Notifica una foto nueva (o '' / 'noPicture' al borrarla). */
2623
+ setPhoto: (photo: string | null) => void;
2624
+ }
2625
+
2626
+ /**
2627
+ * Provider de la foto del usuario logueado. Montarlo por encima de los avatares
2628
+ * que representan al usuario actual (típicamente en el `AppShell` o el layout de
2629
+ * la cuenta), sembrado con `profile.image`.
2630
+ */
2631
+ export declare function CurrentUserPhotoProvider({ initialPhoto, children, }: CurrentUserPhotoProviderProps): JSX.Element;
2632
+
2633
+ export declare interface CurrentUserPhotoProviderProps {
2634
+ /** Foto inicial del usuario logueado (p. ej. `profile.image`). */
2635
+ initialPhoto?: string | null;
2636
+ children: ReactNode;
2637
+ }
1900
2638
 
1901
2639
  /** Cuerpo de la respuesta de POST /dashboard/countNotifications. */
1902
2640
  export declare interface DashboardCountNotificationsResponse extends CmsResponse {
@@ -1961,6 +2699,10 @@ export declare interface DashboardVideoNotification {
1961
2699
  [key: string]: unknown;
1962
2700
  }
1963
2701
 
2702
+ export declare type DateFieldConfig = BaseFieldConfig & {
2703
+ kind: 'date';
2704
+ };
2705
+
1964
2706
  declare type DeepStringMap<T> = {
1965
2707
  [K in keyof T]: T[K] extends Record<string, unknown> ? {
1966
2708
  [K2 in keyof T[K]]: string;
@@ -1969,6 +2711,27 @@ declare type DeepStringMap<T> = {
1969
2711
 
1970
2712
  export declare const DEFAULT_LOCALE: Locale;
1971
2713
 
2714
+ /**
2715
+ * Estructura por defecto del menú "Nuevo", equivalente al `newContent` del
2716
+ * header de cmsmedios (frecuentes / otros / videos) con sus permisos. El gestor
2717
+ * puede sobreescribirla por props si su producto difiere.
2718
+ */
2719
+ export declare const DEFAULT_NEW_CONTENT_GROUPS: NewContentGroup[];
2720
+
2721
+ /**
2722
+ * Formatos por defecto con la ruta EXACTA de cmsmedios. El redirect (form POST
2723
+ * al CMS, como Ayuda) arma el campo `r` con `submitLegacyAdminPage`:
2724
+ * - Desktop → `r = /index.html`
2725
+ * - Mobile → `r = /preview/mobile.html?path=/index.html`
2726
+ * - Tablet → `r = /preview/tablet.html?path=/index.html`
2727
+ *
2728
+ * `path` es la ruta de la publicación (`/index.html` para la principal). El
2729
+ * `queryString` del device, al contener `/`, dispara la rama "redirect" de
2730
+ * cmsmedios (`<queryString>?path=<path>`). El gestor puede sobrescribir estos
2731
+ * formatos con los de `POST /news/previewFormats` por publicación.
2732
+ */
2733
+ export declare const DEFAULT_PREVIEW_FORMATS: PreviewFormat[];
2734
+
1972
2735
  export declare const DEFAULT_SITE_ID = "bluestack-es";
1973
2736
 
1974
2737
  export declare const DefaultCmsLink: ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement> & {
@@ -2099,7 +2862,31 @@ export declare const enMessages: {
2099
2862
  readonly new: "New";
2100
2863
  readonly language: "Language";
2101
2864
  readonly analytics: "Analytics";
2865
+ readonly preview: "Preview";
2102
2866
  readonly help: "Help";
2867
+ readonly publication: "Publication";
2868
+ };
2869
+ readonly newMenu: {
2870
+ readonly frequentsTitle: "Frequent";
2871
+ readonly othersTitle: "Others";
2872
+ readonly videosTitle: "Videos";
2873
+ readonly post: "New Post";
2874
+ readonly trivia: "New Trivia";
2875
+ readonly poll: "New Poll";
2876
+ readonly listicle: "New Listicle";
2877
+ readonly tag: "New Tag";
2878
+ readonly gamecast: "New Gamecast";
2879
+ readonly liveblog: "New LiveBlog";
2880
+ readonly aiPost: "New AI Post";
2881
+ readonly aiListicle: "New AI Listicle";
2882
+ readonly videoNative: "New Video Native";
2883
+ readonly videoEmbedded: "New Video Embedded";
2884
+ readonly videoYoutube: "New Video Youtube";
2885
+ };
2886
+ readonly previewMenu: {
2887
+ readonly desktop: "Preview Desktop";
2888
+ readonly mobile: "Preview Mobile";
2889
+ readonly tablet: "Preview Tablet";
2103
2890
  };
2104
2891
  readonly profileMenu: {
2105
2892
  readonly ariaLabel: "My profile";
@@ -2113,6 +2900,87 @@ export declare const enMessages: {
2113
2900
  readonly empty: "No notifications";
2114
2901
  readonly ariaLabel: "Notifications";
2115
2902
  };
2903
+ readonly search: {
2904
+ readonly placeholder: "Search…";
2905
+ readonly inputAriaLabel: "Search";
2906
+ readonly clearAriaLabel: "Clear search";
2907
+ readonly advancedAriaLabel: "Advanced search";
2908
+ readonly title: "Advanced search";
2909
+ readonly apply: "Apply";
2910
+ readonly reset: "Reset";
2911
+ readonly close: "Close";
2912
+ readonly noOptions: "No matches";
2913
+ readonly dateToday: "Today";
2914
+ readonly dateClear: "Clear";
2915
+ readonly dateOpenAriaLabel: "Open calendar";
2916
+ readonly prevMonthAriaLabel: "Previous month";
2917
+ readonly nextMonthAriaLabel: "Next month";
2918
+ };
2919
+ readonly searchFields: {
2920
+ readonly text: "Text";
2921
+ readonly textPlaceholder: "Title, summary or body";
2922
+ readonly type: "Type";
2923
+ readonly typePlaceholder: "All types";
2924
+ readonly section: "Section";
2925
+ readonly sectionPlaceholder: "All sections";
2926
+ readonly category: "Category";
2927
+ readonly categoryPlaceholder: "All categories";
2928
+ readonly states: "Statuses";
2929
+ readonly statesPlaceholder: "All statuses";
2930
+ readonly creator: "Creator";
2931
+ readonly creatorPlaceholder: "Type to search a creator";
2932
+ readonly author: "Author";
2933
+ readonly authorPlaceholder: "Type to search an author";
2934
+ readonly tags: "Tags";
2935
+ readonly tagsPlaceholder: "Type and press Enter";
2936
+ readonly groups: "Groups";
2937
+ readonly groupsPlaceholder: "All groups";
2938
+ readonly amount: "Amount to show";
2939
+ readonly amountPlaceholder: "e.g. 50";
2940
+ readonly dateFrom: "Date from";
2941
+ readonly dateTo: "Date to";
2942
+ readonly sortBy: "Sort by";
2943
+ readonly sortByPlaceholder: "Relevance";
2944
+ readonly zone: "Zone";
2945
+ readonly zonePlaceholder: "Any zone";
2946
+ readonly priority: "Priority";
2947
+ readonly priorityPlaceholder: "All";
2948
+ readonly order: "Order";
2949
+ readonly orderPlaceholder: "Descending";
2950
+ readonly includeDrafts: "Include drafts";
2951
+ readonly includeHistory: "Include historical content";
2952
+ };
2953
+ readonly searchOptions: {
2954
+ readonly typeNews: "Article";
2955
+ readonly typeList: "List note";
2956
+ readonly typeLiveblog: "LiveBlog";
2957
+ readonly statePublished: "Published";
2958
+ readonly stateDraft: "In drafting";
2959
+ readonly stateScheduled: "Scheduled";
2960
+ readonly stateReview: "In review";
2961
+ readonly stateDone: "Finished";
2962
+ readonly sortRelevance: "Relevance";
2963
+ readonly sortDate: "Date";
2964
+ readonly sortTitle: "Title";
2965
+ readonly orderDesc: "Descending";
2966
+ readonly orderAsc: "Ascending";
2967
+ readonly priorityHigh: "High (1–10)";
2968
+ readonly priorityMid: "Medium (11–30)";
2969
+ readonly priorityLow: "Low (31+)";
2970
+ };
2971
+ readonly toast: {
2972
+ readonly close: "Close";
2973
+ readonly copyDetail: "Copy error detail";
2974
+ readonly copied: "Copied";
2975
+ readonly defaultSuccess: "Operation completed successfully.";
2976
+ readonly defaultError: "An error occurred in the service.";
2977
+ readonly defaultWarning: "Please review the request.";
2978
+ readonly defaultInfo: "Information";
2979
+ };
2980
+ readonly userAvatar: {
2981
+ readonly alt: "User avatar";
2982
+ readonly unknownUser: "Unknown user";
2983
+ };
2116
2984
  };
2117
2985
 
2118
2986
  export declare const esMessages: {
@@ -2167,7 +3035,31 @@ export declare const esMessages: {
2167
3035
  new: string;
2168
3036
  language: string;
2169
3037
  analytics: string;
3038
+ preview: string;
2170
3039
  help: string;
3040
+ publication: string;
3041
+ };
3042
+ newMenu: {
3043
+ frequentsTitle: string;
3044
+ othersTitle: string;
3045
+ videosTitle: string;
3046
+ post: string;
3047
+ trivia: string;
3048
+ poll: string;
3049
+ listicle: string;
3050
+ tag: string;
3051
+ gamecast: string;
3052
+ liveblog: string;
3053
+ aiPost: string;
3054
+ aiListicle: string;
3055
+ videoNative: string;
3056
+ videoEmbedded: string;
3057
+ videoYoutube: string;
3058
+ };
3059
+ previewMenu: {
3060
+ desktop: string;
3061
+ mobile: string;
3062
+ tablet: string;
2171
3063
  };
2172
3064
  profileMenu: {
2173
3065
  ariaLabel: string;
@@ -2181,6 +3073,87 @@ export declare const esMessages: {
2181
3073
  empty: string;
2182
3074
  ariaLabel: string;
2183
3075
  };
3076
+ search: {
3077
+ placeholder: string;
3078
+ inputAriaLabel: string;
3079
+ clearAriaLabel: string;
3080
+ advancedAriaLabel: string;
3081
+ title: string;
3082
+ apply: string;
3083
+ reset: string;
3084
+ close: string;
3085
+ noOptions: string;
3086
+ dateToday: string;
3087
+ dateClear: string;
3088
+ dateOpenAriaLabel: string;
3089
+ prevMonthAriaLabel: string;
3090
+ nextMonthAriaLabel: string;
3091
+ };
3092
+ searchFields: {
3093
+ text: string;
3094
+ textPlaceholder: string;
3095
+ type: string;
3096
+ typePlaceholder: string;
3097
+ section: string;
3098
+ sectionPlaceholder: string;
3099
+ category: string;
3100
+ categoryPlaceholder: string;
3101
+ states: string;
3102
+ statesPlaceholder: string;
3103
+ creator: string;
3104
+ creatorPlaceholder: string;
3105
+ author: string;
3106
+ authorPlaceholder: string;
3107
+ tags: string;
3108
+ tagsPlaceholder: string;
3109
+ groups: string;
3110
+ groupsPlaceholder: string;
3111
+ amount: string;
3112
+ amountPlaceholder: string;
3113
+ dateFrom: string;
3114
+ dateTo: string;
3115
+ sortBy: string;
3116
+ sortByPlaceholder: string;
3117
+ zone: string;
3118
+ zonePlaceholder: string;
3119
+ priority: string;
3120
+ priorityPlaceholder: string;
3121
+ order: string;
3122
+ orderPlaceholder: string;
3123
+ includeDrafts: string;
3124
+ includeHistory: string;
3125
+ };
3126
+ searchOptions: {
3127
+ typeNews: string;
3128
+ typeList: string;
3129
+ typeLiveblog: string;
3130
+ statePublished: string;
3131
+ stateDraft: string;
3132
+ stateScheduled: string;
3133
+ stateReview: string;
3134
+ stateDone: string;
3135
+ sortRelevance: string;
3136
+ sortDate: string;
3137
+ sortTitle: string;
3138
+ orderDesc: string;
3139
+ orderAsc: string;
3140
+ priorityHigh: string;
3141
+ priorityMid: string;
3142
+ priorityLow: string;
3143
+ };
3144
+ toast: {
3145
+ close: string;
3146
+ copyDetail: string;
3147
+ copied: string;
3148
+ defaultSuccess: string;
3149
+ defaultError: string;
3150
+ defaultWarning: string;
3151
+ defaultInfo: string;
3152
+ };
3153
+ userAvatar: {
3154
+ alt: string;
3155
+ unknownUser: string;
3156
+ };
2184
3157
  };
2185
3158
 
2186
3159
  /** Cuerpo de la respuesta de POST /events/create. */
@@ -2248,6 +3221,160 @@ export declare interface ExplorerFolder {
2248
3221
  [key: string]: unknown;
2249
3222
  }
2250
3223
 
3224
+ export declare type FeedbackColors = typeof feedbackColors;
3225
+
3226
+ /**
3227
+ * Colores de feedback de operaciones (toasts/notificaciones).
3228
+ *
3229
+ * El toast usa una superficie oscura (estilo de diseño del CMS) con texto
3230
+ * claro y un ícono de acento por severidad. Los acentos replican los del
3231
+ * Angular legacy (`cmsmedios-ux`): éxito verde, advertencia ámbar, error rojo.
3232
+ */
3233
+ export declare const feedbackColors: {
3234
+ /** Fondo oscuro del toast (común a todas las severidades). */
3235
+ readonly surface: "#2E2E2E";
3236
+ /** Texto/íconos sobre la superficie oscura. */
3237
+ readonly onSurface: "#FFFFFF";
3238
+ /** Texto secundario (detalle, url, versión) sobre la superficie oscura. */
3239
+ readonly onSurfaceMuted: "#C7C7C7";
3240
+ /** Acento de éxito (verde). */
3241
+ readonly success: "#00C853";
3242
+ /** Acento de advertencia (ámbar). */
3243
+ readonly warning: "#FFAB00";
3244
+ /** Acento de error (rojo). */
3245
+ readonly error: "#FF1744";
3246
+ /** Acento informativo (azul). */
3247
+ readonly info: "#2196F3";
3248
+ };
3249
+
3250
+ /**
3251
+ * Configuración de un campo del formulario de búsqueda avanzada.
3252
+ * Unión discriminada por `kind`: el contenedor renderiza el componente de campo
3253
+ * que corresponda. Así un gestor "arma" su modal pasando solo los campos que
3254
+ * necesita (`fields: FieldConfig[]`).
3255
+ */
3256
+ export declare type FieldConfig = TextFieldConfig | NumberFieldConfig | DateFieldConfig | SelectFieldConfig | MultiSelectFieldConfig | ComboboxFieldConfig | TagsFieldConfig | CheckboxFieldConfig;
3257
+
3258
+ /** Tipos de campo soportados por el contenedor de búsqueda avanzada. */
3259
+ export declare type FieldKind = 'text' | 'number' | 'date' | 'select' | 'multiselect' | 'combobox' | 'tags' | 'checkbox';
3260
+
3261
+ /**
3262
+ * Opción de un campo con opciones (select / combobox / multiselect).
3263
+ * Mismo formato que el resto de la librería: `value` se compara/emite y `label`
3264
+ * es el texto (ya traducido) a mostrar.
3265
+ */
3266
+ export declare type FieldOption = {
3267
+ /** Valor que se emite y se compara. */
3268
+ value: string;
3269
+ /** Texto o nodo (ya traducido) a mostrar. */
3270
+ label: ReactNode;
3271
+ /** Si es `false` la opción no se renderiza. Por defecto `true`. */
3272
+ show?: boolean;
3273
+ /** Deshabilita la opción individual. */
3274
+ disabled?: boolean;
3275
+ /**
3276
+ * Color del puntito que precede a la opción (multiselección). Si se omite, la
3277
+ * opción no muestra puntito. Útil para estados con color.
3278
+ */
3279
+ color?: string;
3280
+ };
3281
+
3282
+ /**
3283
+ * Renderiza el componente de campo que corresponde a una `FieldConfig`,
3284
+ * resolviendo el tipo de valor por cada `kind`. Es el puente entre la
3285
+ * configuración declarativa del modal y los componentes de campo concretos.
3286
+ */
3287
+ export declare function FieldRenderer({ field, value, onChange }: FieldRendererProps): JSX.Element | null;
3288
+
3289
+ export declare type FieldRendererProps = {
3290
+ /** Configuración del campo a renderizar. */
3291
+ field: FieldConfig;
3292
+ /** Valor actual del campo. */
3293
+ value: FieldValue | undefined;
3294
+ /** Callback con el nuevo valor del campo. */
3295
+ onChange: (value: FieldValue) => void;
3296
+ };
3297
+
3298
+ /**
3299
+ * Envoltorio común de un campo: etiqueta arriba + control + ayuda abajo.
3300
+ *
3301
+ * Centraliza la disposición vertical y la tipografía de la etiqueta para que
3302
+ * todos los campos del CMS se vean idénticos. Se exporta para poder construir
3303
+ * campos a medida que respeten el mismo layout.
3304
+ */
3305
+ export declare function FieldShell({ label, htmlFor, hint, children }: FieldShellProps): JSX.Element;
3306
+
3307
+ export declare type FieldShellProps = {
3308
+ /** Etiqueta superior (ya traducida). Si se omite no se renderiza. */
3309
+ label?: ReactNode;
3310
+ /** `htmlFor` para asociar la etiqueta al control. */
3311
+ htmlFor?: string;
3312
+ /** Texto de ayuda bajo el control. */
3313
+ hint?: ReactNode;
3314
+ /** El control del campo. */
3315
+ children: ReactNode;
3316
+ };
3317
+
3318
+ /**
3319
+ * Estilos compartidos de los campos de formulario del CMS.
3320
+ *
3321
+ * Replican la estética "Material 3 standard" del diseño de referencia
3322
+ * (etiqueta arriba en gris, control con subrayado inferior; el subrayado pasa a
3323
+ * `primary` al enfocar). Viven juntos para que todos los campos
3324
+ * (`CmsTextField`, `CmsSelectField`, etc.) compartan exactamente el mismo look y
3325
+ * puedan reutilizarse en cualquier formulario de cualquier gestor.
3326
+ */
3327
+ export declare const fieldStyles: {
3328
+ /** Contenedor vertical: etiqueta + control + ayuda. */
3329
+ sxField: SxProps<Theme>;
3330
+ /** Etiqueta superior (gris, label-medium). */
3331
+ sxLabel: SxProps<Theme>;
3332
+ /** Texto de ayuda bajo el control. */
3333
+ sxHint: SxProps<Theme>;
3334
+ /**
3335
+ * `sx` para los controles basados en `TextField variant="standard"`
3336
+ * (texto, número, fecha, select) y para el `renderInput` de los
3337
+ * `Autocomplete` (combobox, tags, multiselect). Unifica subrayado,
3338
+ * tipografía y color del placeholder.
3339
+ */
3340
+ sxStandard: SxProps<Theme>;
3341
+ /**
3342
+ * Chips de los campos multiselección / etiquetas: fondo secundario, texto
3343
+ * sobre contenedor secundario y radio "redondo cuadrado".
3344
+ */
3345
+ sxChip: SxProps<Theme>;
3346
+ /** Paper del desplegable de los `Autocomplete` (con aire vertical). */
3347
+ sxAutocompletePaper: SxProps<Theme>;
3348
+ /**
3349
+ * Listbox de los `Autocomplete`: opciones "embutidas" (con aire lateral y
3350
+ * radio), hover en `secondaryHover` y opción activa en `secondary`.
3351
+ */
3352
+ sxAutocompleteListbox: SxProps<Theme>;
3353
+ /**
3354
+ * Paper del menú de `CmsSelectField`. Con padding propio para que las opciones
3355
+ * queden "embutidas" (hay aire entre el borde del contenedor y el resaltado de
3356
+ * cada opción), igual que el diseño de referencia.
3357
+ */
3358
+ sxSelectMenuPaper: SxProps<Theme>;
3359
+ /** Lista del menú del select (sin padding; el aire lo pone el paper). */
3360
+ sxSelectList: SxProps<Theme>;
3361
+ /**
3362
+ * Opción del menú del select: redondeada, hover en `secondaryHover`, activa en
3363
+ * `secondary` (y su hover también `secondaryHover`). El check va a la derecha.
3364
+ */
3365
+ sxSelectItem: SxProps<Theme>;
3366
+ /** Check de la opción activa del select. */
3367
+ sxSelectCheck: SxProps<Theme>;
3368
+ /** Etiqueta del checkbox (alineada al control). */
3369
+ sxCheckboxLabel: SxProps<Theme>;
3370
+ };
3371
+
3372
+ /** Valor que puede contener un campo del formulario de búsqueda. */
3373
+ export declare type FieldValue = string | string[] | boolean;
3374
+
3375
+ /** Mapa `nombre del campo` → `valor`. Es lo que emite el modal al aplicar. */
3376
+ export declare type FieldValues = Record<string, FieldValue>;
3377
+
2251
3378
  /** Cuerpo de la respuesta de POST /fileExplorer/getFiles. */
2252
3379
  export declare interface FileExplorerGetFilesResponse extends CmsResponse {
2253
3380
  /** Archivos (no carpetas) contenidos en la carpeta consultada. */
@@ -2264,8 +3391,39 @@ export declare function findPublicationBySlug(sites: SiteSection[], slug: string
2264
3391
 
2265
3392
  export declare function findPublicationLabel(sites: SiteSection[], publicationId: string): string;
2266
3393
 
3394
+ /**
3395
+ * Familias tipográficas del CMS. `roboto` = texto general (default del theme);
3396
+ * `productSans` = marca / títulos. Las `@font-face` que las cargan viven en
3397
+ * `theme/fonts.ts` y se inyectan vía el provider MUI. Usar estas variables en
3398
+ * lugar de strings sueltos (mismo criterio que con los colores).
3399
+ */
3400
+ export declare const fontFamilies: {
3401
+ readonly roboto: "\"Roboto\",\"Helvetica\",\"Arial\",sans-serif";
3402
+ readonly productSans: "\"Product Sans\",\"Roboto\",\"Helvetica\",\"Arial\",sans-serif";
3403
+ };
3404
+
3405
+ /**
3406
+ * Formatea un instante (epoch ms) en la zona horaria del sitio, de forma
3407
+ * estable entre navegadores.
3408
+ *
3409
+ * @param epochMs Instante en milisegundos (UTC).
3410
+ * @param gmtRedaction Offset GMT de la publicación.
3411
+ * @param localeTag Tag BCP 47 (p. ej. `"es-AR"`); usar `getIntlLocaleTag(locale)`.
3412
+ * @param options Opciones de `Intl.DateTimeFormat` (se fuerza `timeZone: 'UTC'`).
3413
+ */
3414
+ export declare function formatSiteDateTime(epochMs: number, gmtRedaction: string | null | undefined, localeTag: string, options?: Intl.DateTimeFormatOptions): string;
3415
+
2267
3416
  export declare function getAllPublications(sites: SiteSection[]): Publication[];
2268
3417
 
3418
+ /**
3419
+ * Resuelve el mensaje legible de un código de error en el idioma indicado.
3420
+ * Aplica el fallback legacy `código → código+'a'` (p. ej. `999.002` → `999.002a`)
3421
+ * y, si el idioma no tiene el código, cae a inglés. Devuelve `undefined` si el
3422
+ * código es desconocido (el caller debe usar entonces el `error` crudo o un
3423
+ * mensaje genérico).
3424
+ */
3425
+ export declare function getCommonError(errorCode: string | number | Array<string | number> | null | undefined, locale?: Locale): string | undefined;
3426
+
2269
3427
  export declare function getDefaultPublicationSlug(sites: SiteSection[]): string;
2270
3428
 
2271
3429
  /** BCP 47 tag for `Intl` / `toLocaleString` formatting. */
@@ -2275,6 +3433,16 @@ export declare function getProfileAvatarSrc(profile: ProfileGetResponse, options
2275
3433
 
2276
3434
  export declare function getProfileDisplayName(profile: ProfileGetResponse): string;
2277
3435
 
3436
+ /**
3437
+ * Hora actual del sitio (equivalente al `getFormattedRedactionTimeUTC` del CMS
3438
+ * Angular): "ahora" formateado en la zona de redacción de la publicación.
3439
+ *
3440
+ * @param gmtRedaction Offset GMT de la publicación.
3441
+ * @param localeTag Tag BCP 47 (p. ej. `"es-AR"`).
3442
+ * @param options Opciones de `Intl.DateTimeFormat`.
3443
+ */
3444
+ export declare function getSiteNow(gmtRedaction: string | null | undefined, localeTag: string, options?: Intl.DateTimeFormatOptions): string;
3445
+
2278
3446
  declare interface IAudiosServices {
2279
3447
  axiosApi: AxiosInstance;
2280
3448
  authentication: Authentication;
@@ -2584,6 +3752,19 @@ declare interface INotificationServices {
2584
3752
  authentication: Authentication;
2585
3753
  }
2586
3754
 
3755
+ export declare type InterestColors = typeof interestColors;
3756
+
3757
+ /**
3758
+ * Feedback de interés del usuario sobre un ítem (me gusta / no me gusta).
3759
+ * Tonos semánticos; los fondos de hover se derivan con `alpha()` en el `sx`.
3760
+ */
3761
+ export declare const interestColors: {
3762
+ /** Me gusta (verde). */
3763
+ readonly like: "#1E8E3E";
3764
+ /** No me gusta (rojo). */
3765
+ readonly dislike: "#D93025";
3766
+ };
3767
+
2587
3768
  declare interface IPeopleServices {
2588
3769
  axiosApi: AxiosInstance;
2589
3770
  authentication: Authentication;
@@ -2634,6 +3815,22 @@ declare interface ISitesServices {
2634
3815
  authentication: Authentication;
2635
3816
  }
2636
3817
 
3818
+ /**
3819
+ * Decide si un ítem es visible según los permisos de operación del usuario.
3820
+ *
3821
+ * - Si `operationPermissions` es `undefined`, no hay gating (se muestra todo);
3822
+ * útil para maquetado/mock antes de cablear `/auth/permissions`.
3823
+ * - Si el usuario es admin, ve todo.
3824
+ * - Si el ítem no declara permiso, se muestra.
3825
+ * - Con un array de permisos, se exigen todos.
3826
+ *
3827
+ * @param item - Ítem a evaluar.
3828
+ * @param operationPermissions - Nombres de operaciones concedidas al usuario.
3829
+ * @param isAdmin - Si el usuario es administrador.
3830
+ * @returns `true` si el ítem debe mostrarse.
3831
+ */
3832
+ export declare function isNewContentItemVisible(item: NewContentItem, operationPermissions: string[] | undefined, isAdmin: boolean | undefined): boolean;
3833
+
2637
3834
  declare interface ITagsServices {
2638
3835
  axiosApi: AxiosInstance;
2639
3836
  authentication: Authentication;
@@ -2683,6 +3880,35 @@ declare interface IZonesServices {
2683
3880
  authentication: Authentication;
2684
3881
  }
2685
3882
 
3883
+ /** Parámetros de dispositivo para la previsualización (protocolo/queryString). */
3884
+ export declare type LegacyAdminDevice = {
3885
+ /** `'https'` (por defecto) o `'http'`. */
3886
+ protocol?: string;
3887
+ /** QueryString específico del formato de preview (viene del backend). */
3888
+ queryString?: string;
3889
+ };
3890
+
3891
+ /**
3892
+ * Redirección al admin viejo del CMS (JSP) replicando el `openExternalPage()` de
3893
+ * cmsmedios-ux: en vez de un enlace, se arma y envía un formulario POST oculto
3894
+ * al endpoint `auth/adminBack/login`, que re-establece la sesión en la pestaña
3895
+ * nueva y luego redirige a la ruta pedida (campo `r`).
3896
+ *
3897
+ * Es código de navegador (usa `document`): debe llamarse desde un handler de
3898
+ * cliente, no en SSR.
3899
+ */
3900
+ /** Datos de sesión que el form POST envía al admin viejo. */
3901
+ export declare type LegacyAdminSession = {
3902
+ /** Token de autenticación (se envía en base64, igual que el Angular legacy). */
3903
+ token: string;
3904
+ browserId: string;
3905
+ siteName: string;
3906
+ publication: string | number;
3907
+ userName: string;
3908
+ /** Proyecto del CMS. Por defecto `'Offline'`. */
3909
+ project?: string;
3910
+ };
3911
+
2686
3912
  export declare const LIB_VERSION: "0.0.0";
2687
3913
 
2688
3914
  export declare type Locale = (typeof SUPPORTED_LOCALES)[number];
@@ -2696,6 +3922,13 @@ declare type MenuOrigin = {
2696
3922
  horizontal: 'left' | 'center' | 'right';
2697
3923
  };
2698
3924
 
3925
+ /**
3926
+ * Resuelve el árbol de mensajes del gestor para el locale activo, usando `en`
3927
+ * como fallback (igual criterio que `mergeMessages`). Devuelve `{}` si no se
3928
+ * pasó catálogo del gestor.
3929
+ */
3930
+ export declare function mergeAppMessages(locale: Locale, appCatalog?: AppLocaleCatalog): AppMessages;
3931
+
2699
3932
  /** Deep-merge custom overrides on top of the locale catalog entry. */
2700
3933
  export declare function mergeMessages(locale: Locale, catalog: LocaleCatalog, overrides?: CmsMessagesOverride): CmsMessages;
2701
3934
 
@@ -2704,6 +3937,11 @@ export declare interface ModulesAvailableResponse {
2704
3937
  modules: NavItemPermissions[];
2705
3938
  }
2706
3939
 
3940
+ export declare type MultiSelectFieldConfig = BaseFieldConfig & {
3941
+ kind: 'multiselect';
3942
+ options: FieldOption[];
3943
+ };
3944
+
2707
3945
  export declare type NavBlock = NavLinkItem;
2708
3946
 
2709
3947
  export declare type NavigationModule = keyof CmsMessages['navigation'];
@@ -2725,6 +3963,68 @@ export declare type NavLinkItem = {
2725
3963
  defaultOpen?: boolean;
2726
3964
  };
2727
3965
 
3966
+ /** Columna del menú "Nuevo" (Frecuentes / Otros / Videos). */
3967
+ export declare type NewContentGroup = {
3968
+ /** Clave i18n del título de la columna (namespace `newMenu`). */
3969
+ titleKey: NewMenuMessageKey;
3970
+ items: NewContentItem[];
3971
+ };
3972
+
3973
+ /**
3974
+ * Ítem del menú "Nuevo" (botón "+"). Replica la estructura del header del CMS
3975
+ * Angular legacy (`newContent` de cmsmedios): cada ítem declara su clave i18n y
3976
+ * el/los permiso(s) de operación que habilitan su visibilidad.
3977
+ */
3978
+ export declare type NewContentItem = {
3979
+ /** Identificador estable; lo recibe `onNewContentSelect` al hacer clic. */
3980
+ id: string;
3981
+ /** Clave i18n del namespace `newMenu`. */
3982
+ labelKey: NewMenuMessageKey;
3983
+ /**
3984
+ * Permiso(s) de operación requeridos (p. ej. `NEWS_CREATE`). Si es un array,
3985
+ * se exigen TODOS (criterio NAA-4038 del Angular legacy). Si se omite, el ítem
3986
+ * no requiere permiso.
3987
+ */
3988
+ permission?: string | string[];
3989
+ };
3990
+
3991
+ /**
3992
+ * Menú desplegable del botón "Nuevo" (+) del header. Replica las tres columnas
3993
+ * del header de cmsmedios (Frecuentes / Otros / Videos) con visibilidad por
3994
+ * permisos. El comportamiento de cada ítem lo resuelve el gestor.
3995
+ */
3996
+ export declare function NewContentMenu({ groups, operationPermissions, isAdmin, legacyBaseUrl, getRedirectPath, onSelect, }: NewContentMenuProps): JSX.Element;
3997
+
3998
+ export declare type NewContentMenuProps = {
3999
+ /** Columnas e ítems del menú. Por defecto, la estructura del CMS legacy. */
4000
+ groups?: NewContentGroup[];
4001
+ /**
4002
+ * Nombres de operaciones concedidas al usuario (de `POST /auth/permissions`).
4003
+ * Si se omite, no hay filtrado por permisos (se muestran todos los ítems).
4004
+ */
4005
+ operationPermissions?: string[];
4006
+ /** Si el usuario es administrador (ve todos los ítems). */
4007
+ isAdmin?: boolean;
4008
+ /**
4009
+ * Dominio del deploy nuevo (master) al que se redirige, p. ej.
4010
+ * `https://master.d1c5iid93veq15.amplifyapp.com`. Se navega a
4011
+ * `<legacyBaseUrl><getRedirectPath(id)>` en una pestaña nueva.
4012
+ */
4013
+ legacyBaseUrl?: string;
4014
+ /**
4015
+ * Ruta/parámetro por ítem que se concatena a `legacyBaseUrl`. Por defecto
4016
+ * `/?new=<id>`: el deploy destino lee `new` y dispara la creación.
4017
+ */
4018
+ getRedirectPath?: (itemId: string) => string;
4019
+ /**
4020
+ * Fallback cuando no hay `legacyBaseUrl`: se invoca con el `id` del ítem
4021
+ * (punto de integración para maquetado).
4022
+ */
4023
+ onSelect?: (itemId: string) => void;
4024
+ };
4025
+
4026
+ export declare type NewMenuMessageKey = keyof CmsMessages['newMenu'];
4027
+
2728
4028
  /** Cuerpo de la respuesta de POST /news/edit/adminNewsConfiguration. */
2729
4029
  export declare interface NewsAdminConfigurationResponse extends CmsResponse {
2730
4030
  [key: string]: unknown;
@@ -3182,6 +4482,13 @@ export declare type NextCmsMuiProviderProps = {
3182
4482
  children: ReactNode;
3183
4483
  };
3184
4484
 
4485
+ /**
4486
+ * Normaliza un `errorCode` que puede venir como string, número o array (el CMS
4487
+ * devuelve un array de códigos cuando hay varias violaciones de contraseña).
4488
+ * Devuelve el primer código no vacío.
4489
+ */
4490
+ export declare function normalizeErrorCode(errorCode: string | number | Array<string | number> | null | undefined): string | undefined;
4491
+
3185
4492
  /** Normaliza códigos BCP 47 o variantes (`es-MX`, `pt_BR`) al `Locale` soportado. */
3186
4493
  export declare function normalizeLocale(value?: string | null): Locale;
3187
4494
 
@@ -3256,6 +4563,49 @@ export declare interface NotificationTopicsResponse extends CmsResponse {
3256
4563
  topics?: NotificationTopic[];
3257
4564
  }
3258
4565
 
4566
+ /** Opciones del atajo `notifyCmsResponse`. */
4567
+ export declare interface NotifyCmsResponseOptions {
4568
+ /** URL del servicio invocado (para el detalle del error). */
4569
+ service?: string;
4570
+ /** Parámetros enviados al servicio (para el detalle del error). */
4571
+ params?: unknown;
4572
+ /** Mensaje a mostrar cuando `status === 'ok'`. Default: i18n `toast.defaultSuccess`. */
4573
+ successMessage?: string;
4574
+ /** Título del toast de éxito. */
4575
+ successTitle?: string;
4576
+ }
4577
+
4578
+ export declare type NumberFieldConfig = BaseFieldConfig & {
4579
+ kind: 'number';
4580
+ min?: number;
4581
+ max?: number;
4582
+ };
4583
+
4584
+ /**
4585
+ * Utilidades de hora del sitio (zona de redacción de la publicación).
4586
+ *
4587
+ * El backend entrega en cada `Publication` un offset GMT fijo
4588
+ * (`gmtRedaction`, p. ej. `"-3"` / `"+0"`) — NO una zona IANA. Por eso la
4589
+ * conversión se hace con un offset fijo y no contempla horario de verano
4590
+ * (DST). Es el equivalente, en React, de lo que en el CMS Angular hacía
4591
+ * `settings.service` (`getFormattedRedactionTimeStamp` /
4592
+ * `getFormattedRedactionTimeUTC`).
4593
+ *
4594
+ * El criterio: un timestamp del CMS es un instante en UTC (epoch ms). Para
4595
+ * mostrarlo "como lo ve la redacción" se desplaza el instante por el offset y
4596
+ * se formatea en `timeZone: 'UTC'`, de modo que el resultado es estable e
4597
+ * independiente de la zona horaria del navegador.
4598
+ */
4599
+ /**
4600
+ * Convierte el offset GMT de una publicación a minutos.
4601
+ * Acepta `"-3"`, `"+3"`, `"3"`, `"+5:30"`, tolera prefijos `GMT`/`UTC` y
4602
+ * espacios. Si el valor no es interpretable, devuelve `0` (UTC).
4603
+ *
4604
+ * @param gmt Offset tal como llega en `Publication.gmtRedaction`.
4605
+ * @returns Offset en minutos respecto de UTC (negativo al oeste de Greenwich).
4606
+ */
4607
+ export declare function parseGmtOffsetMinutes(gmt: string | null | undefined): number;
4608
+
3259
4609
  export declare function parsePublicationSlug(slug: string): number;
3260
4610
 
3261
4611
  /** Filtros de POST /contributions/paymentGateways/get. */
@@ -3648,6 +4998,52 @@ export declare interface PollUnpublishResponse extends CmsResponse {
3648
4998
  [key: string]: unknown;
3649
4999
  }
3650
5000
 
5001
+ /**
5002
+ * Formato de previsualización (Desktop / Mobile / Tablet…). En el CMS legacy la
5003
+ * lista es dinámica (`POST /news/previewFormats`); acá se reciben por props.
5004
+ */
5005
+ export declare type PreviewFormat = {
5006
+ /** Identificador estable; lo recibe `onSelect` al hacer clic. */
5007
+ id: string;
5008
+ /** Clave i18n del namespace `previewMenu` (cuando el texto es conocido). */
5009
+ labelKey?: PreviewMenuMessageKey;
5010
+ /** Texto ya resuelto (cuando el nombre viene dinámico del backend). */
5011
+ label?: string;
5012
+ /**
5013
+ * Ruta de preview de la publicación (campo `r` del form), p. ej.
5014
+ * `/sites/<sitio>/index.html`. Viene de `POST /news/previewFormats`. Si está
5015
+ * presente (con sesión), el clic redirige al admin viejo; si no, usa `onSelect`.
5016
+ */
5017
+ path?: string;
5018
+ /** QueryString del dispositivo (de `POST /news/previewFormats`). */
5019
+ queryString?: string;
5020
+ /** Protocolo del preview (`'https'` por defecto). */
5021
+ protocol?: string;
5022
+ };
5023
+
5024
+ /**
5025
+ * Menú desplegable del botón de previsualización (icono de dispositivos) del
5026
+ * header. Usa el `SimpleDropdown` de la lib. Igual que en cmsmedios, solo se
5027
+ * renderiza si hay al menos un formato disponible.
5028
+ */
5029
+ export declare function PreviewMenu({ formats, cmsBaseUrl, legacySession, onSelect, }: PreviewMenuProps): JSX.Element | null;
5030
+
5031
+ export declare type PreviewMenuMessageKey = keyof CmsMessages['previewMenu'];
5032
+
5033
+ export declare type PreviewMenuProps = {
5034
+ /** Formatos de preview. Por defecto, Desktop / Mobile / Tablet. */
5035
+ formats?: PreviewFormat[];
5036
+ /** Origen del CMS (JSP) para el redirect al admin viejo. */
5037
+ cmsBaseUrl?: string;
5038
+ /** Sesión para el form POST del redirect (token, sitio, etc.). */
5039
+ legacySession?: LegacyAdminSession;
5040
+ /**
5041
+ * Punto de integración: se invoca con el `id` del formato cuando no se puede
5042
+ * redirigir directo (falta `path`/sesión). El gestor arma la URL y redirige.
5043
+ */
5044
+ onSelect?: (formatId: string) => void;
5045
+ };
5046
+
3651
5047
  /** Plan de productividad. La forma exacta depende del recurso y del formato pedido. */
3652
5048
  export declare interface ProductivityPlan {
3653
5049
  [key: string]: unknown;
@@ -3975,13 +5371,15 @@ export declare interface ProfileGetResponse {
3975
5371
  documentation: unknown[];
3976
5372
  }
3977
5373
 
3978
- export declare function ProfileMenu({ profile, avatarOptions }: ProfileMenuProps): JSX.Element;
5374
+ export declare function ProfileMenu({ profile, avatarOptions, legacyBaseUrl, }: ProfileMenuProps): JSX.Element;
3979
5375
 
3980
5376
  export declare type ProfileMenuMessageKey = keyof CmsMessages['profileMenu'];
3981
5377
 
3982
5378
  export declare type ProfileMenuProps = {
3983
5379
  profile: ProfileGetResponse;
3984
5380
  avatarOptions?: ProfileAvatarOptions;
5381
+ /** Dominio del CMS Angular legacy para "Mi Perfil" / "Vista Webmaster". */
5382
+ legacyBaseUrl?: string;
3985
5383
  };
3986
5384
 
3987
5385
  /** Cuerpo de la respuesta de POST /profile/moduleAlerts/hide. */
@@ -4101,7 +5499,31 @@ export declare const ptMessages: {
4101
5499
  new: string;
4102
5500
  language: string;
4103
5501
  analytics: string;
5502
+ preview: string;
4104
5503
  help: string;
5504
+ publication: string;
5505
+ };
5506
+ newMenu: {
5507
+ frequentsTitle: string;
5508
+ othersTitle: string;
5509
+ videosTitle: string;
5510
+ post: string;
5511
+ trivia: string;
5512
+ poll: string;
5513
+ listicle: string;
5514
+ tag: string;
5515
+ gamecast: string;
5516
+ liveblog: string;
5517
+ aiPost: string;
5518
+ aiListicle: string;
5519
+ videoNative: string;
5520
+ videoEmbedded: string;
5521
+ videoYoutube: string;
5522
+ };
5523
+ previewMenu: {
5524
+ desktop: string;
5525
+ mobile: string;
5526
+ tablet: string;
4105
5527
  };
4106
5528
  profileMenu: {
4107
5529
  ariaLabel: string;
@@ -4115,6 +5537,87 @@ export declare const ptMessages: {
4115
5537
  empty: string;
4116
5538
  ariaLabel: string;
4117
5539
  };
5540
+ search: {
5541
+ placeholder: string;
5542
+ inputAriaLabel: string;
5543
+ clearAriaLabel: string;
5544
+ advancedAriaLabel: string;
5545
+ title: string;
5546
+ apply: string;
5547
+ reset: string;
5548
+ close: string;
5549
+ noOptions: string;
5550
+ dateToday: string;
5551
+ dateClear: string;
5552
+ dateOpenAriaLabel: string;
5553
+ prevMonthAriaLabel: string;
5554
+ nextMonthAriaLabel: string;
5555
+ };
5556
+ searchFields: {
5557
+ text: string;
5558
+ textPlaceholder: string;
5559
+ type: string;
5560
+ typePlaceholder: string;
5561
+ section: string;
5562
+ sectionPlaceholder: string;
5563
+ category: string;
5564
+ categoryPlaceholder: string;
5565
+ states: string;
5566
+ statesPlaceholder: string;
5567
+ creator: string;
5568
+ creatorPlaceholder: string;
5569
+ author: string;
5570
+ authorPlaceholder: string;
5571
+ tags: string;
5572
+ tagsPlaceholder: string;
5573
+ groups: string;
5574
+ groupsPlaceholder: string;
5575
+ amount: string;
5576
+ amountPlaceholder: string;
5577
+ dateFrom: string;
5578
+ dateTo: string;
5579
+ sortBy: string;
5580
+ sortByPlaceholder: string;
5581
+ zone: string;
5582
+ zonePlaceholder: string;
5583
+ priority: string;
5584
+ priorityPlaceholder: string;
5585
+ order: string;
5586
+ orderPlaceholder: string;
5587
+ includeDrafts: string;
5588
+ includeHistory: string;
5589
+ };
5590
+ searchOptions: {
5591
+ typeNews: string;
5592
+ typeList: string;
5593
+ typeLiveblog: string;
5594
+ statePublished: string;
5595
+ stateDraft: string;
5596
+ stateScheduled: string;
5597
+ stateReview: string;
5598
+ stateDone: string;
5599
+ sortRelevance: string;
5600
+ sortDate: string;
5601
+ sortTitle: string;
5602
+ orderDesc: string;
5603
+ orderAsc: string;
5604
+ priorityHigh: string;
5605
+ priorityMid: string;
5606
+ priorityLow: string;
5607
+ };
5608
+ toast: {
5609
+ close: string;
5610
+ copyDetail: string;
5611
+ copied: string;
5612
+ defaultSuccess: string;
5613
+ defaultError: string;
5614
+ defaultWarning: string;
5615
+ defaultInfo: string;
5616
+ };
5617
+ userAvatar: {
5618
+ alt: string;
5619
+ unknownUser: string;
5620
+ };
4118
5621
  };
4119
5622
 
4120
5623
  /** Publicación devuelta por POST /publications/get y POST /publications/default */
@@ -4149,6 +5652,12 @@ export declare interface Publication {
4149
5652
  timeFormat: string;
4150
5653
  type: string;
4151
5654
  updateAdmin: PublicationUpdateAdmin;
5655
+ /**
5656
+ * Sub-sitios (multisitio) de esta publicación. Opcional: hoy el servicio no
5657
+ * lo devuelve y las publicaciones se listan planas. Cuando el backend lo
5658
+ * incluya, el selector los muestra como filas hijas expandibles con contador.
5659
+ */
5660
+ children?: Publication[];
4152
5661
  }
4153
5662
 
4154
5663
  /**
@@ -4209,6 +5718,8 @@ export declare const radii: {
4209
5718
  readonly lg: "14px";
4210
5719
  /** Píldoras grandes / menús redondeados (M3). */
4211
5720
  readonly xl: "28px";
5721
+ /** Diálogos / modales de confirmación. */
5722
+ readonly dialog: "24px";
4212
5723
  /** Píldora completa. */
4213
5724
  readonly pill: "999px";
4214
5725
  };
@@ -4382,6 +5893,9 @@ export declare function resolveCmsAssetUrl(path: string, cmsOrigin?: string): st
4382
5893
 
4383
5894
  export declare function resolveCmsOrigin(cmsOrigin?: string): string;
4384
5895
 
5896
+ /** Devuelve la severidad de toast para un código de error (`warning`/`error`). */
5897
+ export declare function resolveErrorSeverity(errorCode: string | number | Array<string | number> | null | undefined): CmsErrorSeverity;
5898
+
4385
5899
  /** Sección de una publicación del CMS (forma devuelta por get/exist). */
4386
5900
  export declare interface Section {
4387
5901
  id?: number;
@@ -4446,7 +5960,7 @@ export declare interface SectionsGetResponse extends CmsResponse {
4446
5960
  * "Todos / Activos / Inactivos"), reutilizable desde cualquier app que consuma
4447
5961
  * la librería.
4448
5962
  */
4449
- export declare function SelectDropdown({ value, options, onChange, highlighted, showIcons, minWidth, disabled, placeholder, ariaLabel, testId, }: SelectDropdownProps): JSX.Element;
5963
+ export declare function SelectDropdown({ value, options, onChange, highlighted, showIcons, minWidth, disabled, placeholder, prefix, pinSelectedFirst, ariaLabel, testId, }: SelectDropdownProps): JSX.Element;
4450
5964
 
4451
5965
  export declare type SelectDropdownProps = {
4452
5966
  /** Valor seleccionado actualmente. */
@@ -4471,12 +5985,30 @@ export declare type SelectDropdownProps = {
4471
5985
  disabled?: boolean;
4472
5986
  /** Texto a mostrar cuando ningún valor coincide. */
4473
5987
  placeholder?: ReactNode;
5988
+ /**
5989
+ * Prefijo fijo antes del valor seleccionado en el disparador (p. ej.
5990
+ * "Estado:"). Solo aparece en el trigger, no en el menú. El prefijo va en peso
5991
+ * normal y el valor seleccionado en negrita.
5992
+ */
5993
+ prefix?: ReactNode;
5994
+ /**
5995
+ * Al abrir el menú, mueve la opción seleccionada al tope y la separa del resto
5996
+ * con un divisor. Por defecto `false` (mantiene el orden original).
5997
+ */
5998
+ pinSelectedFirst?: boolean;
4474
5999
  /** `aria-label` del disparador (accesibilidad). */
4475
6000
  ariaLabel?: string;
4476
6001
  /** Valor base para los `data-testid`. */
4477
6002
  testId?: string;
4478
6003
  };
4479
6004
 
6005
+ export declare type SelectFieldConfig = BaseFieldConfig & {
6006
+ kind: 'select';
6007
+ options: FieldOption[];
6008
+ /** Muestra el check en la opción activa. Por defecto `true`. */
6009
+ showCheck?: boolean;
6010
+ };
6011
+
4480
6012
  /** Opción de un `SelectDropdown`. */
4481
6013
  export declare type SelectOption = {
4482
6014
  /** Valor que se emite en `onChange` y se compara con `value`. */
@@ -4497,7 +6029,7 @@ export declare type SelectOption = {
4497
6029
  * compartidos y reutilizables: cualquier proyecto que consuma la librería puede
4498
6030
  * importarlo para construir un trigger/menú coherente con el sistema.
4499
6031
  *
4500
- * Reglas de color (todas con variables de `tokens.ts`):
6032
+ * Reglas de color (todas con variables de `variables.ts`):
4501
6033
  * - Trigger por defecto: borde `controlBorder` (#727784), texto `controlText`
4502
6034
  * (#000) en negrita, fondo transparente; hover → `controlHoverBg` (#F9F9FF).
4503
6035
  * - Trigger activo (abierto) o resaltado (valor activo): fondo `secondary`
@@ -4520,6 +6052,8 @@ export declare const SelectStyles: {
4520
6052
  * Peso normal incluso en la opción activa (la negrita vive en el trigger).
4521
6053
  */
4522
6054
  sxItem: (selected: boolean) => SxProps<Theme>;
6055
+ /** Divisor entre la opción activa (fijada arriba) y el resto del listado. */
6056
+ sxMenuDivider: SxProps<Theme>;
4523
6057
  };
4524
6058
 
4525
6059
  /** Sombras (elevaciones) reutilizables. */
@@ -4530,6 +6064,8 @@ export declare const shadows: {
4530
6064
  readonly menu: "0px 1px 3px 0px rgba(0, 0, 0, 0.30), 0px 4px 8px 3px rgba(0, 0, 0, 0.15)";
4531
6065
  /** Paper suave y difuso (dropdowns genéricos). */
4532
6066
  readonly menuSoft: "0 10px 30px rgba(0, 0, 0, 0.18)";
6067
+ /** Desplegable de opciones (M3 Elevation Light/5): dos capas suaves. */
6068
+ readonly menuDropdown: "0px 4px 4px 0px rgba(0, 0, 0, 0.30), 0px 8px 12px 6px rgba(0, 0, 0, 0.15)";
4533
6069
  /** Submenús flotantes del sidebar. */
4534
6070
  readonly flyout: "0px 8px 16px rgba(0, 0, 0, 0.18)";
4535
6071
  };
@@ -4640,8 +6176,76 @@ export declare const sizes: {
4640
6176
  readonly buttonHeight: 40;
4641
6177
  /** Alto de botones/triggers compactos (selector de sitios). */
4642
6178
  readonly buttonHeightSm: 34;
6179
+ /** Alto del campo buscador (`CmsSearchField`). */
6180
+ readonly searchHeight: 48;
6181
+ };
6182
+
6183
+ export declare type SourceColors = typeof sourceColors;
6184
+
6185
+ /**
6186
+ * Colores de marca por fuente de origen (puntos/indicadores de fuente en
6187
+ * filtros y chips). **Valores placeholder**: ajustar a los oficiales cuando se
6188
+ * definan. Semánticos y reutilizables por cualquier gestor.
6189
+ */
6190
+ export declare const sourceColors: {
6191
+ /** RSS (naranja). */
6192
+ readonly rss: "#FB923C";
6193
+ /** Google Trends (azul). */
6194
+ readonly gtrends: "#4285F4";
6195
+ /** Search Console (verde). */
6196
+ readonly sconsole: "#0F9D58";
6197
+ /** X / Twitter (negro). */
6198
+ readonly x: "#111111";
4643
6199
  };
4644
6200
 
6201
+ export declare type StateColors = typeof stateColors;
6202
+
6203
+ /**
6204
+ * Colores de estado editorial para los chips de estado en listados de
6205
+ * contenido (sugerencias de CoPilot, noticias, etc.). `bg` = contenedor;
6206
+ * `on` = texto/ícono sobre el contenedor. Semánticos y reutilizables por
6207
+ * cualquier gestor (no atados a un componente puntual).
6208
+ */
6209
+ export declare const stateColors: {
6210
+ /** Activo / publicado (verde). */
6211
+ readonly active: {
6212
+ readonly bg: "#D6F4DE";
6213
+ readonly on: "#1D6B2E";
6214
+ };
6215
+ /** Generando con IA (azul Bluestack tonal). */
6216
+ readonly generating: {
6217
+ readonly bg: "#DCE3FF";
6218
+ readonly on: "#001551";
6219
+ };
6220
+ /** Asignado / en redacción (púrpura, distinto de la familia IA). */
6221
+ readonly assigned: {
6222
+ readonly bg: "#EADDFF";
6223
+ readonly on: "#4F378A";
6224
+ };
6225
+ /** Descartado / archivado (neutral). */
6226
+ readonly discarded: {
6227
+ readonly bg: "#ECEDF6";
6228
+ readonly on: "#43474E";
6229
+ };
6230
+ };
6231
+
6232
+ /**
6233
+ * Arma y envía el formulario POST que abre una ruta del admin viejo en una
6234
+ * pestaña nueva, pasando la sesión del usuario (igual que cmsmedios).
6235
+ *
6236
+ * @param params.cmsBaseUrl - Origen del CMS (p. ej. `https://dev.cms-medios.com`).
6237
+ * @param params.path - Ruta destino dentro del CMS (campo `r`).
6238
+ * @param params.session - Datos de sesión a enviar (token, sitio, etc.).
6239
+ * @param params.device - Opcional: protocolo/queryString del preview.
6240
+ * @returns void
6241
+ */
6242
+ export declare function submitLegacyAdminPage(params: {
6243
+ cmsBaseUrl: string;
6244
+ path: string;
6245
+ session: LegacyAdminSession;
6246
+ device?: LegacyAdminDevice;
6247
+ }): void;
6248
+
4645
6249
  /** Filtros de POST /contributions/getSuscriptions. */
4646
6250
  export declare interface SubscriptionsGetFilters {
4647
6251
  /** Filtra por estado de la suscripción. */
@@ -4743,6 +6347,10 @@ export declare interface TagsAdminConfigurationResponse extends CmsResponse {
4743
6347
  [key: string]: unknown;
4744
6348
  }
4745
6349
 
6350
+ export declare type TagsFieldConfig = BaseFieldConfig & {
6351
+ kind: 'tags';
6352
+ };
6353
+
4746
6354
  /** Filtros de POST /tags/get. */
4747
6355
  export declare interface TagsGetFilters {
4748
6356
  /** Tipo de términos: "claves" (default) o "ingredientes". */
@@ -4834,7 +6442,60 @@ export declare interface TagUpdateInput {
4834
6442
  [key: string]: unknown;
4835
6443
  }
4836
6444
 
4837
- export declare function TopBar({ sites, sidebarOpen, onToggleSidebar, notificationUnreadCount, notifications, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, }: TopBarProps): JSX.Element;
6445
+ export declare type TextFieldConfig = BaseFieldConfig & {
6446
+ kind: 'text';
6447
+ /** Tipo HTML del input de texto. Por defecto `text`. */
6448
+ type?: 'text' | 'email' | 'url';
6449
+ };
6450
+
6451
+ /**
6452
+ * Detalle extra que enriquece el toast de error (replica el toast de error del
6453
+ * Angular legacy: detalle copiable con url/servicio/params/versión).
6454
+ */
6455
+ export declare interface ToastErrorDetail {
6456
+ /** Código de error del CMS. Se usa para mapear mensaje y severidad. */
6457
+ errorCode?: string | number | Array<string | number>;
6458
+ /** Texto crudo del error devuelto por el servidor. */
6459
+ error?: string;
6460
+ /** URL del servicio que falló (para el bloque copiable). */
6461
+ service?: string;
6462
+ /** Parámetros del request que falló (para el bloque copiable). */
6463
+ params?: unknown;
6464
+ }
6465
+
6466
+ /** Opciones del toast de error (comunes + detalle copiable). */
6467
+ export declare interface ToastErrorOptions extends ToastOptions, ToastErrorDetail {
6468
+ }
6469
+
6470
+ /** Item de toast ya normalizado y encolado por el provider. */
6471
+ export declare interface ToastItem {
6472
+ id: string;
6473
+ severity: ToastSeverity;
6474
+ message: string;
6475
+ title?: string;
6476
+ /** Null = no autocierra. */
6477
+ duration: number | null;
6478
+ /** Solo presente en toasts de error (habilita el bloque copiable). */
6479
+ detail?: ToastErrorDetail;
6480
+ }
6481
+
6482
+ export declare type ToastMessageKey = keyof CmsMessages['toast'];
6483
+
6484
+ /** Opciones comunes a cualquier toast. */
6485
+ export declare interface ToastOptions {
6486
+ /** Título opcional (en negrita, arriba del mensaje). */
6487
+ title?: string;
6488
+ /**
6489
+ * Milisegundos antes de autocerrarse. `null` o `0` = no se cierra solo
6490
+ * (requiere cierre manual). Si se omite, se usa el default por severidad.
6491
+ */
6492
+ duration?: number | null;
6493
+ }
6494
+
6495
+ /** Severidad visual de un toast. */
6496
+ export declare type ToastSeverity = 'success' | 'error' | 'warning' | 'info';
6497
+
6498
+ export declare function TopBar({ sites, sidebarOpen, onToggleSidebar, notificationUnreadCount, notifications, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, newContentGroups, previewFormats, operationPermissions, isAdmin, onNewContentSelect, onPreviewSelect, }: TopBarProps): JSX.Element;
4838
6499
 
4839
6500
  export declare type TopBarMessageKey = keyof CmsMessages['topBar'];
4840
6501
 
@@ -4851,8 +6512,47 @@ export declare type TopBarProps = {
4851
6512
  getPublicationHref: (publication: Publication) => string;
4852
6513
  resolvePublicationImageUrl?: (imagePath: string) => string;
4853
6514
  profileAvatarOptions?: ProfileAvatarOptions;
6515
+ /** Dominio del CMS Angular legacy (deploy nuevo) para enlaces de perfil. */
6516
+ legacyBaseUrl?: string;
6517
+ /**
6518
+ * Origen del CMS (JSP), p. ej. `https://dev.cms-medios.com`. Se usa para Ayuda
6519
+ * y Preview, que redirigen al admin viejo (NO al deploy de `legacyBaseUrl`).
6520
+ */
6521
+ cmsBaseUrl?: string;
6522
+ /**
6523
+ * Sesión para el redirect al admin viejo (token, sitio, publicación, usuario).
6524
+ * Si se pasa, Ayuda/Preview usan el form POST de cmsmedios; si no, Ayuda cae a
6525
+ * un enlace simple al CMS.
6526
+ */
6527
+ legacySession?: LegacyAdminSession;
6528
+ /** Columnas/ítems del menú "Nuevo". Por defecto, la estructura del CMS legacy. */
6529
+ newContentGroups?: NewContentGroup[];
6530
+ /** Formatos del menú de previsualización. Por defecto, Desktop/Mobile/Tablet. */
6531
+ previewFormats?: PreviewFormat[];
6532
+ /**
6533
+ * Operaciones concedidas al usuario (`POST /auth/permissions`). Si se omite,
6534
+ * no se filtra el menú "Nuevo" por permisos.
6535
+ */
6536
+ operationPermissions?: string[];
6537
+ /** Si el usuario es administrador (ve todos los ítems del menú "Nuevo"). */
6538
+ isAdmin?: boolean;
6539
+ /** Fallback (sin sesión) del clic en un ítem del menú "Nuevo" (recibe su `id`). */
6540
+ onNewContentSelect?: (itemId: string) => void;
6541
+ /** Integración: clic en un formato de previsualización (recibe su `id`). */
6542
+ onPreviewSelect?: (formatId: string) => void;
4854
6543
  };
4855
6544
 
6545
+ /**
6546
+ * Desplaza un instante (epoch ms en UTC) al "reloj de pared" de la zona de
6547
+ * redacción del sitio. El número resultante, formateado con `timeZone: 'UTC'`,
6548
+ * muestra la hora local del sitio sin importar la zona del navegador.
6549
+ *
6550
+ * @param epochMs Instante en milisegundos (UTC).
6551
+ * @param gmtRedaction Offset GMT de la publicación.
6552
+ * @returns Epoch ms desplazado por el offset del sitio.
6553
+ */
6554
+ export declare function toSiteWallClock(epochMs: number, gmtRedaction: string | null | undefined): number;
6555
+
4856
6556
  /**
4857
6557
  * Cuerpo de la respuesta de POST /transcribe/get.
4858
6558
  *
@@ -4867,6 +6567,9 @@ export declare interface TranscriptionGetResponse extends CmsResponse {
4867
6567
  [key: string]: unknown;
4868
6568
  }
4869
6569
 
6570
+ /** Parámetros de interpolación para placeholders `{nombre}` en un mensaje. */
6571
+ export declare type TranslationParams = Record<string, string | number>;
6572
+
4870
6573
  /** Trivia del CMS. La forma exacta depende del recurso y del formato pedido. */
4871
6574
  export declare interface Trivia {
4872
6575
  [key: string]: unknown;
@@ -5094,6 +6797,11 @@ export declare interface UploadResponse extends CmsResponse {
5094
6797
  [key: string]: unknown;
5095
6798
  }
5096
6799
 
6800
+ /**
6801
+ * Hook para disparar toasts. Debe usarse dentro de `CmsToastProvider`.
6802
+ */
6803
+ export declare function useCmsToast(): CmsToastApi;
6804
+
5097
6805
  export declare function useCmsTranslation(options?: UseCmsTranslationOptions): {
5098
6806
  locale: "pt" | "es" | "en";
5099
6807
  t: CmsTranslator;
@@ -5103,6 +6811,61 @@ export declare type UseCmsTranslationOptions = {
5103
6811
  locale?: Locale;
5104
6812
  messages?: CmsMessagesOverride;
5105
6813
  catalog?: LocaleCatalog;
6814
+ /** Catálogo propio del gestor cuando se usa el hook fuera del provider. */
6815
+ appMessages?: AppLocaleCatalog;
6816
+ };
6817
+
6818
+ /**
6819
+ * Acceso al estado compartido de la foto del usuario logueado.
6820
+ *
6821
+ * Devuelve `null` si no hay provider montado: así `UserAvatar` y la pantalla de
6822
+ * perfil funcionan también sin el provider (caso tabla de usuarios, donde cada
6823
+ * avatar es otro usuario y no necesita actualización en vivo).
6824
+ */
6825
+ export declare function useCurrentUserPhoto(): CurrentUserPhotoContextValue | null;
6826
+
6827
+ /**
6828
+ * Avatar de usuario compartible: muestra la foto del usuario y, si no tiene,
6829
+ * el ícono `PersonOutlined` sobre fondo secundario. Incluye tooltip con el
6830
+ * nombre y textos traducidos (es/en/pt). Reacciona al cambio de la prop `photo`;
6831
+ * para el usuario logueado, reacciona además al `CurrentUserPhotoProvider`.
6832
+ */
6833
+ export declare function UserAvatar({ photo, description, username, size, showTooltip, cmsOrigin, crossOrigin, isCurrentUser, onClick, testId, }: UserAvatarProps): JSX.Element;
6834
+
6835
+ export declare type UserAvatarMessageKey = keyof CmsMessages['userAvatar'];
6836
+
6837
+ export declare type UserAvatarProps = {
6838
+ /**
6839
+ * Foto del usuario: ruta relativa, URL absoluta, `''` o `'noPicture'`
6840
+ * (misma forma que el campo `photo` en cmsmedios). Si falta o es `'noPicture'`,
6841
+ * se muestra el ícono de persona sobre fondo secundario.
6842
+ */
6843
+ photo?: string | null;
6844
+ /** Nombre legible del usuario (campo `description` en cmsmedios). Tooltip + alt. */
6845
+ description?: string;
6846
+ /** Login del usuario (campo `username`). Fallback del nombre. */
6847
+ username?: string;
6848
+ /** Diámetro del avatar en px. Por defecto 32. */
6849
+ size?: number;
6850
+ /** Muestra el tooltip con el nombre al pasar el mouse. Por defecto `true`. */
6851
+ showTooltip?: boolean;
6852
+ /** Origen del CMS para resolver rutas relativas de la foto. */
6853
+ cmsOrigin?: string;
6854
+ /**
6855
+ * `crossOrigin` del `<img>`. Sin valor por defecto (lo más seguro para mostrar).
6856
+ * El `TopBar` de la lib usa `'anonymous'`; pasarlo si el CMS lo requiere.
6857
+ */
6858
+ crossOrigin?: 'anonymous' | 'use-credentials';
6859
+ /**
6860
+ * Marca este avatar como el del usuario logueado: así reacciona al cambio de
6861
+ * foto de perfil emitido por `CurrentUserPhotoProvider` (equivalente al
6862
+ * `updateImageProfile` del Angular legacy). Sin provider, usa la prop `photo`.
6863
+ */
6864
+ isCurrentUser?: boolean;
6865
+ /** Acción al hacer clic. Si se define, el avatar muestra cursor de puntero. */
6866
+ onClick?: () => void;
6867
+ /** Base para el `data-testid` (`avatar-<testId>`). */
6868
+ testId?: string;
5106
6869
  };
5107
6870
 
5108
6871
  /** Grupo del sistema devuelto por POST /users/groups/get. */
@@ -5208,9 +6971,29 @@ export declare interface UsersPublicationResponse extends CmsResponse {
5208
6971
  /** Estado posible de un usuario del sistema. */
5209
6972
  export declare type UserStatus = 'active' | 'block' | 'pending';
5210
6973
 
5211
- /** Acción soportada por POST /users/action/setStatus. */
6974
+ /** Acción soportada por POST /users/actions/setStatus. */
5212
6975
  export declare type UserStatusAction = 'activate' | 'deactivate';
5213
6976
 
6977
+ export declare type UserStatusColors = typeof userStatusColors;
6978
+
6979
+ /**
6980
+ * Colores del chip de estado de cuenta de usuario (activo / inactivo).
6981
+ * `bg` = contenedor; `on` = texto e ícono sobre el contenedor. El texto/ícono
6982
+ * es el mismo verde oscuro en ambos estados. Semánticos y reutilizables.
6983
+ */
6984
+ export declare const userStatusColors: {
6985
+ /** Activo: contenedor verde menta. */
6986
+ readonly active: {
6987
+ readonly bg: "#92F7B7";
6988
+ readonly on: "#002112";
6989
+ };
6990
+ /** Inactivo: contenedor neutro. */
6991
+ readonly inactive: {
6992
+ readonly bg: "#E1E2E9";
6993
+ readonly on: "#002112";
6994
+ };
6995
+ };
6996
+
5214
6997
  /** Video del CMS. La forma exacta depende del recurso y del formato pedido. */
5215
6998
  export declare interface Video {
5216
6999
  [key: string]: unknown;