@20minutes/hela 0.0.4 → 0.0.7

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,40 +1,82 @@
1
1
  /// <reference types="react" />
2
+ import { AwsRumConfig, AwsRum } from 'aws-rum-web';
2
3
  import * as React from 'react';
3
4
  import React__default, { ButtonHTMLAttributes } from 'react';
4
5
  import { RawDraftContentState } from 'draft-js';
5
6
 
6
7
  declare type ColorSchemeBrand = 'magazine' | 'prduction' | 'c2c';
7
8
  declare type ColorSchemeTheme = 'primary' | 'direct' | 'entertainment' | 'planet' | 'sport' | 'default';
8
- declare type Color = ColorSchemeBrand | ColorSchemeTheme;
9
+ declare type ColorSchemeGeneric = 'white' | 'black';
10
+ declare type Color = ColorSchemeBrand | ColorSchemeTheme | ColorSchemeGeneric;
9
11
 
10
- declare enum LayoutType {
12
+ declare const enum LayoutType {
11
13
  MOBILE = "mobile",
12
14
  DESKTOP = "desktop"
13
15
  }
14
16
 
15
17
  declare type ThemeType = 'light' | 'dark';
16
18
 
17
- declare type DefaultDataType = {
19
+ interface ContentDataLayerType {
20
+ signature?: string;
21
+ nbParagraphs?: number;
22
+ }
23
+
24
+ interface DefaultDataLayerType {
18
25
  page_uri: string;
19
- };
20
- declare type UserDataType = {
26
+ }
27
+
28
+ interface UserDataLayerType {
21
29
  darkmode: number;
30
+ }
31
+
32
+ interface DataLayerType extends DefaultDataLayerType, UserDataLayerType, ContentDataLayerType {
33
+ }
34
+
35
+ declare type VariablesDataLayerType = ContentDataLayerType;
36
+
37
+ interface AwsRumVariablesType {
38
+ APPLICATION_ID: string;
39
+ APPLICATION_VERSION: string;
40
+ APPLICATION_REGION: string;
41
+ config: AwsRumConfig;
42
+ }
43
+
44
+ declare global {
45
+ interface Window extends VariablesDataLayerType {
46
+ datalayer?: Partial<DataLayerType>;
47
+ awsRumVariables: AwsRumVariablesType;
48
+ awsRum?: AwsRum;
49
+ }
50
+ }
51
+
52
+ interface ComponentConfig {
53
+ componentName: string;
54
+ helaName: string;
55
+ }
56
+ declare const COMPONENT_CONFIGS: ComponentConfig[];
57
+
58
+ declare type TemplateComponentConfig = {
59
+ name: string;
60
+ propsName: string;
61
+ useKey: boolean;
62
+ required: boolean;
22
63
  };
23
- declare type ContentDataType = {
24
- signature?: string;
25
- nbParagraphs?: number;
64
+ declare type TemplateConfig = {
65
+ name: string;
66
+ helaName: string;
67
+ components: TemplateComponentConfig[];
26
68
  };
27
- declare type DatalayerType = DefaultDataType & UserDataType & ContentDataType;
28
-
29
- declare type CustomWindow = Window & typeof globalThis & {
30
- datalayer: {
31
- signature?: string;
32
- nbParagraphs?: number;
33
- darkmode?: number;
34
- page_uri?: string;
69
+ declare const TEMPLATE_CONFIGS: TemplateConfig[];
70
+
71
+ interface AdProps {
72
+ id: string;
73
+ classes?: Array<string>;
74
+ lazyload?: {
75
+ delayed: boolean;
76
+ distanceVisible?: number;
35
77
  };
36
- };
37
- declare const myWindow: CustomWindow;
78
+ }
79
+ declare const Ad: React__default.FC<AdProps>;
38
80
 
39
81
  interface AlertProps {
40
82
  variant?: 'success' | 'warning' | 'error';
@@ -50,11 +92,17 @@ interface AvatarProps {
50
92
  }
51
93
  declare const Avatar: React__default.FC<AvatarProps>;
52
94
 
53
- declare type IconName = 'arrow' | 'comment' | 'heart' | 'home' | 'ic_diode' | 'share' | 'report' | 'bookmark' | 'local' | 'podcast' | 'view';
95
+ declare type IconName = 'apple' | 'arrow' | 'bookmark' | 'comment' | 'dailymotion' | 'facebook' | 'flipboard' | 'googleplay' | 'instagram' | 'connect' | 'heart' | 'home' | 'diode-leaning' | 'menu' | 'local' | 'logo' | 'podcast' | 'report' | 'snapchat' | 'share' | 'tiktok' | 'twitter' | 'view' | 'youtube' | 'search';
54
96
  interface IconProps extends Omit<React__default.SVGAttributes<SVGElement>, 'width' | 'height'> {
55
97
  className?: string;
56
98
  name: IconName;
57
- size?: number;
99
+ size?: number | number[];
100
+ containerProps?: {
101
+ round?: boolean;
102
+ bgColor?: Color;
103
+ borderColor?: Color;
104
+ size?: 's' | 'm';
105
+ };
58
106
  }
59
107
  declare const Icon: React__default.FC<IconProps>;
60
108
 
@@ -64,6 +112,12 @@ interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElem
64
112
  }
65
113
  declare const Button: React__default.FC<ButtonProps>;
66
114
 
115
+ interface DividerSectionProps {
116
+ classnames?: string;
117
+ colorScheme?: ColorSchemeTheme;
118
+ }
119
+ declare const DividerSection: React__default.FC<DividerSectionProps>;
120
+
67
121
  interface DividerProps {
68
122
  colorScheme?: ColorSchemeTheme;
69
123
  }
@@ -94,9 +148,9 @@ interface LinkProps extends React__default.AnchorHTMLAttributes<HTMLAnchorElemen
94
148
  children: React__default.ReactNode;
95
149
  href: string;
96
150
  variant?: 'link' | 'button';
97
- targetBlank: boolean;
98
- nofollow: boolean;
99
- sponsored: boolean;
151
+ isTargetBlank?: boolean;
152
+ isNofollow?: boolean;
153
+ isSponsored?: boolean;
100
154
  }
101
155
  declare const Link: React__default.FC<LinkProps>;
102
156
 
@@ -111,6 +165,16 @@ declare const Tag: React__default.FC<TagProps>;
111
165
 
112
166
  declare function Pipe(): JSX.Element;
113
167
 
168
+ interface ReadAlsoProps {
169
+ title: string;
170
+ link: string;
171
+ label: string;
172
+ isNofollow: boolean;
173
+ isSponsored: boolean;
174
+ isTargetBlank: boolean;
175
+ }
176
+ declare const ReadAlso: React__default.FC<ReadAlsoProps>;
177
+
114
178
  interface SectionProps {
115
179
  inner?: boolean;
116
180
  children: React__default.ReactNode;
@@ -167,7 +231,7 @@ interface CategoryCardProps {
167
231
  title: string;
168
232
  headline: string;
169
233
  cover: string;
170
- layout?: 'desktop' | 'mobile';
234
+ layout?: LayoutType;
171
235
  }
172
236
  declare const CategoryCard: React__default.FC<CategoryCardProps>;
173
237
 
@@ -177,7 +241,7 @@ interface GameCardProps {
177
241
  headline: string;
178
242
  summary: string;
179
243
  cover: string;
180
- layout?: 'desktop' | 'mobile';
244
+ layout?: LayoutType;
181
245
  }
182
246
  declare const GameCard: React__default.FC<GameCardProps>;
183
247
 
@@ -187,7 +251,7 @@ interface HomeLiveCardProps {
187
251
  headline: string;
188
252
  cover: string;
189
253
  publishedAt: string;
190
- layout?: 'desktop' | 'mobile';
254
+ layout?: LayoutType;
191
255
  }
192
256
  declare const HomeLiveCard: React__default.FC<HomeLiveCardProps>;
193
257
 
@@ -218,7 +282,7 @@ interface LargeCardProps {
218
282
  cover: string;
219
283
  signatureProps: SignatureProps;
220
284
  socialBarProps: SocialBarProps;
221
- layout?: 'desktop' | 'mobile';
285
+ layout?: LayoutType;
222
286
  }
223
287
  declare const LargeCard: React__default.FC<LargeCardProps>;
224
288
 
@@ -230,7 +294,7 @@ interface LiveCardProps {
230
294
  summary: string;
231
295
  publishedAt: string;
232
296
  socialBarProps: SocialBarProps;
233
- layout?: 'desktop' | 'mobile';
297
+ layout?: LayoutType;
234
298
  }
235
299
  declare function LiveCard({ link, title, cover, headline, publishedAt, summary, socialBarProps, layout, }: LiveCardProps): JSX.Element;
236
300
 
@@ -241,7 +305,7 @@ interface MediumCardProps {
241
305
  cover: string;
242
306
  socialBarProps: SocialBarProps;
243
307
  signatureProps: SignatureProps;
244
- layout?: 'desktop' | 'mobile';
308
+ layout?: LayoutType;
245
309
  }
246
310
  declare function MediumCard({ link, title, cover, headline, socialBarProps, signatureProps, layout, }: MediumCardProps): JSX.Element;
247
311
 
@@ -261,7 +325,7 @@ interface MostReadCardProps {
261
325
  index: string;
262
326
  summary?: string;
263
327
  viewCount?: number;
264
- layout?: 'desktop' | 'mobile';
328
+ layout?: LayoutType;
265
329
  isSimplified: boolean;
266
330
  withBorder: boolean;
267
331
  colorScheme?: ColorSchemeTheme;
@@ -273,16 +337,16 @@ interface NewsCardProps {
273
337
  headline: string;
274
338
  title: string;
275
339
  link: 'https://www.20minutes.fr/';
276
- layout?: 'desktop' | 'mobile';
340
+ layout?: LayoutType;
277
341
  }
278
- declare function NewsCard({ link, cover, headline, title, layout }: NewsCardProps): JSX.Element;
342
+ declare function NewsCard({ link, cover, headline, title, layout, }: NewsCardProps): JSX.Element;
279
343
 
280
344
  interface OverviewCardProps {
281
345
  cover: string;
282
346
  link: string;
283
347
  headline: string;
284
348
  title: string;
285
- layout?: 'desktop' | 'mobile';
349
+ layout?: LayoutType;
286
350
  }
287
351
  declare function OverviewCard({ link, cover, headline, title, layout, }: OverviewCardProps): JSX.Element;
288
352
 
@@ -293,7 +357,7 @@ interface PodcastCardProps {
293
357
  cover: string;
294
358
  podcastTime: string;
295
359
  socialBarProps: SocialBarProps;
296
- layout?: 'desktop' | 'mobile';
360
+ layout?: LayoutType;
297
361
  }
298
362
  declare function PodcastCard({ title, link, cover, headline, socialBarProps, podcastTime, layout, }: PodcastCardProps): JSX.Element;
299
363
 
@@ -303,7 +367,7 @@ interface RegionalCardProps {
303
367
  location: string;
304
368
  headline: string;
305
369
  socialBarProps: SocialBarProps;
306
- layout?: 'desktop' | 'mobile';
370
+ layout?: LayoutType;
307
371
  }
308
372
  declare const RegionalCard: React__default.FC<RegionalCardProps>;
309
373
 
@@ -315,7 +379,7 @@ interface RubricCardProps {
315
379
  cover: string;
316
380
  signatureProps: SignatureProps;
317
381
  socialBarProps: SocialBarProps;
318
- layout?: 'desktop' | 'mobile';
382
+ layout?: LayoutType;
319
383
  }
320
384
  declare const RubricCard: React__default.FC<RubricCardProps>;
321
385
 
@@ -326,7 +390,7 @@ interface SmallCardProps {
326
390
  cover: string;
327
391
  socialBarProps: SocialBarProps;
328
392
  publishedAt: string;
329
- layout?: 'desktop' | 'mobile';
393
+ layout?: LayoutType;
330
394
  }
331
395
  declare const SmallCard: React__default.FC<SmallCardProps>;
332
396
 
@@ -343,7 +407,7 @@ interface SmallGameCardProps {
343
407
  link: string;
344
408
  headline: string;
345
409
  cover: string;
346
- layout?: 'desktop' | 'mobile';
410
+ layout?: LayoutType;
347
411
  }
348
412
  declare const SmallGameCard: React__default.FC<SmallGameCardProps>;
349
413
 
@@ -352,7 +416,7 @@ interface SmallLiveCardProps {
352
416
  link: string;
353
417
  headline: string;
354
418
  title: string;
355
- layout?: 'desktop' | 'mobile';
419
+ layout?: LayoutType;
356
420
  }
357
421
  declare const SmallLiveCard: React__default.FC<SmallLiveCardProps>;
358
422
 
@@ -374,6 +438,7 @@ declare const ArticleHeader: React.FC<ArticleHeaderProps>;
374
438
  interface ArticleImageCoverProps {
375
439
  src: string;
376
440
  caption: string;
441
+ isCaptionInside?: boolean;
377
442
  layout?: LayoutType;
378
443
  }
379
444
  declare const ArticleImageCover: React.FC<ArticleImageCoverProps>;
@@ -414,6 +479,34 @@ interface CategoryCardsProps {
414
479
  }
415
480
  declare function CategoryCards({ articles, label, colorScheme }: CategoryCardsProps): JSX.Element;
416
481
 
482
+ interface FooterCategoriesProps {
483
+ categories: {
484
+ name: string;
485
+ links: {
486
+ name: string;
487
+ url: string;
488
+ }[];
489
+ }[];
490
+ }
491
+ declare const FooterCategories: React.FC<FooterCategoriesProps>;
492
+
493
+ interface FooterLinksProps {
494
+ footerBar: {
495
+ links: {
496
+ name: string;
497
+ url: string;
498
+ }[];
499
+ }[];
500
+ }
501
+ declare const FooterLinks: React.FC<FooterLinksProps>;
502
+
503
+ interface HeaderPageProps {
504
+ title: string;
505
+ subtitle?: string;
506
+ colorScheme?: ColorSchemeTheme;
507
+ }
508
+ declare const HeaderPage: React.FC<HeaderPageProps>;
509
+
417
510
  interface MostReadArticlesProps {
418
511
  tabItems: {
419
512
  name: string;
@@ -448,7 +541,7 @@ declare const Newsletter: React__default.FC<NewsletterProps>;
448
541
  interface OverviewBarProps {
449
542
  label: string;
450
543
  articles: OverviewCardProps[];
451
- layout?: 'desktop' | 'mobile';
544
+ layout?: LayoutType;
452
545
  }
453
546
  declare function OverviewBar({ articles, label }: OverviewBarProps): JSX.Element;
454
547
 
@@ -462,15 +555,35 @@ interface PartnerCardsProps {
462
555
  }
463
556
  declare function PartnerCards({ columns, label, colorScheme }: PartnerCardsProps): JSX.Element;
464
557
 
558
+ interface SocialIconProps {
559
+ socialIcon: {
560
+ icon: {
561
+ name: IconName;
562
+ url: string;
563
+ }[];
564
+ }[];
565
+ }
566
+ declare const SocialIcon: React.FC<SocialIconProps>;
567
+
465
568
  interface TagBarProps {
466
569
  tags: TagProps[];
467
570
  }
468
571
  declare const TagBar: React__default.FC<TagBarProps>;
469
572
 
470
- interface DatalayerProps {
471
- signature?: string;
472
- nbParagraphs?: number;
573
+ interface FooterProps extends FooterCategoriesProps, FooterLinksProps, SocialIconProps {
574
+ }
575
+ declare const Footer: React.FC<FooterProps>;
576
+
577
+ interface HeaderProps {
578
+ headerLinks: {
579
+ links: {
580
+ name: string;
581
+ url: string;
582
+ theme?: string;
583
+ }[];
584
+ }[];
473
585
  }
586
+ declare const Header: React.FC<HeaderProps>;
474
587
 
475
588
  interface PageTemplateProps {
476
589
  stylesheets?: {
@@ -479,9 +592,13 @@ interface PageTemplateProps {
479
592
  }[];
480
593
  criticalCss?: string;
481
594
  mainInlineScript?: string;
595
+ awsRum?: {
596
+ variables: AwsRumVariablesType;
597
+ inlineScript: string;
598
+ };
482
599
  datalayerInlineScript?: string;
483
600
  children: React.ReactNode;
484
- datalayerVariables?: DatalayerProps;
601
+ datalayerVariables?: VariablesDataLayerType;
485
602
  }
486
603
  declare const PageTemplate: React.FC<PageTemplateProps>;
487
604
 
@@ -504,4 +621,10 @@ interface ArticlePageProps extends PageTemplateProps {
504
621
  }
505
622
  declare const ArticlePage: React.FC<ArticlePageProps>;
506
623
 
507
- export { Alert, AlertProps, ArticleContent, ArticleContentProps, ArticleHeader, ArticleHeaderProps, ArticleImageCover, ArticleImageCoverProps, ArticlePage, ArticlePageProps, ArticleSummary, ArticleSummaryProps, ArticleVideoCover, ArticleVideoCoverProps, Avatar, AvatarProps, Breadcrumb, BreadcrumbProps, Button, ButtonProps, CategoryCard, CategoryCardProps, CategoryCards, CategoryCardsProps, Color, ColorSchemeBrand, ColorSchemeTheme, ContentDataType, CustomWindow, DatalayerType, DefaultDataType, Divider, DividerProps, GameCard, GameCardProps, Heading, HeadingProps, HomeLiveCard, HomeLiveCardProps, Icon, IconName, IconProps, Img, ImgProps, Input, InputProps, Label, LabelProps, LargeCard, LargeCardProps, LayoutType, Link, LinkProps, LiveCard, LiveCardProps, MediumCard, MediumCardProps, MenuCard, MenuCardProps, MostReadArticles, MostReadArticlesProps, MostReadCard, MostReadCardProps, NewsCard, NewsCardProps, NewsCards, NewsCardsProps, Newsletter, NewsletterProps, OverviewBar, OverviewBarProps, OverviewCard, OverviewCardProps, PageTemplate, PageTemplateProps, PartnerCards, PartnerCardsProps, Pipe, PodcastCard, PodcastCardProps, RegionalCard, RegionalCardProps, RubricCard, RubricCardProps, Section, SectionProps, Signature, SignatureProps, SmallCard, SmallCardProps, SmallCategoryCard, SmallCategoryCardProps, SmallGameCard, SmallGameCardProps, SmallLiveCard, SmallLiveCardProps, SocialBar, SocialBarProps, Switch, SwitchDarkMode, SwitchDarkModeProps, SwitchProps, Tab, TabPanel, TabPanelProps, TabProps, Tag, TagBar, TagBarProps, TagProps, Text, TextProps, ThemeType, UserDataType, myWindow };
624
+ interface HoroscopePageProps extends PageTemplateProps {
625
+ breadcrumb: React.ReactNode;
626
+ headerpage: React.ReactNode;
627
+ }
628
+ declare const HoroscopePage: React.FC<HoroscopePageProps>;
629
+
630
+ export { Ad, AdProps, Alert, AlertProps, ArticleContent, ArticleContentProps, ArticleHeader, ArticleHeaderProps, ArticleImageCover, ArticleImageCoverProps, ArticlePage, ArticlePageProps, ArticleSummary, ArticleSummaryProps, ArticleVideoCover, ArticleVideoCoverProps, Avatar, AvatarProps, Breadcrumb, BreadcrumbProps, Button, ButtonProps, COMPONENT_CONFIGS, CategoryCard, CategoryCardProps, CategoryCards, CategoryCardsProps, Color, ColorSchemeBrand, ColorSchemeGeneric, ColorSchemeTheme, ComponentConfig, ContentDataLayerType, DataLayerType, DefaultDataLayerType, Divider, DividerProps, DividerSection, DividerSectionProps, Footer, FooterCategories, FooterCategoriesProps, FooterLinks, FooterLinksProps, FooterProps, GameCard, GameCardProps, Header, HeaderPage, HeaderPageProps, HeaderProps, Heading, HeadingProps, HomeLiveCard, HomeLiveCardProps, HoroscopePage, HoroscopePageProps, Icon, IconName, IconProps, Img, ImgProps, Input, InputProps, Label, LabelProps, LargeCard, LargeCardProps, LayoutType, Link, LinkProps, LiveCard, LiveCardProps, MediumCard, MediumCardProps, MenuCard, MenuCardProps, MostReadArticles, MostReadArticlesProps, MostReadCard, MostReadCardProps, NewsCard, NewsCardProps, NewsCards, NewsCardsProps, Newsletter, NewsletterProps, OverviewBar, OverviewBarProps, OverviewCard, OverviewCardProps, PageTemplate, PageTemplateProps, PartnerCards, PartnerCardsProps, Pipe, PodcastCard, PodcastCardProps, ReadAlso, ReadAlsoProps, RegionalCard, RegionalCardProps, RubricCard, RubricCardProps, Section, SectionProps, Signature, SignatureProps, SmallCard, SmallCardProps, SmallCategoryCard, SmallCategoryCardProps, SmallGameCard, SmallGameCardProps, SmallLiveCard, SmallLiveCardProps, SocialBar, SocialBarProps, SocialIcon, SocialIconProps, Switch, SwitchDarkMode, SwitchDarkModeProps, SwitchProps, TEMPLATE_CONFIGS, Tab, TabPanel, TabPanelProps, TabProps, Tag, TagBar, TagBarProps, TagProps, TemplateComponentConfig, TemplateConfig, Text, TextProps, ThemeType, UserDataLayerType, VariablesDataLayerType };