@indaco/sveo 1.0.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/LICENSE +21 -0
- package/README.md +207 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/metadata/PageMetaTags.svelte +19 -0
- package/dist/components/metadata/PageMetaTags.svelte.d.ts +7 -0
- package/dist/components/metadata/index.d.ts +3 -0
- package/dist/components/metadata/index.js +3 -0
- package/dist/components/metadata/opengraph/OpenGraph.svelte +54 -0
- package/dist/components/metadata/opengraph/OpenGraph.svelte.d.ts +7 -0
- package/dist/components/metadata/opengraph/article.svelte +29 -0
- package/dist/components/metadata/opengraph/article.svelte.d.ts +7 -0
- package/dist/components/metadata/opengraph/book.svelte +22 -0
- package/dist/components/metadata/opengraph/book.svelte.d.ts +7 -0
- package/dist/components/metadata/opengraph/business.svelte +29 -0
- package/dist/components/metadata/opengraph/business.svelte.d.ts +7 -0
- package/dist/components/metadata/opengraph/index.d.ts +1 -0
- package/dist/components/metadata/opengraph/index.js +1 -0
- package/dist/components/metadata/opengraph/music-album.svelte +34 -0
- package/dist/components/metadata/opengraph/music-album.svelte.d.ts +7 -0
- package/dist/components/metadata/opengraph/music-playlist.svelte +19 -0
- package/dist/components/metadata/opengraph/music-playlist.svelte.d.ts +7 -0
- package/dist/components/metadata/opengraph/music-radio-station.svelte +7 -0
- package/dist/components/metadata/opengraph/music-radio-station.svelte.d.ts +7 -0
- package/dist/components/metadata/opengraph/music-song.svelte +31 -0
- package/dist/components/metadata/opengraph/music-song.svelte.d.ts +7 -0
- package/dist/components/metadata/opengraph/product.svelte +15 -0
- package/dist/components/metadata/opengraph/product.svelte.d.ts +7 -0
- package/dist/components/metadata/opengraph/profile.svelte +19 -0
- package/dist/components/metadata/opengraph/profile.svelte.d.ts +7 -0
- package/dist/components/metadata/opengraph/video-episode.svelte +47 -0
- package/dist/components/metadata/opengraph/video-episode.svelte.d.ts +7 -0
- package/dist/components/metadata/opengraph/video-movie.svelte +43 -0
- package/dist/components/metadata/opengraph/video-movie.svelte.d.ts +7 -0
- package/dist/components/metadata/twittercard/TwitterCard.svelte +37 -0
- package/dist/components/metadata/twittercard/TwitterCard.svelte.d.ts +7 -0
- package/dist/components/metadata/twittercard/index.d.ts +1 -0
- package/dist/components/metadata/twittercard/index.js +1 -0
- package/dist/components/schemaorg/breadcrumbs/JsonLdBreadcrumbs.svelte +30 -0
- package/dist/components/schemaorg/breadcrumbs/JsonLdBreadcrumbs.svelte.d.ts +6 -0
- package/dist/components/schemaorg/breadcrumbs/index.d.ts +1 -0
- package/dist/components/schemaorg/breadcrumbs/index.js +1 -0
- package/dist/components/schemaorg/index.d.ts +4 -0
- package/dist/components/schemaorg/index.js +4 -0
- package/dist/components/schemaorg/sitenavigationelements/JsonLdSiteNavigationElements.svelte +22 -0
- package/dist/components/schemaorg/sitenavigationelements/JsonLdSiteNavigationElements.svelte.d.ts +8 -0
- package/dist/components/schemaorg/sitenavigationelements/index.d.ts +1 -0
- package/dist/components/schemaorg/sitenavigationelements/index.js +1 -0
- package/dist/components/schemaorg/webpage/JsonLdWebPage.svelte +17 -0
- package/dist/components/schemaorg/webpage/JsonLdWebPage.svelte.d.ts +7 -0
- package/dist/components/schemaorg/webpage/index.d.ts +1 -0
- package/dist/components/schemaorg/webpage/index.js +1 -0
- package/dist/components/schemaorg/website/JsonLdWebSite.svelte +50 -0
- package/dist/components/schemaorg/website/JsonLdWebSite.svelte.d.ts +7 -0
- package/dist/components/schemaorg/website/index.d.ts +1 -0
- package/dist/components/schemaorg/website/index.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/types.d.ts +231 -0
- package/dist/types.js +79 -0
- package/dist/utils.d.ts +7 -0
- package/dist/utils.js +19 -0
- package/package.json +243 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script lang="ts">import { toISODateString } from '../../../utils.js';
|
|
2
|
+
import VideoMovie from './video-movie.svelte';
|
|
3
|
+
let { data } = $props();
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
{#if Array.isArray(data.opengraph?.episode?.actor)}
|
|
7
|
+
{#each data.opengraph.episode.actor as actor (actor)}
|
|
8
|
+
<meta property="video:actor" content={actor.url} />
|
|
9
|
+
{/each}
|
|
10
|
+
{/if}
|
|
11
|
+
|
|
12
|
+
{#if data.opengraph?.episode?.actorRole}
|
|
13
|
+
<meta property="video:actor:role" content={data.opengraph.episode.actorRole} />
|
|
14
|
+
{/if}
|
|
15
|
+
|
|
16
|
+
{#if Array.isArray(data.opengraph?.episode?.director)}
|
|
17
|
+
{#each data.opengraph.episode.director as director (director)}
|
|
18
|
+
<meta property="video:director" content={director.url} />
|
|
19
|
+
{/each}
|
|
20
|
+
{/if}
|
|
21
|
+
|
|
22
|
+
{#if Array.isArray(data.opengraph?.episode?.writer)}
|
|
23
|
+
{#each data.opengraph.episode.writer as writer (writer)}
|
|
24
|
+
<meta property="video:writer" content={writer.url} />
|
|
25
|
+
{/each}
|
|
26
|
+
{/if}
|
|
27
|
+
|
|
28
|
+
{#if data.opengraph?.episode?.duration}
|
|
29
|
+
<meta property="video:duration" content={data.opengraph.episode.duration.toString()} />
|
|
30
|
+
{/if}
|
|
31
|
+
|
|
32
|
+
{#if data.opengraph?.episode?.release_date}
|
|
33
|
+
<meta
|
|
34
|
+
property="video:release_date"
|
|
35
|
+
content={toISODateString(data.opengraph.episode.release_date)}
|
|
36
|
+
/>
|
|
37
|
+
{/if}
|
|
38
|
+
|
|
39
|
+
{#if Array.isArray(data.opengraph?.episode?.tags)}
|
|
40
|
+
{#each data.opengraph.episode.tags as tag (tag)}
|
|
41
|
+
<meta property="video:tag" content={tag} />
|
|
42
|
+
{/each}
|
|
43
|
+
{/if}
|
|
44
|
+
|
|
45
|
+
{#if data.opengraph?.episode?.series}
|
|
46
|
+
<VideoMovie {data} />
|
|
47
|
+
{/if}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script lang="ts">import { toISODateString } from '../../../utils.js';
|
|
2
|
+
let { data } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
{#if Array.isArray(data.opengraph?.movie?.actor)}
|
|
6
|
+
{#each data.opengraph.movie.actor as actor (actor)}
|
|
7
|
+
<meta property="video:actor" content={actor.url} />
|
|
8
|
+
{/each}
|
|
9
|
+
{/if}
|
|
10
|
+
|
|
11
|
+
{#if data.opengraph?.movie?.actorRole}
|
|
12
|
+
<meta property="video:actor:role" content={data.opengraph.movie.actorRole} />
|
|
13
|
+
{/if}
|
|
14
|
+
|
|
15
|
+
{#if Array.isArray(data.opengraph?.movie?.director)}
|
|
16
|
+
{#each data.opengraph.movie.director as director (director)}
|
|
17
|
+
<meta property="video:director" content={director.url} />
|
|
18
|
+
{/each}
|
|
19
|
+
{/if}
|
|
20
|
+
|
|
21
|
+
{#if Array.isArray(data.opengraph?.movie?.writer)}
|
|
22
|
+
{#each data.opengraph.movie.writer as writer (writer)}
|
|
23
|
+
<meta property="video:writer" content={writer.url} />
|
|
24
|
+
{/each}
|
|
25
|
+
{/if}
|
|
26
|
+
|
|
27
|
+
{#if data.opengraph?.movie?.duration}
|
|
28
|
+
<meta property="video:duration" content={data.opengraph.movie.duration.toString()} />
|
|
29
|
+
{/if}
|
|
30
|
+
|
|
31
|
+
{#if data.opengraph?.movie?.release_date}
|
|
32
|
+
<meta
|
|
33
|
+
property="video:release_date"
|
|
34
|
+
content={toISODateString(data.opengraph.movie.release_date)}
|
|
35
|
+
/>
|
|
36
|
+
{/if}
|
|
37
|
+
|
|
38
|
+
{#if Array.isArray(data.opengraph?.movie?.tags)}
|
|
39
|
+
{@const _tags = data.opengraph?.movie?.tags}
|
|
40
|
+
{#each _tags as tag (tag)}
|
|
41
|
+
<meta property="video:tag" content={tag} />
|
|
42
|
+
{/each}
|
|
43
|
+
{/if}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script lang="ts">import { TwitterCardType } from '../../../types.js';
|
|
2
|
+
let { data } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
{#if data.twitter}
|
|
6
|
+
{#if data.twitter.type}
|
|
7
|
+
<meta property="twitter:card" content={data.twitter.type} />
|
|
8
|
+
<meta property="twitter:title" content={data.title} />
|
|
9
|
+
{#if data.twitter.site}
|
|
10
|
+
<meta property="twitter:site" content={data.twitter.site} />
|
|
11
|
+
{/if}
|
|
12
|
+
{#if data.description}
|
|
13
|
+
<meta property="twitter:description" content={data.description} />
|
|
14
|
+
{/if}
|
|
15
|
+
{#if data.image?.url}
|
|
16
|
+
<meta property="twitter:image" content={data.image.url} />
|
|
17
|
+
{#if data.image.alt}
|
|
18
|
+
<meta property="twitter:image:alt" content={data.image.alt} />
|
|
19
|
+
{/if}
|
|
20
|
+
{/if}
|
|
21
|
+
|
|
22
|
+
{#if data.twitter.type === TwitterCardType.Player && data.twitter.player}
|
|
23
|
+
<meta property="twitter:player" content={data.twitter.player.url} />
|
|
24
|
+
<meta property="twitter:player:width" content={data.twitter.player.width.toString()} />
|
|
25
|
+
<meta property="twitter:player:height" content={data.twitter.player.height.toString()} />
|
|
26
|
+
{/if}
|
|
27
|
+
|
|
28
|
+
{#if data.twitter.type === TwitterCardType.App && data.twitter.app}
|
|
29
|
+
{#if data.twitter.app.country}
|
|
30
|
+
<meta property="twitter:app:country" content={data.twitter.app.country} />
|
|
31
|
+
{/if}
|
|
32
|
+
<meta property="twitter:app:id:iphone" content={data.twitter.app.idIPhone} />
|
|
33
|
+
<meta property="twitter:app:id:ipad" content={data.twitter.app.idIPad} />
|
|
34
|
+
<meta property="twitter:app:id:googleplay" content={data.twitter.app.idGooglePlay} />
|
|
35
|
+
{/if}
|
|
36
|
+
{/if}
|
|
37
|
+
{/if}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TwitterCard } from './TwitterCard.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TwitterCard } from './TwitterCard.svelte';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts">import { serializeJSONLdSchema, pathSegments } from '../../../utils.js';
|
|
2
|
+
let { url } = $props();
|
|
3
|
+
const baseURL = new URL(url).origin;
|
|
4
|
+
const segments = pathSegments(url);
|
|
5
|
+
const itemListElement = [
|
|
6
|
+
{
|
|
7
|
+
'@type': 'ListItem',
|
|
8
|
+
position: 1,
|
|
9
|
+
name: 'Home',
|
|
10
|
+
url: baseURL
|
|
11
|
+
},
|
|
12
|
+
...segments.map((segment, index) => {
|
|
13
|
+
return {
|
|
14
|
+
'@type': 'ListItem',
|
|
15
|
+
position: index + 2,
|
|
16
|
+
name: segment,
|
|
17
|
+
url: `${baseURL}/${segments.slice(0, index + 1).join('/')}`
|
|
18
|
+
};
|
|
19
|
+
})
|
|
20
|
+
];
|
|
21
|
+
const schemaOrgBreadcrumbList = {
|
|
22
|
+
'@context': 'https://schema.org',
|
|
23
|
+
'@type': 'BreadcrumbList',
|
|
24
|
+
itemListElement
|
|
25
|
+
};
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<svelte:head>
|
|
29
|
+
{@html serializeJSONLdSchema(schemaOrgBreadcrumbList, 'jsonld-breadcrumbs')}
|
|
30
|
+
</svelte:head>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as JsonLdBreadcrumbs } from './JsonLdBreadcrumbs.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as JsonLdBreadcrumbs } from './JsonLdBreadcrumbs.svelte';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">import { serializeJSONLdSchema } from '../../../utils.js';
|
|
2
|
+
let { baseURL, data } = $props();
|
|
3
|
+
function makeSiteNavigationElementList(data) {
|
|
4
|
+
return Array.isArray(data)
|
|
5
|
+
? data.map((elem) => ({
|
|
6
|
+
'@type': 'SiteNavigationElement',
|
|
7
|
+
position: elem.weight,
|
|
8
|
+
name: elem.name,
|
|
9
|
+
url: elem.external ? elem.url : `${baseURL}${elem.url}`
|
|
10
|
+
}))
|
|
11
|
+
: [];
|
|
12
|
+
}
|
|
13
|
+
const schemaOrgSiteNavigationElement = {
|
|
14
|
+
'@context': 'https://schema.org',
|
|
15
|
+
'@type': 'ItemList',
|
|
16
|
+
itemListElement: makeSiteNavigationElementList(data)
|
|
17
|
+
};
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<svelte:head>
|
|
21
|
+
{@html serializeJSONLdSchema(schemaOrgSiteNavigationElement, 'jsonld-sitenavigationelements')}
|
|
22
|
+
</svelte:head>
|
package/dist/components/schemaorg/sitenavigationelements/JsonLdSiteNavigationElements.svelte.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SEOMenuItem } from '../../../types.js';
|
|
2
|
+
interface Props {
|
|
3
|
+
baseURL: string;
|
|
4
|
+
data: SEOMenuItem[];
|
|
5
|
+
}
|
|
6
|
+
declare const JsonLdSiteNavigationElements: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type JsonLdSiteNavigationElements = ReturnType<typeof JsonLdSiteNavigationElements>;
|
|
8
|
+
export default JsonLdSiteNavigationElements;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as JsonLdSiteNavigationElements } from './JsonLdSiteNavigationElements.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as JsonLdSiteNavigationElements } from './JsonLdSiteNavigationElements.svelte';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">import { serializeJSONLdSchema } from '../../../utils.js';
|
|
2
|
+
let { data } = $props();
|
|
3
|
+
const schemaOrgWebPage = $state({
|
|
4
|
+
'@context': 'https://schema.org',
|
|
5
|
+
'@type': 'WebPage',
|
|
6
|
+
name: data.title,
|
|
7
|
+
description: data.description || ''
|
|
8
|
+
});
|
|
9
|
+
if (data.author)
|
|
10
|
+
schemaOrgWebPage.author = data.author;
|
|
11
|
+
if (data.keywords?.length)
|
|
12
|
+
schemaOrgWebPage.keywords = data.keywords;
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<svelte:head>
|
|
16
|
+
{@html serializeJSONLdSchema(schemaOrgWebPage, 'jsonld-webpage')}
|
|
17
|
+
</svelte:head>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as JsonLdWebPage } from './JsonLdWebPage.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as JsonLdWebPage } from './JsonLdWebPage.svelte';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script lang="ts">import { serializeJSONLdSchema, isSEOPerson } from '../../../utils.js';
|
|
2
|
+
let { data } = $props();
|
|
3
|
+
const schemaOrgWebSite = $state({
|
|
4
|
+
'@context': 'https://schema.org',
|
|
5
|
+
'@type': 'WebSite',
|
|
6
|
+
'@id': `${data.baseURL}/#website`,
|
|
7
|
+
name: data.name,
|
|
8
|
+
url: data.baseURL,
|
|
9
|
+
description: data.description || '',
|
|
10
|
+
keywords: data.keywords || [],
|
|
11
|
+
inLanguage: data.language || '',
|
|
12
|
+
license: data.copyright || ''
|
|
13
|
+
});
|
|
14
|
+
if (data.socials !== undefined) {
|
|
15
|
+
const sameAs = Object.values(data.socials).filter((v) => v !== '');
|
|
16
|
+
if (sameAs.length > 0) {
|
|
17
|
+
schemaOrgWebSite.sameAs = sameAs;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
if (data.creator) {
|
|
21
|
+
let _address;
|
|
22
|
+
if (typeof data.creator.address === 'string') {
|
|
23
|
+
_address = data.creator.address;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
_address = {
|
|
27
|
+
'@type': 'PostalAddress',
|
|
28
|
+
addressLocality: data.creator.address?.city,
|
|
29
|
+
postalCode: data.creator.address?.postalCode,
|
|
30
|
+
streetAddress: data.creator.address?.streetAddress
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
let _creator = {
|
|
34
|
+
'@type': isSEOPerson(data.creator) ? 'Person' : 'Organization',
|
|
35
|
+
name: data.creator.name,
|
|
36
|
+
email: data.creator.email,
|
|
37
|
+
url: data.creator.url,
|
|
38
|
+
telephone: data.creator.telephone,
|
|
39
|
+
address: _address
|
|
40
|
+
};
|
|
41
|
+
if (isSEOPerson(data.creator)) {
|
|
42
|
+
_creator.jobTitle = data.creator.jobTitle;
|
|
43
|
+
}
|
|
44
|
+
schemaOrgWebSite.creator = _creator;
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<svelte:head>
|
|
49
|
+
{@html serializeJSONLdSchema(schemaOrgWebSite, 'jsonld-website')}
|
|
50
|
+
</svelte:head>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as JsonLdWebSite } from './JsonLdWebSite.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as JsonLdWebSite } from './JsonLdWebSite.svelte';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/index.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/index.js';
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
export type SEOWebSite = {
|
|
2
|
+
name: string;
|
|
3
|
+
baseURL: string;
|
|
4
|
+
language: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
favicon?: string;
|
|
8
|
+
logo?: string;
|
|
9
|
+
copyright?: string;
|
|
10
|
+
keywords?: Array<string>;
|
|
11
|
+
contactEmail?: string;
|
|
12
|
+
socials?: Socials;
|
|
13
|
+
creator?: SEOPerson | SEOOrganization;
|
|
14
|
+
};
|
|
15
|
+
export type Socials = {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
};
|
|
18
|
+
export type SEOMenuItem = {
|
|
19
|
+
identifier: string;
|
|
20
|
+
name: string;
|
|
21
|
+
url: string;
|
|
22
|
+
weight: number;
|
|
23
|
+
external?: boolean;
|
|
24
|
+
children?: Array<SEOMenuItem>;
|
|
25
|
+
};
|
|
26
|
+
export type ImageObject = {
|
|
27
|
+
url: string;
|
|
28
|
+
alt?: string;
|
|
29
|
+
};
|
|
30
|
+
export type SEOWebPage = {
|
|
31
|
+
url: string;
|
|
32
|
+
title: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
author?: string;
|
|
35
|
+
keywords?: Array<string>;
|
|
36
|
+
image?: ImageObject;
|
|
37
|
+
opengraph?: OpenGraph;
|
|
38
|
+
twitter?: TwitterCard;
|
|
39
|
+
};
|
|
40
|
+
export type SEOAddress = {
|
|
41
|
+
city?: string;
|
|
42
|
+
state?: string;
|
|
43
|
+
postalCode?: string;
|
|
44
|
+
streetAddress?: string;
|
|
45
|
+
};
|
|
46
|
+
export type SEOContact = {
|
|
47
|
+
name?: string;
|
|
48
|
+
jobTitle?: string;
|
|
49
|
+
email?: string;
|
|
50
|
+
telephone?: string;
|
|
51
|
+
url?: string;
|
|
52
|
+
address?: SEOAddress | string;
|
|
53
|
+
};
|
|
54
|
+
export type SEOPerson = SEOContact;
|
|
55
|
+
export type SEOOrganization = SEOContact;
|
|
56
|
+
/**
|
|
57
|
+
* * OpenGraph
|
|
58
|
+
*/
|
|
59
|
+
export declare enum EnumOpenGraphType {
|
|
60
|
+
Website = "website",
|
|
61
|
+
Article = "article",
|
|
62
|
+
Book = "book",
|
|
63
|
+
Business = "business.business",
|
|
64
|
+
Product = "product",
|
|
65
|
+
Profile = "profile",
|
|
66
|
+
MusicSong = "music.song",
|
|
67
|
+
MusicAlbum = "music.album",
|
|
68
|
+
MusicPlaylist = "music.playlist",
|
|
69
|
+
MusicRadioStation = "music.radio_station",
|
|
70
|
+
VideoMovie = "video.movie",
|
|
71
|
+
VideoEpisode = "video.episode",
|
|
72
|
+
VideoTVShow = "video.tv_show",
|
|
73
|
+
VideoOther = "video.other"
|
|
74
|
+
}
|
|
75
|
+
export declare enum EnumOpenGraphProfileGender {
|
|
76
|
+
Male = "male",
|
|
77
|
+
Female = "female",
|
|
78
|
+
NonBinary = "non-binary",
|
|
79
|
+
Transgender = "transgender",
|
|
80
|
+
Intersex = "intersex",
|
|
81
|
+
Other = "other",
|
|
82
|
+
PreferNotToSay = "prefer_not_to_say"
|
|
83
|
+
}
|
|
84
|
+
export declare const OpenGraphProfileGender: typeof EnumOpenGraphProfileGender;
|
|
85
|
+
export declare const OpenGraphType: typeof EnumOpenGraphType;
|
|
86
|
+
export type OpenGraph = {
|
|
87
|
+
type: string;
|
|
88
|
+
article?: OpenGraphArticle;
|
|
89
|
+
book?: OpenGraphBook;
|
|
90
|
+
business?: OpenGraphBusiness;
|
|
91
|
+
product?: OpenGraphProduct;
|
|
92
|
+
profile?: OpenGraphProfile;
|
|
93
|
+
song?: OpenGraphMusicSong;
|
|
94
|
+
album?: OpenGraphMusicAlbum;
|
|
95
|
+
playlist?: OpenGraphMusicPlaylist;
|
|
96
|
+
radioStation?: OpenGraphMusicRadioStation;
|
|
97
|
+
movie?: OpenGraphVideoMovie;
|
|
98
|
+
episode?: OpenGraphVideoEpisode;
|
|
99
|
+
tvShow?: OpenGraphVideoTVShow;
|
|
100
|
+
};
|
|
101
|
+
export type ISODateString = string;
|
|
102
|
+
export type OpenGraphArticle = {
|
|
103
|
+
published_time?: ISODateString;
|
|
104
|
+
modified_time?: ISODateString;
|
|
105
|
+
expiration_time?: ISODateString;
|
|
106
|
+
section?: string;
|
|
107
|
+
tags?: Array<string>;
|
|
108
|
+
};
|
|
109
|
+
export type OpenGraphBook = {
|
|
110
|
+
author: string;
|
|
111
|
+
isbn?: string;
|
|
112
|
+
release_date?: ISODateString;
|
|
113
|
+
tags?: Array<string>;
|
|
114
|
+
};
|
|
115
|
+
export type OpenGraphBusiness = {
|
|
116
|
+
street_address?: string;
|
|
117
|
+
city?: string;
|
|
118
|
+
state?: string;
|
|
119
|
+
postal_code?: number;
|
|
120
|
+
country?: string;
|
|
121
|
+
};
|
|
122
|
+
export type OpenGraphProduct = {
|
|
123
|
+
plural_title?: string;
|
|
124
|
+
price?: number;
|
|
125
|
+
currency?: string;
|
|
126
|
+
};
|
|
127
|
+
export type OpenGraphProfile = {
|
|
128
|
+
url: string;
|
|
129
|
+
first_name?: string;
|
|
130
|
+
last_name?: string;
|
|
131
|
+
username?: string;
|
|
132
|
+
gender?: EnumOpenGraphProfileGender;
|
|
133
|
+
};
|
|
134
|
+
type OpenGraphMusic = {
|
|
135
|
+
url: string;
|
|
136
|
+
disc?: number;
|
|
137
|
+
track?: number;
|
|
138
|
+
};
|
|
139
|
+
export type OpenGraphMusicSong = OpenGraphMusic & {
|
|
140
|
+
duration?: number;
|
|
141
|
+
album?: Array<OpenGraphMusicAlbum>;
|
|
142
|
+
musician?: Array<OpenGraphProfile>;
|
|
143
|
+
};
|
|
144
|
+
export type OpenGraphMusicAlbum = OpenGraphMusic & {
|
|
145
|
+
songs?: Array<OpenGraphMusicSong>;
|
|
146
|
+
musicians?: Array<OpenGraphProfile>;
|
|
147
|
+
release_date?: ISODateString;
|
|
148
|
+
};
|
|
149
|
+
export type OpenGraphMusicPlaylist = OpenGraphMusic & {
|
|
150
|
+
song?: OpenGraphMusicSong;
|
|
151
|
+
creator?: OpenGraphProfile;
|
|
152
|
+
};
|
|
153
|
+
export type OpenGraphMusicRadioStation = {
|
|
154
|
+
creator?: OpenGraphProfile;
|
|
155
|
+
};
|
|
156
|
+
type OpenGraphVideo = {
|
|
157
|
+
actor?: Array<OpenGraphProfile>;
|
|
158
|
+
actorRole?: string;
|
|
159
|
+
director?: Array<OpenGraphProfile>;
|
|
160
|
+
writer?: Array<OpenGraphProfile>;
|
|
161
|
+
duration?: number;
|
|
162
|
+
release_date?: ISODateString;
|
|
163
|
+
tags?: Array<string>;
|
|
164
|
+
};
|
|
165
|
+
export type OpenGraphVideoMovie = OpenGraphVideo;
|
|
166
|
+
export type OpenGraphVideoTVShow = OpenGraphVideo;
|
|
167
|
+
export type OpenGraphVideoOther = OpenGraphVideo;
|
|
168
|
+
export type OpenGraphVideoEpisode = OpenGraphVideo & {
|
|
169
|
+
series: OpenGraphVideoTVShow;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* * EnumTwitterCardType
|
|
173
|
+
*
|
|
174
|
+
* * Enumeration with different TwitterCard types:
|
|
175
|
+
* * https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards
|
|
176
|
+
*
|
|
177
|
+
* - SUMMARY: Title, description, and thumbnail
|
|
178
|
+
* - LARGE: Similar to the Summary Card, but with a prominently-featured image
|
|
179
|
+
* - APP: A Card with a direct download to a mobile app
|
|
180
|
+
* - PLAYER: A Card that can display video/audio/media
|
|
181
|
+
*/
|
|
182
|
+
export declare enum EnumTwitterCardType {
|
|
183
|
+
Summary = "summary",
|
|
184
|
+
Large = "summary_large_image",
|
|
185
|
+
App = "app",
|
|
186
|
+
Player = "player"
|
|
187
|
+
}
|
|
188
|
+
export declare const TwitterCardType: typeof EnumTwitterCardType;
|
|
189
|
+
/**
|
|
190
|
+
* * TwitterCard
|
|
191
|
+
*
|
|
192
|
+
* @param type The card type: summary | summary_large_image | player | app
|
|
193
|
+
* @param site (optional) The Twitter @username the card should be attributed to.
|
|
194
|
+
* @param player (optional) A Card that can display video/audio/media
|
|
195
|
+
* @param app (optional) A Card with a direct download to a mobile app
|
|
196
|
+
*/
|
|
197
|
+
export type TwitterCard = {
|
|
198
|
+
type: EnumTwitterCardType;
|
|
199
|
+
site?: string;
|
|
200
|
+
player?: TwitterPlayer;
|
|
201
|
+
app?: TwitterApp;
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* * TwitterPlayer
|
|
205
|
+
*
|
|
206
|
+
* * https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/player-card
|
|
207
|
+
* @param url HTTPS URL to iFrame player
|
|
208
|
+
* @param width Width of iFrame specified in twitter:player in pixels
|
|
209
|
+
* @param height Height of iFrame specified in twitter:player in pixels
|
|
210
|
+
*/
|
|
211
|
+
export type TwitterPlayer = {
|
|
212
|
+
url: string;
|
|
213
|
+
width: number;
|
|
214
|
+
height: number;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* * ITwitterApp
|
|
218
|
+
*
|
|
219
|
+
* * https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/app-card
|
|
220
|
+
* @param country (optional)
|
|
221
|
+
* @param idIPhone String value, the numeric representation of your app ID in the App Store
|
|
222
|
+
* @param idIPad String value, the numeric representation of your app ID in the App Store
|
|
223
|
+
* @param idGooglePlay String value, the numeric representation of your app ID in the Google Play
|
|
224
|
+
*/
|
|
225
|
+
export type TwitterApp = {
|
|
226
|
+
country?: string;
|
|
227
|
+
idIPhone: string;
|
|
228
|
+
idIPad: string;
|
|
229
|
+
idGooglePlay: string;
|
|
230
|
+
};
|
|
231
|
+
export {};
|