sass-template-common 0.11.0 → 0.11.11

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.
@@ -316,6 +316,15 @@ export declare function buildConfigMenuApiPath(servicePrefix: string, configVers
316
316
 
317
317
  export declare const buildTagUrl: (tag: Tag, paths: RoutePathConfig) => string;
318
318
 
319
+ /**
320
+ * Reconstruye la URL pública desde `info.link.internal`. Es el inverso exacto
321
+ * de `getVideoRealPath`, que es quien la vuelve a resolver en `/video/[…slug]`.
322
+ */
323
+ export declare const buildVideoUrlFromInternal: (internal: string, options?: {
324
+ videoPath?: string;
325
+ title?: string;
326
+ }) => string;
327
+
319
328
  declare interface ButtonCSS {
320
329
  '--button-background-color'?: string;
321
330
  '--button-color'?: string;
@@ -1406,8 +1415,18 @@ export declare const getSlugs: {
1406
1415
  /** String (o undefined) para una clave dinámica; nunca devuelve el objeto `comentarios`. */
1407
1416
  export declare function getTextsStringValue(texts: textsType, key: string): string | undefined;
1408
1417
 
1418
+ export declare function getTitleString(title: string | {
1419
+ article?: string;
1420
+ home?: string;
1421
+ section?: string;
1422
+ seo?: string;
1423
+ } | undefined): string;
1424
+
1409
1425
  export declare const getTypeOfNews: (props: Props) => string;
1410
1426
 
1427
+ /** `vf` | `vy` | `ve` si la entrada es un video; `undefined` si es nota. */
1428
+ export declare const getVideoOp: (item: any) => VideoOp | undefined;
1429
+
1411
1430
  export declare function getVideoRealPath(pathname: string): {
1412
1431
  path: string;
1413
1432
  op: string;
@@ -1688,6 +1707,8 @@ export declare interface ImageSizesResolution {
1688
1707
 
1689
1708
  export declare interface Info {
1690
1709
  type?: string;
1710
+ /** Tipo de video cuando `type === 'video'`: flash, youtube o embedded. */
1711
+ videoOp?: 'vf' | 'vy' | 've';
1691
1712
  section?: {
1692
1713
  name: string;
1693
1714
  slug: string;
@@ -1752,6 +1773,9 @@ export declare class IssuuServices {
1752
1773
  getListIssuuPublicationBySlug(slug: string): Promise<AxiosResponse<any, any, {}> | undefined>;
1753
1774
  }
1754
1775
 
1776
+ /** True para videos (flash, youtube y embedded) en cualquiera de sus formas. */
1777
+ export declare const isVideoContentItem: (item: any) => boolean;
1778
+
1755
1779
  export declare interface ItemFormatedType extends NewListResponseData {
1756
1780
  gallery?: Array<Preview>;
1757
1781
  videos?: Array<VideoItem>;
@@ -2577,6 +2601,42 @@ export declare interface NewsResponse {
2577
2601
 
2578
2602
  export declare const NextPrev: FC<Props_36>;
2579
2603
 
2604
+ /**
2605
+ * Deja la entrada del ranking lista para `Readest`/`NewDescriptionBlock`.
2606
+ * Idempotente: una entrada ya normalizada (o una nota completa) se devuelve
2607
+ * tal cual, sin copia.
2608
+ */
2609
+ export declare const normalizeRankingItem: (item: any, options?: NormalizeRankingOptions) => NewListResponseData | null;
2610
+
2611
+ /**
2612
+ * Normaliza la lista completa del ranking. Descarta las entradas sin título:
2613
+ * son las que hoy se cuelan como slot numerado en blanco.
2614
+ */
2615
+ export declare const normalizeRankingList: (list: unknown, options?: NormalizeRankingOptions) => Array<NewListResponseData>;
2616
+
2617
+ export declare type NormalizeRankingOptions = {
2618
+ /** Prefijo de la ruta de ficha de video. Default: `video`. */
2619
+ videoPath?: string;
2620
+ /**
2621
+ * Sección sintética para las entradas de video, que no tienen una propia (el
2622
+ * bucket las manda como `section: { name: null }`). `name` sale de los textos
2623
+ * del sitio y `url` de `paths.videos`; si falta cualquiera de los dos el video
2624
+ * queda sin chip en vez de enlazar a una ruta inventada.
2625
+ */
2626
+ videoSection?: {
2627
+ name?: string;
2628
+ url?: string;
2629
+ slug?: string;
2630
+ };
2631
+ };
2632
+
2633
+ /**
2634
+ * Normaliza el payload del bucket sin tocar su envoltorio, sea la respuesta de
2635
+ * axios (`{ data: { data: [...] } }`) o el fallback de `resilientFetch`
2636
+ * (`{ data: [...] }`).
2637
+ */
2638
+ export declare const normalizeRankingResponse: <T>(response: T, options?: NormalizeRankingOptions) => T;
2639
+
2580
2640
  export declare const NOTA_PRERENDER_CLASS = "nota-prerender";
2581
2641
 
2582
2642
  export declare type NoteShare = {
@@ -2969,6 +3029,13 @@ declare type Props_29 = {
2969
3029
  isHome?: boolean;
2970
3030
  paths: RoutePathConfig;
2971
3031
  speculationPrerenderClass?: string;
3032
+ /** Prefijo de la ficha de video para las entradas de video del ranking. */
3033
+ videoPath?: string;
3034
+ /**
3035
+ * Label del chip de video. Default: `videosSectionTitle` de los textos del
3036
+ * idioma activo. Los sitios lo pasan desde su propio `getTexts()`.
3037
+ */
3038
+ videosSectionLabel?: string;
2972
3039
  };
2973
3040
 
2974
3041
  declare type Props_3 = {
@@ -3160,6 +3227,8 @@ declare type Props_47 = {
3160
3227
  ranking: Array<NewListResponseData>;
3161
3228
  paths: RoutePathConfig;
3162
3229
  readestCustomStyles?: CSSProperties;
3230
+ /** Label del chip de sección de los videos del ranking (textos del sitio). */
3231
+ videosSectionLabel?: string;
3163
3232
  };
3164
3233
 
3165
3234
  declare type Props_48 = {
@@ -3464,6 +3533,12 @@ export declare interface RoutePathConfig {
3464
3533
  contacto?: string | 'contacto';
3465
3534
  anuncia?: string | 'anuncia';
3466
3535
  'ultimas-noticias': string | 'ultimas-noticias';
3536
+ /**
3537
+ * Segmento del listado de videos. Opcional a propósito: es lo que habilita el
3538
+ * chip de sección en las entradas de video del ranking, y no todos los sitios
3539
+ * tienen la ruta. Sin él no se inventa un `/videos` que daría 404.
3540
+ */
3541
+ videos?: string | 'videos';
3467
3542
  }
3468
3543
 
3469
3544
  export declare function runConfigOriginComparison(params: {
@@ -3793,6 +3868,12 @@ export declare type TextsListsAndSearch = {
3793
3868
  relatedNewsTitle: string;
3794
3869
  moreNewsTitle: string;
3795
3870
  searchKeyWord: string;
3871
+ /**
3872
+ * Label del chip de sección de las entradas de video del ranking (las notas
3873
+ * traen la sección del CMS; los videos no tienen una). Opcional: sin valor el
3874
+ * video queda sin chip en vez de mostrar un texto inventado.
3875
+ */
3876
+ videosSectionTitle?: string;
3796
3877
  };
3797
3878
 
3798
3879
  /** Etiquetas de segmentos de URL (paths) */
@@ -3802,6 +3883,8 @@ export declare type TextsPathLabels = {
3802
3883
  buscar: string;
3803
3884
  seccion: string;
3804
3885
  'ultimas-noticias': string;
3886
+ /** Listado de videos. Opcional: no todos los sitios tienen la ruta. */
3887
+ videos?: string;
3805
3888
  };
3806
3889
 
3807
3890
  /** Cinta de ediciones y copyright */
@@ -3971,6 +4054,21 @@ export declare interface VideoItem {
3971
4054
  clip: string;
3972
4055
  }
3973
4056
 
4057
+ /**
4058
+ * El ranking (bucket GA4) mezcla notas y videos, pero NO los emite con la misma
4059
+ * forma: la nota llega completa (`info.link.url`, `main.title.home/section`,
4060
+ * `config`, `authors`…) y el video llega degradado —solo `info.link.internal` +
4061
+ * `info.link.canonical`, `main.title.article` y `preview`—.
4062
+ *
4063
+ * Sin normalizar, un video ocupa un slot en blanco: `NewDescriptionBlock` no
4064
+ * pinta la imagen (condiciona a `main.title.home`), `NewsDescription` no pinta
4065
+ * el título (lee `main.title.section`) ni lo enlaza (lee `info.link.url`).
4066
+ *
4067
+ * Este helper lleva cualquier entrada del ranking a `NewListResponseData`
4068
+ * completo, resolviendo la URL pública del video (flash, youtube y embedded).
4069
+ */
4070
+ export declare type VideoOp = 'vf' | 'vy' | 've';
4071
+
3974
4072
  export declare interface VideoResponseData {
3975
4073
  config: {
3976
4074
  autoplay: boolean;