sass-cms-template-common 0.0.19 → 0.0.21

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,6 +1,7 @@
1
1
  import { AnchorHTMLAttributes } from 'react';
2
2
  import { AxiosInstance } from 'axios';
3
3
  import { Context } from 'react';
4
+ import { CSSProperties } from 'react';
4
5
  import { ElementType } from 'react';
5
6
  import { ForwardRefExoticComponent } from 'react';
6
7
  import { JSX } from 'react';
@@ -42,7 +43,7 @@ export declare type AppMessageNode = string | {
42
43
  /** Árbol de mensajes del gestor (namespaces → claves → string anidable). */
43
44
  export declare type AppMessages = Record<string, AppMessageNode>;
44
45
 
45
- export declare function AppShell({ pathname, sites, children, notificationUnreadCount, notificationsData, copilotSuggestionsHref, onEditorialSeeMore, onEditorialRemindLater, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, previewFormats, operationPermissions, isAdmin, onPreviewSelect, LinkComponent, permissions, locale, language, messages, appMessages, baseUrl, profileServices, }: AppShellProps): JSX.Element;
46
+ export declare function AppShell({ pathname, sites, children, notificationUnreadCount, notificationsData, copilotSuggestionsHref, onEditorialSeeMore, onEditorialRemindLater, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, previewFormats, operationPermissions, isAdmin, onPreviewSelect, showAppearanceMenu, LinkComponent, permissions, navHrefOverrides, locale, language, messages, appMessages, baseUrl, profileServices, }: AppShellProps): JSX.Element;
46
47
 
47
48
  export declare type AppShellProps = {
48
49
  pathname: string;
@@ -80,8 +81,19 @@ export declare type AppShellProps = {
80
81
  isAdmin?: boolean;
81
82
  /** Integración: clic en un formato de previsualización (recibe su `id`). */
82
83
  onPreviewSelect?: (formatId: string) => void;
84
+ /** Muestra el menú "Apariencia" (claro/oscuro) del TopBar. Por defecto `true`. */
85
+ showAppearanceMenu?: boolean;
83
86
  LinkComponent?: CmsLinkComponent;
84
87
  permissions: Array<NavItemPermissions>;
88
+ /**
89
+ * Override de destino por `module` del sidebar, para los ítems que representan
90
+ * a un gestor del ecosistema. El gestor manda su propio ítem a `/` (home) y el
91
+ * del gestor hermano al dominio de su deploy (misma pestaña, redirección real).
92
+ * Gestor de usuarios: `{ USERS: '/', COPILOT: <deploy sugerencias> }`; gestor
93
+ * de sugerencias: `{ COPILOT: '/', USERS: <deploy usuarios> }`. Un valor vacío
94
+ * se ignora (navegación interna normal). Ver `resolveNavHrefOverride`.
95
+ */
96
+ navHrefOverrides?: Record<string, string>;
85
97
  locale?: Locale | string;
86
98
  /** Alias de `locale`. */
87
99
  language?: Locale | string;
@@ -1495,7 +1507,9 @@ export declare type CmsNetworkState = 'online' | 'offline';
1495
1507
  * globales, replicando el Angular legacy:
1496
1508
  *
1497
1509
  * - Al perder internet → toast de error "sin conexión" (no se autocierra).
1498
- * - Al recuperarla → cierra el anterior y muestra "conexión restablecida".
1510
+ * - Al recuperarla → cierra el anterior. No muestra "conexión restablecida":
1511
+ * era redundante (el toast "reintentando" de `useResilientAction` y el de
1512
+ * éxito de la acción ya evidencian que se reanudó) y apilaba toasts.
1499
1513
  *
1500
1514
  * Se monta una sola vez, dentro de `CmsNetworkProvider` + `CmsToastProvider`.
1501
1515
  * El reintento y "reanudar el llamado" por acción los maneja
@@ -2294,7 +2308,7 @@ export declare type CmsTextFieldProps = {
2294
2308
  testId?: string;
2295
2309
  };
2296
2310
 
2297
- export declare function CmsToast({ item, t, localeTag, appVersion, onClose, }: CmsToastProps): JSX.Element;
2311
+ export declare const CmsToast: ForwardRefExoticComponent<CmsToastProps & RefAttributes<HTMLDivElement>>;
2298
2312
 
2299
2313
  export declare interface CmsToastApi {
2300
2314
  /** Toast de éxito (verde). */
@@ -2339,6 +2353,11 @@ export declare interface CmsToastProps {
2339
2353
  /** Versión a mostrar en el detalle del error (app o lib). */
2340
2354
  appVersion: string;
2341
2355
  onClose: (id: string) => void;
2356
+ /**
2357
+ * Estilos inline que inyecta la transición (`Slide` de MUI) para animar la
2358
+ * entrada/salida del toast. Se aplican al nodo raíz.
2359
+ */
2360
+ style?: CSSProperties;
2342
2361
  }
2343
2362
 
2344
2363
  /**
@@ -3312,6 +3331,7 @@ export declare const enMessages: {
3312
3331
  readonly SECTIONS: "Sections";
3313
3332
  readonly TWITTERS: "Twitter Feeds";
3314
3333
  readonly USERS: "Users";
3334
+ readonly COPILOT: "CoPilot";
3315
3335
  readonly ZONES: "Zones";
3316
3336
  readonly IA: "IA";
3317
3337
  };
@@ -3479,7 +3499,6 @@ export declare const enMessages: {
3479
3499
  readonly network: {
3480
3500
  readonly disconnected: "No connection. Check your network or Wi-Fi status. We will retry when the connection is restored.";
3481
3501
  readonly retrying: "Retrying requests.";
3482
- readonly restored: "Connection restored.";
3483
3502
  };
3484
3503
  readonly userAvatar: {
3485
3504
  readonly alt: "User avatar";
@@ -3538,6 +3557,7 @@ export declare const esMessages: {
3538
3557
  SECTIONS: string;
3539
3558
  TWITTERS: string;
3540
3559
  USERS: string;
3560
+ COPILOT: string;
3541
3561
  ZONES: string;
3542
3562
  IA: string;
3543
3563
  };
@@ -3705,7 +3725,6 @@ export declare const esMessages: {
3705
3725
  network: {
3706
3726
  disconnected: string;
3707
3727
  retrying: string;
3708
- restored: string;
3709
3728
  };
3710
3729
  userAvatar: {
3711
3730
  alt: string;
@@ -6274,6 +6293,7 @@ export declare const ptMessages: {
6274
6293
  SECTIONS: string;
6275
6294
  TWITTERS: string;
6276
6295
  USERS: string;
6296
+ COPILOT: string;
6277
6297
  ZONES: string;
6278
6298
  IA: string;
6279
6299
  };
@@ -6441,7 +6461,6 @@ export declare const ptMessages: {
6441
6461
  network: {
6442
6462
  disconnected: string;
6443
6463
  retrying: string;
6444
- restored: string;
6445
6464
  };
6446
6465
  userAvatar: {
6447
6466
  alt: string;
@@ -6966,7 +6985,7 @@ export declare const shadows: {
6966
6985
  readonly flyout: "0 6px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.10)";
6967
6986
  };
6968
6987
 
6969
- export declare function Sidebar({ open, pathname, permissions, LinkComponent, legacyBaseUrl, selectedPublicationId, }: SidebarProps): JSX.Element;
6988
+ export declare function Sidebar({ open, pathname, permissions, LinkComponent, legacyBaseUrl, selectedPublicationId, navHrefOverrides, }: SidebarProps): JSX.Element;
6970
6989
 
6971
6990
  export declare type SidebarMessageKey = keyof CmsMessages['sidebar'];
6972
6991
 
@@ -6978,6 +6997,8 @@ export declare type SidebarProps = {
6978
6997
  /** Dominio del admin legacy (JSP/Angular) para prefijar hrefs con `item.legacy`. */
6979
6998
  legacyBaseUrl?: string;
6980
6999
  selectedPublicationId: string;
7000
+ /** Override de destino por `module` (home `/` o dominio del gestor hermano). Ver `resolveNavHrefOverride`. */
7001
+ navHrefOverrides?: Record<string, string>;
6981
7002
  };
6982
7003
 
6983
7004
  /**
@@ -6987,7 +7008,7 @@ export declare type SidebarProps = {
6987
7008
  * todo. El anclado se identifica por `item.module` y persiste vía
6988
7009
  * `profileServices.addPins`/`deletePins`/`getPins` (recurso de perfil).
6989
7010
  */
6990
- export declare function SidebarRail({ pathname, permissions, LinkComponent, legacyBaseUrl, cmsBaseUrl, legacySession, selectedPublicationId, items, profileServices, }: SidebarRailProps): JSX.Element;
7011
+ export declare function SidebarRail({ pathname, permissions, LinkComponent, legacyBaseUrl, cmsBaseUrl, legacySession, selectedPublicationId, navHrefOverrides, items, profileServices, }: SidebarRailProps): JSX.Element;
6991
7012
 
6992
7013
  /** Servicio de pines usado por el rail: solo necesita estos tres métodos. */
6993
7014
  export declare type SidebarRailPinService = Pick<CmsProfileServices, 'addPins' | 'deletePins' | 'getPins'>;
@@ -7004,6 +7025,11 @@ export declare type SidebarRailProps = {
7004
7025
  legacySession?: LegacyAdminSession;
7005
7026
  /** Id de publicación activa; se agrega a los ítems legacy con `appendPublicationId`. */
7006
7027
  selectedPublicationId?: string;
7028
+ /**
7029
+ * Override de destino por `module` (home `/` para el propio gestor, dominio del
7030
+ * gestor hermano para el ajeno). Misma pestaña. Ver `resolveNavHrefOverride`.
7031
+ */
7032
+ navHrefOverrides?: Record<string, string>;
7007
7033
  /** Ítems de navegación. Por defecto, `ACCOUNT_NAV_BLOCKS`. */
7008
7034
  items?: NavLinkItem[];
7009
7035
  /**
@@ -7154,6 +7180,22 @@ export declare interface SubscriptionsGetResponse extends CmsResponse {
7154
7180
 
7155
7181
  export declare const SUPPORTED_LOCALES: readonly ["es", "en", "pt"];
7156
7182
 
7183
+ /**
7184
+ * Superficie estándar de los menús desplegables (dropdowns, flyouts del menú
7185
+ * lateral, kebab de acciones de fila, "Mi Perfil", etc.). Unifica **borde +
7186
+ * radio + sombra** para que todos mantengan la misma estética (NAA-4799: algunos
7187
+ * papers tenían solo sombra, sin el borde definido, y se perdían contra el
7188
+ * fondo, que comparte el mismo gris).
7189
+ *
7190
+ * - Borde `divider` (= `outlineVariant`, #C4C6CF en claro / #3A3E46 en oscuro):
7191
+ * el mismo que ya usaba el flyout del menú lateral.
7192
+ * - Radio `radii.flyout` (12px) y sombra `shadows.flyout` (dos capas suaves).
7193
+ *
7194
+ * Cada paper agrega aparte lo suyo (ancho mínimo, padding, `overflow`, margen de
7195
+ * separación con el disparador). Se aplica con `...(sxMenuSurface as object)`.
7196
+ */
7197
+ export declare const sxMenuSurface: SxProps<Theme>;
7198
+
7157
7199
  /** Botón pill completo y autónomo. Reutilizable en cualquier CTA de la lib. */
7158
7200
  export declare function sxPillButton(variant?: CmsButtonVariant): SxProps<Theme>;
7159
7201
 
@@ -7409,7 +7451,7 @@ export declare interface ToastOptions {
7409
7451
  /** Severidad visual de un toast. */
7410
7452
  export declare type ToastSeverity = 'success' | 'error' | 'warning' | 'info';
7411
7453
 
7412
- export declare function TopBar({ sites, sidebarOpen, onToggleSidebar, notificationUnreadCount, notificationsData, copilotSuggestionsHref, onEditorialSeeMore, onEditorialRemindLater, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, previewFormats, operationPermissions, isAdmin, onPreviewSelect, }: TopBarProps): JSX.Element;
7454
+ export declare function TopBar({ sites, sidebarOpen, onToggleSidebar, notificationUnreadCount, notificationsData, copilotSuggestionsHref, onEditorialSeeMore, onEditorialRemindLater, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, previewFormats, operationPermissions, isAdmin, onPreviewSelect, showAppearanceMenu, }: TopBarProps): JSX.Element;
7413
7455
 
7414
7456
  export declare type TopBarMessageKey = keyof CmsMessages['topBar'];
7415
7457
 
@@ -7458,6 +7500,8 @@ export declare type TopBarProps = {
7458
7500
  isAdmin?: boolean;
7459
7501
  /** Integración: clic en un formato de previsualización (recibe su `id`). */
7460
7502
  onPreviewSelect?: (formatId: string) => void;
7503
+ /** Muestra el menú "Apariencia" (claro/oscuro). Por defecto `true`. */
7504
+ showAppearanceMenu?: boolean;
7461
7505
  };
7462
7506
 
7463
7507
  /**