sanity-plugin-seofields 1.3.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/schema.js ADDED
@@ -0,0 +1,1691 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+
21
+ // src/schema/generator.ts
22
+ import { defineField, defineType } from "sanity";
23
+ function buildField(fieldDef, validation) {
24
+ var _a, _b, _c;
25
+ const base = {
26
+ name: fieldDef.name,
27
+ title: fieldDef.title,
28
+ type: fieldDef.type
29
+ };
30
+ if (fieldDef.description) base.description = fieldDef.description;
31
+ if (fieldDef.initialValue !== void 0) base.initialValue = fieldDef.initialValue;
32
+ if (fieldDef.rows) base.rows = fieldDef.rows;
33
+ if (fieldDef.options) {
34
+ base.options = { list: fieldDef.options };
35
+ }
36
+ if (fieldDef.type === "array" && ((_a = fieldDef.fields) == null ? void 0 : _a.length) && !fieldDef.of) {
37
+ base.of = [
38
+ {
39
+ type: "object",
40
+ fields: fieldDef.fields.map((child) => buildField(child, validation))
41
+ }
42
+ ];
43
+ } else if (fieldDef.of) {
44
+ base.of = fieldDef.of;
45
+ }
46
+ if (fieldDef.type !== "array" && ((_b = fieldDef.fields) == null ? void 0 : _b.length)) {
47
+ base.fields = fieldDef.fields.map((child) => buildField(child, validation));
48
+ }
49
+ if (fieldDef.required) {
50
+ const msg = (_c = validation == null ? void 0 : validation[fieldDef.required.key]) != null ? _c : fieldDef.required.message;
51
+ base.validation = (Rule) => Rule.required().error(msg);
52
+ }
53
+ return defineField(base);
54
+ }
55
+ function generateSchemaType(def, config = {}) {
56
+ return defineType(__spreadProps(__spreadValues({
57
+ name: def.name,
58
+ title: def.title,
59
+ type: "object"
60
+ }, def.icon && { icon: def.icon }), {
61
+ fields: def.fields.map((f) => buildField(f, config.validation)),
62
+ preview: {
63
+ select: {
64
+ title: "name"
65
+ },
66
+ prepare(selection) {
67
+ var _a;
68
+ return __spreadValues({
69
+ title: selection.title || def.title,
70
+ subtitle: `@type: ${((_a = def.title.split("\u2014")[1]) == null ? void 0 : _a.trim()) || def.title}`
71
+ }, def.icon && { media: def.icon });
72
+ }
73
+ }
74
+ }));
75
+ }
76
+ var SANITY_INTERNAL_KEYS = /* @__PURE__ */ new Set([
77
+ "_key",
78
+ "_type",
79
+ "_ref",
80
+ "_id",
81
+ "_rev",
82
+ "_createdAt",
83
+ "_updatedAt"
84
+ ]);
85
+ function buildNestedJsonLd(data, fieldDefs, jsonLdType) {
86
+ var _a;
87
+ const result = jsonLdType ? { "@type": jsonLdType } : {};
88
+ for (const field of fieldDefs) {
89
+ const value = data[field.name];
90
+ if (value === void 0 || value === null || value === "") continue;
91
+ const key = (_a = field.jsonLdKey) != null ? _a : field.name;
92
+ if (field.type === "object" && field.fields && typeof value === "object" && !Array.isArray(value)) {
93
+ const nested = buildNestedJsonLd(
94
+ value,
95
+ field.fields,
96
+ field.jsonLdType
97
+ );
98
+ const minKeys = field.jsonLdType ? 1 : 0;
99
+ if (Object.keys(nested).length > minKeys) {
100
+ result[key] = nested;
101
+ }
102
+ } else if (field.type === "array" && Array.isArray(value)) {
103
+ if (field.fields && field.jsonLdType) {
104
+ const items = value.filter(
105
+ (item) => typeof item === "object" && item !== null
106
+ ).map((item) => buildNestedJsonLd(item, field.fields, field.jsonLdType));
107
+ if (items.length) result[key] = items;
108
+ } else if (value.length) {
109
+ result[key] = value.filter((v) => v !== void 0 && v !== null && v !== "");
110
+ }
111
+ } else if (!SANITY_INTERNAL_KEYS.has(field.name)) {
112
+ result[key] = value;
113
+ }
114
+ }
115
+ return result;
116
+ }
117
+ function buildGenericJsonLd(schemaType, data, fieldDefs, requiredFields = []) {
118
+ if (!data) return null;
119
+ for (const req of requiredFields) {
120
+ if (!data[req]) return null;
121
+ }
122
+ const body = buildNestedJsonLd(data, fieldDefs);
123
+ return __spreadValues({
124
+ "@context": "https://schema.org",
125
+ "@type": schemaType
126
+ }, body);
127
+ }
128
+
129
+ // src/schema/schemaOrg.ts
130
+ import { definePlugin, defineType as defineType2 } from "sanity";
131
+
132
+ // src/schema/icons.ts
133
+ import {
134
+ ApiIcon,
135
+ BarChartIcon,
136
+ BookIcon,
137
+ CalendarIcon,
138
+ CodeBlockIcon,
139
+ ComponentIcon,
140
+ DesktopIcon,
141
+ DocumentTextIcon,
142
+ EarthGlobeIcon,
143
+ HeartFilledIcon,
144
+ HelpCircleIcon,
145
+ HomeIcon,
146
+ ImageIcon,
147
+ LinkIcon,
148
+ ListIcon,
149
+ MarkerIcon,
150
+ PackageIcon,
151
+ SparkleIcon,
152
+ TagIcon,
153
+ UserIcon,
154
+ VideoIcon
155
+ } from "@sanity/icons";
156
+ var SchemaOrgIcons = {
157
+ // Website & WebPage
158
+ website: EarthGlobeIcon,
159
+ webPage: DocumentTextIcon,
160
+ // Organization & Business
161
+ organization: ComponentIcon,
162
+ localBusiness: HomeIcon,
163
+ brand: SparkleIcon,
164
+ // People
165
+ person: UserIcon,
166
+ // Navigation
167
+ breadcrumbList: LinkIcon,
168
+ // Media
169
+ imageObject: ImageIcon,
170
+ videoObject: VideoIcon,
171
+ // Content
172
+ article: DocumentTextIcon,
173
+ blogPosting: BookIcon,
174
+ faqPage: HelpCircleIcon,
175
+ howTo: ListIcon,
176
+ // Commerce
177
+ product: PackageIcon,
178
+ offer: TagIcon,
179
+ aggregateRating: BarChartIcon,
180
+ review: HeartFilledIcon,
181
+ // Location
182
+ postalAddress: MarkerIcon,
183
+ place: MarkerIcon,
184
+ event: CalendarIcon,
185
+ // Contact
186
+ contactPoint: ApiIcon,
187
+ // Software
188
+ softwareApplication: CodeBlockIcon,
189
+ webApplication: DesktopIcon,
190
+ // Education
191
+ course: BookIcon
192
+ };
193
+
194
+ // src/schema/aggregateRating/schema.ts
195
+ var aggregateRatingFields = [
196
+ {
197
+ name: "ratingValue",
198
+ title: "Rating Value",
199
+ type: "string",
200
+ description: 'The average rating value, e.g. "4.5".',
201
+ required: {
202
+ key: "ratingValueRequired",
203
+ message: "Rating value is required for Schema.org."
204
+ }
205
+ },
206
+ {
207
+ name: "reviewCount",
208
+ title: "Review Count",
209
+ type: "string",
210
+ description: 'The total number of reviews, e.g. "120".'
211
+ }
212
+ ];
213
+ function schemaOrgAggregateRating(config = {}) {
214
+ return generateSchemaType(
215
+ {
216
+ name: "schemaOrgAggregateRating",
217
+ title: "Schema.org \u2014 AggregateRating",
218
+ icon: SchemaOrgIcons.aggregateRating,
219
+ fields: aggregateRatingFields
220
+ },
221
+ config
222
+ );
223
+ }
224
+
225
+ // src/schema/article/schema.ts
226
+ var articleFields = [
227
+ {
228
+ name: "headline",
229
+ title: "Headline",
230
+ type: "string",
231
+ required: { key: "headlineRequired", message: "Headline is required for Schema.org Article." }
232
+ },
233
+ {
234
+ name: "description",
235
+ title: "Description",
236
+ type: "text",
237
+ rows: 3
238
+ },
239
+ {
240
+ name: "image",
241
+ title: "Image",
242
+ type: "url",
243
+ description: "URL of the article image."
244
+ },
245
+ {
246
+ name: "author",
247
+ title: "Author",
248
+ type: "object",
249
+ jsonLdType: "Person",
250
+ fields: [
251
+ {
252
+ name: "name",
253
+ title: "Author Name",
254
+ type: "string"
255
+ }
256
+ ]
257
+ },
258
+ {
259
+ name: "publisher",
260
+ title: "Publisher",
261
+ type: "object",
262
+ jsonLdType: "Organization",
263
+ fields: [
264
+ {
265
+ name: "name",
266
+ title: "Publisher Name",
267
+ type: "string"
268
+ },
269
+ {
270
+ name: "logo",
271
+ title: "Publisher Logo",
272
+ type: "object",
273
+ jsonLdType: "ImageObject",
274
+ fields: [
275
+ {
276
+ name: "url",
277
+ title: "Logo URL",
278
+ type: "url"
279
+ }
280
+ ]
281
+ }
282
+ ]
283
+ },
284
+ {
285
+ name: "datePublished",
286
+ title: "Date Published",
287
+ type: "date"
288
+ }
289
+ ];
290
+ function schemaOrgArticle(config = {}) {
291
+ return generateSchemaType(
292
+ {
293
+ name: "schemaOrgArticle",
294
+ title: "Schema.org \u2014 Article",
295
+ icon: SchemaOrgIcons.article,
296
+ fields: articleFields
297
+ },
298
+ config
299
+ );
300
+ }
301
+
302
+ // src/schema/blogPosting/schema.ts
303
+ var blogPostingFields = [
304
+ {
305
+ name: "headline",
306
+ title: "Headline",
307
+ type: "string",
308
+ required: {
309
+ key: "headlineRequired",
310
+ message: "Headline is required for Schema.org BlogPosting."
311
+ }
312
+ },
313
+ {
314
+ name: "description",
315
+ title: "Description",
316
+ type: "text",
317
+ rows: 3
318
+ },
319
+ {
320
+ name: "author",
321
+ title: "Author",
322
+ type: "object",
323
+ jsonLdType: "Person",
324
+ fields: [
325
+ {
326
+ name: "name",
327
+ title: "Author Name",
328
+ type: "string"
329
+ }
330
+ ]
331
+ },
332
+ {
333
+ name: "datePublished",
334
+ title: "Date Published",
335
+ type: "date"
336
+ },
337
+ {
338
+ name: "mainEntityOfPage",
339
+ title: "Main Entity of Page",
340
+ type: "object",
341
+ jsonLdType: "WebPage",
342
+ fields: [
343
+ {
344
+ name: "id",
345
+ title: "Page URL",
346
+ type: "url",
347
+ jsonLdKey: "@id"
348
+ }
349
+ ]
350
+ }
351
+ ];
352
+ function schemaOrgBlogPosting(config = {}) {
353
+ return generateSchemaType(
354
+ {
355
+ name: "schemaOrgBlogPosting",
356
+ title: "Schema.org \u2014 BlogPosting",
357
+ icon: SchemaOrgIcons.blogPosting,
358
+ fields: blogPostingFields
359
+ },
360
+ config
361
+ );
362
+ }
363
+
364
+ // src/schema/brand/schema.ts
365
+ var brandFields = [
366
+ {
367
+ name: "name",
368
+ title: "Brand Name",
369
+ type: "string",
370
+ description: "The name of the brand.",
371
+ required: { key: "nameRequired", message: "Brand name is required for Schema.org." }
372
+ }
373
+ ];
374
+ function schemaOrgBrand(config = {}) {
375
+ return generateSchemaType(
376
+ {
377
+ name: "schemaOrgBrand",
378
+ title: "Schema.org \u2014 Brand",
379
+ icon: SchemaOrgIcons.brand,
380
+ fields: brandFields
381
+ },
382
+ config
383
+ );
384
+ }
385
+
386
+ // src/schema/breadcrumbList/schema.ts
387
+ var breadcrumbListFields = [
388
+ {
389
+ name: "itemListElement",
390
+ title: "Breadcrumb Items",
391
+ type: "array",
392
+ jsonLdType: "ListItem",
393
+ fields: [
394
+ {
395
+ name: "position",
396
+ title: "Position",
397
+ type: "number",
398
+ required: { key: "positionRequired", message: "Position is required." }
399
+ },
400
+ {
401
+ name: "name",
402
+ title: "Label",
403
+ type: "string",
404
+ required: { key: "nameRequired", message: "Label is required." }
405
+ },
406
+ {
407
+ name: "item",
408
+ title: "URL",
409
+ type: "url"
410
+ }
411
+ ]
412
+ }
413
+ ];
414
+ function schemaOrgBreadcrumbList(config = {}) {
415
+ return generateSchemaType(
416
+ {
417
+ name: "schemaOrgBreadcrumbList",
418
+ title: "Schema.org \u2014 BreadcrumbList",
419
+ icon: SchemaOrgIcons.breadcrumbList,
420
+ fields: breadcrumbListFields
421
+ },
422
+ config
423
+ );
424
+ }
425
+
426
+ // src/schema/contactPoint/schema.ts
427
+ var contactPointFields = [
428
+ {
429
+ name: "contactType",
430
+ title: "Contact Type",
431
+ type: "string",
432
+ description: 'The type of contact, e.g. "customer support", "sales".',
433
+ required: { key: "contactTypeRequired", message: "Contact type is required for Schema.org." },
434
+ initialValue: "customer support",
435
+ options: [
436
+ { title: "Customer Support", value: "customer support" },
437
+ { title: "Sales", value: "sales" },
438
+ { title: "Technical Support", value: "technical support" },
439
+ { title: "Billing", value: "billing" },
440
+ { title: "General Inquiry", value: "general inquiry" }
441
+ ]
442
+ },
443
+ {
444
+ name: "email",
445
+ title: "Email",
446
+ type: "string",
447
+ description: "Contact email address."
448
+ },
449
+ {
450
+ name: "telephone",
451
+ title: "Telephone",
452
+ type: "string",
453
+ description: "Contact telephone number."
454
+ },
455
+ {
456
+ name: "availableLanguage",
457
+ title: "Available Languages",
458
+ type: "array",
459
+ of: [{ type: "string" }],
460
+ description: 'Languages supported by this contact point, e.g. "English", "Spanish".',
461
+ initialValue: ["English"]
462
+ }
463
+ ];
464
+ function schemaOrgContactPoint(config = {}) {
465
+ return generateSchemaType(
466
+ {
467
+ name: "schemaOrgContactPoint",
468
+ title: "Schema.org \u2014 ContactPoint",
469
+ icon: SchemaOrgIcons.contactPoint,
470
+ fields: contactPointFields
471
+ },
472
+ config
473
+ );
474
+ }
475
+
476
+ // src/schema/course/schema.ts
477
+ var courseFields = [
478
+ {
479
+ name: "name",
480
+ title: "Course Name",
481
+ type: "string",
482
+ description: "The name of the course.",
483
+ required: { key: "nameRequired", message: "Course name is required for Schema.org." }
484
+ },
485
+ {
486
+ name: "description",
487
+ title: "Description",
488
+ type: "text",
489
+ rows: 3,
490
+ description: "A short description of the course."
491
+ },
492
+ {
493
+ name: "provider",
494
+ title: "Provider",
495
+ type: "object",
496
+ description: "The organization that provides this course.",
497
+ jsonLdType: "Organization",
498
+ fields: [
499
+ {
500
+ name: "name",
501
+ title: "Provider Name",
502
+ type: "string",
503
+ description: "Name of the providing organization."
504
+ },
505
+ {
506
+ name: "sameAs",
507
+ title: "Provider URL",
508
+ type: "url",
509
+ description: "URL of the providing organization."
510
+ }
511
+ ]
512
+ }
513
+ ];
514
+ function schemaOrgCourse(config = {}) {
515
+ return generateSchemaType(
516
+ {
517
+ name: "schemaOrgCourse",
518
+ title: "Schema.org \u2014 Course",
519
+ icon: SchemaOrgIcons.course,
520
+ fields: courseFields
521
+ },
522
+ config
523
+ );
524
+ }
525
+
526
+ // src/schema/event/schema.ts
527
+ var eventFields = [
528
+ {
529
+ name: "name",
530
+ title: "Event Name",
531
+ type: "string",
532
+ description: "The name of the event.",
533
+ required: { key: "nameRequired", message: "Event name is required for Schema.org." }
534
+ },
535
+ {
536
+ name: "startDate",
537
+ title: "Start Date",
538
+ type: "date",
539
+ description: "The start date of the event."
540
+ },
541
+ {
542
+ name: "location",
543
+ title: "Location",
544
+ type: "object",
545
+ description: "The location where the event takes place.",
546
+ jsonLdType: "Place",
547
+ fields: [
548
+ {
549
+ name: "name",
550
+ title: "Venue Name",
551
+ type: "string",
552
+ description: "Name of the venue or location."
553
+ },
554
+ {
555
+ name: "address",
556
+ title: "Address",
557
+ type: "string",
558
+ description: "Full address as a single string."
559
+ }
560
+ ]
561
+ }
562
+ ];
563
+ function schemaOrgEvent(config = {}) {
564
+ return generateSchemaType(
565
+ {
566
+ name: "schemaOrgEvent",
567
+ title: "Schema.org \u2014 Event",
568
+ icon: SchemaOrgIcons.event,
569
+ fields: eventFields
570
+ },
571
+ config
572
+ );
573
+ }
574
+
575
+ // src/schema/faqPage/schema.ts
576
+ var faqPageFields = [
577
+ {
578
+ name: "mainEntity",
579
+ title: "FAQ Items",
580
+ type: "array",
581
+ jsonLdType: "Question",
582
+ fields: [
583
+ {
584
+ name: "name",
585
+ title: "Question",
586
+ type: "string",
587
+ required: { key: "questionRequired", message: "Question text is required." }
588
+ },
589
+ {
590
+ name: "acceptedAnswer",
591
+ title: "Accepted Answer",
592
+ type: "object",
593
+ jsonLdType: "Answer",
594
+ fields: [
595
+ {
596
+ name: "text",
597
+ title: "Answer Text",
598
+ type: "text",
599
+ rows: 3
600
+ }
601
+ ]
602
+ }
603
+ ]
604
+ }
605
+ ];
606
+ function schemaOrgFAQPage(config = {}) {
607
+ return generateSchemaType(
608
+ {
609
+ name: "schemaOrgFAQPage",
610
+ title: "Schema.org \u2014 FAQPage",
611
+ icon: SchemaOrgIcons.faqPage,
612
+ fields: faqPageFields
613
+ },
614
+ config
615
+ );
616
+ }
617
+
618
+ // src/schema/howTo/schema.ts
619
+ var howToFields = [
620
+ {
621
+ name: "name",
622
+ title: "Name",
623
+ type: "string",
624
+ required: { key: "nameRequired", message: "Name is required for Schema.org HowTo." }
625
+ },
626
+ {
627
+ name: "description",
628
+ title: "Description",
629
+ type: "text",
630
+ rows: 3
631
+ },
632
+ {
633
+ name: "step",
634
+ title: "Steps",
635
+ type: "array",
636
+ jsonLdType: "HowToStep",
637
+ fields: [
638
+ {
639
+ name: "name",
640
+ title: "Step Name",
641
+ type: "string",
642
+ required: { key: "stepNameRequired", message: "Step name is required." }
643
+ },
644
+ {
645
+ name: "text",
646
+ title: "Step Description",
647
+ type: "text",
648
+ rows: 2
649
+ }
650
+ ]
651
+ }
652
+ ];
653
+ function schemaOrgHowTo(config = {}) {
654
+ return generateSchemaType(
655
+ {
656
+ name: "schemaOrgHowTo",
657
+ title: "Schema.org \u2014 HowTo",
658
+ icon: SchemaOrgIcons.howTo,
659
+ fields: howToFields
660
+ },
661
+ config
662
+ );
663
+ }
664
+
665
+ // src/schema/imageObject/schema.ts
666
+ var imageObjectFields = [
667
+ {
668
+ name: "url",
669
+ title: "Image URL",
670
+ type: "url",
671
+ description: "The URL of the image.",
672
+ required: { key: "urlRequired", message: "Image URL is required for Schema.org." }
673
+ },
674
+ {
675
+ name: "width",
676
+ title: "Width",
677
+ type: "number",
678
+ description: "Image width in pixels."
679
+ },
680
+ {
681
+ name: "height",
682
+ title: "Height",
683
+ type: "number",
684
+ description: "Image height in pixels."
685
+ },
686
+ {
687
+ name: "caption",
688
+ title: "Caption",
689
+ type: "string",
690
+ description: "Caption or alt text for the image."
691
+ }
692
+ ];
693
+ function schemaOrgImageObject(config = {}) {
694
+ return generateSchemaType(
695
+ {
696
+ name: "schemaOrgImageObject",
697
+ title: "Schema.org \u2014 ImageObject",
698
+ icon: SchemaOrgIcons.imageObject,
699
+ fields: imageObjectFields
700
+ },
701
+ config
702
+ );
703
+ }
704
+
705
+ // src/schema/localBusiness/schema.ts
706
+ var localBusinessFields = [
707
+ {
708
+ name: "name",
709
+ title: "Business Name",
710
+ type: "string",
711
+ description: "The official name of the business.",
712
+ required: { key: "nameRequired", message: "Business name is required for Schema.org." }
713
+ },
714
+ {
715
+ name: "image",
716
+ title: "Image URL",
717
+ type: "url",
718
+ description: "URL to the business image."
719
+ },
720
+ {
721
+ name: "telephone",
722
+ title: "Telephone",
723
+ type: "string",
724
+ description: "The telephone number of the business."
725
+ },
726
+ {
727
+ name: "address",
728
+ title: "Address",
729
+ type: "object",
730
+ description: "The physical address of the business.",
731
+ jsonLdType: "PostalAddress",
732
+ fields: [
733
+ {
734
+ name: "streetAddress",
735
+ title: "Street Address",
736
+ type: "string"
737
+ },
738
+ {
739
+ name: "addressLocality",
740
+ title: "Locality",
741
+ type: "string",
742
+ description: "City or town."
743
+ },
744
+ {
745
+ name: "addressCountry",
746
+ title: "Country",
747
+ type: "string",
748
+ description: 'Country code, e.g. "US".'
749
+ }
750
+ ]
751
+ }
752
+ ];
753
+ function schemaOrgLocalBusiness(config = {}) {
754
+ return generateSchemaType(
755
+ {
756
+ name: "schemaOrgLocalBusiness",
757
+ title: "Schema.org \u2014 LocalBusiness",
758
+ icon: SchemaOrgIcons.localBusiness,
759
+ fields: localBusinessFields
760
+ },
761
+ config
762
+ );
763
+ }
764
+
765
+ // src/schema/offer/schema.ts
766
+ var offerFields = [
767
+ {
768
+ name: "price",
769
+ title: "Price",
770
+ type: "string",
771
+ description: 'The price of the offer, e.g. "199.99".',
772
+ required: { key: "priceRequired", message: "Price is required for Schema.org." }
773
+ },
774
+ {
775
+ name: "priceCurrency",
776
+ title: "Currency",
777
+ type: "string",
778
+ description: 'The currency of the price, e.g. "USD".',
779
+ initialValue: "USD",
780
+ options: [
781
+ { title: "USD", value: "USD" },
782
+ { title: "EUR", value: "EUR" },
783
+ { title: "GBP", value: "GBP" },
784
+ { title: "INR", value: "INR" },
785
+ { title: "JPY", value: "JPY" },
786
+ { title: "CAD", value: "CAD" },
787
+ { title: "AUD", value: "AUD" }
788
+ ]
789
+ },
790
+ {
791
+ name: "availability",
792
+ title: "Availability",
793
+ type: "url",
794
+ description: 'Schema.org availability URL, e.g. "https://schema.org/InStock".'
795
+ },
796
+ {
797
+ name: "url",
798
+ title: "Offer URL",
799
+ type: "url",
800
+ description: "URL of the offer page."
801
+ }
802
+ ];
803
+ function schemaOrgOffer(config = {}) {
804
+ return generateSchemaType(
805
+ {
806
+ name: "schemaOrgOffer",
807
+ title: "Schema.org \u2014 Offer",
808
+ icon: SchemaOrgIcons.offer,
809
+ fields: offerFields
810
+ },
811
+ config
812
+ );
813
+ }
814
+
815
+ // src/schema/organization/schema.ts
816
+ var organizationFields = [
817
+ {
818
+ name: "name",
819
+ title: "Organization Name",
820
+ type: "string",
821
+ description: "The official name of the organization.",
822
+ required: { key: "nameRequired", message: "Organization name is required for Schema.org." }
823
+ },
824
+ {
825
+ name: "url",
826
+ title: "Organization URL",
827
+ type: "url",
828
+ description: "The full URL of the organization website.",
829
+ required: { key: "urlRequired", message: "Organization URL is required for Schema.org." }
830
+ },
831
+ {
832
+ name: "logoUrl",
833
+ title: "Logo URL",
834
+ type: "url",
835
+ description: "Direct URL to the organization logo image. Used in search results and knowledge panels."
836
+ },
837
+ {
838
+ name: "description",
839
+ title: "Description",
840
+ type: "text",
841
+ rows: 3,
842
+ description: "A short description of the organization."
843
+ },
844
+ {
845
+ name: "sameAs",
846
+ title: "Social / External Profiles",
847
+ type: "array",
848
+ of: [{ type: "url" }],
849
+ description: "URLs of social media profiles and other authoritative pages (Twitter, LinkedIn, GitHub, etc.)."
850
+ },
851
+ {
852
+ name: "contactPoint",
853
+ title: "Contact Point",
854
+ type: "object",
855
+ description: "Primary contact information for the organization.",
856
+ fields: [
857
+ {
858
+ name: "contactType",
859
+ title: "Contact Type",
860
+ type: "string",
861
+ description: 'e.g. "customer support", "sales", "technical support".',
862
+ initialValue: "customer support",
863
+ options: [
864
+ { title: "Customer Support", value: "customer support" },
865
+ { title: "Sales", value: "sales" },
866
+ { title: "Technical Support", value: "technical support" },
867
+ { title: "Billing", value: "billing" },
868
+ { title: "General Inquiry", value: "general inquiry" }
869
+ ]
870
+ },
871
+ {
872
+ name: "email",
873
+ title: "Email",
874
+ type: "string",
875
+ description: "Contact email address."
876
+ },
877
+ {
878
+ name: "availableLanguage",
879
+ title: "Available Languages",
880
+ type: "array",
881
+ of: [{ type: "string" }],
882
+ description: 'Languages supported by this contact point, e.g. "English", "Spanish".',
883
+ initialValue: ["English"]
884
+ }
885
+ ]
886
+ }
887
+ ];
888
+ function schemaOrgOrganization(config = {}) {
889
+ return generateSchemaType(
890
+ {
891
+ name: "schemaOrgOrganization",
892
+ title: "Schema.org \u2014 Organization",
893
+ icon: SchemaOrgIcons.organization,
894
+ fields: organizationFields
895
+ },
896
+ config
897
+ );
898
+ }
899
+
900
+ // src/schema/person/schema.ts
901
+ var personFields = [
902
+ {
903
+ name: "name",
904
+ title: "Full Name",
905
+ type: "string",
906
+ description: "The full name of the person.",
907
+ required: { key: "nameRequired", message: "Person name is required for Schema.org." }
908
+ },
909
+ {
910
+ name: "jobTitle",
911
+ title: "Job Title",
912
+ type: "string",
913
+ description: "The job title or role of the person."
914
+ },
915
+ {
916
+ name: "url",
917
+ title: "Profile URL",
918
+ type: "url",
919
+ description: "URL of the person's profile or personal website."
920
+ },
921
+ {
922
+ name: "imageUrl",
923
+ title: "Image URL",
924
+ type: "url",
925
+ description: "URL to a photo/image of this person.",
926
+ jsonLdKey: "image"
927
+ },
928
+ {
929
+ name: "sameAs",
930
+ title: "Social / External Profiles",
931
+ type: "array",
932
+ of: [{ type: "url" }],
933
+ description: "URLs of social media profiles and other authoritative pages (LinkedIn, GitHub, etc.)."
934
+ },
935
+ {
936
+ name: "worksFor",
937
+ title: "Works For",
938
+ type: "object",
939
+ description: "The organization this person works for.",
940
+ jsonLdType: "Organization",
941
+ fields: [
942
+ {
943
+ name: "name",
944
+ title: "Organization Name",
945
+ type: "string",
946
+ description: "Name of the organization."
947
+ }
948
+ ]
949
+ }
950
+ ];
951
+ function schemaOrgPerson(config = {}) {
952
+ return generateSchemaType(
953
+ {
954
+ name: "schemaOrgPerson",
955
+ title: "Schema.org \u2014 Person",
956
+ icon: SchemaOrgIcons.person,
957
+ fields: personFields
958
+ },
959
+ config
960
+ );
961
+ }
962
+
963
+ // src/schema/place/schema.ts
964
+ var placeFields = [
965
+ {
966
+ name: "name",
967
+ title: "Place Name",
968
+ type: "string",
969
+ description: "The name of the place.",
970
+ required: { key: "nameRequired", message: "Place name is required for Schema.org." }
971
+ },
972
+ {
973
+ name: "address",
974
+ title: "Address",
975
+ type: "object",
976
+ description: "The physical address of the place.",
977
+ jsonLdType: "PostalAddress",
978
+ fields: [
979
+ {
980
+ name: "addressLocality",
981
+ title: "Locality",
982
+ type: "string",
983
+ description: "City or town."
984
+ },
985
+ {
986
+ name: "addressCountry",
987
+ title: "Country",
988
+ type: "string",
989
+ description: 'Country code, e.g. "US".'
990
+ }
991
+ ]
992
+ }
993
+ ];
994
+ function schemaOrgPlace(config = {}) {
995
+ return generateSchemaType(
996
+ {
997
+ name: "schemaOrgPlace",
998
+ title: "Schema.org \u2014 Place",
999
+ icon: SchemaOrgIcons.place,
1000
+ fields: placeFields
1001
+ },
1002
+ config
1003
+ );
1004
+ }
1005
+
1006
+ // src/schema/postalAddress/schema.ts
1007
+ var postalAddressFields = [
1008
+ {
1009
+ name: "streetAddress",
1010
+ title: "Street Address",
1011
+ type: "string",
1012
+ description: 'The street address, e.g. "123 Main St".'
1013
+ },
1014
+ {
1015
+ name: "addressLocality",
1016
+ title: "City / Locality",
1017
+ type: "string",
1018
+ description: 'The city or locality, e.g. "New York".'
1019
+ },
1020
+ {
1021
+ name: "postalCode",
1022
+ title: "Postal Code",
1023
+ type: "string",
1024
+ description: 'The postal or ZIP code, e.g. "10001".'
1025
+ },
1026
+ {
1027
+ name: "addressCountry",
1028
+ title: "Country",
1029
+ type: "string",
1030
+ description: 'The country code, e.g. "US".'
1031
+ }
1032
+ ];
1033
+ function schemaOrgPostalAddress(config = {}) {
1034
+ return generateSchemaType(
1035
+ {
1036
+ name: "schemaOrgPostalAddress",
1037
+ title: "Schema.org \u2014 PostalAddress",
1038
+ icon: SchemaOrgIcons.postalAddress,
1039
+ fields: postalAddressFields
1040
+ },
1041
+ config
1042
+ );
1043
+ }
1044
+
1045
+ // src/schema/product/schema.ts
1046
+ var productFields = [
1047
+ {
1048
+ name: "name",
1049
+ title: "Product Name",
1050
+ type: "string",
1051
+ description: "The name of the product.",
1052
+ required: { key: "nameRequired", message: "Product name is required for Schema.org." }
1053
+ },
1054
+ {
1055
+ name: "imageUrl",
1056
+ title: "Image URL",
1057
+ type: "url",
1058
+ description: "URL to the product image.",
1059
+ jsonLdKey: "image"
1060
+ },
1061
+ {
1062
+ name: "description",
1063
+ title: "Description",
1064
+ type: "text",
1065
+ rows: 3,
1066
+ description: "A short description of the product."
1067
+ },
1068
+ {
1069
+ name: "brand",
1070
+ title: "Brand",
1071
+ type: "object",
1072
+ description: "The brand of the product.",
1073
+ jsonLdType: "Brand",
1074
+ fields: [
1075
+ {
1076
+ name: "name",
1077
+ title: "Brand Name",
1078
+ type: "string",
1079
+ description: "Name of the brand."
1080
+ }
1081
+ ]
1082
+ }
1083
+ ];
1084
+ function schemaOrgProduct(config = {}) {
1085
+ return generateSchemaType(
1086
+ {
1087
+ name: "schemaOrgProduct",
1088
+ title: "Schema.org \u2014 Product",
1089
+ icon: SchemaOrgIcons.product,
1090
+ fields: productFields
1091
+ },
1092
+ config
1093
+ );
1094
+ }
1095
+
1096
+ // src/schema/review/schema.ts
1097
+ var reviewFields = [
1098
+ {
1099
+ name: "reviewRating",
1100
+ title: "Review Rating",
1101
+ type: "object",
1102
+ jsonLdType: "Rating",
1103
+ fields: [
1104
+ {
1105
+ name: "ratingValue",
1106
+ title: "Rating Value",
1107
+ type: "string",
1108
+ required: {
1109
+ key: "ratingValueRequired",
1110
+ message: "Rating value is required for Schema.org Review."
1111
+ }
1112
+ }
1113
+ ]
1114
+ },
1115
+ {
1116
+ name: "author",
1117
+ title: "Author",
1118
+ type: "object",
1119
+ jsonLdType: "Person",
1120
+ fields: [
1121
+ {
1122
+ name: "name",
1123
+ title: "Author Name",
1124
+ type: "string",
1125
+ required: {
1126
+ key: "authorNameRequired",
1127
+ message: "Author name is required for Schema.org Review."
1128
+ }
1129
+ }
1130
+ ]
1131
+ },
1132
+ {
1133
+ name: "reviewBody",
1134
+ title: "Review Body",
1135
+ type: "text",
1136
+ rows: 3
1137
+ }
1138
+ ];
1139
+ function schemaOrgReview(config = {}) {
1140
+ return generateSchemaType(
1141
+ {
1142
+ name: "schemaOrgReview",
1143
+ title: "Schema.org \u2014 Review",
1144
+ icon: SchemaOrgIcons.review,
1145
+ fields: reviewFields
1146
+ },
1147
+ config
1148
+ );
1149
+ }
1150
+
1151
+ // src/schema/softwareApplication/schema.ts
1152
+ var softwareApplicationFields = [
1153
+ {
1154
+ name: "name",
1155
+ title: "Application Name",
1156
+ type: "string",
1157
+ description: "The name of the software application.",
1158
+ required: {
1159
+ key: "nameRequired",
1160
+ message: "Application name is required for Schema.org."
1161
+ }
1162
+ },
1163
+ {
1164
+ name: "applicationCategory",
1165
+ title: "Application Category",
1166
+ type: "string",
1167
+ description: "The category of the application.",
1168
+ options: [
1169
+ { title: "Developer Application", value: "DeveloperApplication" },
1170
+ { title: "Business Application", value: "BusinessApplication" },
1171
+ { title: "Game Application", value: "GameApplication" },
1172
+ { title: "Educational Application", value: "EducationalApplication" },
1173
+ { title: "Utilities Application", value: "UtilitiesApplication" },
1174
+ { title: "Social Networking Application", value: "SocialNetworkingApplication" }
1175
+ ]
1176
+ },
1177
+ {
1178
+ name: "operatingSystem",
1179
+ title: "Operating System",
1180
+ type: "string",
1181
+ description: 'The supported operating systems, e.g. "Windows, macOS".'
1182
+ },
1183
+ {
1184
+ name: "url",
1185
+ title: "Application URL",
1186
+ type: "url",
1187
+ description: "URL of the software application."
1188
+ }
1189
+ ];
1190
+ function schemaOrgSoftwareApplication(config = {}) {
1191
+ return generateSchemaType(
1192
+ {
1193
+ name: "schemaOrgSoftwareApplication",
1194
+ title: "Schema.org \u2014 SoftwareApplication",
1195
+ icon: SchemaOrgIcons.softwareApplication,
1196
+ fields: softwareApplicationFields
1197
+ },
1198
+ config
1199
+ );
1200
+ }
1201
+
1202
+ // src/schema/videoObject/schema.ts
1203
+ var videoObjectFields = [
1204
+ {
1205
+ name: "name",
1206
+ title: "Video Name",
1207
+ type: "string",
1208
+ description: "The name of the video.",
1209
+ required: { key: "nameRequired", message: "Video name is required for Schema.org." }
1210
+ },
1211
+ {
1212
+ name: "description",
1213
+ title: "Description",
1214
+ type: "text",
1215
+ rows: 3,
1216
+ description: "A description of the video."
1217
+ },
1218
+ {
1219
+ name: "thumbnailUrl",
1220
+ title: "Thumbnail URL",
1221
+ type: "url",
1222
+ description: "URL of the video thumbnail image."
1223
+ },
1224
+ {
1225
+ name: "uploadDate",
1226
+ title: "Upload Date",
1227
+ type: "date",
1228
+ description: "The date the video was uploaded."
1229
+ },
1230
+ {
1231
+ name: "contentUrl",
1232
+ title: "Content URL",
1233
+ type: "url",
1234
+ description: "URL to the actual video file."
1235
+ }
1236
+ ];
1237
+ function schemaOrgVideoObject(config = {}) {
1238
+ return generateSchemaType(
1239
+ {
1240
+ name: "schemaOrgVideoObject",
1241
+ title: "Schema.org \u2014 VideoObject",
1242
+ icon: SchemaOrgIcons.videoObject,
1243
+ fields: videoObjectFields
1244
+ },
1245
+ config
1246
+ );
1247
+ }
1248
+
1249
+ // src/schema/webApplication/schema.ts
1250
+ var webApplicationFields = [
1251
+ {
1252
+ name: "name",
1253
+ title: "Application Name",
1254
+ type: "string",
1255
+ description: "The name of the web application.",
1256
+ required: {
1257
+ key: "nameRequired",
1258
+ message: "Application name is required for Schema.org."
1259
+ }
1260
+ },
1261
+ {
1262
+ name: "url",
1263
+ title: "Application URL",
1264
+ type: "url",
1265
+ description: "URL of the web application.",
1266
+ required: { key: "urlRequired", message: "Application URL is required for Schema.org." }
1267
+ },
1268
+ {
1269
+ name: "applicationCategory",
1270
+ title: "Application Category",
1271
+ type: "string",
1272
+ description: "The category of the application.",
1273
+ options: [
1274
+ { title: "Developer Application", value: "DeveloperApplication" },
1275
+ { title: "Business Application", value: "BusinessApplication" },
1276
+ { title: "Game Application", value: "GameApplication" },
1277
+ { title: "Educational Application", value: "EducationalApplication" },
1278
+ { title: "Utilities Application", value: "UtilitiesApplication" },
1279
+ { title: "Social Networking Application", value: "SocialNetworkingApplication" }
1280
+ ]
1281
+ },
1282
+ {
1283
+ name: "operatingSystem",
1284
+ title: "Operating System",
1285
+ type: "string",
1286
+ description: "The supported operating systems.",
1287
+ initialValue: "All"
1288
+ }
1289
+ ];
1290
+ function schemaOrgWebApplication(config = {}) {
1291
+ return generateSchemaType(
1292
+ {
1293
+ name: "schemaOrgWebApplication",
1294
+ title: "Schema.org \u2014 WebApplication",
1295
+ icon: SchemaOrgIcons.webApplication,
1296
+ fields: webApplicationFields
1297
+ },
1298
+ config
1299
+ );
1300
+ }
1301
+
1302
+ // src/schema/webPage/schema.ts
1303
+ var webPageFields = [
1304
+ {
1305
+ name: "name",
1306
+ title: "Page Name",
1307
+ type: "string",
1308
+ description: "The title of the page.",
1309
+ required: { key: "nameRequired", message: "Page name is required for Schema.org." }
1310
+ },
1311
+ {
1312
+ name: "url",
1313
+ title: "Page URL",
1314
+ type: "url",
1315
+ description: "The full URL of the page.",
1316
+ required: { key: "urlRequired", message: "Page URL is required for Schema.org." }
1317
+ },
1318
+ {
1319
+ name: "description",
1320
+ title: "Description",
1321
+ type: "text",
1322
+ rows: 3,
1323
+ description: "A short description of the page."
1324
+ },
1325
+ {
1326
+ name: "inLanguage",
1327
+ title: "Language",
1328
+ type: "string",
1329
+ description: 'The language of the page content, e.g. "en".',
1330
+ initialValue: "en",
1331
+ options: [
1332
+ { title: "English", value: "en" },
1333
+ { title: "Spanish", value: "es" },
1334
+ { title: "French", value: "fr" },
1335
+ { title: "German", value: "de" },
1336
+ { title: "Portuguese", value: "pt" },
1337
+ { title: "Italian", value: "it" },
1338
+ { title: "Dutch", value: "nl" },
1339
+ { title: "Japanese", value: "ja" },
1340
+ { title: "Chinese", value: "zh" },
1341
+ { title: "Korean", value: "ko" },
1342
+ { title: "Hindi", value: "hi" },
1343
+ { title: "Arabic", value: "ar" }
1344
+ ]
1345
+ },
1346
+ {
1347
+ name: "isPartOf",
1348
+ title: "Part Of (Website)",
1349
+ type: "object",
1350
+ description: "The website this page belongs to.",
1351
+ jsonLdType: "WebSite",
1352
+ fields: [
1353
+ {
1354
+ name: "url",
1355
+ title: "Website URL",
1356
+ type: "url",
1357
+ description: "URL of the parent website."
1358
+ }
1359
+ ]
1360
+ }
1361
+ ];
1362
+ function schemaOrgWebPage(config = {}) {
1363
+ return generateSchemaType(
1364
+ {
1365
+ name: "schemaOrgWebPage",
1366
+ title: "Schema.org \u2014 WebPage",
1367
+ icon: SchemaOrgIcons.webPage,
1368
+ fields: webPageFields
1369
+ },
1370
+ config
1371
+ );
1372
+ }
1373
+
1374
+ // src/schema/website/schema.ts
1375
+ var websiteFields = [
1376
+ {
1377
+ name: "name",
1378
+ title: "Website Name",
1379
+ type: "string",
1380
+ description: "The name of the website.",
1381
+ required: { key: "nameRequired", message: "Website name is required for Schema.org." }
1382
+ },
1383
+ {
1384
+ name: "url",
1385
+ title: "Website URL",
1386
+ type: "url",
1387
+ description: 'The full URL of the website, e.g. "https://www.example.com".',
1388
+ required: { key: "urlRequired", message: "Website URL is required for Schema.org." }
1389
+ },
1390
+ {
1391
+ name: "description",
1392
+ title: "Description",
1393
+ type: "text",
1394
+ rows: 3,
1395
+ description: "A short description of the website."
1396
+ },
1397
+ {
1398
+ name: "inLanguage",
1399
+ title: "Language",
1400
+ type: "string",
1401
+ description: 'The language of the website content, e.g. "en".',
1402
+ initialValue: "en",
1403
+ options: [
1404
+ { title: "English", value: "en" },
1405
+ { title: "Spanish", value: "es" },
1406
+ { title: "French", value: "fr" },
1407
+ { title: "German", value: "de" },
1408
+ { title: "Portuguese", value: "pt" },
1409
+ { title: "Italian", value: "it" },
1410
+ { title: "Dutch", value: "nl" },
1411
+ { title: "Japanese", value: "ja" },
1412
+ { title: "Chinese", value: "zh" },
1413
+ { title: "Korean", value: "ko" },
1414
+ { title: "Hindi", value: "hi" },
1415
+ { title: "Arabic", value: "ar" }
1416
+ ]
1417
+ },
1418
+ {
1419
+ name: "publisher",
1420
+ title: "Publisher",
1421
+ type: "object",
1422
+ description: "The organization that publishes this website.",
1423
+ fields: [
1424
+ {
1425
+ name: "name",
1426
+ title: "Publisher Name",
1427
+ type: "string",
1428
+ description: "Name of the publishing organization."
1429
+ },
1430
+ {
1431
+ name: "url",
1432
+ title: "Publisher URL",
1433
+ type: "url",
1434
+ description: "URL of the publishing organization."
1435
+ },
1436
+ {
1437
+ name: "logoUrl",
1438
+ title: "Publisher Logo URL",
1439
+ type: "url",
1440
+ description: "URL to the publisher logo image."
1441
+ }
1442
+ ]
1443
+ }
1444
+ ];
1445
+ function schemaOrgWebsite(config = {}) {
1446
+ return generateSchemaType(
1447
+ {
1448
+ name: "schemaOrgWebsite",
1449
+ title: "Schema.org \u2014 Website",
1450
+ icon: SchemaOrgIcons.website,
1451
+ fields: websiteFields
1452
+ },
1453
+ config
1454
+ );
1455
+ }
1456
+
1457
+ // src/schema/schemaOrg.ts
1458
+ var ALL_SCHEMA_ORG_TYPES = [
1459
+ "schemaOrgWebsite",
1460
+ "schemaOrgOrganization",
1461
+ "schemaOrgWebPage",
1462
+ "schemaOrgPerson",
1463
+ "schemaOrgArticle",
1464
+ "schemaOrgBlogPosting",
1465
+ "schemaOrgBreadcrumbList",
1466
+ "schemaOrgFAQPage",
1467
+ "schemaOrgHowTo",
1468
+ "schemaOrgProduct",
1469
+ "schemaOrgOffer",
1470
+ "schemaOrgAggregateRating",
1471
+ "schemaOrgReview",
1472
+ "schemaOrgBrand",
1473
+ "schemaOrgLocalBusiness",
1474
+ "schemaOrgEvent",
1475
+ "schemaOrgPlace",
1476
+ "schemaOrgSoftwareApplication",
1477
+ "schemaOrgWebApplication",
1478
+ "schemaOrgVideoObject",
1479
+ "schemaOrgCourse",
1480
+ "schemaOrgImageObject",
1481
+ "schemaOrgPostalAddress",
1482
+ "schemaOrgContactPoint"
1483
+ ];
1484
+ var schemaOrgWebsitePlugin = definePlugin((config = {}) => ({
1485
+ name: "sanity-plugin-seofields/schema-org-website",
1486
+ schema: { types: [schemaOrgWebsite(config)] }
1487
+ }));
1488
+ var schemaOrgOrganizationPlugin = definePlugin((config = {}) => ({
1489
+ name: "sanity-plugin-seofields/schema-org-organization",
1490
+ schema: { types: [schemaOrgOrganization(config)] }
1491
+ }));
1492
+ var schemaOrgWebPagePlugin = definePlugin((config = {}) => ({
1493
+ name: "sanity-plugin-seofields/schema-org-webpage",
1494
+ schema: { types: [schemaOrgWebPage(config)] }
1495
+ }));
1496
+ var schemaOrgPersonPlugin = definePlugin((config = {}) => ({
1497
+ name: "sanity-plugin-seofields/schema-org-person",
1498
+ schema: { types: [schemaOrgPerson(config)] }
1499
+ }));
1500
+ var schemaOrgBreadcrumbListPlugin = definePlugin(
1501
+ (config = {}) => ({
1502
+ name: "sanity-plugin-seofields/schema-org-breadcrumblist",
1503
+ schema: { types: [schemaOrgBreadcrumbList(config)] }
1504
+ })
1505
+ );
1506
+ var schemaOrgImageObjectPlugin = definePlugin((config = {}) => ({
1507
+ name: "sanity-plugin-seofields/schema-org-imageobject",
1508
+ schema: { types: [schemaOrgImageObject(config)] }
1509
+ }));
1510
+ var schemaOrgArticlePlugin = definePlugin((config = {}) => ({
1511
+ name: "sanity-plugin-seofields/schema-org-article",
1512
+ schema: { types: [schemaOrgArticle(config)] }
1513
+ }));
1514
+ var schemaOrgBlogPostingPlugin = definePlugin((config = {}) => ({
1515
+ name: "sanity-plugin-seofields/schema-org-blogposting",
1516
+ schema: { types: [schemaOrgBlogPosting(config)] }
1517
+ }));
1518
+ var schemaOrgFAQPagePlugin = definePlugin((config = {}) => ({
1519
+ name: "sanity-plugin-seofields/schema-org-faqpage",
1520
+ schema: { types: [schemaOrgFAQPage(config)] }
1521
+ }));
1522
+ var schemaOrgHowToPlugin = definePlugin((config = {}) => ({
1523
+ name: "sanity-plugin-seofields/schema-org-howto",
1524
+ schema: { types: [schemaOrgHowTo(config)] }
1525
+ }));
1526
+ var schemaOrgProductPlugin = definePlugin((config = {}) => ({
1527
+ name: "sanity-plugin-seofields/schema-org-product",
1528
+ schema: { types: [schemaOrgProduct(config)] }
1529
+ }));
1530
+ var schemaOrgOfferPlugin = definePlugin((config = {}) => ({
1531
+ name: "sanity-plugin-seofields/schema-org-offer",
1532
+ schema: { types: [schemaOrgOffer(config)] }
1533
+ }));
1534
+ var schemaOrgAggregateRatingPlugin = definePlugin(
1535
+ (config = {}) => ({
1536
+ name: "sanity-plugin-seofields/schema-org-aggregaterating",
1537
+ schema: { types: [schemaOrgAggregateRating(config)] }
1538
+ })
1539
+ );
1540
+ var schemaOrgReviewPlugin = definePlugin((config = {}) => ({
1541
+ name: "sanity-plugin-seofields/schema-org-review",
1542
+ schema: { types: [schemaOrgReview(config)] }
1543
+ }));
1544
+ var schemaOrgBrandPlugin = definePlugin((config = {}) => ({
1545
+ name: "sanity-plugin-seofields/schema-org-brand",
1546
+ schema: { types: [schemaOrgBrand(config)] }
1547
+ }));
1548
+ var schemaOrgLocalBusinessPlugin = definePlugin((config = {}) => ({
1549
+ name: "sanity-plugin-seofields/schema-org-localbusiness",
1550
+ schema: { types: [schemaOrgLocalBusiness(config)] }
1551
+ }));
1552
+ var schemaOrgPostalAddressPlugin = definePlugin((config = {}) => ({
1553
+ name: "sanity-plugin-seofields/schema-org-postaladdress",
1554
+ schema: { types: [schemaOrgPostalAddress(config)] }
1555
+ }));
1556
+ var schemaOrgContactPointPlugin = definePlugin((config = {}) => ({
1557
+ name: "sanity-plugin-seofields/schema-org-contactpoint",
1558
+ schema: { types: [schemaOrgContactPoint(config)] }
1559
+ }));
1560
+ var schemaOrgSoftwareApplicationPlugin = definePlugin(
1561
+ (config = {}) => ({
1562
+ name: "sanity-plugin-seofields/schema-org-softwareapplication",
1563
+ schema: { types: [schemaOrgSoftwareApplication(config)] }
1564
+ })
1565
+ );
1566
+ var schemaOrgWebApplicationPlugin = definePlugin(
1567
+ (config = {}) => ({
1568
+ name: "sanity-plugin-seofields/schema-org-webapplication",
1569
+ schema: { types: [schemaOrgWebApplication(config)] }
1570
+ })
1571
+ );
1572
+ var schemaOrgEventPlugin = definePlugin((config = {}) => ({
1573
+ name: "sanity-plugin-seofields/schema-org-event",
1574
+ schema: { types: [schemaOrgEvent(config)] }
1575
+ }));
1576
+ var schemaOrgPlacePlugin = definePlugin((config = {}) => ({
1577
+ name: "sanity-plugin-seofields/schema-org-place",
1578
+ schema: { types: [schemaOrgPlace(config)] }
1579
+ }));
1580
+ var schemaOrgVideoObjectPlugin = definePlugin((config = {}) => ({
1581
+ name: "sanity-plugin-seofields/schema-org-videoobject",
1582
+ schema: { types: [schemaOrgVideoObject(config)] }
1583
+ }));
1584
+ var schemaOrgCoursePlugin = definePlugin((config = {}) => ({
1585
+ name: "sanity-plugin-seofields/schema-org-course",
1586
+ schema: { types: [schemaOrgCourse(config)] }
1587
+ }));
1588
+ var schemaOrg = definePlugin((config = {}) => {
1589
+ const c = config;
1590
+ return {
1591
+ name: "sanity-plugin-seofields/schema-org",
1592
+ schema: {
1593
+ types: [
1594
+ schemaOrgWebsite(c.website),
1595
+ schemaOrgOrganization(c.organization),
1596
+ schemaOrgWebPage(c.webPage),
1597
+ schemaOrgPerson(c.person),
1598
+ schemaOrgBreadcrumbList(c.breadcrumbList),
1599
+ schemaOrgImageObject(c.imageObject),
1600
+ schemaOrgArticle(c.article),
1601
+ schemaOrgBlogPosting(c.blogPosting),
1602
+ schemaOrgFAQPage(c.faqPage),
1603
+ schemaOrgHowTo(c.howTo),
1604
+ schemaOrgProduct(c.product),
1605
+ schemaOrgOffer(c.offer),
1606
+ schemaOrgAggregateRating(c.aggregateRating),
1607
+ schemaOrgReview(c.review),
1608
+ schemaOrgBrand(c.brand),
1609
+ schemaOrgLocalBusiness(c.localBusiness),
1610
+ schemaOrgPostalAddress(c.postalAddress),
1611
+ schemaOrgContactPoint(c.contactPoint),
1612
+ schemaOrgSoftwareApplication(c.softwareApplication),
1613
+ schemaOrgWebApplication(c.webApplication),
1614
+ schemaOrgEvent(c.event),
1615
+ schemaOrgPlace(c.place),
1616
+ schemaOrgVideoObject(c.videoObject),
1617
+ schemaOrgCourse(c.course),
1618
+ // Combined array type — lets editors add multiple schemas
1619
+ defineType2({
1620
+ name: "schemaOrg",
1621
+ title: "Schema.org Structured Data",
1622
+ type: "array",
1623
+ of: ALL_SCHEMA_ORG_TYPES.map((type) => ({ type })),
1624
+ options: {
1625
+ insertMenu: {
1626
+ views: [
1627
+ {
1628
+ name: "grid"
1629
+ }
1630
+ ]
1631
+ }
1632
+ }
1633
+ })
1634
+ ]
1635
+ }
1636
+ };
1637
+ });
1638
+ export {
1639
+ buildGenericJsonLd,
1640
+ generateSchemaType,
1641
+ schemaOrg,
1642
+ schemaOrgAggregateRating,
1643
+ schemaOrgAggregateRatingPlugin,
1644
+ schemaOrgArticle,
1645
+ schemaOrgArticlePlugin,
1646
+ schemaOrgBlogPosting,
1647
+ schemaOrgBlogPostingPlugin,
1648
+ schemaOrgBrand,
1649
+ schemaOrgBrandPlugin,
1650
+ schemaOrgBreadcrumbList,
1651
+ schemaOrgBreadcrumbListPlugin,
1652
+ schemaOrgContactPoint,
1653
+ schemaOrgContactPointPlugin,
1654
+ schemaOrgCourse,
1655
+ schemaOrgCoursePlugin,
1656
+ schemaOrgEvent,
1657
+ schemaOrgEventPlugin,
1658
+ schemaOrgFAQPage,
1659
+ schemaOrgFAQPagePlugin,
1660
+ schemaOrgHowTo,
1661
+ schemaOrgHowToPlugin,
1662
+ schemaOrgImageObject,
1663
+ schemaOrgImageObjectPlugin,
1664
+ schemaOrgLocalBusiness,
1665
+ schemaOrgLocalBusinessPlugin,
1666
+ schemaOrgOffer,
1667
+ schemaOrgOfferPlugin,
1668
+ schemaOrgOrganization,
1669
+ schemaOrgOrganizationPlugin,
1670
+ schemaOrgPerson,
1671
+ schemaOrgPersonPlugin,
1672
+ schemaOrgPlace,
1673
+ schemaOrgPlacePlugin,
1674
+ schemaOrgPostalAddress,
1675
+ schemaOrgPostalAddressPlugin,
1676
+ schemaOrgProduct,
1677
+ schemaOrgProductPlugin,
1678
+ schemaOrgReview,
1679
+ schemaOrgReviewPlugin,
1680
+ schemaOrgSoftwareApplication,
1681
+ schemaOrgSoftwareApplicationPlugin,
1682
+ schemaOrgVideoObject,
1683
+ schemaOrgVideoObjectPlugin,
1684
+ schemaOrgWebApplication,
1685
+ schemaOrgWebApplicationPlugin,
1686
+ schemaOrgWebPage,
1687
+ schemaOrgWebPagePlugin,
1688
+ schemaOrgWebsite,
1689
+ schemaOrgWebsitePlugin
1690
+ };
1691
+ //# sourceMappingURL=schema.js.map