sass-template-common 0.10.12 → 0.10.14

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.
@@ -248,6 +248,27 @@ export declare type BucketOriginConfig = {
248
248
  menu?: boolean;
249
249
  /** Sirve los banners (home/seccion/nota) desde el bucket. */
250
250
  banners?: boolean;
251
+ /**
252
+ * [transicional] Sirve la config de los slots dinámicos de home
253
+ * (`bloques/modulos-dinamicos/modulos-dinamicos.json`) desde el bucket en
254
+ * lugar del fan-out N contra `/config/blocks-saas`. Toggle de migración: al
255
+ * pasar todos los sitios a `true`, la rama legacy CMS se elimina y el toggle
256
+ * queda no-op (luego se remueve). ⚠ Requiere el adapter
257
+ * `mapBucketModulesToSlots`, aún sin implementar por depender del shape real
258
+ * del JSON — ver `PLAN_DYNAMIC_SLOTS_BUCKET_ORIGIN.md` §2. NO prender hasta
259
+ * que el adapter exista (hoy lanza si se activa).
260
+ */
261
+ slots?: boolean;
262
+ /**
263
+ * [transicional] Sirve la config del destacado dinámico
264
+ * (`bloques/destacado/destacado.json`) desde el bucket en lugar de
265
+ * `/config/blocks`. Drop-in 1→1: asume el mismo envelope `{ data: [...] }`
266
+ * que el endpoint CMS (verificar contra el archivo real antes de prender —
267
+ * `PLAN_DYNAMIC_SLOTS_BUCKET_ORIGIN.md` §2 Q4). Cae al CMS legacy si el
268
+ * bucket agota reintentos, igual que `menu`/`banners`. Al migrar todos los
269
+ * sitios la rama legacy se elimina y el toggle queda no-op.
270
+ */
271
+ destacado?: boolean;
251
272
  /**
252
273
  * Referer exigido por la bucket policy (`aws:Referer`). Sin este header el
253
274
  * bucket devuelve 403 aunque la ruta/archivo exista. Default: el mismo
@@ -1008,6 +1029,25 @@ export declare class DynamicBlockServices extends CommonServices {
1008
1029
  } | {
1009
1030
  blockSass: BlockSaasResponse[] | undefined;
1010
1031
  }>;
1032
+ /**
1033
+ * Dada la config de UN slot (`BlockSaasResponse[]`, se usa `[0]`), dispara el
1034
+ * content-fetch que corresponda (`videos`/`tag`/`seccion`) y devuelve
1035
+ * `{ blockSass, content? }`. Extraído de `getBlockSass` para reusarse tanto
1036
+ * desde la rama legacy (CMS `/config/blocks-saas`) como desde la rama de
1037
+ * bucket (`modulos-dinamicos.json`, ver `getDynamicSlotsFromBucket`): el
1038
+ * origen del array cambia, el resto de la resolución de contenido no.
1039
+ */
1040
+ resolveSlotContent: (blockSassData: Array<BlockSaasResponse> | undefined) => Promise<{
1041
+ blockSass: BlockSaasResponse[];
1042
+ content: {
1043
+ data: Array<VideoResponseData>;
1044
+ } | undefined;
1045
+ } | {
1046
+ blockSass: BlockSaasResponse[];
1047
+ content: NewListResponse | undefined;
1048
+ } | {
1049
+ blockSass: BlockSaasResponse[] | undefined;
1050
+ }>;
1011
1051
  }
1012
1052
 
1013
1053
  export declare const DynamicComponents: ({ slots, DYNAMIC_SLOT_SUBINDEXES, stylesConfig, AutorIcon, config, banners, showTagBySection, pathname, }: Props_21) => JSX.Element[];
@@ -1595,12 +1635,12 @@ export declare interface ImageSizesContract {
1595
1635
  cardTall: SizeString;
1596
1636
  square: SizeString;
1597
1637
  gallery: SizeString;
1598
- featuredSuperSecondary: SizeString;
1599
- featuredVerticalPrimary: SizeString;
1600
- featuredVerticalSecondary: SizeString;
1601
- featuredHorizontalPrimary: SizeString;
1602
- featuredHorizontalSecondary: SizeString;
1603
- featuredDiarioImageThumb: SizeString;
1638
+ featuredSuperSecondary?: SizeString;
1639
+ featuredVerticalPrimary?: SizeString;
1640
+ featuredVerticalSecondary?: SizeString;
1641
+ featuredHorizontalPrimary?: SizeString;
1642
+ featuredHorizontalSecondary?: SizeString;
1643
+ featuredDiarioImageThumb?: SizeString;
1604
1644
  };
