seox 1.1.1 → 1.2.0
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.cts +15 -75
- package/dist/index.d.ts +15 -75
- package/dist/next.cjs +1 -1
- package/dist/next.d.cts +0 -2
- package/dist/next.d.ts +0 -2
- package/dist/next.js +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,87 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { OpenGraphType } from 'next/dist/lib/metadata/types/opengraph-types';
|
|
1
|
+
import { Metadata } from 'next';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
interface SEOImage {
|
|
9
|
-
url: string;
|
|
10
|
-
width?: number;
|
|
11
|
-
height?: number;
|
|
12
|
-
alt?: string;
|
|
13
|
-
}
|
|
14
|
-
interface SEORobots {
|
|
15
|
-
index?: boolean;
|
|
16
|
-
follow?: boolean;
|
|
17
|
-
googleBot?: {
|
|
18
|
-
index?: boolean;
|
|
19
|
-
follow?: boolean;
|
|
20
|
-
'max-video-preview'?: number;
|
|
21
|
-
'max-image-preview'?: 'none' | 'standard' | 'large';
|
|
22
|
-
'max-snippet'?: number;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
interface SEOTwitter {
|
|
26
|
-
card?: 'summary' | 'summary_large_image' | 'app' | 'player';
|
|
27
|
-
title?: string;
|
|
28
|
-
description?: string;
|
|
29
|
-
images?: string[];
|
|
30
|
-
creator?: string;
|
|
31
|
-
}
|
|
32
|
-
interface SEOOpenGraph {
|
|
33
|
-
type: OpenGraphType;
|
|
34
|
-
locale?: string;
|
|
35
|
-
url?: string;
|
|
36
|
-
title?: string;
|
|
37
|
-
description?: string;
|
|
38
|
-
siteName?: string;
|
|
39
|
-
images?: SEOImage[];
|
|
40
|
-
}
|
|
41
|
-
interface SEOFormatDetection {
|
|
42
|
-
email?: boolean;
|
|
43
|
-
address?: boolean;
|
|
44
|
-
telephone?: boolean;
|
|
45
|
-
}
|
|
46
|
-
interface SEOIcons {
|
|
47
|
-
icon?: {
|
|
48
|
-
url: string;
|
|
49
|
-
sizes?: string;
|
|
50
|
-
}[];
|
|
51
|
-
apple?: {
|
|
52
|
-
url: string;
|
|
53
|
-
sizes?: string;
|
|
54
|
-
}[];
|
|
55
|
-
shortcut?: {
|
|
56
|
-
url: string;
|
|
57
|
-
sizes?: string;
|
|
58
|
-
}[];
|
|
59
|
-
}
|
|
3
|
+
/**
|
|
4
|
+
* JSON-LD structured data schema
|
|
5
|
+
*/
|
|
60
6
|
interface SEOJsonLd {
|
|
61
7
|
'@context': string;
|
|
62
8
|
'@type': string;
|
|
63
|
-
[key: string]:
|
|
9
|
+
[key: string]: unknown;
|
|
64
10
|
}
|
|
65
11
|
/**
|
|
66
|
-
*
|
|
12
|
+
* SEO configuration extending Next.js Metadata with additional fields
|
|
13
|
+
*
|
|
14
|
+
* - `name`: Site name (used as fallback for openGraph.siteName)
|
|
15
|
+
* - `url`: Site URL (used as fallback for openGraph.url)
|
|
16
|
+
* - `jsonld`: JSON-LD structured data schemas
|
|
67
17
|
*/
|
|
68
|
-
interface SEOConfig {
|
|
18
|
+
interface SEOConfig extends Metadata {
|
|
19
|
+
/** Site name, used as fallback for openGraph.siteName */
|
|
69
20
|
name: string;
|
|
21
|
+
/** Site URL, used as fallback for openGraph.url */
|
|
70
22
|
url: string;
|
|
71
|
-
|
|
72
|
-
description?: string;
|
|
73
|
-
keywords?: string[];
|
|
74
|
-
creator?: string;
|
|
75
|
-
publisher?: string;
|
|
76
|
-
authors?: SEOAuthor[];
|
|
77
|
-
manifest?: string;
|
|
78
|
-
icons?: SEOIcons;
|
|
79
|
-
formatDetection?: SEOFormatDetection;
|
|
80
|
-
openGraph?: SEOOpenGraph;
|
|
81
|
-
twitter?: SEOTwitter;
|
|
82
|
-
robots?: SEORobots;
|
|
23
|
+
/** JSON-LD structured data schemas */
|
|
83
24
|
jsonld?: SEOJsonLd[];
|
|
84
|
-
locale?: string;
|
|
85
25
|
}
|
|
86
26
|
|
|
87
|
-
export type {
|
|
27
|
+
export type { SEOConfig, SEOJsonLd };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,87 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { OpenGraphType } from 'next/dist/lib/metadata/types/opengraph-types';
|
|
1
|
+
import { Metadata } from 'next';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
interface SEOImage {
|
|
9
|
-
url: string;
|
|
10
|
-
width?: number;
|
|
11
|
-
height?: number;
|
|
12
|
-
alt?: string;
|
|
13
|
-
}
|
|
14
|
-
interface SEORobots {
|
|
15
|
-
index?: boolean;
|
|
16
|
-
follow?: boolean;
|
|
17
|
-
googleBot?: {
|
|
18
|
-
index?: boolean;
|
|
19
|
-
follow?: boolean;
|
|
20
|
-
'max-video-preview'?: number;
|
|
21
|
-
'max-image-preview'?: 'none' | 'standard' | 'large';
|
|
22
|
-
'max-snippet'?: number;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
interface SEOTwitter {
|
|
26
|
-
card?: 'summary' | 'summary_large_image' | 'app' | 'player';
|
|
27
|
-
title?: string;
|
|
28
|
-
description?: string;
|
|
29
|
-
images?: string[];
|
|
30
|
-
creator?: string;
|
|
31
|
-
}
|
|
32
|
-
interface SEOOpenGraph {
|
|
33
|
-
type: OpenGraphType;
|
|
34
|
-
locale?: string;
|
|
35
|
-
url?: string;
|
|
36
|
-
title?: string;
|
|
37
|
-
description?: string;
|
|
38
|
-
siteName?: string;
|
|
39
|
-
images?: SEOImage[];
|
|
40
|
-
}
|
|
41
|
-
interface SEOFormatDetection {
|
|
42
|
-
email?: boolean;
|
|
43
|
-
address?: boolean;
|
|
44
|
-
telephone?: boolean;
|
|
45
|
-
}
|
|
46
|
-
interface SEOIcons {
|
|
47
|
-
icon?: {
|
|
48
|
-
url: string;
|
|
49
|
-
sizes?: string;
|
|
50
|
-
}[];
|
|
51
|
-
apple?: {
|
|
52
|
-
url: string;
|
|
53
|
-
sizes?: string;
|
|
54
|
-
}[];
|
|
55
|
-
shortcut?: {
|
|
56
|
-
url: string;
|
|
57
|
-
sizes?: string;
|
|
58
|
-
}[];
|
|
59
|
-
}
|
|
3
|
+
/**
|
|
4
|
+
* JSON-LD structured data schema
|
|
5
|
+
*/
|
|
60
6
|
interface SEOJsonLd {
|
|
61
7
|
'@context': string;
|
|
62
8
|
'@type': string;
|
|
63
|
-
[key: string]:
|
|
9
|
+
[key: string]: unknown;
|
|
64
10
|
}
|
|
65
11
|
/**
|
|
66
|
-
*
|
|
12
|
+
* SEO configuration extending Next.js Metadata with additional fields
|
|
13
|
+
*
|
|
14
|
+
* - `name`: Site name (used as fallback for openGraph.siteName)
|
|
15
|
+
* - `url`: Site URL (used as fallback for openGraph.url)
|
|
16
|
+
* - `jsonld`: JSON-LD structured data schemas
|
|
67
17
|
*/
|
|
68
|
-
interface SEOConfig {
|
|
18
|
+
interface SEOConfig extends Metadata {
|
|
19
|
+
/** Site name, used as fallback for openGraph.siteName */
|
|
69
20
|
name: string;
|
|
21
|
+
/** Site URL, used as fallback for openGraph.url */
|
|
70
22
|
url: string;
|
|
71
|
-
|
|
72
|
-
description?: string;
|
|
73
|
-
keywords?: string[];
|
|
74
|
-
creator?: string;
|
|
75
|
-
publisher?: string;
|
|
76
|
-
authors?: SEOAuthor[];
|
|
77
|
-
manifest?: string;
|
|
78
|
-
icons?: SEOIcons;
|
|
79
|
-
formatDetection?: SEOFormatDetection;
|
|
80
|
-
openGraph?: SEOOpenGraph;
|
|
81
|
-
twitter?: SEOTwitter;
|
|
82
|
-
robots?: SEORobots;
|
|
23
|
+
/** JSON-LD structured data schemas */
|
|
83
24
|
jsonld?: SEOJsonLd[];
|
|
84
|
-
locale?: string;
|
|
85
25
|
}
|
|
86
26
|
|
|
87
|
-
export type {
|
|
27
|
+
export type { SEOConfig, SEOJsonLd };
|
package/dist/next.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var r=require('react');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var r__namespace=/*#__PURE__*/_interopNamespace(r);var s=class{config;constructor(o){this.config=o;}configToMetadata(o){let{name:t,url:e,jsonld:p,...n}=this.config,{name:c,url:g,jsonld:m,...a}=o??{},d={...n,...a};return (n.openGraph||a.openGraph)&&(d.openGraph={...n.openGraph,...a.openGraph,url:a.openGraph?.url??n.openGraph?.url??e,siteName:a.openGraph?.siteName??n.openGraph?.siteName??t}),d}generatePageMetadata(o){return this.configToMetadata(o)}getJsonLd(o){let t=this.config.jsonld??[],e=o??[];return [...t,...e]}getJsonLdStrings(o){return this.getJsonLd(o).map(t=>JSON.stringify(t))}};function f({seo:i,additionalSchemas:o}){let t=i.getJsonLd(o);return !t||t.length===0?null:r__namespace.createElement(r__namespace.Fragment,null,t.map((e,p)=>r__namespace.createElement("script",{key:`jsonld-${p}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(e)}})))}exports.JsonLd=f;exports.Seox=s;
|
package/dist/next.d.cts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { SEOConfig, SEOJsonLd } from './index.cjs';
|
|
2
2
|
import { Metadata } from 'next';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import 'next/dist/lib/metadata/types/metadata-types';
|
|
5
|
-
import 'next/dist/lib/metadata/types/opengraph-types';
|
|
6
4
|
|
|
7
5
|
declare class Seox {
|
|
8
6
|
config: SEOConfig;
|
package/dist/next.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { SEOConfig, SEOJsonLd } from './index.js';
|
|
2
2
|
import { Metadata } from 'next';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import 'next/dist/lib/metadata/types/metadata-types';
|
|
5
|
-
import 'next/dist/lib/metadata/types/opengraph-types';
|
|
6
4
|
|
|
7
5
|
declare class Seox {
|
|
8
6
|
config: SEOConfig;
|
package/dist/next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as r from'react';var s=class{config;constructor(o){this.config=o;}configToMetadata(o){let{name:t,url:e,jsonld:p,...n}=this.config,{name:c,url:g,jsonld:m,...a}=o??{},d={...n,...a};return (n.openGraph||a.openGraph)&&(d.openGraph={...n.openGraph,...a.openGraph,url:a.openGraph?.url??n.openGraph?.url??e,siteName:a.openGraph?.siteName??n.openGraph?.siteName??t}),d}generatePageMetadata(o){return this.configToMetadata(o)}getJsonLd(o){let t=this.config.jsonld??[],e=o??[];return [...t,...e]}getJsonLdStrings(o){return this.getJsonLd(o).map(t=>JSON.stringify(t))}};function f({seo:i,additionalSchemas:o}){let t=i.getJsonLd(o);return !t||t.length===0?null:r.createElement(r.Fragment,null,t.map((e,p)=>r.createElement("script",{key:`jsonld-${p}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(e)}})))}export{f as JsonLd,s as Seox};
|