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.
Files changed (70) hide show
  1. package/README.md +4 -4
  2. package/dist/SeoHealthDashboard-7XMPVJRX.cjs +10 -0
  3. package/dist/{SeoHealthDashboard-KPBNXSL4.cjs.map → SeoHealthDashboard-7XMPVJRX.cjs.map} +1 -1
  4. package/dist/SeoHealthDashboard-UWPLB5DM.js +4 -0
  5. package/dist/{SeoHealthDashboard-QKVB5HK3.js.map → SeoHealthDashboard-UWPLB5DM.js.map} +1 -1
  6. package/dist/{SeoHealthTool-ON3SRXCF.cjs → SeoHealthTool-2H4XZR4I.cjs} +4 -4
  7. package/dist/{SeoHealthTool-ON3SRXCF.cjs.map → SeoHealthTool-2H4XZR4I.cjs.map} +1 -1
  8. package/dist/{SeoHealthTool-EPPOEDTW.js → SeoHealthTool-XCXINAQI.js} +3 -3
  9. package/dist/{SeoHealthTool-EPPOEDTW.js.map → SeoHealthTool-XCXINAQI.js.map} +1 -1
  10. package/dist/{SeoPreview-G3LPA7GV.js → SeoPreview-F6GGPZWI.js} +2 -2
  11. package/dist/SeoPreview-F6GGPZWI.js.map +1 -0
  12. package/dist/{SeoPreview-Y3CFDVBR.cjs → SeoPreview-JDROKZLP.cjs} +2 -2
  13. package/dist/SeoPreview-JDROKZLP.cjs.map +1 -0
  14. package/dist/chunk-6NIHHOVS.js +3918 -0
  15. package/dist/chunk-6NIHHOVS.js.map +1 -0
  16. package/dist/chunk-7HCP5O62.cjs +4027 -0
  17. package/dist/chunk-7HCP5O62.cjs.map +1 -0
  18. package/dist/{chunk-527WXITP.js → chunk-KWUITSHS.js} +218 -54
  19. package/dist/chunk-KWUITSHS.js.map +1 -0
  20. package/dist/{chunk-UCVSMPEJ.js → chunk-NHJBEV3A.js} +2 -2
  21. package/dist/{chunk-UCVSMPEJ.js.map → chunk-NHJBEV3A.js.map} +1 -1
  22. package/dist/chunk-WCLEWFAJ.cjs +669 -0
  23. package/dist/chunk-WCLEWFAJ.cjs.map +1 -0
  24. package/dist/{chunk-G2SVI2SP.cjs → chunk-Z74QPO75.cjs} +2 -2
  25. package/dist/{chunk-G2SVI2SP.cjs.map → chunk-Z74QPO75.cjs.map} +1 -1
  26. package/dist/cli.js +25 -25
  27. package/dist/component-7rqDvuy2.d.ts +534 -0
  28. package/dist/component-J2nEQkOw.d.cts +534 -0
  29. package/dist/index.cjs +159 -185
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.d.cts +43 -51
  32. package/dist/index.d.ts +43 -51
  33. package/dist/index.js +159 -185
  34. package/dist/index.js.map +1 -1
  35. package/dist/next.cjs +155 -51
  36. package/dist/next.d.cts +3 -3
  37. package/dist/next.d.ts +3 -3
  38. package/dist/next.js +2 -2
  39. package/dist/schema/next.cjs +171 -52
  40. package/dist/schema/next.cjs.map +1 -1
  41. package/dist/schema/next.d.cts +12 -428
  42. package/dist/schema/next.d.ts +12 -428
  43. package/dist/schema/next.js +20 -2
  44. package/dist/schema/next.js.map +1 -1
  45. package/dist/schema.cjs +831 -156
  46. package/dist/schema.cjs.map +1 -1
  47. package/dist/schema.d.cts +318 -41
  48. package/dist/schema.d.ts +318 -41
  49. package/dist/schema.js +567 -86
  50. package/dist/schema.js.map +1 -1
  51. package/dist/types-BRn3hfQb.d.ts +24 -0
  52. package/dist/types-BSgolLj3.d.cts +24 -0
  53. package/dist/{types-R3n9Fu4w.d.cts → types-BtSRRG6C.d.cts} +1 -1
  54. package/dist/{types-R3n9Fu4w.d.ts → types-BtSRRG6C.d.ts} +1 -1
  55. package/dist/types-DnVvOp3o.d.ts +1215 -0
  56. package/dist/types-DoUYMRVf.d.cts +1215 -0
  57. package/package.json +2 -1
  58. package/dist/SeoHealthDashboard-KPBNXSL4.cjs +0 -10
  59. package/dist/SeoHealthDashboard-QKVB5HK3.js +0 -4
  60. package/dist/SeoPreview-G3LPA7GV.js.map +0 -1
  61. package/dist/SeoPreview-Y3CFDVBR.cjs.map +0 -1
  62. package/dist/chunk-527WXITP.js.map +0 -1
  63. package/dist/chunk-6CYMVS3O.js +0 -1245
  64. package/dist/chunk-6CYMVS3O.js.map +0 -1
  65. package/dist/chunk-D2GWRRK5.cjs +0 -1293
  66. package/dist/chunk-D2GWRRK5.cjs.map +0 -1
  67. package/dist/chunk-L3L3FSPJ.cjs +0 -478
  68. package/dist/chunk-L3L3FSPJ.cjs.map +0 -1
  69. package/dist/types-CVaAX7uy.d.cts +0 -589
  70. package/dist/types-Ci-ZZT7A.d.ts +0 -589
