dn-react-router-toolkit 0.1.6 → 0.1.8

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.
@@ -1,5 +1,5 @@
1
- import * as Schema from 'schema-dts';
2
1
  import React from 'react';
2
+ import * as Schema from 'schema-dts';
3
3
  import { MetaFunction } from 'react-router';
4
4
 
5
5
  type SEOImage = {
@@ -15,8 +15,8 @@ declare function configSEO(config: {
15
15
  siteName: string;
16
16
  description: string;
17
17
  keywords?: string[];
18
- thumbnail?: SEOImage | (() => SEOImage | null | Promise<SEOImage | null>);
19
- structedData?: Schema.Thing[] | (() => Schema.Thing[] | Promise<Schema.Thing[]>);
18
+ thumbnail?: SEOImage | (() => SEOImage | null);
19
+ structedData?: Schema.Thing[] | (() => Schema.Thing[]);
20
20
  copyright?: string;
21
21
  }): {
22
22
  config: {
@@ -24,26 +24,26 @@ declare function configSEO(config: {
24
24
  siteName: string;
25
25
  description: string;
26
26
  keywords?: string[];
27
- thumbnail?: SEOImage | (() => SEOImage | null | Promise<SEOImage | null>);
28
- structedData?: Schema.Thing[] | (() => Schema.Thing[] | Promise<Schema.Thing[]>);
27
+ thumbnail?: SEOImage | (() => SEOImage | null);
28
+ structedData?: Schema.Thing[] | (() => Schema.Thing[]);
29
29
  copyright?: string;
30
30
  };
31
- init(props?: {
31
+ init: (props: {
32
32
  title?: string;
33
33
  description?: string;
34
34
  keywords?: string[];
35
35
  path?: string;
36
36
  type?: string;
37
- canonicalPath?: string;
37
+ canonicalPath: string;
38
38
  breadcrumbs?: {
39
- label: string;
39
+ title: string;
40
40
  href: string;
41
41
  }[];
42
42
  thumbnail?: SEOImage;
43
43
  images?: SEOImage[];
44
44
  updatedAt?: Date;
45
45
  createdAt?: Date;
46
- structedData?: Schema.Thing[] | (() => Schema.Thing[] | Promise<Schema.Thing[]>);
46
+ structedData?: Schema.Thing[] | (() => Schema.Thing[]);
47
47
  article?: boolean;
48
48
  blogPosting?: boolean;
49
49
  creativeWork?: boolean;
@@ -56,48 +56,16 @@ declare function configSEO(config: {
56
56
  updatedAt?: Date;
57
57
  createdAt?: Date;
58
58
  }[];
59
- }): Promise<{
60
- config: {
61
- origin: string;
62
- siteName: string;
63
- description: string;
64
- keywords?: string[];
65
- thumbnail?: SEOImage | (() => SEOImage | null | Promise<SEOImage | null>);
66
- structedData?: Schema.Thing[] | (() => Schema.Thing[] | Promise<Schema.Thing[]>);
67
- copyright?: string;
68
- };
69
- props: {
70
- title?: string;
71
- description?: string;
72
- keywords?: string[];
73
- path?: string;
74
- type?: string;
75
- canonicalPath?: string;
76
- breadcrumbs?: {
77
- label: string;
78
- href: string;
79
- }[];
80
- thumbnail?: SEOImage;
81
- images?: SEOImage[];
82
- updatedAt?: Date;
83
- createdAt?: Date;
84
- structedData?: Schema.Thing[] | (() => Schema.Thing[] | Promise<Schema.Thing[]>);
85
- article?: boolean;
86
- blogPosting?: boolean;
87
- creativeWork?: boolean;
88
- visualArtwork?: boolean;
89
- collection?: {
90
- title: string;
91
- url: string;
92
- description?: string;
93
- thumbnail?: SEOImage;
94
- updatedAt?: Date;
95
- createdAt?: Date;
96
- }[];
97
- };
98
- meta: MetaFunction<unknown, Record<string, unknown>>;
99
- generateJSONLD: () => React.JSX.Element;
100
- }>;
59
+ }) => {
60
+ pageTitle: string;
61
+ type: string | undefined;
62
+ description: string;
63
+ keywords: string[] | undefined;
64
+ url: string;
65
+ thumbnail: SEOImage | null | undefined;
66
+ };
67
+ meta: MetaFunction<unknown, Record<string, unknown>>;
68
+ StructedData: () => React.JSX.Element;
101
69
  };
102
70
 
103
71
  export { type SEO, type SEOImage, configSEO };
@@ -1,5 +1,5 @@
1
- import * as Schema from 'schema-dts';
2
1
  import React from 'react';
2
+ import * as Schema from 'schema-dts';
3
3
  import { MetaFunction } from 'react-router';
4
4
 
5
5
  type SEOImage = {
@@ -15,8 +15,8 @@ declare function configSEO(config: {
15
15
  siteName: string;
16
16
  description: string;
17
17
  keywords?: string[];
18
- thumbnail?: SEOImage | (() => SEOImage | null | Promise<SEOImage | null>);
19
- structedData?: Schema.Thing[] | (() => Schema.Thing[] | Promise<Schema.Thing[]>);
18
+ thumbnail?: SEOImage | (() => SEOImage | null);
19
+ structedData?: Schema.Thing[] | (() => Schema.Thing[]);
20
20
  copyright?: string;
21
21
  }): {
22
22
  config: {
@@ -24,26 +24,26 @@ declare function configSEO(config: {
24
24
  siteName: string;
25
25
  description: string;
26
26
  keywords?: string[];
27
- thumbnail?: SEOImage | (() => SEOImage | null | Promise<SEOImage | null>);
28
- structedData?: Schema.Thing[] | (() => Schema.Thing[] | Promise<Schema.Thing[]>);
27
+ thumbnail?: SEOImage | (() => SEOImage | null);
28
+ structedData?: Schema.Thing[] | (() => Schema.Thing[]);
29
29
  copyright?: string;
30
30
  };
31
- init(props?: {
31
+ init: (props: {
32
32
  title?: string;
33
33
  description?: string;
34
34
  keywords?: string[];
35
35
  path?: string;
36
36
  type?: string;
37
- canonicalPath?: string;
37
+ canonicalPath: string;
38
38
  breadcrumbs?: {
39
- label: string;
39
+ title: string;
40
40
  href: string;
41
41
  }[];
42
42
  thumbnail?: SEOImage;
43
43
  images?: SEOImage[];
44
44
  updatedAt?: Date;
45
45
  createdAt?: Date;
46
- structedData?: Schema.Thing[] | (() => Schema.Thing[] | Promise<Schema.Thing[]>);
46
+ structedData?: Schema.Thing[] | (() => Schema.Thing[]);
47
47
  article?: boolean;
48
48
  blogPosting?: boolean;
49
49
  creativeWork?: boolean;
@@ -56,48 +56,16 @@ declare function configSEO(config: {
56
56
  updatedAt?: Date;
57
57
  createdAt?: Date;
58
58
  }[];
59
- }): Promise<{
60
- config: {
61
- origin: string;
62
- siteName: string;
63
- description: string;
64
- keywords?: string[];
65
- thumbnail?: SEOImage | (() => SEOImage | null | Promise<SEOImage | null>);
66
- structedData?: Schema.Thing[] | (() => Schema.Thing[] | Promise<Schema.Thing[]>);
67
- copyright?: string;
68
- };
69
- props: {
70
- title?: string;
71
- description?: string;
72
- keywords?: string[];
73
- path?: string;
74
- type?: string;
75
- canonicalPath?: string;
76
- breadcrumbs?: {
77
- label: string;
78
- href: string;
79
- }[];
80
- thumbnail?: SEOImage;
81
- images?: SEOImage[];
82
- updatedAt?: Date;
83
- createdAt?: Date;
84
- structedData?: Schema.Thing[] | (() => Schema.Thing[] | Promise<Schema.Thing[]>);
85
- article?: boolean;
86
- blogPosting?: boolean;
87
- creativeWork?: boolean;
88
- visualArtwork?: boolean;
89
- collection?: {
90
- title: string;
91
- url: string;
92
- description?: string;
93
- thumbnail?: SEOImage;
94
- updatedAt?: Date;
95
- createdAt?: Date;
96
- }[];
97
- };
98
- meta: MetaFunction<unknown, Record<string, unknown>>;
99
- generateJSONLD: () => React.JSX.Element;
100
- }>;
59
+ }) => {
60
+ pageTitle: string;
61
+ type: string | undefined;
62
+ description: string;
63
+ keywords: string[] | undefined;
64
+ url: string;
65
+ thumbnail: SEOImage | null | undefined;
66
+ };
67
+ meta: MetaFunction<unknown, Record<string, unknown>>;
68
+ StructedData: () => React.JSX.Element;
101
69
  };
102
70
 
103
71
  export { type SEO, type SEOImage, configSEO };