1605
1645
  author: {
1606
1646
  avatar: SizeString;
@@ -1614,15 +1654,28 @@ export declare interface ImageSizesContract {
1614
1654
  og: {
1615
1655
  social: SizeString;
1616
1656
  };
1657
+ /**
1658
+ * Corte opcional propio de un repo (NO resuelto por `resolveImageSizes`, sin
1659
+ * default congelado). El repo que lo usa lo declara; si un consumidor lo usa
1660
+ * sin declararlo es `undefined` → falla (obliga a configurar, decisión del
1661
+ * owner). Hoy: preview cuadrado-grande de video/clip (`squareLg`) en
1662
+ * radioformula/template/crack-family. Repos que no lo usan lo omiten.
1663
+ */
1664
+ squareLg?: SizeString;
1617
1665
  }
1618
1666
 
1619
1667
  /**
1620
1668
  * Partial real (por slot, no solo por grupo): `Partial<ImageSizesContract>` es
1621
1669
  * shallow y obligaría a mandar cada grupo completo o nada. Un app puede mandar
1622
1670
  * solo algunos slots de `note` y dejar el resto en manos del default congelado.
1671
+ *
1672
+ * `squareLg` (opcional, sin default) va aparte del mapeo de grupos: es un
1673
+ * escalar, no un grupo — pasa tal cual si se provee, se omite si no.
1623
1674
  */
1624
1675
  export declare type ImageSizesContractInput = {
1625
- [G in keyof ImageSizesContract]?: Partial<ImageSizesContract[G]>;
1676
+ [G in RequiredGroup]?: Partial<ImageSizesContract[G]>;
1677
+ } & {
1678
+ squareLg?: SizeString;
1626
1679
  };
1627
1680
 
1628
1681
  export declare interface ImageSizesResolution {
@@ -1972,8 +2025,8 @@ export declare class MainComponentServices {
1972
2025
  readonly contract: ImageSizesContract;
1973
2026
  constructor(config: Config, imgSizes: any, axiosApi: AxiosInstance, exclude?: string, customMainImagesSizes?: string, imageSizes?: ImageSizesContractInput);
1974
2027
  getNewsListZone(params: Params): Promise<AxiosResponse<NewListResponse, any, {}> | undefined>;
1975
- getOutstandingBlock(params: Params): Promise<AxiosResponse< {
1976
- data: Array<Outstanding>;
2028
+ getOutstandingBlock(params: Params): Promise<AxiosResponse<{
2029
+ data: Array<Outstanding>;
1977
2030
  }, any, {}> | undefined>;
1978
2031
  getNewsListZoneWrapper(section: string, size: number, imagesizes?: string): Promise<AxiosResponse<NewListResponse, any, {}> | undefined>;
1979
2032
  getNewsDestacadoDiario(section: string): Promise<never[] | AxiosResponse<NewListResponse, any, {}>>;
@@ -3259,6 +3312,15 @@ export declare interface ReportCommentParams {
3259
3312
 
3260
3313
  export declare type ReportReasonKey = keyof typeof REPORT_REASONS;
3261
3314
 
3315
+ /**
3316
+ * Grupos requeridos del contrato: los que `resolveImageSizes` completa con el
3317
+ * default congelado y el assert exige enteros. Los slots OPCIONALES sin default
3318
+ * obligatorio (`squareLg` a nivel raíz, `featured*` dentro de `note`) se manejan
3319
+ * aparte — no participan del assert obligatorio. Derivado (no hardcode) para que
3320
+ * un grupo requerido nuevo entre solo y siga cubierto por el guard de completitud.
3321
+ */
3322
+ export declare type RequiredGroup = Exclude<keyof ImageSizesContract, 'squareLg'>;
3323
+
3262
3324
  /**
3263
3325
  * Reintenta `fn` con backoff exponencial, acotando cada intento con `timeoutMs`
3264
3326
  * (un fetch a un bucket S3 colgado no debe bloquear el request indefinidamente).
@@ -3287,7 +3349,7 @@ export declare function resolveBatchCount(): number;
3287
3349
 
3288
3350
  export declare function resolveBucketMenuSubtype(path?: string): string;
3289
3351
 
3290
- export declare function resolveBucketOriginUrl(bucket: BucketOriginConfig, servicePrefix: string | undefined, type: 'menu' | 'banners', subtype: string): string;
3352
+ export declare function resolveBucketOriginUrl(bucket: BucketOriginConfig, servicePrefix: string | undefined, type: 'menu' | 'banners' | 'bloques', subtype: string): string;
3291
3353
 
3292
3354
  /**
3293
3355
  * Recibe lo que el app mande hoy (contrato completo, parcial, o nada) y