package/dist/schema.js CHANGED
@@ -1,17 +1,427 @@
1
- import { schemaOrgWebPage, schemaOrgPerson, schemaOrgBreadcrumbList, schemaOrgImageObject, schemaOrgArticle, schemaOrgBlogPosting, schemaOrgFAQPage, schemaOrgHowTo, schemaOrgProduct, schemaOrgOffer, schemaOrgAggregateRating, schemaOrgReview, schemaOrgBrand, schemaOrgLocalBusiness, schemaOrgPostalAddress, schemaOrgContactPoint, schemaOrgSoftwareApplication, schemaOrgWebApplication, schemaOrgEvent, schemaOrgPlace, schemaOrgVideoObject, schemaOrgCourse, generateSchemaType, SchemaOrgIcons } from './chunk-6CYMVS3O.js';
2
- export { buildGenericJsonLd, generateSchemaType, schemaOrgAggregateRating, schemaOrgArticle, schemaOrgBlogPosting, schemaOrgBrand, schemaOrgBreadcrumbList, schemaOrgContactPoint, schemaOrgCourse, schemaOrgEvent, schemaOrgFAQPage, schemaOrgHowTo, schemaOrgImageObject, schemaOrgLocalBusiness, schemaOrgOffer, schemaOrgPerson, schemaOrgPlace, schemaOrgPostalAddress, schemaOrgProduct, schemaOrgReview, schemaOrgSoftwareApplication, schemaOrgVideoObject, schemaOrgWebApplication, schemaOrgWebPage } from './chunk-6CYMVS3O.js';
3
- import './chunk-2NMEKWO5.js';
1
+ import { nameField, urlField, descriptionField, inLanguageField, polymorphicPublisher, potentialActionSearch, issnField, schemaOrgWebPage, schemaOrgPerson, schemaOrgBreadcrumbList, schemaOrgImageObject, schemaOrgArticle, schemaOrgBlogPosting, schemaOrgFAQPage, schemaOrgHowTo, schemaOrgProduct, schemaOrgOffer, schemaOrgAggregateRating, schemaOrgReview, schemaOrgBrand, schemaOrgLocalBusiness, schemaOrgPostalAddress, schemaOrgContactPoint, schemaOrgSoftwareApplication, schemaOrgWebApplication, schemaOrgEvent, schemaOrgPlace, schemaOrgVideoObject, schemaOrgCourse, schemaOrgRecipe, schemaOrgService, schemaOrgSocialMediaPosting, schemaOrgLegalService, schemaOrgCountry, schemaOrgJobPosting, schemaOrgRestaurant, schemaOrgMovie, schemaOrgBook, schemaOrgNewsArticle, schemaOrgItemList, schemaOrgProfilePage, schemaOrgMusicRecording, schemaOrgMusicAlbum, generateSchemaType, SchemaOrgIcons } from './chunk-6NIHHOVS.js';
2
+ export { IETF_LANGUAGE_OPTIONS, buildGenericJsonLd, datePublishedField, descriptionField, generateSchemaType, headlineField, inLanguageField, nameField, polymorphicAdditionalType, polymorphicArchivedAt, polymorphicAuthor, polymorphicCitation, polymorphicContentRating, polymorphicContributor, polymorphicCopyrightHolder, polymorphicCreator, polymorphicFunder, polymorphicGenre, polymorphicIdentifier, polymorphicImage, polymorphicIsBasedOn, polymorphicIsPartOf, polymorphicKeywords, polymorphicLicense, polymorphicLocationCreated, polymorphicMaintainer, polymorphicMaterial, polymorphicOwner, polymorphicPublisher, schemaOrgAggregateRating, schemaOrgArticle, schemaOrgBlogPosting, schemaOrgBook, schemaOrgBrand, schemaOrgBreadcrumbList, schemaOrgContactPoint, schemaOrgCountry, schemaOrgCourse, schemaOrgEvent, schemaOrgFAQPage, schemaOrgHowTo, schemaOrgImageObject, schemaOrgItemList, schemaOrgJobPosting, schemaOrgLegalService, schemaOrgLocalBusiness, schemaOrgMovie, schemaOrgMusicAlbum, schemaOrgMusicRecording, schemaOrgNewsArticle, schemaOrgOffer, schemaOrgPerson, schemaOrgPlace, schemaOrgPostalAddress, schemaOrgProduct, schemaOrgProfilePage, schemaOrgRecipe, schemaOrgRestaurant, schemaOrgReview, schemaOrgService, schemaOrgSocialMediaPosting, schemaOrgSoftwareApplication, schemaOrgVideoObject, schemaOrgWebApplication, schemaOrgWebPage, urlField, withCreativeWorkCommons, withThingCommons } from './chunk-6NIHHOVS.js';
3
+ import { __spreadProps, __spreadValues } from './chunk-2NMEKWO5.js';
4
+ import { AddIcon, SearchIcon } from '@sanity/icons';
5
+ import { Stack, Button, Dialog, Box, TextInput, Card, Flex, Text, Heading, Grid } from '@sanity/ui';
6
+ import { useState, useCallback, useMemo } from 'react';
7
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
8
  import { definePlugin, defineType } from 'sanity';
5
9
 
