UNPKG

2.78 kBTypeScriptView Raw
1import { FunctionalComponent } from "preact";
2import { Ref } from "preact/hooks";
3export declare let warned: boolean;
4interface OpenGraphBase {
5 title?: string;
6 description?: string;
7 url?: string;
8 locale?: string;
9 altLocales?: string[];
10 siteName?: string;
11}
12declare type OpenGraph = OpenGraphArticle | OpenGraphProfile | OpenGraphBook | OpenGraphWebsite;
13interface OpenGraphProfile extends OpenGraphBase {
14 type?: "profile";
15 firstName?: string;
16 lastName?: string;
17 username?: string;
18 gender?: "male" | "female";
19}
20interface OpenGraphBook extends OpenGraphBase {
21 type?: "book";
22 authors?: string[];
23 isbn?: string;
24 releaseDate?: Date;
25 tags?: string[];
26}
27interface OpenGraphArticle extends OpenGraphBase {
28 type?: "article";
29 publishedTime?: Date;
30 modifiedTime?: Date;
31 expirationTime?: Date;
32 authors?: string[];
33 section?: string;
34 tags?: string[];
35}
36interface OpenGraphWebsite extends OpenGraphBase {
37 type?: "website";
38}
39interface SEO {
40 robots?: {
41 noindex?: boolean;
42 nofollow?: boolean;
43 };
44 title?: string;
45 description?: string;
46 images?: {
47 src: string;
48 alt?: string;
49 width?: number;
50 height?: number;
51 }[];
52 videos?: {
53 src: string;
54 width?: number;
55 height?: number;
56 }[];
57 audio?: {
58 src: string;
59 }[];
60 canonical?: string;
61 facebook?: {
62 appId?: string;
63 };
64 twitter?: {
65 site?: string;
66 handle?: string;
67 card?: "summary" | "summary_large_image" | "app" | "player";
68 };
69 openGraph?: OpenGraph;
70}
71export declare const __SeoContext: import("preact").Context<{
72 seo: Ref<SEO>;
73}>;
74export declare function Head({ children }: {
75 children: any;
76}): any;
77export declare const seo: {
78 robots: FunctionalComponent<{
79 children?: never;
80 } & {
81 noindex?: boolean;
82 nofollow?: boolean;
83 }>;
84 title: FunctionalComponent<{}>;
85 description: FunctionalComponent<{}>;
86 image: FunctionalComponent<{
87 children?: never;
88 } & {
89 src: string;
90 alt?: string;
91 width?: number;
92 height?: number;
93 }>;
94 video: FunctionalComponent<{
95 children?: never;
96 } & {
97 src: string;
98 width?: number;
99 height?: number;
100 }>;
101 audio: FunctionalComponent<{
102 children?: never;
103 } & {
104 src: string;
105 }>;
106 canonical: FunctionalComponent<{}>;
107 twitter: FunctionalComponent<{
108 site?: string;
109 handle?: string;
110 card?: "summary" | "summary_large_image" | "app" | "player";
111 }>;
112 facebook: FunctionalComponent<{
113 appId?: string;
114 }>;
115 openGraph: FunctionalComponent<OpenGraph>;
116};
117export {};