sass-cms-template-common 0.0.10 → 0.0.12

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
@@ -35,7 +35,7 @@ export declare type AppMessageNode = string | {
35
35
  /** Árbol de mensajes del gestor (namespaces → claves → string anidable). */
36
36
  export declare type AppMessages = Record<string, AppMessageNode>;
37
37
 
38
- export declare function AppShell({ pathname, sites, children, notificationUnreadCount, notificationsData, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, newContentGroups, previewFormats, operationPermissions, isAdmin, onNewContentSelect, onPreviewSelect, LinkComponent, permissions, locale, language, messages, appMessages, baseUrl, profileServices, }: AppShellProps): JSX.Element;
38
+ export declare function AppShell({ pathname, sites, children, notificationUnreadCount, notificationsData, editorialOpportunities, showEditorialOpportunities, copilotSuggestionsHref, onEditorialSeeMore, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, newContentGroups, previewFormats, operationPermissions, isAdmin, onNewContentSelect, onPreviewSelect, LinkComponent, permissions, locale, language, messages, appMessages, baseUrl, profileServices, }: AppShellProps): JSX.Element;
39
39
 
40
40
  export declare type AppShellProps = {
41
41
  pathname: string;
@@ -44,6 +44,14 @@ export declare type AppShellProps = {
44
44
  notificationUnreadCount: number;
45
45
  /** Respuesta cruda de `POST /dashboard/notification` (newsTask/expireTask/videos). */
46
46
  notificationsData?: DashboardNotificationsResponse | null;
47
+ /** Oportunidades editoriales copilot (card de la campanita). Si se omite, mock temporal. */
48
+ editorialOpportunities?: EditorialOpportunity[];
49
+ /** Muestra la card de oportunidades editoriales copilot. Por defecto `true`. */
50
+ showEditorialOpportunities?: boolean;
51
+ /** URL del gestor de sugerencias copilot para el "Ver más" (enlace real). */
52
+ copilotSuggestionsHref?: string;
53
+ /** Clic en "Ver más" cuando no hay `copilotSuggestionsHref` (fallback). */
54
+ onEditorialSeeMore?: () => void;
47
55
  profile: ProfileGetResponse;
48
56
  primaryLogo: ReactNode;
49
57
  brandLogo?: ReactNode;
@@ -706,76 +714,48 @@ export declare class CmsCkeditorServices {
706
714
 
707
715
  export declare type CmsColors = typeof cmsColors;
708
716
 
709
- /** Paleta de la librería. Valores semánticos, no por componente. */
717
+ /**
718
+ * Paleta de la librería. Valores semánticos, no por componente.
719
+ *
720
+ * Casi todos son *mode-aware* (`var(--cms-…)`). La única excepción es `white`,
721
+ * que es blanco de contraste (texto sobre botón de color) y se mantiene blanco
722
+ * en ambos modos.
723
+ */
710
724
  export declare const cmsColors: {
711
- /** Color de acción primaria (CTA "Publicar/Guardar", botones, foco activo). */
712
- readonly primary: "#0067C4";
713
- /** Hover del primario (mismo tono, un poco más oscuro). */
714
- readonly primaryHover: "#005CAF";
715
- /** Fondo de control primario deshabilitado (negro al 10%). */
716
- readonly primaryDisabled: "#1D1B201A";
717
- /** Color secundario / contenedor (estado activo o seleccionado). */
718
- readonly secondary: "#D8E2FF";
719
- /** Hover sobre superficies secundarias (opciones de desplegable). */
720
- readonly secondaryHover: "#E1E2EA";
721
- /**
722
- * Texto / íconos sobre el contenedor `secondary` (chips de filtro activos,
723
- * opciones marcadas en multiselect, etiquetas). Equivale al
724
- * `onSecondaryContainer` de Material 3.
725
- */
726
- readonly onSecondaryContainer: "#2C4678";
727
- /**
728
- * Secundario sólido (tono fuerte de la paleta secundaria). Se usa, p. ej.,
729
- * para resaltar el borde del avatar al hacer hover sobre una fila.
730
- */
731
- readonly secondaryStrong: "#455E91";
732
- /** Borde por defecto de controles tipo select. */
733
- readonly controlBorder: "#727784";
734
- /** Texto por defecto de controles tipo select. */
735
- readonly controlText: "#000000";
736
- /** Fondo de hover de un control tipo select (sin valor activo). */
737
- readonly controlHoverBg: "#F9F9FF";
738
- /** Borde del botón en variante blanca (BtnDropdown). */
739
- readonly whiteBtnBorder: "#DDDDDD";
740
- /** Texto del botón en variante blanca (BtnDropdown). */
741
- readonly whiteBtnText: "#515253";
742
- /** Fondo de hover/activo del botón de ícono (disparador del SimpleDropdown). */
743
- readonly iconButtonHoverBg: "#E6E6E6";
744
- /** Color del ícono del disparador en reposo. */
745
- readonly iconButtonIcon: "#929193";
746
- /** Fondo de menús flotantes (perfil, selector de sitios). */
747
- readonly menuSurface: "#ECEDF6";
748
- /** Fondo de la opción activa/hover dentro de un menú desplegable simple. */
749
- readonly menuItemActive: "#E1E2EB";
750
- /** Hover neutro sobre superficies claras (sidebar, top bar). */
751
- readonly surfaceHover: "#E3E2E6";
752
- /** Texto tenue del índice alfabético (letras inactivas A–Z del listado). */
753
- readonly alphabetIdle: "#B4BEDA";
754
- /** Texto fuerte (títulos de ítems, nombre de perfil). */
755
- readonly textStrong: "#191C22";
756
- /** Texto de navegación / secundario. */
757
- readonly textNav: "#414752";
758
- /** Texto atenuado: títulos de sección, encabezados de columna (gris claro). */
759
- readonly textMuted: "#94A2AA";
760
- /**
761
- * Azul para enlaces de texto y botones tipo texto (p. ej. el label
762
- * "Cancelar" del modal de confirmación y los enlaces dentro de descripciones).
763
- */
764
- readonly link: "#004F99";
765
- /** Acento de acción destructiva (CTA "Desactivar/Resetear", badge de riesgo). */
766
- readonly danger: "#BA1A1A";
767
- /** Hover del acento destructivo. */
768
- readonly dangerHover: "#93000A";
769
- /** Acento de acción positiva (badge de "Activar"). */
770
- readonly success: "#1E8E3E";
771
- /** Bordes y divisores sutiles. */
772
- readonly border: "#C1C6D4";
773
- /** Fondo del avatar de perfil. */
774
- readonly avatarBg: "#F2F6FC";
775
- /** Borde del avatar de perfil. */
776
- readonly avatarBorder: "#DEE2E6";
777
- /** Blanco base (superficies elevadas / botones blancos). */
725
+ /** Blanco de contraste (texto/íconos sobre botones de color). Fijo en ambos modos. */
778
726
  readonly white: "#FFFFFF";
727
+ readonly primary: string;
728
+ readonly primaryHover: string;
729
+ readonly primaryDisabled: string;
730
+ readonly secondary: string;
731
+ readonly secondaryHover: string;
732
+ readonly onSecondaryContainer: string;
733
+ readonly secondaryStrong: string;
734
+ readonly controlBorder: string;
735
+ readonly controlText: string;
736
+ readonly controlHoverBg: string;
737
+ readonly whiteBtnBorder: string;
738
+ readonly whiteBtnText: string;
739
+ readonly iconButtonHoverBg: string;
740
+ readonly iconButtonIcon: string;
741
+ readonly menuSurface: string;
742
+ readonly menuItemActive: string;
743
+ readonly surfaceHover: string;
744
+ readonly alphabetIdle: string;
745
+ readonly alphabetIdleSoft: string;
746
+ readonly alphabetLetter: string;
747
+ readonly alphabetLetterDisabled: string;
748
+ readonly textStrong: string;
749
+ readonly textNav: string;
750
+ readonly textMuted: string;
751
+ readonly link: string;
752
+ readonly danger: string;
753
+ readonly dangerHover: string;
754
+ readonly success: string;
755
+ readonly border: string;
756
+ readonly avatarBg: string;
757
+ readonly avatarBorder: string;
758
+ readonly surface: string;
779
759
  };
780
760
 
781
761
  /**
@@ -939,7 +919,11 @@ export declare type CmsConfirmDialogProps = {
939
919
  minHeight?: number | string;
940
920
  /** Evita cerrar al hacer clic fuera o con Escape (p. ej. mientras carga). */
941
921
  disableBackdropClose?: boolean;
942
- /** Base para los `data-testid`. */
922
+ /**
923
+ * Base para los `data-testid`. Emite: `${testId}` (modal),
924
+ * `${testId}-icon-btn-close` (botón X), `${testId}-actions` (fila de botones)
925
+ * y los botones `${testId}-actions-btn-cancel` y `${testId}-actions-btn-confirm`.
926
+ */
943
927
  testId?: string;
944
928
  };
945
929
 
@@ -980,6 +964,25 @@ export declare class CmsContributionsServices {
980
964
  getPaymentGateways: (filters?: PaymentGatewaysGetFilters) => Promise<PaymentGatewaysGetResponse>;
981
965
  }
982
966
 
967
+ /**
968
+ * Servicios HTTP del módulo `copilot` del CMS (gateway hacia el microservicio
969
+ * Copilot/Kundera). Errores propios en la serie `030.x` (ver `commonErrors`).
970
+ *
971
+ * Se construye igual que `CmsCommonServices`, con `{ axiosApi, authentication }`.
972
+ */
973
+ export declare class CmsCopilotServices {
974
+ protected props: ICopilotServices;
975
+ protected authentication: Authentication;
976
+ constructor(props: ICopilotServices);
977
+ /** POST /copilot/opportunities — feed de oportunidades (permiso COPILOT_VIEW). */
978
+ getOpportunities: (filters?: CopilotOpportunitiesFilters) => Promise<CopilotOpportunitiesResponse>;
979
+ /**
980
+ * POST /copilot/actions — ejecuta una acción del editor sobre una
981
+ * oportunidad: `save` | `like` | `dislike` | `assign` (permiso COPILOT_ACTION).
982
+ */
983
+ executeAction: (input: CopilotActionInput) => Promise<CopilotActionResponse>;
984
+ }
985
+
983
986
  /**
984
987
  * Servicios HTTP del módulo `dashboard` del CMS.
985
988
  *
@@ -1053,10 +1056,40 @@ export declare type CmsDialogActionsProps = {
1053
1056
  fullWidth?: boolean;
1054
1057
  /** Alineación horizontal de los botones. Por defecto `end`. */
1055
1058
  align?: CmsDialogActionsAlign;
1056
- /** Base para los `data-testid`. */
1059
+ /**
1060
+ * Base para los `data-testid`. El contenedor usa `testId`; el botón cancelar
1061
+ * emite `${testId}-btn-cancel` y el de confirmar `${testId}-btn-confirm`
1062
+ * (cada uno con su `data-action` `cancel` / `confirm` como atributo extra).
1063
+ */
1057
1064
  testId?: string;
1058
1065
  };
1059
1066
 
1067
+ /**
1068
+ * Página de error compartida por todos los gestores (mecanismo en la lib).
1069
+ * Replica la de cmsmedios: ilustración + título + subtítulo + botón HOME, y en
1070
+ * el 404 la línea "Error 404. Copiar detalle." que copia la URL al portapapeles.
1071
+ * Los textos salen del i18n de la lib (namespace `errorPage`, es/en/pt), así que
1072
+ * ningún gestor los duplica.
1073
+ */
1074
+ export declare function CmsErrorPage({ variant, homeHref, LinkComponent, illustrationSrc, }: CmsErrorPageProps): JSX.Element;
1075
+
1076
+ export declare type CmsErrorPageProps = {
1077
+ /** Tipo de error a mostrar. */
1078
+ variant: CmsErrorPageVariant;
1079
+ /** Destino del botón HOME. Por defecto la raíz del gestor (`/`). */
1080
+ homeHref?: string;
1081
+ /** Componente de enlace del host (p. ej. `next/link`). Por defecto un `<a>`. */
1082
+ LinkComponent?: CmsLinkComponent;
1083
+ /**
1084
+ * Ruta de la ilustración (servida desde el `public/` del gestor). Por defecto
1085
+ * `/errors/notfound.png` o `/errors/not-allowed.png` según la variante.
1086
+ */
1087
+ illustrationSrc?: string;
1088
+ };
1089
+
1090
+ /** Variante de error a mostrar: 404 (no encontrado) o sin permisos. */
1091
+ export declare type CmsErrorPageVariant = 'not-found' | 'not-allowed';
1092
+
1060
1093
  /** Severidad de feedback derivada de un código de error. */
1061
1094
  export declare type CmsErrorSeverity = 'warning' | 'error';
1062
1095
 
@@ -2089,6 +2122,7 @@ export declare type CmsTranslator = {
2089
2122
  }) => string;
2090
2123
  toast: (key: ToastMessageKey) => string;
2091
2124
  userAvatar: (key: UserAvatarMessageKey) => string;
2125
+ errorPage: (key: ErrorPageMessageKey) => string;
2092
2126
  /**
2093
2127
  * Resuelve una clave propia del gestor por ruta con puntos
2094
2128
  * (p. ej. `t.app('usuarios.modal.deactivate.title')`). Si falta, devuelve la
@@ -2545,27 +2579,10 @@ export declare const commonErrorsPt: Record<string, string>;
2545
2579
 
2546
2580
  export declare type ConfidenceColors = typeof confidenceColors;
2547
2581
 
2548
- /**
2549
- * Colores de un badge de confianza/score por nivel. `bg` = fondo del badge;
2550
- * `on` = texto. (Score de IA, relevancia, etc.)
2551
- */
2552
- export declare const confidenceColors: {
2553
- /** Alto, ≥85% (verde). */
2554
- readonly high: {
2555
- readonly bg: "#D7F5DD";
2556
- readonly on: "#0D5B2B";
2557
- };
2558
- /** Medio, 70–84% (ámbar). */
2559
- readonly medium: {
2560
- readonly bg: "#FFF0C8";
2561
- readonly on: "#6B4D00";
2562
- };
2563
- /** Bajo, <70% (gris). */
2564
- readonly low: {
2565
- readonly bg: "#E7E8EE";
2566
- readonly on: "#43474E";
2567
- };
2568
- };
2582
+ export declare const confidenceColors: Record<"high" | "medium" | "low", {
2583
+ bg: string;
2584
+ on: string;
2585
+ }>;
2569
2586
 
2570
2587
  /**
2571
2588
  * Contribución a actualizar (POST /contributions/edit).
@@ -2603,6 +2620,90 @@ export declare interface ContributionsInsertCrmResponse extends CmsResponse {
2603
2620
  [key: string]: unknown;
2604
2621
  }
2605
2622
 
2623
+ /** Acción del editor sobre una oportunidad (POST /copilot/actions). */
2624
+ export declare type CopilotAction = 'save' | 'like' | 'dislike' | 'assign';
2625
+
2626
+ /** Datos según la acción ejecutada (el backend lo omite si está vacío). */
2627
+ export declare interface CopilotActionData {
2628
+ /** Acción `save` (bookmark, toggle). */
2629
+ is_followed?: boolean;
2630
+ /** Acciones `like` / `dislike`. */
2631
+ interest_signal?: string;
2632
+ /** Acción `assign`. */
2633
+ assigned_to?: string;
2634
+ }
2635
+
2636
+ /** Entrada de POST /copilot/actions. */
2637
+ export declare interface CopilotActionInput {
2638
+ action: CopilotAction;
2639
+ /** ID de la oportunidad sobre la que se acciona. */
2640
+ opportunityId: string;
2641
+ /**
2642
+ * ID opaco y estable del redactor a asignar (NO el username).
2643
+ * Obligatorio solo para `action = "assign"` (error 030.005 si falta).
2644
+ */
2645
+ userExternalId?: string;
2646
+ }
2647
+
2648
+ /** Cuerpo de la respuesta de POST /copilot/actions. */
2649
+ export declare interface CopilotActionResponse extends CmsResponse {
2650
+ copilotEnabled?: boolean;
2651
+ action?: CopilotAction;
2652
+ opportunity_id?: string;
2653
+ /** Código de resultado devuelto por el microservicio (omitido si es nulo). */
2654
+ code?: string;
2655
+ data?: CopilotActionData;
2656
+ }
2657
+
2658
+ /** Filtros opcionales de POST /copilot/opportunities (passthrough al micro). */
2659
+ export declare interface CopilotOpportunitiesFilters {
2660
+ /** Filtro de estado de las oportunidades (p. ej. "open"). */
2661
+ status?: CopilotOpportunityStatus;
2662
+ /** Cantidad máxima de oportunidades a devolver. */
2663
+ limit?: number;
2664
+ }
2665
+
2666
+ /**
2667
+ * Cuerpo de la respuesta de POST /copilot/opportunities.
2668
+ *
2669
+ * Si la publicación no tiene `KUNDERA_SITE_UUID` (Copilot desactivado) el CMS
2670
+ * responde `status:"ok"` con `copilotEnabled:false` y lista vacía: NO es un
2671
+ * error, el gestor decide qué mostrar.
2672
+ */
2673
+ export declare interface CopilotOpportunitiesResponse extends CmsResponse {
2674
+ copilotEnabled?: boolean;
2675
+ /** UUID del sitio en Kundera (solo si `copilotEnabled = true`). */
2676
+ site_uuid?: string;
2677
+ count?: number;
2678
+ opportunities?: CopilotOpportunity[];
2679
+ }
2680
+
2681
+ /**
2682
+ * Oportunidad editorial del feed de Copilot.
2683
+ *
2684
+ * La doc del gateway lista `id`, `topic` y `created_at`, pero el microservicio
2685
+ * (observado en dev) puede omitirlos: solo `title`, `status` y `score` están
2686
+ * garantizados. El consumidor debe tolerar los faltantes.
2687
+ */
2688
+ export declare interface CopilotOpportunity {
2689
+ id?: string;
2690
+ title: string;
2691
+ /** Tema/categoría. */
2692
+ topic?: string;
2693
+ status: CopilotOpportunityStatus;
2694
+ /** Puntaje (el backend lo omite si es nulo). */
2695
+ score?: number;
2696
+ /** Fecha de creación (ISO 8601, p. ej. "2026-06-26T10:15:00Z"). */
2697
+ created_at?: string;
2698
+ }
2699
+
2700
+ /**
2701
+ * Estado de una oportunidad tal como lo entrega el microservicio (passthrough).
2702
+ * El único valor documentado hoy es `"open"`; se deja abierto para no romper
2703
+ * cuando el microservicio agregue estados nuevos.
2704
+ */
2705
+ export declare type CopilotOpportunityStatus = 'open' | (string & {});
2706
+
2606
2707
  /** POST /dashboard/countNotificatio */
2607
2708
  export declare interface CountNotificationsResponse {
2608
2709
  status: string;
@@ -2817,6 +2918,29 @@ export declare type DropdownOption = {
2817
2918
  testId?: string;
2818
2919
  };
2819
2920
 
2921
+ /**
2922
+ * Oportunidad editorial de un tema copilot (fuente de la card de la campanita).
2923
+ * Misma forma que el `getCopilotOpportunities()` del CMS Angular (NAA-4645): hoy
2924
+ * datos quemados; cuando el back libere el bloque en el WS de notificaciones se
2925
+ * reemplaza la fuente manteniendo esta forma.
2926
+ */
2927
+ export declare interface EditorialOpportunity {
2928
+ id: number | string;
2929
+ title: string;
2930
+ /** % de coincidencia con la línea editorial. */
2931
+ match: number;
2932
+ trending: boolean;
2933
+ isRead: boolean;
2934
+ /** Momento de entrega (epoch ms), como `{ time }` o número. */
2935
+ timeStamp?: {
2936
+ time: number;
2937
+ } | number | null;
2938
+ }
2939
+
2940
+ export declare type EditorialOpportunityColors = typeof editorialOpportunityColors;
2941
+
2942
+ export declare const editorialOpportunityColors: Record<"accent" | "text" | "topicBg" | "topicBorder" | "trending", string>;
2943
+
2820
2944
  export declare const enMessages: {
2821
2945
  readonly navigation: {
2822
2946
  readonly COMMENTS: "Comments";
@@ -2874,6 +2998,13 @@ export declare const enMessages: {
2874
2998
  readonly preview: "Preview";
2875
2999
  readonly help: "Help";
2876
3000
  readonly publication: "Publication";
3001
+ readonly appearance: "Appearance";
3002
+ readonly newTheme: "New theme";
3003
+ readonly newThemeSubtitle: "Redesigned interface";
3004
+ readonly modeLabel: "Mode";
3005
+ readonly modeLight: "Light";
3006
+ readonly modeDark: "Dark";
3007
+ readonly classicUnavailable: "The classic view is not available in this prototype.";
2877
3008
  };
2878
3009
  readonly newMenu: {
2879
3010
  readonly frequentsTitle: "Frequent";
@@ -2919,6 +3050,15 @@ export declare const enMessages: {
2919
3050
  readonly assignedYesterday: "Assigned yesterday";
2920
3051
  readonly assignedOn: "Assigned on";
2921
3052
  readonly expires: "Due";
3053
+ readonly editorialOpportunityLabel: "Editorial opportunity";
3054
+ readonly editorialOpportunityText: "{count} topics require your attention";
3055
+ readonly editorialOpportunityTop: "Top";
3056
+ readonly editorialOpportunityMatch: "Match";
3057
+ readonly editorialOpportunityTrending: "Trending";
3058
+ readonly editorialOpportunitySeeMoreOpportunities: "See {count} more opportunities";
3059
+ readonly editorialOpportunityHide: "Hide";
3060
+ readonly editorialOpportunityRemindLater: "Remind me later";
3061
+ readonly editorialOpportunitySeeMore: "See more";
2922
3062
  };
2923
3063
  readonly search: {
2924
3064
  readonly placeholder: "Search…";
@@ -3001,8 +3141,22 @@ export declare const enMessages: {
3001
3141
  readonly alt: "User avatar";
3002
3142
  readonly unknownUser: "Unknown user";
3003
3143
  };
3144
+ readonly errorPage: {
3145
+ readonly homeButton: "Home";
3146
+ readonly notFoundTitle: "Sorry an error occurred.";
3147
+ readonly notFoundSubtitle: "This website is no longer available. Keep browsing!";
3148
+ readonly notFoundCode: "404";
3149
+ readonly errorLabel: "Error";
3150
+ readonly copyDetail: "Copy detail.";
3151
+ readonly copyDetailText: "The route {url} you are trying to access is no longer available.";
3152
+ readonly copied: "Text copied to clipboard!";
3153
+ readonly notAllowedTitle: "Sorry.\nYou do not have access.";
3154
+ readonly notAllowedSubtitle: "What you want to see is restricted by permissions. Keep browsing!";
3155
+ };
3004
3156
  };
3005
3157
 
3158
+ declare type ErrorPageMessageKey = keyof CmsMessages['errorPage'];
3159
+
3006
3160
  export declare const esMessages: {
3007
3161
  navigation: {
3008
3162
  COMMENTS: string;
@@ -3060,6 +3214,13 @@ export declare const esMessages: {
3060
3214
  preview: string;
3061
3215
  help: string;
3062
3216
  publication: string;
3217
+ appearance: string;
3218
+ newTheme: string;
3219
+ newThemeSubtitle: string;
3220
+ modeLabel: string;
3221
+ modeLight: string;
3222
+ modeDark: string;
3223
+ classicUnavailable: string;
3063
3224
  };
3064
3225
  newMenu: {
3065
3226
  frequentsTitle: string;
@@ -3105,6 +3266,15 @@ export declare const esMessages: {
3105
3266
  assignedYesterday: string;
3106
3267
  assignedOn: string;
3107
3268
  expires: string;
3269
+ editorialOpportunityLabel: string;
3270
+ editorialOpportunityText: string;
3271
+ editorialOpportunityTop: string;
3272
+ editorialOpportunityMatch: string;
3273
+ editorialOpportunityTrending: string;
3274
+ editorialOpportunitySeeMoreOpportunities: string;
3275
+ editorialOpportunityHide: string;
3276
+ editorialOpportunityRemindLater: string;
3277
+ editorialOpportunitySeeMore: string;
3108
3278
  };
3109
3279
  search: {
3110
3280
  placeholder: string;
@@ -3187,6 +3357,18 @@ export declare const esMessages: {
3187
3357
  alt: string;
3188
3358
  unknownUser: string;
3189
3359
  };
3360
+ errorPage: {
3361
+ homeButton: string;
3362
+ notFoundTitle: string;
3363
+ notFoundSubtitle: string;
3364
+ notFoundCode: string;
3365
+ errorLabel: string;
3366
+ copyDetail: string;
3367
+ copyDetailText: string;
3368
+ copied: string;
3369
+ notAllowedTitle: string;
3370
+ notAllowedSubtitle: string;
3371
+ };
3190
3372
  };
3191
3373
 
3192
3374
  /** Cuerpo de la respuesta de POST /events/create. */
@@ -3258,8 +3440,8 @@ export declare type FeedbackBadgeColors = typeof feedbackBadgeColors;
3258
3440
 
3259
3441
  /**
3260
3442
  * Colores del círculo de ícono del toast por severidad. `bg` = fondo del
3261
- * círculo; `on` = color del ícono. Contenedores tonales claros con ícono
3262
- * oscuro (misma familia que Material 3), legibles sobre la superficie oscura.
3443
+ * círculo; `on` = color del ícono. Como el toast es oscuro en ambos modos,
3444
+ * estos tampoco cambian.
3263
3445
  */
3264
3446
  export declare const feedbackBadgeColors: {
3265
3447
  /** Éxito: círculo verde menta con check verde oscuro. */
@@ -3290,8 +3472,8 @@ export declare type FeedbackColors = typeof feedbackColors;
3290
3472
  * Colores de feedback de operaciones (toasts/notificaciones).
3291
3473
  *
3292
3474
  * El toast usa una superficie oscura (estilo de diseño del CMS) con texto
3293
- * claro y un ícono de acento por severidad. Los acentos replican los del
3294
- * Angular legacy (`cmsmedios-ux`): éxito verde, advertencia ámbar, error rojo.
3475
+ * claro y un ícono de acento por severidad. Como ya es un componente oscuro por
3476
+ * diseño, NO cambia entre modos (se mantiene igual en claro y oscuro).
3295
3477
  */
3296
3478
  export declare const feedbackColors: {
3297
3479
  /** Fondo oscuro del toast (común a todas las severidades). */
@@ -3460,6 +3642,23 @@ export declare interface FileExplorerGetFoldersResponse extends CmsResponse {
3460
3642
  folders: ExplorerFolder[];
3461
3643
  }
3462
3644
 
3645
+ /**
3646
+ * Filtra los módulos de POST /auth/modulesAvailable dejando solo los que el
3647
+ * usuario puede ver, replicando el cruce que hace `parseModuleIntoMenu` de
3648
+ * cmsmedios: un admin ve todo; el resto solo ve un módulo si tiene la operación
3649
+ * `${module}_VIEW` en POST /auth/permissions. La comparación es case-insensitive.
3650
+ *
3651
+ * Degrada con seguridad: si `permissions` es null/undefined (p. ej. porque
3652
+ * /auth/permissions falló), NO filtra y devuelve los módulos tal cual (misma
3653
+ * visibilidad que hoy). El acceso real lo sigue gobernando el guard de ruta
3654
+ * (`hasModulePermission`), así que el menú puede degradar sin exponer nada.
3655
+ *
3656
+ * @param modules módulos crudos de POST /auth/modulesAvailable
3657
+ * @param permissions respuesta de POST /auth/permissions (`isAdmin` + `operations`)
3658
+ * @returns los módulos visibles para el usuario (preserva `isnew`)
3659
+ */
3660
+ export declare function filterModulesByPermissions(modules: NavItemPermissions[], permissions: Pick<AuthPermissionsResponse, 'isAdmin' | 'operations'> | null | undefined): NavItemPermissions[];
3661
+
3463
3662
  export declare function findPublicationBySlug(sites: SiteSection[], slug: string): Publication | undefined;
3464
3663
 
3465
3664
  export declare function findPublicationLabel(sites: SiteSection[], publicationId: string): string;
@@ -3467,8 +3666,7 @@ export declare function findPublicationLabel(sites: SiteSection[], publicationId
3467
3666
  /**
3468
3667
  * Familias tipográficas del CMS. `roboto` = texto general (default del theme);
3469
3668
  * `productSans` = marca / títulos. Las `@font-face` que las cargan viven en
3470
- * `theme/fonts.ts` y se inyectan vía el provider MUI. Usar estas variables en
3471
- * lugar de strings sueltos (mismo criterio que con los colores).
3669
+ * `theme/fonts.ts` y se inyectan vía el provider MUI.
3472
3670
  */
3473
3671
  export declare const fontFamilies: {
3474
3672
  readonly roboto: "\"Roboto\",\"Helvetica\",\"Arial\",sans-serif";
@@ -3504,6 +3702,15 @@ export declare function getDefaultPublicationSlug(sites: SiteSection[]): string;
3504
3702
  /** BCP 47 tag for `Intl` / `toLocaleString` formatting. */
3505
3703
  export declare function getIntlLocaleTag(locale: Locale): string;
3506
3704
 
3705
+ /**
3706
+ * Oportunidades editoriales copilot QUEMADAS temporales (NAA-4837). El back aún
3707
+ * no envía este bloque; cuando lo haga, el gestor pasa las oportunidades reales
3708
+ * por la prop `editorialOpportunities` y este mock se elimina.
3709
+ *
3710
+ * @param now Instante actual (epoch ms) usado como hora de entrega de las cards.
3711
+ */
3712
+ export declare function getMockCopilotOpportunities(now: number): EditorialOpportunity[];
3713
+
3507
3714
  export declare function getProfileAvatarSrc(profile: ProfileGetResponse, options?: ProfileAvatarOptions): string;
3508
3715
 
3509
3716
  export declare function getProfileDisplayName(profile: ProfileGetResponse): string;
@@ -3518,6 +3725,19 @@ export declare function getProfileDisplayName(profile: ProfileGetResponse): stri
3518
3725
  */
3519
3726
  export declare function getSiteNow(gmtRedaction: string | null | undefined, localeTag: string, options?: Intl.DateTimeFormatOptions): string;
3520
3727
 
3728
+ /**
3729
+ * Decide si el usuario puede acceder a un módulo, replicando el
3730
+ * `AccessPermissionsGuard` de cmsmedios: un admin siempre pasa, el comodín
3731
+ * `All_VIEWS` siempre pasa, y en el resto el usuario debe tener una operación
3732
+ * cuyo `name` coincida con el permiso requerido. La comparación es
3733
+ * case-insensitive (cmsmedios pasa el permiso de la ruta a mayúsculas).
3734
+ *
3735
+ * @param permissions respuesta de POST /auth/permissions (`isAdmin` + `operations`)
3736
+ * @param requiredPermission permiso que exige la ruta (p. ej. `'NEWS_VIEW'`)
3737
+ * @returns `true` si tiene acceso; `false` si debería redirigirse a `/not-allowed`
3738
+ */
3739
+ export declare function hasModulePermission(permissions: Pick<AuthPermissionsResponse, 'isAdmin' | 'operations'> | null | undefined, requiredPermission: string): boolean;
3740
+
3521
3741
  declare interface IAudiosServices {
3522
3742
  axiosApi: AxiosInstance;
3523
3743
  authentication: Authentication;
@@ -3557,6 +3777,11 @@ declare interface IContributionsServices {
3557
3777
  authentication: Authentication;
3558
3778
  }
3559
3779
 
3780
+ declare interface ICopilotServices {
3781
+ axiosApi: AxiosInstance;
3782
+ authentication: Authentication;
3783
+ }
3784
+
3560
3785
  declare interface IDashboardServices {
3561
3786
  axiosApi: AxiosInstance;
3562
3787
  authentication: Authentication;
@@ -3831,7 +4056,7 @@ export declare type InterestColors = typeof interestColors;
3831
4056
 
3832
4057
  /**
3833
4058
  * Feedback de interés del usuario sobre un ítem (me gusta / no me gusta).
3834
- * Tonos semánticos; los fondos de hover se derivan con `alpha()` en el `sx`.
4059
+ * Se mantienen literales (se usan con `alpha()` para los hovers).
3835
4060
  */
3836
4061
  export declare const interestColors: {
3837
4062
  /** Me gusta (verde). */
@@ -3911,9 +4136,9 @@ declare interface ITagsServices {
3911
4136
  authentication: Authentication;
3912
4137
  }
3913
4138
 
3914
- export declare const ITEM_DEFAULT_BG: "#FFFFFF";
4139
+ export declare const ITEM_DEFAULT_BG: string;
3915
4140
 
3916
- export declare const ITEM_HOVER_BG: "#D8E2FF";
4141
+ export declare const ITEM_HOVER_BG: string;
3917
4142
 
3918
4143
  declare interface ITranscribeServices {
3919
4144
  axiosApi: AxiosInstance;
@@ -3990,7 +4215,7 @@ export declare type Locale = (typeof SUPPORTED_LOCALES)[number];
3990
4215
 
3991
4216
  export declare type LocaleCatalog = Record<Locale, CmsMessages>;
3992
4217
 
3993
- export declare const MENU_BG: "#ECEDF6";
4218
+ export declare const MENU_BG: string;
3994
4219
 
3995
4220
  declare type MenuOrigin = {
3996
4221
  vertical: 'top' | 'center' | 'bottom';
@@ -4581,29 +4806,23 @@ export declare interface NotificationAdminConfigurationResponse extends CmsRespo
4581
4806
 
4582
4807
  export declare type NotificationColors = typeof notificationColors;
4583
4808
 
4584
- /**
4585
- * Colores del avatar de ícono de cada tarjeta del centro de notificaciones
4586
- * (campanita del TopBar). `bg` = fondo del contenedor cuadrado; `on` =
4587
- * color del ícono. Replican los del centro de notificaciones del diseño
4588
- * (mockup "Gestión de Noticias"): temas asignados en azul (misma familia
4589
- * secundaria), actividades por vencer en naranja y notificaciones de sistema
4590
- * (videos) en verde. Semánticos y reutilizables por cualquier gestor.
4591
- */
4592
4809
  export declare const notificationColors: {
4593
- /** Temas asignados (azul): mismo contenedor secundario que los chips activos. */
4594
- readonly assigned: {
4595
- readonly bg: "#D8E2FF";
4596
- readonly on: "#2C4678";
4597
- };
4598
- /** Actividades por vencer (naranja). El `on` se reutiliza para la fecha de vencimiento. */
4599
4810
  readonly pending: {
4600
- readonly bg: "#FFE2D5";
4601
- readonly on: "#B3300A";
4811
+ bg: string;
4812
+ on: string;
4602
4813
  };
4603
- /** Notificaciones del sistema / videos (verde). */
4604
4814
  readonly system: {
4605
- readonly bg: "#DCEFE0";
4606
- readonly on: "#11663B";
4815
+ bg: string;
4816
+ on: string;
4817
+ };
4818
+ readonly editorialOpportunity: {
4819
+ bg: string;
4820
+ on: string;
4821
+ };
4822
+ /** Temas asignados (azul): mismo contenedor secundario que los chips activos. */
4823
+ readonly assigned: {
4824
+ readonly bg: string;
4825
+ readonly on: string;
4607
4826
  };
4608
4827
  };
4609
4828
 
@@ -4649,7 +4868,7 @@ export declare interface NotificationsListResponse {
4649
4868
  total?: number;
4650
4869
  }
4651
4870
 
4652
- export declare function NotificationsMenu({ unreadCount, notificationsData, masterBaseUrl, currentPublicationId, gmtRedaction, }: NotificationsMenuProps): JSX.Element;
4871
+ export declare function NotificationsMenu({ unreadCount, notificationsData, masterBaseUrl, currentPublicationId, gmtRedaction, editorialOpportunities, showEditorialOpportunities, copilotSuggestionsHref, onEditorialSeeMore, }: NotificationsMenuProps): JSX.Element;
4653
4872
 
4654
4873
  export declare type NotificationsMenuMessageKey = keyof CmsMessages['notificationsMenu'];
4655
4874
 
@@ -4664,6 +4883,22 @@ export declare type NotificationsMenuProps = {
4664
4883
  currentPublicationId?: number | string;
4665
4884
  /** Offset GMT de la publicación (para mostrar las fechas en zona de redacción). */
4666
4885
  gmtRedaction?: string | null;
4886
+ /**
4887
+ * Oportunidades editoriales copilot (card de la campanita, NAA-4837). Si se
4888
+ * omite y `showEditorialOpportunities` no es `false`, se usan datos QUEMADOS
4889
+ * temporales; cuando el back libere el bloque, el gestor pasa las reales aquí.
4890
+ */
4891
+ editorialOpportunities?: EditorialOpportunity[];
4892
+ /** Muestra la card de oportunidades editoriales copilot. Por defecto `true`. */
4893
+ showEditorialOpportunities?: boolean;
4894
+ /**
4895
+ * URL del gestor de sugerencias copilot para el "Ver más" de la card. La arma
4896
+ * el gestor con su deploy (env) + la publicación actual; si se pasa, el "Ver
4897
+ * más" es un enlace real (nueva pestaña). Si no, cae al callback.
4898
+ */
4899
+ copilotSuggestionsHref?: string;
4900
+ /** Clic en "Ver más" cuando no hay `copilotSuggestionsHref` (fallback). */
4901
+ onEditorialSeeMore?: () => void;
4667
4902
  };
4668
4903
 
4669
4904
  /** Topic devuelto por notification/topics (`{ name, description }`). */
@@ -5619,6 +5854,13 @@ export declare const ptMessages: {
5619
5854
  preview: string;
5620
5855
  help: string;
5621
5856
  publication: string;
5857
+ appearance: string;
5858
+ newTheme: string;
5859
+ newThemeSubtitle: string;
5860
+ modeLabel: string;
5861
+ modeLight: string;
5862
+ modeDark: string;
5863
+ classicUnavailable: string;
5622
5864
  };
5623
5865
  newMenu: {
5624
5866
  frequentsTitle: string;
@@ -5664,6 +5906,15 @@ export declare const ptMessages: {
5664
5906
  assignedYesterday: string;
5665
5907
  assignedOn: string;
5666
5908
  expires: string;
5909
+ editorialOpportunityLabel: string;
5910
+ editorialOpportunityText: string;
5911
+ editorialOpportunityTop: string;
5912
+ editorialOpportunityMatch: string;
5913
+ editorialOpportunityTrending: string;
5914
+ editorialOpportunitySeeMoreOpportunities: string;
5915
+ editorialOpportunityHide: string;
5916
+ editorialOpportunityRemindLater: string;
5917
+ editorialOpportunitySeeMore: string;
5667
5918
  };
5668
5919
  search: {
5669
5920
  placeholder: string;
@@ -5746,6 +5997,18 @@ export declare const ptMessages: {
5746
5997
  alt: string;
5747
5998
  unknownUser: string;
5748
5999
  };
6000
+ errorPage: {
6001
+ homeButton: string;
6002
+ notFoundTitle: string;
6003
+ notFoundSubtitle: string;
6004
+ notFoundCode: string;
6005
+ errorLabel: string;
6006
+ copyDetail: string;
6007
+ copyDetailText: string;
6008
+ copied: string;
6009
+ notAllowedTitle: string;
6010
+ notAllowedSubtitle: string;
6011
+ };
5749
6012
  };
5750
6013
 
5751
6014
  /** Publicación devuelta por POST /publications/get y POST /publications/default */
@@ -6339,52 +6602,14 @@ export declare const sizes: {
6339
6602
 
6340
6603
  export declare type SourceColors = typeof sourceColors;
6341
6604
 
6342
- /**
6343
- * Colores de marca por fuente de origen (puntos/indicadores de fuente en
6344
- * filtros y chips). **Valores placeholder**: ajustar a los oficiales cuando se
6345
- * definan. Semánticos y reutilizables por cualquier gestor.
6346
- */
6347
- export declare const sourceColors: {
6348
- /** RSS (naranja). */
6349
- readonly rss: "#FB923C";
6350
- /** Google Trends (azul). */
6351
- readonly gtrends: "#4285F4";
6352
- /** Search Console (verde). */
6353
- readonly sconsole: "#0F9D58";
6354
- /** X / Twitter (negro). */
6355
- readonly x: "#111111";
6356
- };
6605
+ export declare const sourceColors: Record<"rss" | "gtrends" | "sconsole" | "x", string>;
6357
6606
 
6358
6607
  export declare type StateColors = typeof stateColors;
6359
6608
 
6360
- /**
6361
- * Colores de estado editorial para los chips de estado en listados de
6362
- * contenido (sugerencias de CoPilot, noticias, etc.). `bg` = contenedor;
6363
- * `on` = texto/ícono sobre el contenedor. Semánticos y reutilizables por
6364
- * cualquier gestor (no atados a un componente puntual).
6365
- */
6366
- export declare const stateColors: {
6367
- /** Activo / publicado (verde). */
6368
- readonly active: {
6369
- readonly bg: "#D6F4DE";
6370
- readonly on: "#1D6B2E";
6371
- };
6372
- /** Generando con IA (azul Bluestack tonal). */
6373
- readonly generating: {
6374
- readonly bg: "#DCE3FF";
6375
- readonly on: "#001551";
6376
- };
6377
- /** Asignado / en redacción (púrpura, distinto de la familia IA). */
6378
- readonly assigned: {
6379
- readonly bg: "#EADDFF";
6380
- readonly on: "#4F378A";
6381
- };
6382
- /** Descartado / archivado (neutral). */
6383
- readonly discarded: {
6384
- readonly bg: "#ECEDF6";
6385
- readonly on: "#43474E";
6386
- };
6387
- };
6609
+ export declare const stateColors: Record<"active" | "generating" | "assigned" | "discarded", {
6610
+ bg: string;
6611
+ on: string;
6612
+ }>;
6388
6613
 
6389
6614
  /**
6390
6615
  * Arma y envía el formulario POST que abre una ruta del admin viejo en una
@@ -6652,7 +6877,7 @@ export declare interface ToastOptions {
6652
6877
  /** Severidad visual de un toast. */
6653
6878
  export declare type ToastSeverity = 'success' | 'error' | 'warning' | 'info';
6654
6879
 
6655
- export declare function TopBar({ sites, sidebarOpen, onToggleSidebar, notificationUnreadCount, notificationsData, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, newContentGroups, previewFormats, operationPermissions, isAdmin, onNewContentSelect, onPreviewSelect, }: TopBarProps): JSX.Element;
6880
+ export declare function TopBar({ sites, sidebarOpen, onToggleSidebar, notificationUnreadCount, notificationsData, editorialOpportunities, showEditorialOpportunities, copilotSuggestionsHref, onEditorialSeeMore, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, newContentGroups, previewFormats, operationPermissions, isAdmin, onNewContentSelect, onPreviewSelect, }: TopBarProps): JSX.Element;
6656
6881
 
6657
6882
  export declare type TopBarMessageKey = keyof CmsMessages['topBar'];
6658
6883
 
@@ -6664,6 +6889,14 @@ export declare type TopBarProps = {
6664
6889
  notificationUnreadCount: number;
6665
6890
  /** Respuesta cruda de `POST /dashboard/notification` (newsTask/expireTask/videos). */
6666
6891
  notificationsData?: DashboardNotificationsResponse | null;
6892
+ /** Oportunidades editoriales copilot (card de la campanita). Si se omite, mock temporal. */
6893
+ editorialOpportunities?: EditorialOpportunity[];
6894
+ /** Muestra la card de oportunidades editoriales copilot. Por defecto `true`. */
6895
+ showEditorialOpportunities?: boolean;
6896
+ /** URL del gestor de sugerencias copilot para el "Ver más" (enlace real). */
6897
+ copilotSuggestionsHref?: string;
6898
+ /** Clic en "Ver más" cuando no hay `copilotSuggestionsHref` (fallback). */
6899
+ onEditorialSeeMore?: () => void;
6667
6900
  profile: ProfileGetResponse;
6668
6901
  primaryLogo: ReactNode;
6669
6902
  brandLogo?: ReactNode;
@@ -6712,6 +6945,28 @@ export declare type TopBarProps = {
6712
6945
  */
6713
6946
  export declare function toSiteWallClock(epochMs: number, gmtRedaction: string | null | undefined): number;
6714
6947
 
6948
+ /**
6949
+ * Normaliza un valor a un `data-testid` estable en kebab-case ASCII.
6950
+ *
6951
+ * Equivalente React del pipe `toTestId` del CMS Angular (`cmsmedios-ux`):
6952
+ * pasa a minúsculas, quita tildes/acentos y convierte cualquier separador
6953
+ * (espacios, puntos, guiones bajos, barras) en un único guion.
6954
+ *
6955
+ * IMPORTANTE: el valor que se le pasa debe ser **independiente del idioma**
6956
+ * (una clave i18n, un `id`/`value`/`slug`, un código o enum interno), nunca el
6957
+ * texto traducido: si no, el `data-testid` cambiaría según el idioma del usuario
6958
+ * y las pruebas no podrían apuntarlo de forma estable.
6959
+ *
6960
+ * @param value Valor de origen (clave i18n, id, código o índice).
6961
+ * @returns El `data-testid` normalizado, o `''` si el valor es vacío/nulo.
6962
+ *
6963
+ * @example
6964
+ * toTestId('modal.deactivate.title') // 'modal-deactivate-title'
6965
+ * toTestId('Próximo evento') // 'proximo-evento'
6966
+ * toTestId(3) // '3'
6967
+ */
6968
+ export declare function toTestId(value: string | number | null | undefined): string;
6969
+
6715
6970
  /**
6716
6971
  * Cuerpo de la respuesta de POST /transcribe/get.
6717
6972
  *
@@ -7135,23 +7390,10 @@ export declare type UserStatusAction = 'activate' | 'deactivate';
7135
7390
 
7136
7391
  export declare type UserStatusColors = typeof userStatusColors;
7137
7392
 
7138
- /**
7139
- * Colores del chip de estado de cuenta de usuario (activo / inactivo).
7140
- * `bg` = contenedor; `on` = texto e ícono sobre el contenedor. El texto/ícono
7141
- * es el mismo verde oscuro en ambos estados. Semánticos y reutilizables.
7142
- */
7143
- export declare const userStatusColors: {
7144
- /** Activo: contenedor verde menta. */
7145
- readonly active: {
7146
- readonly bg: "#92F7B7";
7147
- readonly on: "#002112";
7148
- };
7149
- /** Inactivo: contenedor neutro. */
7150
- readonly inactive: {
7151
- readonly bg: "#E1E2E9";
7152
- readonly on: "#002112";
7153
- };
7154
- };
7393
+ export declare const userStatusColors: Record<"active" | "inactive", {
7394
+ bg: string;
7395
+ on: string;
7396
+ }>;
7155
7397
 
7156
7398
  /** Video del CMS. La forma exacta depende del recurso y del formato pedido. */
7157
7399
  export declare interface Video {