10
+ // src/schema/components/schemaTypeMetadata.ts
11
+ var CATEGORY_LABELS = {
12
+ content: "Content & Pages",
13
+ commerce: "Commerce & Reviews",
14
+ media: "Media",
15
+ people: "People & Organizations",
16
+ navigation: "Navigation",
17
+ location: "Location & Events",
18
+ software: "Software",
19
+ education: "Education"
20
+ };
21
+ var CATEGORY_ORDER = [
22
+ "content",
23
+ "commerce",
24
+ "people",
25
+ "media",
26
+ "navigation",
27
+ "location",
28
+ "software",
29
+ "education"
30
+ ];
31
+ var SCHEMA_TYPE_METADATA = [
32
+ // ─── Content & Pages ──────────────────────────────────────────────
33
+ {
34
+ type: "schemaOrgWebsite",
35
+ title: "Website",
36
+ description: "Represents an entire website with search action support.",
37
+ category: "content",
38
+ keywords: ["site", "homepage", "search action"]
39
+ },
40
+ {
41
+ type: "schemaOrgWebPage",
42
+ title: "Web Page",
43
+ description: "A single web page with metadata and publisher info.",
44
+ category: "content",
45
+ keywords: ["page", "about", "contact", "landing"]
46
+ },
47
+ {
48
+ type: "schemaOrgArticle",
49
+ title: "Article",
50
+ description: "News articles, blog posts, and editorial content.",
51
+ category: "content",
52
+ keywords: ["news", "blog", "post", "editorial", "story"]
53
+ },
54
+ {
55
+ type: "schemaOrgBlogPosting",
56
+ title: "Blog Posting",
57
+ description: "Blog post with author, date, and content metadata.",
58
+ category: "content",
59
+ keywords: ["blog", "post", "writing"]
60
+ },
61
+ {
62
+ type: "schemaOrgFAQPage",
63
+ title: "FAQ Page",
64
+ description: "Frequently asked questions with rich result support.",
65
+ category: "content",
66
+ keywords: ["faq", "questions", "answers", "help"]
67
+ },
68
+ {
69
+ type: "schemaOrgHowTo",
70
+ title: "How-To",
71
+ description: "Step-by-step instructions with supplies, tools, and costs.",
72
+ category: "content",
73
+ keywords: ["tutorial", "guide", "steps", "instructions", "diy"]
74
+ },
75
+ {
76
+ type: "schemaOrgRecipe",
77
+ title: "Recipe",
78
+ description: "Cooking recipes with ingredients, nutrition, and times.",
79
+ category: "content",
80
+ keywords: ["cooking", "food", "ingredients", "nutrition", "meal"]
81
+ },
82
+ {
83
+ type: "schemaOrgSocialMediaPosting",
84
+ title: "Social Media Posting",
85
+ description: "Social media content with shared links and engagement.",
86
+ category: "content",
87
+ keywords: ["social", "post", "share", "twitter", "facebook"]
88
+ },
89
+ // ─── Commerce & Reviews ───────────────────────────────────────────
90
+ {
91
+ type: "schemaOrgProduct",
92
+ title: "Product",
93
+ description: "Products with pricing, ratings, and availability.",
94
+ category: "commerce",
95
+ keywords: ["ecommerce", "shop", "buy", "price", "store"]
96
+ },
97
+ {
98
+ type: "schemaOrgOffer",
99
+ title: "Offer",
100
+ description: "Pricing and availability for products or services.",
101
+ category: "commerce",
102
+ keywords: ["price", "deal", "discount", "availability"]
103
+ },
104
+ {
105
+ type: "schemaOrgAggregateRating",
106
+ title: "Aggregate Rating",
107
+ description: "Overall rating from multiple reviews.",
108
+ category: "commerce",
109
+ keywords: ["stars", "rating", "score", "average"]
110
+ },
111
+ {
112
+ type: "schemaOrgReview",
113
+ title: "Review",
114
+ description: "Individual review with rating and author.",
115
+ category: "commerce",
116
+ keywords: ["feedback", "testimonial", "rating", "critique"]
117
+ },
118
+ {
119
+ type: "schemaOrgBrand",
120
+ title: "Brand",
121
+ description: "Brand identity and recognition.",
122
+ category: "commerce",
123
+ keywords: ["brand", "label", "manufacturer"]
124
+ },
125
+ {
126
+ type: "schemaOrgService",
127
+ title: "Service",
128
+ description: "Professional services with provider and catalog.",
129
+ category: "commerce",
130
+ keywords: ["consulting", "professional", "provider", "catalog"]
131
+ },
132
+ // ─── People & Organizations ───────────────────────────────────────
133
+ {
134
+ type: "schemaOrgPerson",
135
+ title: "Person",
136
+ description: "Individual profile with contact info and social links.",
137
+ category: "people",
138
+ keywords: ["author", "profile", "employee", "contact"]
139
+ },
140
+ {
141
+ type: "schemaOrgOrganization",
142
+ title: "Organization",
143
+ description: "Company or organization with departments and contacts.",
144
+ category: "people",
145
+ keywords: ["company", "business", "corporation", "ngo"]
146
+ },
147
+ {
148
+ type: "schemaOrgLocalBusiness",
149
+ title: "Local Business",
150
+ description: "Local business with hours, location, and reviews.",
151
+ category: "people",
152
+ keywords: ["store", "restaurant", "shop", "local", "maps"]
153
+ },
154
+ {
155
+ type: "schemaOrgContactPoint",
156
+ title: "Contact Point",
157
+ description: "Contact information \u2014 phone, email, languages.",
158
+ category: "people",
159
+ keywords: ["phone", "email", "support", "helpdesk"]
160
+ },
161
+ {
162
+ type: "schemaOrgPostalAddress",
163
+ title: "Postal Address",
164
+ description: "Physical mailing address.",
165
+ category: "people",
166
+ keywords: ["address", "street", "zip", "city", "mailing"]
167
+ },
168
+ // ─── Media ────────────────────────────────────────────────────────
169
+ {
170
+ type: "schemaOrgImageObject",
171
+ title: "Image Object",
172
+ description: "Image with metadata, author, and location.",
173
+ category: "media",
174
+ keywords: ["photo", "picture", "graphic", "illustration"]
175
+ },
176
+ {
177
+ type: "schemaOrgVideoObject",
178
+ title: "Video Object",
179
+ description: "Video with thumbnails, duration, and seek actions.",
180
+ category: "media",
181
+ keywords: ["video", "youtube", "vimeo", "clip", "film"]
182
+ },
183
+ // ─── Navigation ───────────────────────────────────────────────────
184
+ {
185
+ type: "schemaOrgBreadcrumbList",
186
+ title: "Breadcrumb List",
187
+ description: "Page hierarchy breadcrumb trail for navigation.",
188
+ category: "navigation",
189
+ keywords: ["breadcrumb", "path", "hierarchy", "trail"]
190
+ },
191
+ // ─── Location & Events ────────────────────────────────────────────
192
+ {
193
+ type: "schemaOrgEvent",
194
+ title: "Event",
195
+ description: "Events with dates, location, and organizer.",
196
+ category: "location",
197
+ keywords: ["conference", "meetup", "webinar", "concert"]
198
+ },
199
+ {
200
+ type: "schemaOrgPlace",
201
+ title: "Place",
202
+ description: "A physical location with address.",
203
+ category: "location",
204
+ keywords: ["venue", "location", "landmark", "spot"]
205
+ },
206
+ {
207
+ type: "schemaOrgCountry",
208
+ title: "Country",
209
+ description: "A country (extends Place) \u2014 useful for geographic targeting.",
210
+ category: "location",
211
+ keywords: ["country", "nation", "geography", "region"]
212
+ },
213
+ {
214
+ type: "schemaOrgLegalService",
215
+ title: "Legal Service",
216
+ description: "Law firm or legal practice (extends LocalBusiness).",
217
+ category: "people",
218
+ keywords: ["law", "lawyer", "attorney", "firm", "legal"]
219
+ },
220
+ // ─── Software ─────────────────────────────────────────────────────
221
+ {
222
+ type: "schemaOrgSoftwareApplication",
223
+ title: "Software Application",
224
+ description: "Desktop or mobile application.",
225
+ category: "software",
226
+ keywords: ["app", "tool", "program", "desktop", "mobile"]
227
+ },
228
+ {
229
+ type: "schemaOrgWebApplication",
230
+ title: "Web Application",
231
+ description: "Web-based application or SaaS tool.",
232
+ category: "software",
233
+ keywords: ["webapp", "saas", "online", "cloud"]
234
+ },
235
+ // ─── Education ────────────────────────────────────────────────────
236
+ {
237
+ type: "schemaOrgCourse",
238
+ title: "Course",
239
+ description: "Educational course with provider info.",
240
+ category: "education",
241
+ keywords: ["learning", "class", "training", "workshop", "tutorial"]
242
+ },
243
+ // ─── New Schema Types ──────────────────────────────────────────────
244
+ {
245
+ type: "schemaOrgJobPosting",
246
+ title: "Job Posting",
247
+ description: "A job listing with salary, location, and requirements.",
248
+ category: "people",
249
+ keywords: ["job", "career", "hiring", "employment", "vacancy", "work"]
250
+ },
251
+ {
252
+ type: "schemaOrgRestaurant",
253
+ title: "Restaurant",
254
+ description: "A restaurant or dining establishment.",
255
+ category: "commerce",
256
+ keywords: ["restaurant", "dining", "food", "cuisine", "eatery"]
257
+ },
258
+ {
259
+ type: "schemaOrgMovie",
260
+ title: "Movie",
261
+ description: "A movie or film with cast and crew details.",
262
+ category: "media",
263
+ keywords: ["movie", "film", "cinema", "motion picture"]
264
+ },
265
+ {
266
+ type: "schemaOrgBook",
267
+ title: "Book",
268
+ description: "A book, e-book, or audiobook publication.",
269
+ category: "commerce",
270
+ keywords: ["book", "ebook", "publication", "novel", "isbn"]
271
+ },
272
+ {
273
+ type: "schemaOrgNewsArticle",
274
+ title: "News Article",
275
+ description: "A news story \u2014 distinct from generic Article for news publishers.",
276
+ category: "content",
277
+ keywords: ["news", "journalism", "press", "story", "report"]
278
+ },
279
+ {
280
+ type: "schemaOrgItemList",
281
+ title: "Item List",
282
+ description: "An ordered or unordered list of items (carousel).",
283
+ category: "navigation",
284
+ keywords: ["list", "carousel", "items", "collection"]
285
+ },
286
+ {
287
+ type: "schemaOrgProfilePage",
288
+ title: "Profile Page",
289
+ description: "A profile page for a person or organization.",
290
+ category: "content",
291
+ keywords: ["profile", "about", "bio", "author", "creator"]
292
+ },
293
+ {
294
+ type: "schemaOrgMusicRecording",
295
+ title: "Music Recording",
296
+ description: "An individual song or music track.",
297
+ category: "media",
298
+ keywords: ["song", "track", "music", "recording", "single"]
299
+ },
300
+ {
301
+ type: "schemaOrgMusicAlbum",
302
+ title: "Music Album",
303
+ description: "A music album or collection of tracks.",
304
+ category: "media",
305
+ keywords: ["album", "music", "record", "lp", "ep", "release"]
306
+ }
307
+ ];
308
+ function matchesSearch(info, query) {
309
+ const q = query.toLowerCase();
310
+ return info.title.toLowerCase().includes(q) || info.description.toLowerCase().includes(q) || info.keywords.some((kw) => kw.toLowerCase().includes(q));
311
+ }
312
+ function groupByCategory(items) {
313
+ const map = /* @__PURE__ */ new Map();
314
+ for (const cat of CATEGORY_ORDER) {
315
+ const matches = items.filter((i) => i.category === cat);
316
+ if (matches.length) map.set(cat, matches);
317
+ }
318
+ return map;
319
+ }
320
+ function TypeArrayFunctions(props) {
321
+ const { onValueCreate, schemaType, onItemAppend } = props;
322
+ const [open, setOpen] = useState(false);
323
+ const [search, setSearch] = useState("");
324
+ const onClose = useCallback(() => {
325
+ setOpen(false);
326
+ setSearch("");
327
+ }, []);
328
+ const onOpen = useCallback(() => setOpen(true), []);
329
+ const handleSearchChange = useCallback((e) => {
330
+ setSearch(e.currentTarget.value);
331
+ }, []);
332
+ const availableTypes = useMemo(() => {
333
+ const typeNames = new Set(schemaType.of.map((t) => t.name));
334
+ return SCHEMA_TYPE_METADATA.filter((m) => typeNames.has(m.type));
335
+ }, [schemaType.of]);
336
+ const filtered = useMemo(
337
+ () => search ? availableTypes.filter((t) => matchesSearch(t, search)) : availableTypes,
338
+ [availableTypes, search]
339
+ );
340
+ const grouped = useMemo(() => groupByCategory(filtered), [filtered]);
341
+ const handleSelect = useCallback(
342
+ (typeName) => {
343
+ const schemaItem = schemaType.of.find((t) => t.name === typeName);
344
+ if (schemaItem) {
345
+ const value = onValueCreate(schemaItem);
346
+ onItemAppend(value);
347
+ }
348
+ onClose();
349
+ },
350
+ [schemaType.of, onValueCreate, onItemAppend, onClose]
351
+ );
352
+ const handleCardClick = useCallback((typeName) => handleSelect(typeName), [handleSelect]);
353
+ return /* @__PURE__ */ jsxs(Stack, { space: 4, children: [
354
+ /* @__PURE__ */ jsx(Button, { icon: AddIcon, text: "Add Schema Type", mode: "ghost", onClick: onOpen }),
355
+ open && /* @__PURE__ */ jsx(
356
+ Dialog,
357
+ {
358
+ header: "Add Schema.org Type",
359
+ id: "schema-type-picker",
360
+ onClose,
361
+ zOffset: 1e3,
362
+ width: 1,
363
+ children: /* @__PURE__ */ jsx(Box, { padding: 4, children: /* @__PURE__ */ jsxs(Stack, { space: 4, children: [
364
+ /* @__PURE__ */ jsx(
365
+ TextInput,
366
+ {
367
+ icon: SearchIcon,
368
+ placeholder: "Search schema types\u2026",
369
+ value: search,
370
+ onChange: handleSearchChange,
371
+ autoFocus: true
372
+ }
373
+ ),
374
+ grouped.size === 0 ? /* @__PURE__ */ jsx(Card, { padding: 4, tone: "transparent", children: /* @__PURE__ */ jsx(Flex, { align: "center", justify: "center", children: /* @__PURE__ */ jsx(Text, { muted: true, size: 1, children: "No matching schema types found." }) }) }) : /* @__PURE__ */ jsx(Stack, { space: 5, children: Array.from(grouped.entries()).map(([category, types]) => /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
375
+ /* @__PURE__ */ jsx(
376
+ Heading,
377
+ {
378
+ size: 0,
379
+ style: { textTransform: "uppercase", letterSpacing: "0.05em" },
380
+ children: CATEGORY_LABELS[category]
381
+ }
382
+ ),
383
+ /* @__PURE__ */ jsx(Grid, { columns: [1, 1, 2], gap: 2, children: types.map((info) => {
384
+ const schemaItem = schemaType.of.find((t) => t.name === info.type);
385
+ const Icon = schemaItem == null ? void 0 : schemaItem.icon;
386
+ return /* @__PURE__ */ jsx(
387
+ Card,
388
+ {
389
+ as: "button",
390
+ padding: 3,
391
+ radius: 2,
392
+ shadow: 1,
393
+ tone: "default",
394
+ onClick: () => handleCardClick(info.type),
395
+ style: { cursor: "pointer", textAlign: "left" },
396
+ children: /* @__PURE__ */ jsxs(Flex, { gap: 3, align: "flex-start", children: [
397
+ Icon && /* @__PURE__ */ jsx(Box, { style: { flexShrink: 0, marginTop: 2 }, children: /* @__PURE__ */ jsx(Text, { size: 2, children: /* @__PURE__ */ jsx(Icon, {}) }) }),
398
+ /* @__PURE__ */ jsxs(Stack, { space: 2, children: [
399
+ /* @__PURE__ */ jsx(Text, { weight: "semibold", size: 1, children: info.title }),
400
+ /* @__PURE__ */ jsx(Text, { muted: true, size: 0, children: info.description })
401
+ ] })
402
+ ] })
403
+ },
404
+ info.type
405
+ );
406
+ }) })
407
+ ] }, category)) })
408
+ ] }) })
409
+ }
410
+ )
411
+ ] });
412
+ }
413
+ function TypePickerInput(props) {
414
+ const { renderDefault } = props;
415
+ return /* @__PURE__ */ jsx(Stack, { space: 3, children: renderDefault(__spreadProps(__spreadValues({}, props), { arrayFunctions: TypeArrayFunctions })) });
416
+ }
417
+
6
418
  // src/schema/organization/schema.ts
