sass-template-common 0.11.0 → 0.11.1
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/sass-template-common.d.ts +66 -0
- package/dist/sass-template-common.js +2360 -2229
- package/dist/sass-template-common.umd.cjs +37 -37
- package/package.json +1 -1
|
@@ -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,31 @@ 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
|
+
|
|
2622
|
+
/**
|
|
2623
|
+
* Normaliza el payload del bucket sin tocar su envoltorio, sea la respuesta de
|
|
2624
|
+
* axios (`{ data: { data: [...] } }`) o el fallback de `resilientFetch`
|
|
2625
|
+
* (`{ data: [...] }`).
|
|
2626
|
+
*/
|
|
2627
|
+
export declare const normalizeRankingResponse: <T>(response: T, options?: NormalizeRankingOptions) => T;
|
|
2628
|
+
|
|
2580
2629
|
export declare const NOTA_PRERENDER_CLASS = "nota-prerender";
|
|
2581
2630
|
|
|
2582
2631
|
export declare type NoteShare = {
|
|
@@ -2969,6 +3018,8 @@ declare type Props_29 = {
|
|
|
2969
3018
|
isHome?: boolean;
|
|
2970
3019
|
paths: RoutePathConfig;
|
|
2971
3020
|
speculationPrerenderClass?: string;
|
|
3021
|
+
/** Prefijo de la ficha de video para las entradas de video del ranking. */
|
|
3022
|
+
videoPath?: string;
|
|
2972
3023
|
};
|
|
2973
3024
|
|
|
2974
3025
|
declare type Props_3 = {
|
|
@@ -3971,6 +4022,21 @@ export declare interface VideoItem {
|
|
|
3971
4022
|
clip: string;
|
|
3972
4023
|
}
|
|
3973
4024
|
|
|
4025
|
+
/**
|
|
4026
|
+
* El ranking (bucket GA4) mezcla notas y videos, pero NO los emite con la misma
|
|
4027
|
+
* forma: la nota llega completa (`info.link.url`, `main.title.home/section`,
|
|
4028
|
+
* `config`, `authors`…) y el video llega degradado —solo `info.link.internal` +
|
|
4029
|
+
* `info.link.canonical`, `main.title.article` y `preview`—.
|
|
4030
|
+
*
|
|
4031
|
+
* Sin normalizar, un video ocupa un slot en blanco: `NewDescriptionBlock` no
|
|
4032
|
+
* pinta la imagen (condiciona a `main.title.home`), `NewsDescription` no pinta
|
|
4033
|
+
* el título (lee `main.title.section`) ni lo enlaza (lee `info.link.url`).
|
|
4034
|
+
*
|
|
4035
|
+
* Este helper lleva cualquier entrada del ranking a `NewListResponseData`
|
|
4036
|
+
* completo, resolviendo la URL pública del video (flash, youtube y embedded).
|
|
4037
|
+
*/
|
|
4038
|
+
export declare type VideoOp = 'vf' | 'vy' | 've';
|
|
4039
|
+
|
|
3974
4040
|
export declare interface VideoResponseData {
|
|
3975
4041
|
config: {
|
|
3976
4042
|
autoplay: boolean;
|