sanity-plugin-seofields 1.5.4 → 1.6.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/README.md +4 -4
- package/dist/SeoHealthDashboard-7XMPVJRX.cjs +10 -0
- package/dist/{SeoHealthDashboard-KPBNXSL4.cjs.map → SeoHealthDashboard-7XMPVJRX.cjs.map} +1 -1
- package/dist/SeoHealthDashboard-UWPLB5DM.js +4 -0
- package/dist/{SeoHealthDashboard-QKVB5HK3.js.map → SeoHealthDashboard-UWPLB5DM.js.map} +1 -1
- package/dist/{SeoHealthTool-ON3SRXCF.cjs → SeoHealthTool-2H4XZR4I.cjs} +4 -4
- package/dist/{SeoHealthTool-ON3SRXCF.cjs.map → SeoHealthTool-2H4XZR4I.cjs.map} +1 -1
- package/dist/{SeoHealthTool-EPPOEDTW.js → SeoHealthTool-XCXINAQI.js} +3 -3
- package/dist/{SeoHealthTool-EPPOEDTW.js.map → SeoHealthTool-XCXINAQI.js.map} +1 -1
- package/dist/{SeoPreview-G3LPA7GV.js → SeoPreview-F6GGPZWI.js} +2 -2
- package/dist/SeoPreview-F6GGPZWI.js.map +1 -0
- package/dist/{SeoPreview-Y3CFDVBR.cjs → SeoPreview-JDROKZLP.cjs} +2 -2
- package/dist/SeoPreview-JDROKZLP.cjs.map +1 -0
- package/dist/chunk-6NIHHOVS.js +3918 -0
- package/dist/chunk-6NIHHOVS.js.map +1 -0
- package/dist/chunk-7HCP5O62.cjs +4027 -0
- package/dist/chunk-7HCP5O62.cjs.map +1 -0
- package/dist/{chunk-527WXITP.js → chunk-KWUITSHS.js} +218 -54
- package/dist/chunk-KWUITSHS.js.map +1 -0
- package/dist/{chunk-UCVSMPEJ.js → chunk-NHJBEV3A.js} +2 -2
- package/dist/{chunk-UCVSMPEJ.js.map → chunk-NHJBEV3A.js.map} +1 -1
- package/dist/chunk-WCLEWFAJ.cjs +669 -0
- package/dist/chunk-WCLEWFAJ.cjs.map +1 -0
- package/dist/{chunk-G2SVI2SP.cjs → chunk-Z74QPO75.cjs} +2 -2
- package/dist/{chunk-G2SVI2SP.cjs.map → chunk-Z74QPO75.cjs.map} +1 -1
- package/dist/cli.js +25 -25
- package/dist/component-7rqDvuy2.d.ts +534 -0
- package/dist/component-J2nEQkOw.d.cts +534 -0
- package/dist/index.cjs +159 -185
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -51
- package/dist/index.d.ts +43 -51
- package/dist/index.js +159 -185
- package/dist/index.js.map +1 -1
- package/dist/next.cjs +155 -51
- package/dist/next.d.cts +3 -3
- package/dist/next.d.ts +3 -3
- package/dist/next.js +2 -2
- package/dist/schema/next.cjs +171 -52
- package/dist/schema/next.cjs.map +1 -1
- package/dist/schema/next.d.cts +12 -428
- package/dist/schema/next.d.ts +12 -428
- package/dist/schema/next.js +20 -2
- package/dist/schema/next.js.map +1 -1
- package/dist/schema.cjs +831 -156
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.d.cts +318 -41
- package/dist/schema.d.ts +318 -41
- package/dist/schema.js +567 -86
- package/dist/schema.js.map +1 -1
- package/dist/types-BRn3hfQb.d.ts +24 -0
- package/dist/types-BSgolLj3.d.cts +24 -0
- package/dist/{types-R3n9Fu4w.d.cts → types-BtSRRG6C.d.cts} +1 -1
- package/dist/{types-R3n9Fu4w.d.ts → types-BtSRRG6C.d.ts} +1 -1
- package/dist/types-DnVvOp3o.d.ts +1215 -0
- package/dist/types-DoUYMRVf.d.cts +1215 -0
- package/package.json +2 -1
- package/dist/SeoHealthDashboard-KPBNXSL4.cjs +0 -10
- package/dist/SeoHealthDashboard-QKVB5HK3.js +0 -4
- package/dist/SeoPreview-G3LPA7GV.js.map +0 -1
- package/dist/SeoPreview-Y3CFDVBR.cjs.map +0 -1
- package/dist/chunk-527WXITP.js.map +0 -1
- package/dist/chunk-6CYMVS3O.js +0 -1245
- package/dist/chunk-6CYMVS3O.js.map +0 -1
- package/dist/chunk-D2GWRRK5.cjs +0 -1293
- package/dist/chunk-D2GWRRK5.cjs.map +0 -1
- package/dist/chunk-L3L3FSPJ.cjs +0 -478
- package/dist/chunk-L3L3FSPJ.cjs.map +0 -1
- package/dist/types-CVaAX7uy.d.cts +0 -589
- package/dist/types-Ci-ZZT7A.d.ts +0 -589
|
@@ -0,0 +1,534 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { L as SchemaOrgAggregateRatingData, N as SchemaOrgArticleData, P as SchemaOrgBlogPostingData, Q as SchemaOrgBookData, R as SchemaOrgBrandData, T as SchemaOrgBreadcrumbListData, U as SchemaOrgContactPointData, X as SchemaOrgCountryData, Y as SchemaOrgCourseData, _ as SchemaOrgEventData, $ as SchemaOrgFAQPageData, a0 as SchemaOrgHowToData, a2 as SchemaOrgImageObjectData, a3 as SchemaOrgItemListData, a4 as SchemaOrgJobPostingData, a5 as SchemaOrgLegalServiceData, a6 as SchemaOrgLocalBusinessData, a7 as SchemaOrgMovieData, a8 as SchemaOrgMusicAlbumData, a9 as SchemaOrgMusicRecordingData, aa as SchemaOrgNewsArticleData, ab as SchemaOrgOfferData, ac as SchemaOrgOrganizationData, ae as SchemaOrgPersonData, ag as SchemaOrgPlaceData, ah as SchemaOrgPostalAddressData, ai as SchemaOrgProductData, aj as SchemaOrgProfilePageData, ak as SchemaOrgRecipeData, al as SchemaOrgRestaurantData, an as SchemaOrgServiceData, am as SchemaOrgReviewData, ao as SchemaOrgSoftwareApplicationData, ar as SchemaOrgVideoObjectData, as as SchemaOrgWebApplicationData, at as SchemaOrgWebPageData, au as SchemaOrgWebsiteData } from './types-DoUYMRVf.cjs';
|
|
3
|
+
import { c as SanityImage } from './types-BtSRRG6C.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* <SchemaOrgScripts> — Renders multiple Schema.org JSON-LD script tags
|
|
7
|
+
* from a combined `schemaOrg` array field.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { SchemaOrgScripts } from 'sanity-plugin-seofields/next'
|
|
12
|
+
*
|
|
13
|
+
* const data = await sanityFetch({ query: `*[_type == "settings"][0]{ structuredData }` })
|
|
14
|
+
*
|
|
15
|
+
* <SchemaOrgScripts data={data.structuredData} />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
interface SchemaOrgScriptsProps {
|
|
20
|
+
/** Array of Schema.org items from the combined `schemaOrg` field. */
|
|
21
|
+
data?: Array<Record<string, unknown>> | null;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Renders one `<script type="application/ld+json">` tag per Schema.org item.
|
|
25
|
+
* Skips items that fail validation (missing required fields).
|
|
26
|
+
*/
|
|
27
|
+
declare function SchemaOrgScripts({ data }: SchemaOrgScriptsProps): JSX.Element | null;
|
|
28
|
+
|
|
29
|
+
interface AggregateRatingSchemaProps {
|
|
30
|
+
data?: SchemaOrgAggregateRatingData | null;
|
|
31
|
+
}
|
|
32
|
+
declare function buildAggregateRatingJsonLd(data?: SchemaOrgAggregateRatingData | null): Record<string, unknown> | null;
|
|
33
|
+
declare function AggregateRatingSchema({ data }: AggregateRatingSchemaProps): JSX.Element | null;
|
|
34
|
+
|
|
35
|
+
interface ArticleSchemaProps {
|
|
36
|
+
/** The Schema.org Article data from your Sanity GROQ query. */
|
|
37
|
+
data?: SchemaOrgArticleData | null;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Builds a Schema.org Article JSON-LD object from Sanity data.
|
|
41
|
+
* Returns `null` if required fields (headline) are missing.
|
|
42
|
+
*/
|
|
43
|
+
declare function buildArticleJsonLd(data?: SchemaOrgArticleData | null): Record<string, unknown> | null;
|
|
44
|
+
/**
|
|
45
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org Article data.
|
|
46
|
+
* Renders nothing if required fields are missing.
|
|
47
|
+
*/
|
|
48
|
+
declare function ArticleSchema({ data }: ArticleSchemaProps): JSX.Element | null;
|
|
49
|
+
|
|
50
|
+
interface BlogPostingSchemaProps {
|
|
51
|
+
/** The Schema.org BlogPosting data from your Sanity GROQ query. */
|
|
52
|
+
data?: SchemaOrgBlogPostingData | null;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Builds a Schema.org BlogPosting JSON-LD object from Sanity data.
|
|
56
|
+
* Returns `null` if required fields (headline) are missing.
|
|
57
|
+
*/
|
|
58
|
+
declare function buildBlogPostingJsonLd(data?: SchemaOrgBlogPostingData | null): Record<string, unknown> | null;
|
|
59
|
+
/**
|
|
60
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org BlogPosting data.
|
|
61
|
+
* Renders nothing if required fields are missing.
|
|
62
|
+
*/
|
|
63
|
+
declare function BlogPostingSchema({ data }: BlogPostingSchemaProps): JSX.Element | null;
|
|
64
|
+
|
|
65
|
+
interface BookSchemaProps {
|
|
66
|
+
data?: SchemaOrgBookData | null;
|
|
67
|
+
}
|
|
68
|
+
declare function buildBookJsonLd(data?: SchemaOrgBookData | null): Record<string, unknown> | null;
|
|
69
|
+
declare function BookSchema({ data }: BookSchemaProps): JSX.Element | null;
|
|
70
|
+
|
|
71
|
+
interface BrandSchemaProps {
|
|
72
|
+
data?: SchemaOrgBrandData | null;
|
|
73
|
+
}
|
|
74
|
+
declare function buildBrandJsonLd(data?: SchemaOrgBrandData | null): Record<string, unknown> | null;
|
|
75
|
+
declare function BrandSchema({ data }: BrandSchemaProps): JSX.Element | null;
|
|
76
|
+
|
|
77
|
+
interface BreadcrumbListSchemaProps {
|
|
78
|
+
/** The Schema.org BreadcrumbList data from your Sanity GROQ query. */
|
|
79
|
+
data?: SchemaOrgBreadcrumbListData | null;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Builds a Schema.org BreadcrumbList JSON-LD object from Sanity data.
|
|
83
|
+
* Returns `null` if data is missing.
|
|
84
|
+
*/
|
|
85
|
+
declare function buildBreadcrumbListJsonLd(data?: SchemaOrgBreadcrumbListData | null): Record<string, unknown> | null;
|
|
86
|
+
/**
|
|
87
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org BreadcrumbList data.
|
|
88
|
+
* Renders nothing if data is missing.
|
|
89
|
+
*/
|
|
90
|
+
declare function BreadcrumbListSchema({ data }: BreadcrumbListSchemaProps): JSX.Element | null;
|
|
91
|
+
|
|
92
|
+
interface ContactPointSchemaProps {
|
|
93
|
+
data?: SchemaOrgContactPointData | null;
|
|
94
|
+
}
|
|
95
|
+
declare function buildContactPointJsonLd(data?: SchemaOrgContactPointData | null): Record<string, unknown> | null;
|
|
96
|
+
declare function ContactPointSchema({ data }: ContactPointSchemaProps): JSX.Element | null;
|
|
97
|
+
|
|
98
|
+
interface CountrySchemaProps {
|
|
99
|
+
/** The Schema.org Country data from your Sanity GROQ query. */
|
|
100
|
+
data?: SchemaOrgCountryData | null;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Builds a Schema.org Country JSON-LD object from Sanity data.
|
|
104
|
+
* Returns `null` if required fields (name) are missing.
|
|
105
|
+
*/
|
|
106
|
+
declare function buildCountryJsonLd(data?: SchemaOrgCountryData | null): Record<string, unknown> | null;
|
|
107
|
+
/**
|
|
108
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org Country data.
|
|
109
|
+
* Renders nothing if required fields are missing.
|
|
110
|
+
*/
|
|
111
|
+
declare function CountrySchema({ data }: CountrySchemaProps): JSX.Element | null;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* <CourseSchema> — Renders Schema.org Course JSON-LD structured data.
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ```tsx
|
|
118
|
+
* import { CourseSchema } from 'sanity-plugin-seofields/next/course'
|
|
119
|
+
*
|
|
120
|
+
* const data = await sanityFetch({ query: `*[_type == "course"][0]{ seo }` })
|
|
121
|
+
*
|
|
122
|
+
* <CourseSchema data={data.seo} />
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
interface CourseSchemaProps {
|
|
127
|
+
/** The Schema.org Course data from your Sanity GROQ query. */
|
|
128
|
+
data?: SchemaOrgCourseData | null;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Builds a Schema.org Course JSON-LD object from Sanity data.
|
|
132
|
+
* Returns `null` if required fields (name) are missing.
|
|
133
|
+
*/
|
|
134
|
+
declare function buildCourseJsonLd(data?: SchemaOrgCourseData | null): Record<string, unknown> | null;
|
|
135
|
+
/**
|
|
136
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org Course data.
|
|
137
|
+
* Renders nothing if required fields are missing.
|
|
138
|
+
*/
|
|
139
|
+
declare function CourseSchema({ data }: CourseSchemaProps): JSX.Element | null;
|
|
140
|
+
|
|
141
|
+
interface EventSchemaProps {
|
|
142
|
+
/** The Schema.org Event data from your Sanity GROQ query. */
|
|
143
|
+
data?: SchemaOrgEventData | null;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Builds a Schema.org Event JSON-LD object from Sanity data.
|
|
147
|
+
* Returns `null` if required fields (name) are missing.
|
|
148
|
+
*/
|
|
149
|
+
declare function buildEventJsonLd(data?: SchemaOrgEventData | null): Record<string, unknown> | null;
|
|
150
|
+
/**
|
|
151
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org Event data.
|
|
152
|
+
* Renders nothing if required fields are missing.
|
|
153
|
+
*/
|
|
154
|
+
declare function EventSchema({ data }: EventSchemaProps): JSX.Element | null;
|
|
155
|
+
|
|
156
|
+
interface FAQPageSchemaProps {
|
|
157
|
+
/** The Schema.org FAQPage data from your Sanity GROQ query. */
|
|
158
|
+
data?: SchemaOrgFAQPageData | null;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Builds a Schema.org FAQPage JSON-LD object from Sanity data.
|
|
162
|
+
* Returns `null` if data is missing.
|
|
163
|
+
*/
|
|
164
|
+
declare function buildFAQPageJsonLd(data?: SchemaOrgFAQPageData | null): Record<string, unknown> | null;
|
|
165
|
+
/**
|
|
166
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org FAQPage data.
|
|
167
|
+
* Renders nothing if data is missing.
|
|
168
|
+
*/
|
|
169
|
+
declare function FAQPageSchema({ data }: FAQPageSchemaProps): JSX.Element | null;
|
|
170
|
+
|
|
171
|
+
interface HowToSchemaProps {
|
|
172
|
+
/** The Schema.org HowTo data from your Sanity GROQ query. */
|
|
173
|
+
data?: SchemaOrgHowToData | null;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Builds a Schema.org HowTo JSON-LD object from Sanity data.
|
|
177
|
+
* Returns `null` if required fields (name) are missing.
|
|
178
|
+
*/
|
|
179
|
+
declare function buildHowToJsonLd(data?: SchemaOrgHowToData | null): Record<string, unknown> | null;
|
|
180
|
+
/**
|
|
181
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org HowTo data.
|
|
182
|
+
* Renders nothing if required fields are missing.
|
|
183
|
+
*/
|
|
184
|
+
declare function HowToSchema({ data }: HowToSchemaProps): JSX.Element | null;
|
|
185
|
+
|
|
186
|
+
interface ImageObjectSchemaProps {
|
|
187
|
+
data?: SchemaOrgImageObjectData | null;
|
|
188
|
+
}
|
|
189
|
+
declare function buildImageObjectJsonLd(data?: SchemaOrgImageObjectData | null): Record<string, unknown> | null;
|
|
190
|
+
declare function ImageObjectSchema({ data }: ImageObjectSchemaProps): JSX.Element | null;
|
|
191
|
+
|
|
192
|
+
interface ItemListSchemaProps {
|
|
193
|
+
data?: SchemaOrgItemListData | null;
|
|
194
|
+
}
|
|
195
|
+
declare function buildItemListJsonLd(data?: SchemaOrgItemListData | null): Record<string, unknown> | null;
|
|
196
|
+
declare function ItemListSchema({ data }: ItemListSchemaProps): JSX.Element | null;
|
|
197
|
+
|
|
198
|
+
interface JobPostingSchemaProps {
|
|
199
|
+
data?: SchemaOrgJobPostingData | null;
|
|
200
|
+
}
|
|
201
|
+
declare function buildJobPostingJsonLd(data?: SchemaOrgJobPostingData | null): Record<string, unknown> | null;
|
|
202
|
+
declare function JobPostingSchema({ data }: JobPostingSchemaProps): JSX.Element | null;
|
|
203
|
+
|
|
204
|
+
interface LegalServiceSchemaProps {
|
|
205
|
+
/** The Schema.org LegalService data from your Sanity GROQ query. */
|
|
206
|
+
data?: SchemaOrgLegalServiceData | null;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Builds a Schema.org LegalService JSON-LD object from Sanity data.
|
|
210
|
+
* Returns `null` if required fields (name) are missing.
|
|
211
|
+
*/
|
|
212
|
+
declare function buildLegalServiceJsonLd(data?: SchemaOrgLegalServiceData | null): Record<string, unknown> | null;
|
|
213
|
+
/**
|
|
214
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org LegalService data.
|
|
215
|
+
* Renders nothing if required fields are missing.
|
|
216
|
+
*/
|
|
217
|
+
declare function LegalServiceSchema({ data }: LegalServiceSchemaProps): JSX.Element | null;
|
|
218
|
+
|
|
219
|
+
interface LocalBusinessSchemaProps {
|
|
220
|
+
/** The Schema.org LocalBusiness data from your Sanity GROQ query. */
|
|
221
|
+
data?: SchemaOrgLocalBusinessData | null;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Builds a Schema.org LocalBusiness JSON-LD object from Sanity data.
|
|
225
|
+
* Returns `null` if required fields (name) are missing.
|
|
226
|
+
*/
|
|
227
|
+
declare function buildLocalBusinessJsonLd(data?: SchemaOrgLocalBusinessData | null): Record<string, unknown> | null;
|
|
228
|
+
/**
|
|
229
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org LocalBusiness data.
|
|
230
|
+
* Renders nothing if required fields are missing.
|
|
231
|
+
*/
|
|
232
|
+
declare function LocalBusinessSchema({ data }: LocalBusinessSchemaProps): JSX.Element | null;
|
|
233
|
+
|
|
234
|
+
interface MovieSchemaProps {
|
|
235
|
+
data?: SchemaOrgMovieData | null;
|
|
236
|
+
}
|
|
237
|
+
declare function buildMovieJsonLd(data?: SchemaOrgMovieData | null): Record<string, unknown> | null;
|
|
238
|
+
declare function MovieSchema({ data }: MovieSchemaProps): JSX.Element | null;
|
|
239
|
+
|
|
240
|
+
interface MusicAlbumSchemaProps {
|
|
241
|
+
data?: SchemaOrgMusicAlbumData | null;
|
|
242
|
+
}
|
|
243
|
+
declare function buildMusicAlbumJsonLd(data?: SchemaOrgMusicAlbumData | null): Record<string, unknown> | null;
|
|
244
|
+
declare function MusicAlbumSchema({ data }: MusicAlbumSchemaProps): JSX.Element | null;
|
|
245
|
+
|
|
246
|
+
interface MusicRecordingSchemaProps {
|
|
247
|
+
data?: SchemaOrgMusicRecordingData | null;
|
|
248
|
+
}
|
|
249
|
+
declare function buildMusicRecordingJsonLd(data?: SchemaOrgMusicRecordingData | null): Record<string, unknown> | null;
|
|
250
|
+
declare function MusicRecordingSchema({ data }: MusicRecordingSchemaProps): JSX.Element | null;
|
|
251
|
+
|
|
252
|
+
interface NewsArticleSchemaProps {
|
|
253
|
+
data?: SchemaOrgNewsArticleData | null;
|
|
254
|
+
}
|
|
255
|
+
declare function buildNewsArticleJsonLd(data?: SchemaOrgNewsArticleData | null): Record<string, unknown> | null;
|
|
256
|
+
declare function NewsArticleSchema({ data }: NewsArticleSchemaProps): JSX.Element | null;
|
|
257
|
+
|
|
258
|
+
interface OfferSchemaProps {
|
|
259
|
+
data?: SchemaOrgOfferData | null;
|
|
260
|
+
}
|
|
261
|
+
declare function buildOfferJsonLd(data?: SchemaOrgOfferData | null): Record<string, unknown> | null;
|
|
262
|
+
declare function OfferSchema({ data }: OfferSchemaProps): JSX.Element | null;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* <OrganizationSchema> — Renders Schema.org Organization JSON-LD structured data.
|
|
266
|
+
*
|
|
267
|
+
* @example
|
|
268
|
+
* ```tsx
|
|
269
|
+
* import { OrganizationSchema } from 'sanity-plugin-seofields/next/organization'
|
|
270
|
+
*
|
|
271
|
+
* const data = await sanityFetch({ query: `*[_type == "settings"][0]{ organization }` })
|
|
272
|
+
*
|
|
273
|
+
* <OrganizationSchema data={data.organization} />
|
|
274
|
+
* ```
|
|
275
|
+
*/
|
|
276
|
+
|
|
277
|
+
interface OrganizationSchemaProps {
|
|
278
|
+
/** The Schema.org Organization data from your Sanity GROQ query. */
|
|
279
|
+
data?: SchemaOrgOrganizationData | null;
|
|
280
|
+
/**
|
|
281
|
+
* Resolve a Sanity image asset to a URL string (for the logo field).
|
|
282
|
+
* Only needed if you use the Sanity image upload field instead of logoUrl.
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* imageUrlResolver={(img) => urlFor(img).width(600).url()}
|
|
286
|
+
*/
|
|
287
|
+
imageUrlResolver?: (image: SanityImage) => string | null | undefined;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Builds a Schema.org Organization JSON-LD object from Sanity data.
|
|
291
|
+
* Returns `null` if required fields (name, url) are missing.
|
|
292
|
+
*/
|
|
293
|
+
declare function buildOrganizationJsonLd(data?: SchemaOrgOrganizationData | null, imageUrlResolver?: (image: SanityImage) => string | null | undefined): Record<string, unknown> | null;
|
|
294
|
+
/**
|
|
295
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org Organization data.
|
|
296
|
+
* Renders nothing if required fields are missing.
|
|
297
|
+
*/
|
|
298
|
+
declare function OrganizationSchema({ data, imageUrlResolver, }: OrganizationSchemaProps): JSX.Element | null;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* <PersonSchema> — Renders Schema.org Person JSON-LD structured data.
|
|
302
|
+
*
|
|
303
|
+
* @example
|
|
304
|
+
* ```tsx
|
|
305
|
+
* import { PersonSchema } from 'sanity-plugin-seofields/next/person'
|
|
306
|
+
*
|
|
307
|
+
* const data = await sanityFetch({ query: `*[_type == "teamMember"][0]{ person }` })
|
|
308
|
+
*
|
|
309
|
+
* <PersonSchema data={data.person} />
|
|
310
|
+
* ```
|
|
311
|
+
*/
|
|
312
|
+
|
|
313
|
+
interface PersonSchemaProps {
|
|
314
|
+
/** The Schema.org Person data from your Sanity GROQ query. */
|
|
315
|
+
data?: SchemaOrgPersonData | null;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Builds a Schema.org Person JSON-LD object from Sanity data.
|
|
319
|
+
* Returns `null` if required fields (name) are missing.
|
|
320
|
+
*/
|
|
321
|
+
declare function buildPersonJsonLd(data?: SchemaOrgPersonData | null): Record<string, unknown> | null;
|
|
322
|
+
/**
|
|
323
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org Person data.
|
|
324
|
+
* Renders nothing if required fields are missing.
|
|
325
|
+
*/
|
|
326
|
+
declare function PersonSchema({ data }: PersonSchemaProps): JSX.Element | null;
|
|
327
|
+
|
|
328
|
+
interface PlaceSchemaProps {
|
|
329
|
+
/** The Schema.org Place data from your Sanity GROQ query. */
|
|
330
|
+
data?: SchemaOrgPlaceData | null;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Builds a Schema.org Place JSON-LD object from Sanity data.
|
|
334
|
+
* Returns `null` if required fields (name) are missing.
|
|
335
|
+
*/
|
|
336
|
+
declare function buildPlaceJsonLd(data?: SchemaOrgPlaceData | null): Record<string, unknown> | null;
|
|
337
|
+
/**
|
|
338
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org Place data.
|
|
339
|
+
* Renders nothing if required fields are missing.
|
|
340
|
+
*/
|
|
341
|
+
declare function PlaceSchema({ data }: PlaceSchemaProps): JSX.Element | null;
|
|
342
|
+
|
|
343
|
+
interface PostalAddressSchemaProps {
|
|
344
|
+
data?: SchemaOrgPostalAddressData | null;
|
|
345
|
+
}
|
|
346
|
+
declare function buildPostalAddressJsonLd(data?: SchemaOrgPostalAddressData | null): Record<string, unknown> | null;
|
|
347
|
+
declare function PostalAddressSchema({ data }: PostalAddressSchemaProps): JSX.Element | null;
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* <ProductSchema> — Renders Schema.org Product JSON-LD structured data.
|
|
351
|
+
*
|
|
352
|
+
* @example
|
|
353
|
+
* ```tsx
|
|
354
|
+
* import { ProductSchema } from 'sanity-plugin-seofields/next/product'
|
|
355
|
+
*
|
|
356
|
+
* const data = await sanityFetch({ query: `*[_type == "product"][0]{ seo }` })
|
|
357
|
+
*
|
|
358
|
+
* <ProductSchema data={data.seo} />
|
|
359
|
+
* ```
|
|
360
|
+
*/
|
|
361
|
+
|
|
362
|
+
interface ProductSchemaProps {
|
|
363
|
+
/** The Schema.org Product data from your Sanity GROQ query. */
|
|
364
|
+
data?: SchemaOrgProductData | null;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Builds a Schema.org Product JSON-LD object from Sanity data.
|
|
368
|
+
* Returns `null` if required fields (name) are missing.
|
|
369
|
+
*/
|
|
370
|
+
declare function buildProductJsonLd(data?: SchemaOrgProductData | null): Record<string, unknown> | null;
|
|
371
|
+
/**
|
|
372
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org Product data.
|
|
373
|
+
* Renders nothing if required fields are missing.
|
|
374
|
+
*/
|
|
375
|
+
declare function ProductSchema({ data }: ProductSchemaProps): JSX.Element | null;
|
|
376
|
+
|
|
377
|
+
interface ProfilePageSchemaProps {
|
|
378
|
+
data?: SchemaOrgProfilePageData | null;
|
|
379
|
+
}
|
|
380
|
+
declare function buildProfilePageJsonLd(data?: SchemaOrgProfilePageData | null): Record<string, unknown> | null;
|
|
381
|
+
declare function ProfilePageSchema({ data }: ProfilePageSchemaProps): JSX.Element | null;
|
|
382
|
+
|
|
383
|
+
interface RecipeSchemaProps {
|
|
384
|
+
data?: SchemaOrgRecipeData | null;
|
|
385
|
+
}
|
|
386
|
+
declare function buildRecipeJsonLd(data?: SchemaOrgRecipeData | null): Record<string, unknown> | null;
|
|
387
|
+
declare function RecipeSchema({ data }: RecipeSchemaProps): JSX.Element | null;
|
|
388
|
+
|
|
389
|
+
interface RestaurantSchemaProps {
|
|
390
|
+
data?: SchemaOrgRestaurantData | null;
|
|
391
|
+
}
|
|
392
|
+
declare function buildRestaurantJsonLd(data?: SchemaOrgRestaurantData | null): Record<string, unknown> | null;
|
|
393
|
+
declare function RestaurantSchema({ data }: RestaurantSchemaProps): JSX.Element | null;
|
|
394
|
+
|
|
395
|
+
interface ServiceSchemaProps {
|
|
396
|
+
data?: SchemaOrgServiceData | null;
|
|
397
|
+
}
|
|
398
|
+
declare function buildServiceJsonLd(data?: SchemaOrgServiceData | null): Record<string, unknown> | null;
|
|
399
|
+
declare function ServiceSchema({ data }: ServiceSchemaProps): JSX.Element | null;
|
|
400
|
+
|
|
401
|
+
interface ReviewSchemaProps {
|
|
402
|
+
/** The Schema.org Review data from your Sanity GROQ query. */
|
|
403
|
+
data?: SchemaOrgReviewData | null;
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Builds a Schema.org Review JSON-LD object from Sanity data.
|
|
407
|
+
* Returns `null` if data is missing.
|
|
408
|
+
*/
|
|
409
|
+
declare function buildReviewJsonLd(data?: SchemaOrgReviewData | null): Record<string, unknown> | null;
|
|
410
|
+
/**
|
|
411
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org Review data.
|
|
412
|
+
* Renders nothing if data is missing.
|
|
413
|
+
*/
|
|
414
|
+
declare function ReviewSchema({ data }: ReviewSchemaProps): JSX.Element | null;
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* <SoftwareApplicationSchema> — Renders Schema.org SoftwareApplication JSON-LD structured data.
|
|
418
|
+
*
|
|
419
|
+
* @example
|
|
420
|
+
* ```tsx
|
|
421
|
+
* import { SoftwareApplicationSchema } from 'sanity-plugin-seofields/next/softwareApplication'
|
|
422
|
+
*
|
|
423
|
+
* const data = await sanityFetch({ query: `*[_type == "app"][0]{ seo }` })
|
|
424
|
+
*
|
|
425
|
+
* <SoftwareApplicationSchema data={data.seo} />
|
|
426
|
+
* ```
|
|
427
|
+
*/
|
|
428
|
+
|
|
429
|
+
interface SoftwareApplicationSchemaProps {
|
|
430
|
+
/** The Schema.org SoftwareApplication data from your Sanity GROQ query. */
|
|
431
|
+
data?: SchemaOrgSoftwareApplicationData | null;
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Builds a Schema.org SoftwareApplication JSON-LD object from Sanity data.
|
|
435
|
+
* Returns `null` if required fields (name) are missing.
|
|
436
|
+
*/
|
|
437
|
+
declare function buildSoftwareApplicationJsonLd(data?: SchemaOrgSoftwareApplicationData | null): Record<string, unknown> | null;
|
|
438
|
+
/**
|
|
439
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org SoftwareApplication data.
|
|
440
|
+
* Renders nothing if required fields are missing.
|
|
441
|
+
*/
|
|
442
|
+
declare function SoftwareApplicationSchema({ data, }: SoftwareApplicationSchemaProps): JSX.Element | null;
|
|
443
|
+
|
|
444
|
+
interface VideoObjectSchemaProps {
|
|
445
|
+
data?: SchemaOrgVideoObjectData | null;
|
|
446
|
+
}
|
|
447
|
+
declare function buildVideoObjectJsonLd(data?: SchemaOrgVideoObjectData | null): Record<string, unknown> | null;
|
|
448
|
+
declare function VideoObjectSchema({ data }: VideoObjectSchemaProps): JSX.Element | null;
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* <WebApplicationSchema> — Renders Schema.org WebApplication JSON-LD structured data.
|
|
452
|
+
*
|
|
453
|
+
* @example
|
|
454
|
+
* ```tsx
|
|
455
|
+
* import { WebApplicationSchema } from 'sanity-plugin-seofields/next/webApplication'
|
|
456
|
+
*
|
|
457
|
+
* const data = await sanityFetch({ query: `*[_type == "app"][0]{ seo }` })
|
|
458
|
+
*
|
|
459
|
+
* <WebApplicationSchema data={data.seo} />
|
|
460
|
+
* ```
|
|
461
|
+
*/
|
|
462
|
+
|
|
463
|
+
interface WebApplicationSchemaProps {
|
|
464
|
+
/** The Schema.org WebApplication data from your Sanity GROQ query. */
|
|
465
|
+
data?: SchemaOrgWebApplicationData | null;
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Builds a Schema.org WebApplication JSON-LD object from Sanity data.
|
|
469
|
+
* Returns `null` if required fields (name, url) are missing.
|
|
470
|
+
*/
|
|
471
|
+
declare function buildWebApplicationJsonLd(data?: SchemaOrgWebApplicationData | null): Record<string, unknown> | null;
|
|
472
|
+
/**
|
|
473
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org WebApplication data.
|
|
474
|
+
* Renders nothing if required fields are missing.
|
|
475
|
+
*/
|
|
476
|
+
declare function WebApplicationSchema({ data }: WebApplicationSchemaProps): JSX.Element | null;
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* <WebPageSchema> — Renders Schema.org WebPage JSON-LD structured data.
|
|
480
|
+
*
|
|
481
|
+
* @example
|
|
482
|
+
* ```tsx
|
|
483
|
+
* import { WebPageSchema } from 'sanity-plugin-seofields/next/webPage'
|
|
484
|
+
*
|
|
485
|
+
* const data = await sanityFetch({ query: `*[_type == "page"][0]{ seo }` })
|
|
486
|
+
*
|
|
487
|
+
* <WebPageSchema data={data.seo} />
|
|
488
|
+
* ```
|
|
489
|
+
*/
|
|
490
|
+
|
|
491
|
+
interface WebPageSchemaProps {
|
|
492
|
+
/** The Schema.org WebPage data from your Sanity GROQ query. */
|
|
493
|
+
data?: SchemaOrgWebPageData | null;
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Builds a Schema.org WebPage JSON-LD object from Sanity data.
|
|
497
|
+
* Returns `null` if required fields (name, url) are missing.
|
|
498
|
+
*/
|
|
499
|
+
declare function buildWebPageJsonLd(data?: SchemaOrgWebPageData | null): Record<string, unknown> | null;
|
|
500
|
+
/**
|
|
501
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org WebPage data.
|
|
502
|
+
* Renders nothing if required fields are missing.
|
|
503
|
+
*/
|
|
504
|
+
declare function WebPageSchema({ data }: WebPageSchemaProps): JSX.Element | null;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* <WebsiteSchema> — Renders Schema.org WebSite JSON-LD structured data.
|
|
508
|
+
*
|
|
509
|
+
* @example
|
|
510
|
+
* ```tsx
|
|
511
|
+
* import { WebsiteSchema } from 'sanity-plugin-seofields/next/website'
|
|
512
|
+
*
|
|
513
|
+
* const data = await sanityFetch({ query: `*[_type == "settings"][0]{ website }` })
|
|
514
|
+
*
|
|
515
|
+
* <WebsiteSchema data={data.website} />
|
|
516
|
+
* ```
|
|
517
|
+
*/
|
|
518
|
+
|
|
519
|
+
interface WebsiteSchemaProps {
|
|
520
|
+
/** The Schema.org Website data from your Sanity GROQ query. */
|
|
521
|
+
data?: SchemaOrgWebsiteData | null;
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* Builds a Schema.org WebSite JSON-LD object from Sanity data.
|
|
525
|
+
* Returns `null` if required fields (name, url) are missing.
|
|
526
|
+
*/
|
|
527
|
+
declare function buildWebsiteJsonLd(data?: SchemaOrgWebsiteData | null): Record<string, unknown> | null;
|
|
528
|
+
/**
|
|
529
|
+
* Renders a `<script type="application/ld+json">` tag with Schema.org WebSite data.
|
|
530
|
+
* Renders nothing if required fields are missing.
|
|
531
|
+
*/
|
|
532
|
+
declare function WebsiteSchema({ data }: WebsiteSchemaProps): JSX.Element | null;
|
|
533
|
+
|
|
534
|
+
export { type ProductSchemaProps as $, AggregateRatingSchema as A, BlogPostingSchema as B, ContactPointSchema as C, MusicAlbumSchema as D, EventSchema as E, FAQPageSchema as F, type MusicAlbumSchemaProps as G, HowToSchema as H, ImageObjectSchema as I, JobPostingSchema as J, MusicRecordingSchema as K, LegalServiceSchema as L, MovieSchema as M, type MusicRecordingSchemaProps as N, NewsArticleSchema as O, type NewsArticleSchemaProps as P, OfferSchema as Q, type OfferSchemaProps as R, OrganizationSchema as S, type OrganizationSchemaProps as T, PersonSchema as U, type PersonSchemaProps as V, PlaceSchema as W, type PlaceSchemaProps as X, PostalAddressSchema as Y, type PostalAddressSchemaProps as Z, ProductSchema as _, type AggregateRatingSchemaProps as a, ProfilePageSchema as a0, type ProfilePageSchemaProps as a1, RecipeSchema as a2, type RecipeSchemaProps as a3, RestaurantSchema as a4, type RestaurantSchemaProps as a5, ReviewSchema as a6, type ReviewSchemaProps as a7, SchemaOrgScripts as a8, type SchemaOrgScriptsProps as a9, buildJobPostingJsonLd as aA, buildLegalServiceJsonLd as aB, buildLocalBusinessJsonLd as aC, buildMovieJsonLd as aD, buildMusicAlbumJsonLd as aE, buildMusicRecordingJsonLd as aF, buildNewsArticleJsonLd as aG, buildOfferJsonLd as aH, buildOrganizationJsonLd as aI, buildPersonJsonLd as aJ, buildPlaceJsonLd as aK, buildPostalAddressJsonLd as aL, buildProductJsonLd as aM, buildProfilePageJsonLd as aN, buildRecipeJsonLd as aO, buildRestaurantJsonLd as aP, buildReviewJsonLd as aQ, buildServiceJsonLd as aR, buildSoftwareApplicationJsonLd as aS, buildVideoObjectJsonLd as aT, buildWebApplicationJsonLd as aU, buildWebPageJsonLd as aV, buildWebsiteJsonLd as aW, ServiceSchema as aa, type ServiceSchemaProps as ab, SoftwareApplicationSchema as ac, type SoftwareApplicationSchemaProps as ad, VideoObjectSchema as ae, type VideoObjectSchemaProps as af, WebApplicationSchema as ag, type WebApplicationSchemaProps as ah, WebPageSchema as ai, type WebPageSchemaProps as aj, WebsiteSchema as ak, type WebsiteSchemaProps as al, buildAggregateRatingJsonLd as am, buildArticleJsonLd as an, buildBlogPostingJsonLd as ao, buildBookJsonLd as ap, buildBrandJsonLd as aq, buildBreadcrumbListJsonLd as ar, buildContactPointJsonLd as as, buildCountryJsonLd as at, buildCourseJsonLd as au, buildEventJsonLd as av, buildFAQPageJsonLd as aw, buildHowToJsonLd as ax, buildImageObjectJsonLd as ay, buildItemListJsonLd as az, ArticleSchema as b, type ArticleSchemaProps as c, type BlogPostingSchemaProps as d, BookSchema as e, type BookSchemaProps as f, BrandSchema as g, type BrandSchemaProps as h, BreadcrumbListSchema as i, type BreadcrumbListSchemaProps as j, type ContactPointSchemaProps as k, CountrySchema as l, type CountrySchemaProps as m, CourseSchema as n, type CourseSchemaProps as o, type EventSchemaProps as p, type FAQPageSchemaProps as q, type HowToSchemaProps as r, type ImageObjectSchemaProps as s, ItemListSchema as t, type ItemListSchemaProps as u, type JobPostingSchemaProps as v, type LegalServiceSchemaProps as w, LocalBusinessSchema as x, type LocalBusinessSchemaProps as y, type MovieSchemaProps as z };
|