sass-cms-template-common 0.0.34 → 0.0.35

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
@@ -1154,17 +1154,17 @@ export declare type CmsEmptyStateProps = {
1154
1154
 
1155
1155
  /**
1156
1156
  * Página de error compartida por todos los gestores (mecanismo en la lib).
1157
- * Replica la de cmsmedios: ilustración + título + subtítulo + botón HOME, y en
1158
- * el 404 la línea "Error 404. Copiar detalle." que copia la URL al portapapeles.
1159
- * Los textos salen del i18n de la lib (namespace `errorPage`, es/en/pt), así que
1160
- * ningún gestor los duplica.
1157
+ * Header propio (logo + Apariencia) + ilustración/texto centrados + footer,
1158
+ * con la tarjeta "Detalle del error" copiable (Código, Usuario en el 403,
1159
+ * Dirección y Fecha). Los textos salen del i18n de la lib (namespace
1160
+ * `errorPage`, es/en/pt), así que ningún gestor los duplica.
1161
1161
  */
1162
- export declare function CmsErrorPage({ variant, homeHref, LinkComponent, illustrationSrc, }: CmsErrorPageProps): JSX.Element;
1162
+ export declare function CmsErrorPage({ variant, homeHref, LinkComponent, illustrationSrc, logo, userEmail, changeAccountHref, supportEmail, }: CmsErrorPageProps): JSX.Element;
1163
1163
 
1164
1164
  export declare type CmsErrorPageProps = {
1165
1165
  /** Tipo de error a mostrar. */
1166
1166
  variant: CmsErrorPageVariant;
1167
- /** Destino del botón HOME. Por defecto la raíz del gestor (`/`). */
1167
+ /** Destino del botón "Ir al gestor". Por defecto la raíz del gestor (`/`). */
1168
1168
  homeHref?: string;
1169
1169
  /** Componente de enlace del host (p. ej. `next/link`). Por defecto un `<a>`. */
1170
1170
  LinkComponent?: CmsLinkComponent;
@@ -1173,6 +1173,18 @@ export declare type CmsErrorPageProps = {
1173
1173
  * `/errors/notfound.png` o `/errors/not-allowed.png` según la variante.
1174
1174
  */
1175
1175
  illustrationSrc?: string;
1176
+ /** Logo de marca del gestor, mostrado en el header propio de la página. */
1177
+ logo?: ReactNode;
1178
+ /**
1179
+ * Email del usuario logueado. Solo se usa en `variant="not-allowed"`: alimenta
1180
+ * la fila "Usuario" de la tarjeta de detalle y el pie "Sesión iniciada como…".
1181
+ * Sin este dato esas dos piezas no se muestran.
1182
+ */
1183
+ userEmail?: string;
1184
+ /** Destino de "Cambiar de cuenta" (403). Por defecto `/logout`. */
1185
+ changeAccountHref?: string;
1186
+ /** Email de soporte para el hint del 404. Por defecto `soporte@bluestack.la`. */
1187
+ supportEmail?: string;
1176
1188
  };
1177
1189
 
1178
1190
  /** Variante de error a mostrar: 404 (no encontrado) o sin permisos. */
@@ -3611,7 +3623,7 @@ export declare const enMessages: {
3611
3623
  readonly defaultInfo: "Information";
3612
3624
  };
3613
3625
  readonly network: {
3614
- readonly disconnected: "No connection. Check your network or Wi-Fi status. We will retry when the connection is restored.";
3626
+ readonly disconnected: "No connection.\nPlease check your Internet connection status.\nThe system will automatically retry pending actions once the connection is restored.";
3615
3627
  readonly retrying: "Retrying requests.";
3616
3628
  };
3617
3629
  readonly userAvatar: {
@@ -3619,16 +3631,28 @@ export declare const enMessages: {
3619
3631
  readonly unknownUser: "Unknown user";
3620
3632
  };
3621
3633
  readonly errorPage: {
3622
- readonly homeButton: "Home";
3623
- readonly notFoundTitle: "Sorry an error occurred.";
3624
- readonly notFoundSubtitle: "This website is no longer available. Keep browsing!";
3634
+ readonly homeButton: "Go to manager";
3635
+ readonly notFoundTitle: "We couldn't find this page";
3636
+ readonly notFoundSubtitle: "This content may have been moved, unpublished, or the link may be mistyped.";
3625
3637
  readonly notFoundCode: "404";
3638
+ readonly notFoundCodeLabel: "404 — Page not found";
3626
3639
  readonly errorLabel: "Error";
3627
- readonly copyDetail: "Copy detail.";
3628
- readonly copyDetailText: "The route {url} you are trying to access is no longer available.";
3629
- readonly copied: "Text copied to clipboard!";
3630
- readonly notAllowedTitle: "Sorry.\nYou do not have access.";
3631
- readonly notAllowedSubtitle: "What you want to see is restricted by permissions. Keep browsing!";
3640
+ readonly notAllowedTitle: "You don't have permission to access this";
3641
+ readonly notAllowedSubtitle: "Your account does not have the permissions needed to view this page. If you think this is a mistake, request access from the site administrator.";
3642
+ readonly notAllowedCode: "403";
3643
+ readonly notAllowedCodeLabel: "403 — Access denied";
3644
+ readonly detailTitle: "Error detail";
3645
+ readonly detailFieldCode: "Code";
3646
+ readonly detailFieldAddress: "Address";
3647
+ readonly detailFieldUser: "User";
3648
+ readonly detailFieldDate: "Date";
3649
+ readonly copyDetail: "Copy";
3650
+ readonly copied: "Copied";
3651
+ readonly helpHintPrefix: "Need help? Copy the detail and write to";
3652
+ readonly loggedInAsPrefix: "Signed in as";
3653
+ readonly changeAccount: "Change account";
3654
+ readonly footerBrand: "Bluestack CMS";
3655
+ readonly footerCodeLabel: "Error code";
3632
3656
  };
3633
3657
  };
3634
3658
 
@@ -3849,12 +3873,24 @@ export declare const esMessages: {
3849
3873
  notFoundTitle: string;
3850
3874
  notFoundSubtitle: string;
3851
3875
  notFoundCode: string;
3876
+ notFoundCodeLabel: string;
3852
3877
  errorLabel: string;
3853
- copyDetail: string;
3854
- copyDetailText: string;
3855
- copied: string;
3856
3878
  notAllowedTitle: string;
3857
3879
  notAllowedSubtitle: string;
3880
+ notAllowedCode: string;
3881
+ notAllowedCodeLabel: string;
3882
+ detailTitle: string;
3883
+ detailFieldCode: string;
3884
+ detailFieldAddress: string;
3885
+ detailFieldUser: string;
3886
+ detailFieldDate: string;
3887
+ copyDetail: string;
3888
+ copied: string;
3889
+ helpHintPrefix: string;
3890
+ loggedInAsPrefix: string;
3891
+ changeAccount: string;
3892
+ footerBrand: string;
3893
+ footerCodeLabel: string;
3858
3894
  };
3859
3895
  };
3860
3896
 
@@ -4157,7 +4193,7 @@ export declare function findPublicationLabel(sites: SiteSection[], publicationId
4157
4193
  * que la carga vive en `theme/fonts.ts` y se inyecta vía el provider MUI.
4158
4194
  */
4159
4195
  export declare const fontFamilies: {
4160
- readonly googleSans: "\"Google Sans\",\"Helvetica\",\"Arial\",sans-serif";
4196
+ readonly googleSans: "\"Google Sans\",\"Roboto\",\"Helvetica\",\"Arial\",sans-serif";
4161
4197
  /** Monoespaciada (url del toast de error, fragmentos de código). No es de marca. */
4162
4198
  readonly mono: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
4163
4199
  };
@@ -6649,12 +6685,24 @@ export declare const ptMessages: {
6649
6685
  notFoundTitle: string;
6650
6686
  notFoundSubtitle: string;
6651
6687
  notFoundCode: string;
6688
+ notFoundCodeLabel: string;
6652
6689
  errorLabel: string;
6653
- copyDetail: string;
6654
- copyDetailText: string;
6655
- copied: string;
6656
6690
  notAllowedTitle: string;
6657
6691
  notAllowedSubtitle: string;
6692
+ notAllowedCode: string;
6693
+ notAllowedCodeLabel: string;
6694
+ detailTitle: string;
6695
+ detailFieldCode: string;
6696
+ detailFieldAddress: string;
6697
+ detailFieldUser: string;
6698
+ detailFieldDate: string;
6699
+ copyDetail: string;
6700
+ copied: string;
6701
+ helpHintPrefix: string;
6702
+ loggedInAsPrefix: string;
6703
+ changeAccount: string;
6704
+ footerBrand: string;
6705
+ footerCodeLabel: string;
6658
6706
  };
6659
6707
  };
6660
6708
 
@@ -6968,6 +7016,19 @@ export declare interface ResilientRunOptions {
6968
7016
  maxRetries?: number;
6969
7017
  /** Mostrar el toast "reintentando" al reanudar tras una desconexión. Default true. */
6970
7018
  notifyRetry?: boolean;
7019
+ /**
7020
+ * Clave para **deduplicar** llamados idénticos en vuelo (p. ej. el usuario le
7021
+ * dio clic varias veces al mismo botón mientras esperaba reconexión). Si ya
7022
+ * hay un `run` con la misma clave esperando conexión/reintentando, este NO
7023
+ * vuelve a invocar `fn`: se engancha a esa misma promesa y ambos llamantes
7024
+ * reciben el mismo resultado (un solo request real, no uno por clic).
7025
+ *
7026
+ * Sin esta opción no hay dedupe (comportamiento previo, sin cambios). El
7027
+ * gestor arma la clave con lo que identifica **esa** acción de negocio, p. ej.
7028
+ * `` `users/setStatus:${userId}` ``: no la deriva la lib porque es una
7029
+ * decisión del caller (no todo llamado conviene deduplicar).
7030
+ */
7031
+ dedupeKey?: string;
6971
7032
  }
6972
7033
 
6973
7034
  export declare function resolveCmsAssetUrl(path: string, cmsOrigin?: string): string;
@@ -8095,6 +8156,11 @@ export declare type UserAvatarProps = {
8095
8156
  * resultado de error para que el caller muestre el toast.
8096
8157
  * - **Error de negocio (4xx / `status:'fail'`):** no reintenta; devuelve el
8097
8158
  * resultado tal cual para que el caller decida (toast/update optimista).
8159
+ * - **Clics repetidos a la misma acción** (con `dedupeKey`): mientras el
8160
+ * primer llamado siga esperando reconexión o reintentando, los siguientes
8161
+ * con la misma clave no disparan `fn` de nuevo — se enganchan a la misma
8162
+ * promesa, así solo sale un request real aunque el usuario haya hecho clic
8163
+ * varias veces.
8098
8164
  *
8099
8165
  * El toast global de "sin conexión" / "conexión restablecida" lo dispara
8100
8166
  * `CmsNetworkToaster`; este hook solo añade el "reintentando…" por acción.
@@ -8102,8 +8168,11 @@ export declare type UserAvatarProps = {
8102
8168
  * Uso en el gestor:
8103
8169
  * ```ts
8104
8170
  * const run = useResilientAction();
8105
- * const res = await run(() => setUserStatus(slug, id, action),
8106
- * { service: '/users/actions/setStatus', params: { id, action } });
8171
+ * const res = await run(() => setUserStatus(slug, id, action), {
8172
+ * service: '/users/actions/setStatus',
8173
+ * params: { id, action },
8174
+ * dedupeKey: `users/setStatus:${id}`,
8175
+ * });
8107
8176
  * ```
8108
8177
  */
8109
8178
  export declare function useResilientAction(): ResilientRunner;