7
419
  var organizationFields = [
8
- {
9
- name: "name",
420
+ nameField({
10
421
  title: "Organization Name",
11
- type: "string",
12
422
  description: "The official name of the organization.",
13
423
  required: { key: "nameRequired", message: "Organization name is required for Schema.org." }
14
- },
424
+ }),
15
425
  {
16
426
  name: "url",
17
427
  title: "Organization URL",
@@ -32,12 +442,18 @@ var organizationFields = [
32
442
  rows: 3,
33
443
  description: "A short description of the organization."
34
444
  },
445
+ {
446
+ name: "alternateName",
447
+ title: "Alternate Name",
448
+ type: "string",
449
+ description: "An alias or alternate name for the organization."
450
+ },
35
451
  {
36
452
  name: "sameAs",
37
- title: "Social / External Profiles",
38
- type: "array",
39
- of: [{ type: "url" }],
40
- description: "URLs of social media profiles and other authoritative pages (Twitter, LinkedIn, GitHub, etc.)."
453
+ title: "Same As URL",
454
+ type: "url",
455
+ description: "URLs of social media profiles and other authoritative pages (Twitter, LinkedIn, GitHub, etc.).",
456
+ urlValidation: { schemes: ["http", "https"] }
41
457
  },
42
458
  {
43
459
  name: "contactPoint",
@@ -74,15 +490,40 @@ var organizationFields = [
74
490
  initialValue: ["English"]
75
491
  }
76
492
  ]
493
+ },
494
+ {
495
+ name: "department",
496
+ title: "Departments",
497
+ type: "array",
498
+ description: "Departments within the organization.",
499
+ jsonLdType: "Organization",
500
+ fields: [
501
+ {
502
+ name: "name",
503
+ title: "Department Name",
504
+ type: "string"
505
+ },
506
+ {
507
+ name: "url",
508
+ title: "Department URL",
509
+ type: "url"
510
+ },
511
+ {
512
+ name: "telephone",
513
+ title: "Department Phone",
514
+ type: "string"
515
+ }
516
+ ]
77
517
  }
78
518
  ];
79
519
  function schemaOrgOrganization(config = {}) {
80
520
  return generateSchemaType(
81
521
  {
82
522
  name: "schemaOrgOrganization",
83
- title: "Schema.org \u2014 Organization",
523
+ title: "Organization",
84
524
  icon: SchemaOrgIcons.organization,
85
- fields: organizationFields
525
+ fields: organizationFields,
526
+ customPrepareSubtitle: (document) => document.name ? `${document.name}${document.url ? ` \xB7 ${document.url}` : ""}` : "Untitled organization"
86
527
  },
87
528
  config
88
529
  );
@@ -90,82 +531,40 @@ function schemaOrgOrganization(config = {}) {
90
531
 
91
532
  // src/schema/website/schema.ts
92
533
  var websiteFields = [
93
- {
94
- name: "name",
534
+ nameField({
95
535
  title: "Website Name",
96
- type: "string",
97
536
  description: "The name of the website.",
98
537
  required: { key: "nameRequired", message: "Website name is required for Schema.org." }
99
- },
100
- {
101
- name: "url",
538
+ }),
539
+ urlField({
102
540
  title: "Website URL",
103
- type: "url",
104
541
  description: 'The full URL of the website, e.g. "https://www.example.com".',
105
542
  required: { key: "urlRequired", message: "Website URL is required for Schema.org." }
106
- },
107
- {
108
- name: "description",
109
- title: "Description",
110
- type: "text",
111
- rows: 3,
543
+ }),
544
+ descriptionField({
112
545
  description: "A short description of the website."
113
- },
114
- {
115
- name: "inLanguage",
116
- title: "Language",
117
- type: "string",
118
- description: 'The language of the website content, e.g. "en".',
119
- initialValue: "en",
120
- options: [
121
- { title: "English", value: "en" },
122
- { title: "Spanish", value: "es" },
123
- { title: "French", value: "fr" },
124
- { title: "German", value: "de" },
125
- { title: "Portuguese", value: "pt" },
126
- { title: "Italian", value: "it" },
127
- { title: "Dutch", value: "nl" },
128
- { title: "Japanese", value: "ja" },
129
- { title: "Chinese", value: "zh" },
130
- { title: "Korean", value: "ko" },
131
- { title: "Hindi", value: "hi" },
132
- { title: "Arabic", value: "ar" }
133
- ]
134
- },
135
- {
136
- name: "publisher",
137
- title: "Publisher",
138
- type: "object",
139
- description: "The organization that publishes this website.",
140
- fields: [
141
- {
142
- name: "name",
143
- title: "Publisher Name",
144
- type: "string",
145
- description: "Name of the publishing organization."
146
- },
147
- {
148
- name: "url",
149
- title: "Publisher URL",
150
- type: "url",
151
- description: "URL of the publishing organization."
152
- },
153
- {
154
- name: "logoUrl",
155
- title: "Publisher Logo URL",
156
- type: "url",
157
- description: "URL to the publisher logo image."
158
- }
159
- ]
160
- }
546
+ }),
547
+ inLanguageField({ description: 'The language of the website content, e.g. "en".' }),
548
+ polymorphicPublisher({ description: "The organization or person that publishes this website." }),
549
+ potentialActionSearch({
550
+ description: "Enables the sitelinks search box in Google. Configure the search URL template."
551
+ }),
552
+ issnField({
553
+ description: "The ISSN (International Standard Serial Number) of the website, if applicable."
554
+ })
161
555
  ];
162
556
  function schemaOrgWebsite(config = {}) {
163
557
  return generateSchemaType(
164
558
  {
165
559
  name: "schemaOrgWebsite",
166
- title: "Schema.org \u2014 Website",
560
+ title: "Website",
167
561
  icon: SchemaOrgIcons.website,
168
- fields: websiteFields
562
+ fields: websiteFields,
563
+ customPrepareSubtitle: (document) => {
564
+ const name = document.name ? `${document.name}` : "Untitled website";
565
+ const url = document.url ? ` \xB7 ${document.url}` : "";
566
+ return `${name}${url}`;
567
+ }
169
568
  },
170
569
  config
171
570
  );
@@ -196,7 +595,21 @@ var ALL_SCHEMA_ORG_TYPES = [
196
595
  "schemaOrgCourse",
197
596
  "schemaOrgImageObject",
198
597
  "schemaOrgPostalAddress",
199
- "schemaOrgContactPoint"
598
+ "schemaOrgContactPoint",
599
+ "schemaOrgRecipe",
600
+ "schemaOrgService",
601
+ "schemaOrgSocialMediaPosting",
602
+ "schemaOrgLegalService",
603
+ "schemaOrgCountry",
604
+ "schemaOrgJobPosting",
605
+ "schemaOrgRestaurant",
606
+ "schemaOrgMovie",
607
+ "schemaOrgBook",
608
+ "schemaOrgNewsArticle",
609
+ "schemaOrgItemList",
610
+ "schemaOrgProfilePage",
611
+ "schemaOrgMusicRecording",
612
+ "schemaOrgMusicAlbum"
200
613
  ];
201
614
  var schemaOrgWebsitePlugin = definePlugin((config = {}) => ({
202
615
  name: "sanity-plugin-seofields/schema-org-website",
@@ -302,6 +715,66 @@ var schemaOrgCoursePlugin = definePlugin((config = {}) => ({
302
715
  name: "sanity-plugin-seofields/schema-org-course",
303
716
  schema: { types: [schemaOrgCourse(config)] }
304
717
  }));
718
+ var schemaOrgRecipePlugin = definePlugin((config = {}) => ({
719
+ name: "sanity-plugin-seofields/schema-org-recipe",
720
+ schema: { types: [schemaOrgRecipe(config)] }
721
+ }));
722
+ var schemaOrgServicePlugin = definePlugin((config = {}) => ({
723
+ name: "sanity-plugin-seofields/schema-org-service",
724
+ schema: { types: [schemaOrgService(config)] }
725
+ }));
726
+ var schemaOrgSocialMediaPostingPlugin = definePlugin(
727
+ (config = {}) => ({
728
+ name: "sanity-plugin-seofields/schema-org-socialmediaposting",
729
+ schema: { types: [schemaOrgSocialMediaPosting(config)] }
730
+ })
731
+ );
732
+ var schemaOrgLegalServicePlugin = definePlugin((config = {}) => ({
733
+ name: "sanity-plugin-seofields/schema-org-legalservice",
734
+ schema: { types: [schemaOrgLegalService(config)] }
735
+ }));
736
+ var schemaOrgCountryPlugin = definePlugin((config = {}) => ({
737
+ name: "sanity-plugin-seofields/schema-org-country",
738
+ schema: { types: [schemaOrgCountry(config)] }
739
+ }));
740
+ var schemaOrgJobPostingPlugin = definePlugin((config = {}) => ({
741
+ name: "sanity-plugin-seofields/schema-org-jobposting",
742
+ schema: { types: [schemaOrgJobPosting(config)] }
743
+ }));
744
+ var schemaOrgRestaurantPlugin = definePlugin((config = {}) => ({
745
+ name: "sanity-plugin-seofields/schema-org-restaurant",
746
+ schema: { types: [schemaOrgRestaurant(config)] }
747
+ }));
748
+ var schemaOrgMoviePlugin = definePlugin((config = {}) => ({
749
+ name: "sanity-plugin-seofields/schema-org-movie",
750
+ schema: { types: [schemaOrgMovie(config)] }
751
+ }));
752
+ var schemaOrgBookPlugin = definePlugin((config = {}) => ({
753
+ name: "sanity-plugin-seofields/schema-org-book",
754
+ schema: { types: [schemaOrgBook(config)] }
755
+ }));
756
+ var schemaOrgNewsArticlePlugin = definePlugin((config = {}) => ({
757
+ name: "sanity-plugin-seofields/schema-org-newsarticle",
758
+ schema: { types: [schemaOrgNewsArticle(config)] }
759
+ }));
760
+ var schemaOrgItemListPlugin = definePlugin((config = {}) => ({
761
+ name: "sanity-plugin-seofields/schema-org-itemlist",
762
+ schema: { types: [schemaOrgItemList(config)] }
763
+ }));
764
+ var schemaOrgProfilePagePlugin = definePlugin((config = {}) => ({
765
+ name: "sanity-plugin-seofields/schema-org-profilepage",
766
+ schema: { types: [schemaOrgProfilePage(config)] }
767
+ }));
768
+ var schemaOrgMusicRecordingPlugin = definePlugin(
769
+ (config = {}) => ({
770
+ name: "sanity-plugin-seofields/schema-org-musicrecording",
771
+ schema: { types: [schemaOrgMusicRecording(config)] }
772
+ })
773
+ );
774
+ var schemaOrgMusicAlbumPlugin = definePlugin((config = {}) => ({
775
+ name: "sanity-plugin-seofields/schema-org-musicalbum",
776
+ schema: { types: [schemaOrgMusicAlbum(config)] }
777
+ }));
305
778
  var schemaOrg = definePlugin((config = {}) => {
306
779
  const c = config;
307
780
  return {
@@ -332,20 +805,28 @@ var schemaOrg = definePlugin((config = {}) => {
332
805
  schemaOrgPlace(c.place),
333
806
  schemaOrgVideoObject(c.videoObject),
334
807
  schemaOrgCourse(c.course),
808
+ schemaOrgRecipe(c.recipe),
809
+ schemaOrgService(c.service),
810
+ schemaOrgSocialMediaPosting(c.socialMediaPosting),
811
+ schemaOrgLegalService(c.legalService),
812
+ schemaOrgCountry(c.country),
813
+ schemaOrgJobPosting(c.jobPosting),
814
+ schemaOrgRestaurant(c.restaurant),
815
+ schemaOrgMovie(c.movie),
816
+ schemaOrgBook(c.book),
817
+ schemaOrgNewsArticle(c.newsArticle),
818
+ schemaOrgItemList(c.itemList),
819
+ schemaOrgProfilePage(c.profilePage),
820
+ schemaOrgMusicRecording(c.musicRecording),
821
+ schemaOrgMusicAlbum(c.musicAlbum),
335
822
  // Combined array type — lets editors add multiple schemas
336
823
  defineType({
337
824
  name: "schemaOrg",
338
825
  title: "Schema.org Structured Data",
339
826
  type: "array",
340
827
  of: ALL_SCHEMA_ORG_TYPES.map((type) => ({ type })),
341
- options: {
342
- insertMenu: {
343
- views: [
344
- {
345
- name: "grid"
346
- }
347
- ]
348
- }
828
+ components: {
829
+ input: TypePickerInput
349
830
  }
350
831
  })
351
832
  ]
@@ -353,6 +834,6 @@ var schemaOrg = definePlugin((config = {}) => {
353
834
  };
354
835
  });
355
836
 
356
- export { schemaOrg, schemaOrgAggregateRatingPlugin, schemaOrgArticlePlugin, schemaOrgBlogPostingPlugin, schemaOrgBrandPlugin, schemaOrgBreadcrumbListPlugin, schemaOrgContactPointPlugin, schemaOrgCoursePlugin, schemaOrgEventPlugin, schemaOrgFAQPagePlugin, schemaOrgHowToPlugin, schemaOrgImageObjectPlugin, schemaOrgLocalBusinessPlugin, schemaOrgOfferPlugin, schemaOrgOrganization, schemaOrgOrganizationPlugin, schemaOrgPersonPlugin, schemaOrgPlacePlugin, schemaOrgPostalAddressPlugin, schemaOrgProductPlugin, schemaOrgReviewPlugin, schemaOrgSoftwareApplicationPlugin, schemaOrgVideoObjectPlugin, schemaOrgWebApplicationPlugin, schemaOrgWebPagePlugin, schemaOrgWebsite, schemaOrgWebsitePlugin };
837
+ export { CATEGORY_LABELS, CATEGORY_ORDER, SCHEMA_TYPE_METADATA, TypePickerInput, schemaOrg, schemaOrgAggregateRatingPlugin, schemaOrgArticlePlugin, schemaOrgBlogPostingPlugin, schemaOrgBookPlugin, schemaOrgBrandPlugin, schemaOrgBreadcrumbListPlugin, schemaOrgContactPointPlugin, schemaOrgCountryPlugin, schemaOrgCoursePlugin, schemaOrgEventPlugin, schemaOrgFAQPagePlugin, schemaOrgHowToPlugin, schemaOrgImageObjectPlugin, schemaOrgItemListPlugin, schemaOrgJobPostingPlugin, schemaOrgLegalServicePlugin, schemaOrgLocalBusinessPlugin, schemaOrgMoviePlugin, schemaOrgMusicAlbumPlugin, schemaOrgMusicRecordingPlugin, schemaOrgNewsArticlePlugin, schemaOrgOfferPlugin, schemaOrgOrganization, schemaOrgOrganizationPlugin, schemaOrgPersonPlugin, schemaOrgPlacePlugin, schemaOrgPostalAddressPlugin, schemaOrgProductPlugin, schemaOrgProfilePagePlugin, schemaOrgRecipePlugin, schemaOrgRestaurantPlugin, schemaOrgReviewPlugin, schemaOrgServicePlugin, schemaOrgSocialMediaPostingPlugin, schemaOrgSoftwareApplicationPlugin, schemaOrgVideoObjectPlugin, schemaOrgWebApplicationPlugin, schemaOrgWebPagePlugin, schemaOrgWebsite, schemaOrgWebsitePlugin };
357
838
  //# sourceMappingURL=schema.js.map
358
839
  //# sourceMappingURL=schema.js.map