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
@@ -1,1293 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkS367Y35J_cjs = require('./chunk-S367Y35J.cjs');
4
- var sanity = require('sanity');
5
- var icons = require('@sanity/icons');
6
-
7
- function buildField(fieldDef, validation) {
8
- var _a, _b, _c;
9
- const base = {
10
- name: fieldDef.name,
11
- title: fieldDef.title,
12
- type: fieldDef.type
13
- };
14
- if (fieldDef.description) base.description = fieldDef.description;
15
- if (fieldDef.initialValue !== void 0) base.initialValue = fieldDef.initialValue;
16
- if (fieldDef.rows) base.rows = fieldDef.rows;
17
- if (fieldDef.options) {
18
- base.options = { list: fieldDef.options };
19
- }
20
- if (fieldDef.type === "array" && ((_a = fieldDef.fields) == null ? void 0 : _a.length) && !fieldDef.of) {
21
- base.of = [
22
- {
23
- type: "object",
24
- fields: fieldDef.fields.map((child) => buildField(child, validation))
25
- }
26
- ];
27
- } else if (fieldDef.of) {
28
- base.of = fieldDef.of;
29
- }
30
- if (fieldDef.type !== "array" && ((_b = fieldDef.fields) == null ? void 0 : _b.length)) {
31
- base.fields = fieldDef.fields.map((child) => buildField(child, validation));
32
- }
33
- if (fieldDef.required) {
34
- const msg = (_c = validation == null ? void 0 : validation[fieldDef.required.key]) != null ? _c : fieldDef.required.message;
35
- base.validation = (Rule) => Rule.required().error(msg);
36
- }
37
- return sanity.defineField(base);
38
- }
39
- function generateSchemaType(def, config = {}) {
40
- return sanity.defineType(chunkS367Y35J_cjs.__spreadProps(chunkS367Y35J_cjs.__spreadValues({
41
- name: def.name,
42
- title: def.title,
43
- type: "object"
44
- }, def.icon && { icon: def.icon }), {
45
- fields: def.fields.map((f) => buildField(f, config.validation)),
46
- preview: {
47
- select: {
48
- title: "name"
49
- },
50
- prepare(selection) {
51
- var _a;
52
- return chunkS367Y35J_cjs.__spreadValues({
53
- title: selection.title || def.title,
54
- subtitle: `@type: ${((_a = def.title.split("\u2014")[1]) == null ? void 0 : _a.trim()) || def.title}`
55
- }, def.icon && { media: def.icon });
56
- }
57
- }
58
- }));
59
- }
60
- var SANITY_INTERNAL_KEYS = /* @__PURE__ */ new Set([
61
- "_key",
62
- "_type",
63
- "_ref",
64
- "_id",
65
- "_rev",
66
- "_createdAt",
67
- "_updatedAt"
68
- ]);
69
- function buildNestedJsonLd(data, fieldDefs, jsonLdType) {
70
- var _a;
71
- const result = jsonLdType ? { "@type": jsonLdType } : {};
72
- for (const field of fieldDefs) {
73
- const value = data[field.name];
74
- if (value === void 0 || value === null || value === "") continue;
75
- const key = (_a = field.jsonLdKey) != null ? _a : field.name;
76
- if (field.type === "object" && field.fields && typeof value === "object" && !Array.isArray(value)) {
77
- const nested = buildNestedJsonLd(
78
- value,
79
- field.fields,
80
- field.jsonLdType
81
- );
82
- const minKeys = field.jsonLdType ? 1 : 0;
83
- if (Object.keys(nested).length > minKeys) {
84
- result[key] = nested;
85
- }
86
- } else if (field.type === "array" && Array.isArray(value)) {
87
- if (field.fields && field.jsonLdType) {
88
- const items = value.filter(
89
- (item) => typeof item === "object" && item !== null
90
- ).map((item) => buildNestedJsonLd(item, field.fields, field.jsonLdType));
91
- if (items.length) result[key] = items;
92
- } else if (value.length) {
93
- result[key] = value.filter((v) => v !== void 0 && v !== null && v !== "");
94
- }
95
- } else if (!SANITY_INTERNAL_KEYS.has(field.name)) {
96
- result[key] = value;
97
- }
98
- }
99
- return result;
100
- }
101
- function buildGenericJsonLd(schemaType, data, fieldDefs, requiredFields = []) {
102
- if (!data) return null;
103
- for (const req of requiredFields) {
104
- if (!data[req]) return null;
105
- }
106
- const body = buildNestedJsonLd(data, fieldDefs);
107
- return chunkS367Y35J_cjs.__spreadValues({
108
- "@context": "https://schema.org",
109
- "@type": schemaType
110
- }, body);
111
- }
112
- var SchemaOrgIcons = {
113
- // Website & WebPage
114
- website: icons.EarthGlobeIcon,
115
- webPage: icons.DocumentTextIcon,
116
- // Organization & Business
117
- organization: icons.ComponentIcon,
118
- localBusiness: icons.HomeIcon,
119
- brand: icons.SparkleIcon,
120
- // People
121
- person: icons.UserIcon,
122
- // Navigation
123
- breadcrumbList: icons.LinkIcon,
124
- // Media
125
- imageObject: icons.ImageIcon,
126
- videoObject: icons.VideoIcon,
127
- // Content
128
- article: icons.DocumentTextIcon,
129
- blogPosting: icons.BookIcon,
130
- faqPage: icons.HelpCircleIcon,
131
- howTo: icons.ListIcon,
132
- // Commerce
133
- product: icons.PackageIcon,
134
- offer: icons.TagIcon,
135
- aggregateRating: icons.BarChartIcon,
136
- review: icons.HeartFilledIcon,
137
- // Location
138
- postalAddress: icons.MarkerIcon,
139
- place: icons.MarkerIcon,
140
- event: icons.CalendarIcon,
141
- // Contact
142
- contactPoint: icons.ApiIcon,
143
- // Software
144
- softwareApplication: icons.CodeBlockIcon,
145
- webApplication: icons.DesktopIcon,
146
- // Education
147
- course: icons.BookIcon
148
- };
149
-
150
- // src/schema/aggregateRating/schema.ts
151
- var aggregateRatingFields = [
152
- {
153
- name: "ratingValue",
154
- title: "Rating Value",
155
- type: "string",
156
- description: 'The average rating value, e.g. "4.5".',
157
- required: {
158
- key: "ratingValueRequired",
159
- message: "Rating value is required for Schema.org."
160
- }
161
- },
162
- {
163
- name: "reviewCount",
164
- title: "Review Count",
165
- type: "string",
166
- description: 'The total number of reviews, e.g. "120".'
167
- }
168
- ];
169
- function schemaOrgAggregateRating(config = {}) {
170
- return generateSchemaType(
171
- {
172
- name: "schemaOrgAggregateRating",
173
- title: "Schema.org \u2014 AggregateRating",
174
- icon: SchemaOrgIcons.aggregateRating,
175
- fields: aggregateRatingFields
176
- },
177
- config
178
- );
179
- }
180
-
181
- // src/schema/article/schema.ts
182
- var articleFields = [
183
- {
184
- name: "headline",
185
- title: "Headline",
186
- type: "string",
187
- required: { key: "headlineRequired", message: "Headline is required for Schema.org Article." }
188
- },
189
- {
190
- name: "description",
191
- title: "Description",
192
- type: "text",
193
- rows: 3
194
- },
195
- {
196
- name: "image",
197
- title: "Image",
198
- type: "url",
199
- description: "URL of the article image."
200
- },
201
- {
202
- name: "author",
203
- title: "Author",
204
- type: "object",
205
- jsonLdType: "Person",
206
- fields: [
207
- {
208
- name: "name",
209
- title: "Author Name",
210
- type: "string"
211
- }
212
- ]
213
- },
214
- {
215
- name: "publisher",
216
- title: "Publisher",
217
- type: "object",
218
- jsonLdType: "Organization",
219
- fields: [
220
- {
221
- name: "name",
222
- title: "Publisher Name",
223
- type: "string"
224
- },
225
- {
226
- name: "logo",
227
- title: "Publisher Logo",
228
- type: "object",
229
- jsonLdType: "ImageObject",
230
- fields: [
231
- {
232
- name: "url",
233
- title: "Logo URL",
234
- type: "url"
235
- }
236
- ]
237
- }
238
- ]
239
- },
240
- {
241
- name: "datePublished",
242
- title: "Date Published",
243
- type: "date"
244
- }
245
- ];
246
- function schemaOrgArticle(config = {}) {
247
- return generateSchemaType(
248
- {
249
- name: "schemaOrgArticle",
250
- title: "Schema.org \u2014 Article",
251
- icon: SchemaOrgIcons.article,
252
- fields: articleFields
253
- },
254
- config
255
- );
256
- }
257
-
258
- // src/schema/blogPosting/schema.ts
259
- var blogPostingFields = [
260
- {
261
- name: "headline",
262
- title: "Headline",
263
- type: "string",
264
- required: {
265
- key: "headlineRequired",
266
- message: "Headline is required for Schema.org BlogPosting."
267
- }
268
- },
269
- {
270
- name: "description",
271
- title: "Description",
272
- type: "text",
273
- rows: 3
274
- },
275
- {
276
- name: "author",
277
- title: "Author",
278
- type: "object",
279
- jsonLdType: "Person",
280
- fields: [
281
- {
282
- name: "name",
283
- title: "Author Name",
284
- type: "string"
285
- }
286
- ]
287
- },
288
- {
289
- name: "datePublished",
290
- title: "Date Published",
291
- type: "date"
292
- },
293
- {
294
- name: "mainEntityOfPage",
295
- title: "Main Entity of Page",
296
- type: "object",
297
- jsonLdType: "WebPage",
298
- fields: [
299
- {
300
- name: "id",
301
- title: "Page URL",
302
- type: "url",
303
- jsonLdKey: "@id"
304
- }
305
- ]
306
- }
307
- ];
308
- function schemaOrgBlogPosting(config = {}) {
309
- return generateSchemaType(
310
- {
311
- name: "schemaOrgBlogPosting",
312
- title: "Schema.org \u2014 BlogPosting",
313
- icon: SchemaOrgIcons.blogPosting,
314
- fields: blogPostingFields
315
- },
316
- config
317
- );
318
- }
319
-
320
- // src/schema/brand/schema.ts
321
- var brandFields = [
322
- {
323
- name: "name",
324
- title: "Brand Name",
325
- type: "string",
326
- description: "The name of the brand.",
327
- required: { key: "nameRequired", message: "Brand name is required for Schema.org." }
328
- }
329
- ];
330
- function schemaOrgBrand(config = {}) {
331
- return generateSchemaType(
332
- {
333
- name: "schemaOrgBrand",
334
- title: "Schema.org \u2014 Brand",
335
- icon: SchemaOrgIcons.brand,
336
- fields: brandFields
337
- },
338
- config
339
- );
340
- }
341
-
342
- // src/schema/breadcrumbList/schema.ts
343
- var breadcrumbListFields = [
344
- {
345
- name: "itemListElement",
346
- title: "Breadcrumb Items",
347
- type: "array",
348
- jsonLdType: "ListItem",
349
- fields: [
350
- {
351
- name: "position",
352
- title: "Position",
353
- type: "number",
354
- required: { key: "positionRequired", message: "Position is required." }
355
- },
356
- {
357
- name: "name",
358
- title: "Label",
359
- type: "string",
360
- required: { key: "nameRequired", message: "Label is required." }
361
- },
362
- {
363
- name: "item",
364
- title: "URL",
365
- type: "url"
366
- }
367
- ]
368
- }
369
- ];
370
- function schemaOrgBreadcrumbList(config = {}) {
371
- return generateSchemaType(
372
- {
373
- name: "schemaOrgBreadcrumbList",
374
- title: "Schema.org \u2014 BreadcrumbList",
375
- icon: SchemaOrgIcons.breadcrumbList,
376
- fields: breadcrumbListFields
377
- },
378
- config
379
- );
380
- }
381
-
382
- // src/schema/contactPoint/schema.ts
383
- var contactPointFields = [
384
- {
385
- name: "contactType",
386
- title: "Contact Type",
387
- type: "string",
388
- description: 'The type of contact, e.g. "customer support", "sales".',
389
- required: { key: "contactTypeRequired", message: "Contact type is required for Schema.org." },
390
- initialValue: "customer support",
391
- options: [
392
- { title: "Customer Support", value: "customer support" },
393
- { title: "Sales", value: "sales" },
394
- { title: "Technical Support", value: "technical support" },
395
- { title: "Billing", value: "billing" },
396
- { title: "General Inquiry", value: "general inquiry" }
397
- ]
398
- },
399
- {
400
- name: "email",
401
- title: "Email",
402
- type: "string",
403
- description: "Contact email address."
404
- },
405
- {
406
- name: "telephone",
407
- title: "Telephone",
408
- type: "string",
409
- description: "Contact telephone number."
410
- },
411
- {
412
- name: "availableLanguage",
413
- title: "Available Languages",
414
- type: "array",
415
- of: [{ type: "string" }],
416
- description: 'Languages supported by this contact point, e.g. "English", "Spanish".',
417
- initialValue: ["English"]
418
- }
419
- ];
420
- function schemaOrgContactPoint(config = {}) {
421
- return generateSchemaType(
422
- {
423
- name: "schemaOrgContactPoint",
424
- title: "Schema.org \u2014 ContactPoint",
425
- icon: SchemaOrgIcons.contactPoint,
426
- fields: contactPointFields
427
- },
428
- config
429
- );
430
- }
431
-
432
- // src/schema/course/schema.ts
433
- var courseFields = [
434
- {
435
- name: "name",
436
- title: "Course Name",
437
- type: "string",
438
- description: "The name of the course.",
439
- required: { key: "nameRequired", message: "Course name is required for Schema.org." }
440
- },
441
- {
442
- name: "description",
443
- title: "Description",
444
- type: "text",
445
- rows: 3,
446
- description: "A short description of the course."
447
- },
448
- {
449
- name: "provider",
450
- title: "Provider",
451
- type: "object",
452
- description: "The organization that provides this course.",
453
- jsonLdType: "Organization",
454
- fields: [
455
- {
456
- name: "name",
457
- title: "Provider Name",
458
- type: "string",
459
- description: "Name of the providing organization."
460
- },
461
- {
462
- name: "sameAs",
463
- title: "Provider URL",
464
- type: "url",
465
- description: "URL of the providing organization."
466
- }
467
- ]
468
- }
469
- ];
470
- function schemaOrgCourse(config = {}) {
471
- return generateSchemaType(
472
- {
473
- name: "schemaOrgCourse",
474
- title: "Schema.org \u2014 Course",
475
- icon: SchemaOrgIcons.course,
476
- fields: courseFields
477
- },
478
- config
479
- );
480
- }
481
-
482
- // src/schema/event/schema.ts
483
- var eventFields = [
484
- {
485
- name: "name",
486
- title: "Event Name",
487
- type: "string",
488
- description: "The name of the event.",
489
- required: { key: "nameRequired", message: "Event name is required for Schema.org." }
490
- },
491
- {
492
- name: "startDate",
493
- title: "Start Date",
494
- type: "date",
495
- description: "The start date of the event."
496
- },
497
- {
498
- name: "location",
499
- title: "Location",
500
- type: "object",
501
- description: "The location where the event takes place.",
502
- jsonLdType: "Place",
503
- fields: [
504
- {
505
- name: "name",
506
- title: "Venue Name",
507
- type: "string",
508
- description: "Name of the venue or location."
509
- },
510
- {
511
- name: "address",
512
- title: "Address",
513
- type: "string",
514
- description: "Full address as a single string."
515
- }
516
- ]
517
- }
518
- ];
519
- function schemaOrgEvent(config = {}) {
520
- return generateSchemaType(
521
- {
522
- name: "schemaOrgEvent",
523
- title: "Schema.org \u2014 Event",
524
- icon: SchemaOrgIcons.event,
525
- fields: eventFields
526
- },
527
- config
528
- );
529
- }
530
-
531
- // src/schema/faqPage/schema.ts
532
- var faqPageFields = [
533
- {
534
- name: "mainEntity",
535
- title: "FAQ Items",
536
- type: "array",
537
- jsonLdType: "Question",
538
- fields: [
539
- {
540
- name: "name",
541
- title: "Question",
542
- type: "string",
543
- required: { key: "questionRequired", message: "Question text is required." }
544
- },
545
- {
546
- name: "acceptedAnswer",
547
- title: "Accepted Answer",
548
- type: "object",
549
- jsonLdType: "Answer",
550
- fields: [
551
- {
552
- name: "text",
553
- title: "Answer Text",
554
- type: "text",
555
- rows: 3
556
- }
557
- ]
558
- }
559
- ]
560
- }
561
- ];
562
- function schemaOrgFAQPage(config = {}) {
563
- return generateSchemaType(
564
- {
565
- name: "schemaOrgFAQPage",
566
- title: "Schema.org \u2014 FAQPage",
567
- icon: SchemaOrgIcons.faqPage,
568
- fields: faqPageFields
569
- },
570
- config
571
- );
572
- }
573
-
574
- // src/schema/howTo/schema.ts
575
- var howToFields = [
576
- {
577
- name: "name",
578
- title: "Name",
579
- type: "string",
580
- required: { key: "nameRequired", message: "Name is required for Schema.org HowTo." }
581
- },
582
- {
583
- name: "description",
584
- title: "Description",
585
- type: "text",
586
- rows: 3
587
- },
588
- {
589
- name: "step",
590
- title: "Steps",
591
- type: "array",
592
- jsonLdType: "HowToStep",
593
- fields: [
594
- {
595
- name: "name",
596
- title: "Step Name",
597
- type: "string",
598
- required: { key: "stepNameRequired", message: "Step name is required." }
599
- },
600
- {
601
- name: "text",
602
- title: "Step Description",
603
- type: "text",
604
- rows: 2
605
- }
606
- ]
607
- }
608
- ];
609
- function schemaOrgHowTo(config = {}) {
610
- return generateSchemaType(
611
- {
612
- name: "schemaOrgHowTo",
613
- title: "Schema.org \u2014 HowTo",
614
- icon: SchemaOrgIcons.howTo,
615
- fields: howToFields
616
- },
617
- config
618
- );
619
- }
620
-
621
- // src/schema/imageObject/schema.ts
622
- var imageObjectFields = [
623
- {
624
- name: "url",
625
- title: "Image URL",
626
- type: "url",
627
- description: "The URL of the image.",
628
- required: { key: "urlRequired", message: "Image URL is required for Schema.org." }
629
- },
630
- {
631
- name: "width",
632
- title: "Width",
633
- type: "number",
634
- description: "Image width in pixels."
635
- },
636
- {
637
- name: "height",
638
- title: "Height",
639
- type: "number",
640
- description: "Image height in pixels."
641
- },
642
- {
643
- name: "caption",
644
- title: "Caption",
645
- type: "string",
646
- description: "Caption or alt text for the image."
647
- }
648
- ];
649
- function schemaOrgImageObject(config = {}) {
650
- return generateSchemaType(
651
- {
652
- name: "schemaOrgImageObject",
653
- title: "Schema.org \u2014 ImageObject",
654
- icon: SchemaOrgIcons.imageObject,
655
- fields: imageObjectFields
656
- },
657
- config
658
- );
659
- }
660
-
661
- // src/schema/localBusiness/schema.ts
662
- var localBusinessFields = [
663
- {
664
- name: "name",
665
- title: "Business Name",
666
- type: "string",
667
- description: "The official name of the business.",
668
- required: { key: "nameRequired", message: "Business name is required for Schema.org." }
669
- },
670
- {
671
- name: "image",
672
- title: "Image URL",
673
- type: "url",
674
- description: "URL to the business image."
675
- },
676
- {
677
- name: "telephone",
678
- title: "Telephone",
679
- type: "string",
680
- description: "The telephone number of the business."
681
- },
682
- {
683
- name: "address",
684
- title: "Address",
685
- type: "object",
686
- description: "The physical address of the business.",
687
- jsonLdType: "PostalAddress",
688
- fields: [
689
- {
690
- name: "streetAddress",
691
- title: "Street Address",
692
- type: "string"
693
- },
694
- {
695
- name: "addressLocality",
696
- title: "Locality",
697
- type: "string",
698
- description: "City or town."
699
- },
700
- {
701
- name: "addressCountry",
702
- title: "Country",
703
- type: "string",
704
- description: 'Country code, e.g. "US".'
705
- }
706
- ]
707
- }
708
- ];
709
- function schemaOrgLocalBusiness(config = {}) {
710
- return generateSchemaType(
711
- {
712
- name: "schemaOrgLocalBusiness",
713
- title: "Schema.org \u2014 LocalBusiness",
714
- icon: SchemaOrgIcons.localBusiness,
715
- fields: localBusinessFields
716
- },
717
- config
718
- );
719
- }
720
-
721
- // src/schema/offer/schema.ts
722
- var offerFields = [
723
- {
724
- name: "price",
725
- title: "Price",
726
- type: "string",
727
- description: 'The price of the offer, e.g. "199.99".',
728
- required: { key: "priceRequired", message: "Price is required for Schema.org." }
729
- },
730
- {
731
- name: "priceCurrency",
732
- title: "Currency",
733
- type: "string",
734
- description: 'The currency of the price, e.g. "USD".',
735
- initialValue: "USD",
736
- options: [
737
- { title: "USD", value: "USD" },
738
- { title: "EUR", value: "EUR" },
739
- { title: "GBP", value: "GBP" },
740
- { title: "INR", value: "INR" },
741
- { title: "JPY", value: "JPY" },
742
- { title: "CAD", value: "CAD" },
743
- { title: "AUD", value: "AUD" }
744
- ]
745
- },
746
- {
747
- name: "availability",
748
- title: "Availability",
749
- type: "url",
750
- description: 'Schema.org availability URL, e.g. "https://schema.org/InStock".'
751
- },
752
- {
753
- name: "url",
754
- title: "Offer URL",
755
- type: "url",
756
- description: "URL of the offer page."
757
- }
758
- ];
759
- function schemaOrgOffer(config = {}) {
760
- return generateSchemaType(
761
- {
762
- name: "schemaOrgOffer",
763
- title: "Schema.org \u2014 Offer",
764
- icon: SchemaOrgIcons.offer,
765
- fields: offerFields
766
- },
767
- config
768
- );
769
- }
770
-
771
- // src/schema/person/schema.ts
772
- var personFields = [
773
- {
774
- name: "name",
775
- title: "Full Name",
776
- type: "string",
777
- description: "The full name of the person.",
778
- required: { key: "nameRequired", message: "Person name is required for Schema.org." }
779
- },
780
- {
781
- name: "jobTitle",
782
- title: "Job Title",
783
- type: "string",
784
- description: "The job title or role of the person."
785
- },
786
- {
787
- name: "url",
788
- title: "Profile URL",
789
- type: "url",
790
- description: "URL of the person's profile or personal website."
791
- },
792
- {
793
- name: "imageUrl",
794
- title: "Image URL",
795
- type: "url",
796
- description: "URL to a photo/image of this person.",
797
- jsonLdKey: "image"
798
- },
799
- {
800
- name: "sameAs",
801
- title: "Social / External Profiles",
802
- type: "array",
803
- of: [{ type: "url" }],
804
- description: "URLs of social media profiles and other authoritative pages (LinkedIn, GitHub, etc.)."
805
- },
806
- {
807
- name: "worksFor",
808
- title: "Works For",
809
- type: "object",
810
- description: "The organization this person works for.",
811
- jsonLdType: "Organization",
812
- fields: [
813
- {
814
- name: "name",
815
- title: "Organization Name",
816
- type: "string",
817
- description: "Name of the organization."
818
- }
819
- ]
820
- }
821
- ];
822
- function schemaOrgPerson(config = {}) {
823
- return generateSchemaType(
824
- {
825
- name: "schemaOrgPerson",
826
- title: "Schema.org \u2014 Person",
827
- icon: SchemaOrgIcons.person,
828
- fields: personFields
829
- },
830
- config
831
- );
832
- }
833
-
834
- // src/schema/place/schema.ts
835
- var placeFields = [
836
- {
837
- name: "name",
838
- title: "Place Name",
839
- type: "string",
840
- description: "The name of the place.",
841
- required: { key: "nameRequired", message: "Place name is required for Schema.org." }
842
- },
843
- {
844
- name: "address",
845
- title: "Address",
846
- type: "object",
847
- description: "The physical address of the place.",
848
- jsonLdType: "PostalAddress",
849
- fields: [
850
- {
851
- name: "addressLocality",
852
- title: "Locality",
853
- type: "string",
854
- description: "City or town."
855
- },
856
- {
857
- name: "addressCountry",
858
- title: "Country",
859
- type: "string",
860
- description: 'Country code, e.g. "US".'
861
- }
862
- ]
863
- }
864
- ];
865
- function schemaOrgPlace(config = {}) {
866
- return generateSchemaType(
867
- {
868
- name: "schemaOrgPlace",
869
- title: "Schema.org \u2014 Place",
870
- icon: SchemaOrgIcons.place,
871
- fields: placeFields
872
- },
873
- config
874
- );
875
- }
876
-
877
- // src/schema/postalAddress/schema.ts
878
- var postalAddressFields = [
879
- {
880
- name: "streetAddress",
881
- title: "Street Address",
882
- type: "string",
883
- description: 'The street address, e.g. "123 Main St".'
884
- },
885
- {
886
- name: "addressLocality",
887
- title: "City / Locality",
888
- type: "string",
889
- description: 'The city or locality, e.g. "New York".'
890
- },
891
- {
892
- name: "postalCode",
893
- title: "Postal Code",
894
- type: "string",
895
- description: 'The postal or ZIP code, e.g. "10001".'
896
- },
897
- {
898
- name: "addressCountry",
899
- title: "Country",
900
- type: "string",
901
- description: 'The country code, e.g. "US".'
902
- }
903
- ];
904
- function schemaOrgPostalAddress(config = {}) {
905
- return generateSchemaType(
906
- {
907
- name: "schemaOrgPostalAddress",
908
- title: "Schema.org \u2014 PostalAddress",
909
- icon: SchemaOrgIcons.postalAddress,
910
- fields: postalAddressFields
911
- },
912
- config
913
- );
914
- }
915
-
916
- // src/schema/product/schema.ts
917
- var productFields = [
918
- {
919
- name: "name",
920
- title: "Product Name",
921
- type: "string",
922
- description: "The name of the product.",
923
- required: { key: "nameRequired", message: "Product name is required for Schema.org." }
924
- },
925
- {
926
- name: "imageUrl",
927
- title: "Image URL",
928
- type: "url",
929
- description: "URL to the product image.",
930
- jsonLdKey: "image"
931
- },
932
- {
933
- name: "description",
934
- title: "Description",
935
- type: "text",
936
- rows: 3,
937
- description: "A short description of the product."
938
- },
939
- {
940
- name: "brand",
941
- title: "Brand",
942
- type: "object",
943
- description: "The brand of the product.",
944
- jsonLdType: "Brand",
945
- fields: [
946
- {
947
- name: "name",
948
- title: "Brand Name",
949
- type: "string",
950
- description: "Name of the brand."
951
- }
952
- ]
953
- }
954
- ];
955
- function schemaOrgProduct(config = {}) {
956
- return generateSchemaType(
957
- {
958
- name: "schemaOrgProduct",
959
- title: "Schema.org \u2014 Product",
960
- icon: SchemaOrgIcons.product,
961
- fields: productFields
962
- },
963
- config
964
- );
965
- }
966
-
967
- // src/schema/review/schema.ts
968
- var reviewFields = [
969
- {
970
- name: "reviewRating",
971
- title: "Review Rating",
972
- type: "object",
973
- jsonLdType: "Rating",
974
- fields: [
975
- {
976
- name: "ratingValue",
977
- title: "Rating Value",
978
- type: "string",
979
- required: {
980
- key: "ratingValueRequired",
981
- message: "Rating value is required for Schema.org Review."
982
- }
983
- }
984
- ]
985
- },
986
- {
987
- name: "author",
988
- title: "Author",
989
- type: "object",
990
- jsonLdType: "Person",
991
- fields: [
992
- {
993
- name: "name",
994
- title: "Author Name",
995
- type: "string",
996
- required: {
997
- key: "authorNameRequired",
998
- message: "Author name is required for Schema.org Review."
999
- }
1000
- }
1001
- ]
1002
- },
1003
- {
1004
- name: "reviewBody",
1005
- title: "Review Body",
1006
- type: "text",
1007
- rows: 3
1008
- }
1009
- ];
1010
- function schemaOrgReview(config = {}) {
1011
- return generateSchemaType(
1012
- {
1013
- name: "schemaOrgReview",
1014
- title: "Schema.org \u2014 Review",
1015
- icon: SchemaOrgIcons.review,
1016
- fields: reviewFields
1017
- },
1018
- config
1019
- );
1020
- }
1021
-
1022
- // src/schema/softwareApplication/schema.ts
1023
- var softwareApplicationFields = [
1024
- {
1025
- name: "name",
1026
- title: "Application Name",
1027
- type: "string",
1028
- description: "The name of the software application.",
1029
- required: {
1030
- key: "nameRequired",
1031
- message: "Application name is required for Schema.org."
1032
- }
1033
- },
1034
- {
1035
- name: "applicationCategory",
1036
- title: "Application Category",
1037
- type: "string",
1038
- description: "The category of the application.",
1039
- options: [
1040
- { title: "Developer Application", value: "DeveloperApplication" },
1041
- { title: "Business Application", value: "BusinessApplication" },
1042
- { title: "Game Application", value: "GameApplication" },
1043
- { title: "Educational Application", value: "EducationalApplication" },
1044
- { title: "Utilities Application", value: "UtilitiesApplication" },
1045
- { title: "Social Networking Application", value: "SocialNetworkingApplication" }
1046
- ]
1047
- },
1048
- {
1049
- name: "operatingSystem",
1050
- title: "Operating System",
1051
- type: "string",
1052
- description: 'The supported operating systems, e.g. "Windows, macOS".'
1053
- },
1054
- {
1055
- name: "url",
1056
- title: "Application URL",
1057
- type: "url",
1058
- description: "URL of the software application."
1059
- }
1060
- ];
1061
- function schemaOrgSoftwareApplication(config = {}) {
1062
- return generateSchemaType(
1063
- {
1064
- name: "schemaOrgSoftwareApplication",
1065
- title: "Schema.org \u2014 SoftwareApplication",
1066
- icon: SchemaOrgIcons.softwareApplication,
1067
- fields: softwareApplicationFields
1068
- },
1069
- config
1070
- );
1071
- }
1072
-
1073
- // src/schema/videoObject/schema.ts
1074
- var videoObjectFields = [
1075
- {
1076
- name: "name",
1077
- title: "Video Name",
1078
- type: "string",
1079
- description: "The name of the video.",
1080
- required: { key: "nameRequired", message: "Video name is required for Schema.org." }
1081
- },
1082
- {
1083
- name: "description",
1084
- title: "Description",
1085
- type: "text",
1086
- rows: 3,
1087
- description: "A description of the video."
1088
- },
1089
- {
1090
- name: "thumbnailUrl",
1091
- title: "Thumbnail URL",
1092
- type: "url",
1093
- description: "URL of the video thumbnail image."
1094
- },
1095
- {
1096
- name: "uploadDate",
1097
- title: "Upload Date",
1098
- type: "date",
1099
- description: "The date the video was uploaded."
1100
- },
1101
- {
1102
- name: "contentUrl",
1103
- title: "Content URL",
1104
- type: "url",
1105
- description: "URL to the actual video file."
1106
- }
1107
- ];
1108
- function schemaOrgVideoObject(config = {}) {
1109
- return generateSchemaType(
1110
- {
1111
- name: "schemaOrgVideoObject",
1112
- title: "Schema.org \u2014 VideoObject",
1113
- icon: SchemaOrgIcons.videoObject,
1114
- fields: videoObjectFields
1115
- },
1116
- config
1117
- );
1118
- }
1119
-
1120
- // src/schema/webApplication/schema.ts
1121
- var webApplicationFields = [
1122
- {
1123
- name: "name",
1124
- title: "Application Name",
1125
- type: "string",
1126
- description: "The name of the web application.",
1127
- required: {
1128
- key: "nameRequired",
1129
- message: "Application name is required for Schema.org."
1130
- }
1131
- },
1132
- {
1133
- name: "url",
1134
- title: "Application URL",
1135
- type: "url",
1136
- description: "URL of the web application.",
1137
- required: { key: "urlRequired", message: "Application URL is required for Schema.org." }
1138
- },
1139
- {
1140
- name: "applicationCategory",
1141
- title: "Application Category",
1142
- type: "string",
1143
- description: "The category of the application.",
1144
- options: [
1145
- { title: "Developer Application", value: "DeveloperApplication" },
1146
- { title: "Business Application", value: "BusinessApplication" },
1147
- { title: "Game Application", value: "GameApplication" },
1148
- { title: "Educational Application", value: "EducationalApplication" },
1149
- { title: "Utilities Application", value: "UtilitiesApplication" },
1150
- { title: "Social Networking Application", value: "SocialNetworkingApplication" }
1151
- ]
1152
- },
1153
- {
1154
- name: "operatingSystem",
1155
- title: "Operating System",
1156
- type: "string",
1157
- description: "The supported operating systems.",
1158
- initialValue: "All"
1159
- }
1160
- ];
1161
- function schemaOrgWebApplication(config = {}) {
1162
- return generateSchemaType(
1163
- {
1164
- name: "schemaOrgWebApplication",
1165
- title: "Schema.org \u2014 WebApplication",
1166
- icon: SchemaOrgIcons.webApplication,
1167
- fields: webApplicationFields
1168
- },
1169
- config
1170
- );
1171
- }
1172
-
1173
- // src/schema/webPage/schema.ts
1174
- var webPageFields = [
1175
- {
1176
- name: "name",
1177
- title: "Page Name",
1178
- type: "string",
1179
- description: "The title of the page.",
1180
- required: { key: "nameRequired", message: "Page name is required for Schema.org." }
1181
- },
1182
- {
1183
- name: "url",
1184
- title: "Page URL",
1185
- type: "url",
1186
- description: "The full URL of the page.",
1187
- required: { key: "urlRequired", message: "Page URL is required for Schema.org." }
1188
- },
1189
- {
1190
- name: "description",
1191
- title: "Description",
1192
- type: "text",
1193
- rows: 3,
1194
- description: "A short description of the page."
1195
- },
1196
- {
1197
- name: "inLanguage",
1198
- title: "Language",
1199
- type: "string",
1200
- description: 'The language of the page content, e.g. "en".',
1201
- initialValue: "en",
1202
- options: [
1203
- { title: "English", value: "en" },
1204
- { title: "Spanish", value: "es" },
1205
- { title: "French", value: "fr" },
1206
- { title: "German", value: "de" },
1207
- { title: "Portuguese", value: "pt" },
1208
- { title: "Italian", value: "it" },
1209
- { title: "Dutch", value: "nl" },
1210
- { title: "Japanese", value: "ja" },
1211
- { title: "Chinese", value: "zh" },
1212
- { title: "Korean", value: "ko" },
1213
- { title: "Hindi", value: "hi" },
1214
- { title: "Arabic", value: "ar" }
1215
- ]
1216
- },
1217
- {
1218
- name: "isPartOf",
1219
- title: "Part Of (Website)",
1220
- type: "object",
1221
- description: "The website this page belongs to.",
1222
- jsonLdType: "WebSite",
1223
- fields: [
1224
- {
1225
- name: "url",
1226
- title: "Website URL",
1227
- type: "url",
1228
- description: "URL of the parent website."
1229
- }
1230
- ]
1231
- }
1232
- ];
1233
- function schemaOrgWebPage(config = {}) {
1234
- return generateSchemaType(
1235
- {
1236
- name: "schemaOrgWebPage",
1237
- title: "Schema.org \u2014 WebPage",
1238
- icon: SchemaOrgIcons.webPage,
1239
- fields: webPageFields
1240
- },
1241
- config
1242
- );
1243
- }
1244
-
1245
- exports.SchemaOrgIcons = SchemaOrgIcons;
1246
- exports.aggregateRatingFields = aggregateRatingFields;
1247
- exports.articleFields = articleFields;
1248
- exports.blogPostingFields = blogPostingFields;
1249
- exports.brandFields = brandFields;
1250
- exports.breadcrumbListFields = breadcrumbListFields;
1251
- exports.buildGenericJsonLd = buildGenericJsonLd;
1252
- exports.contactPointFields = contactPointFields;
1253
- exports.courseFields = courseFields;
1254
- exports.eventFields = eventFields;
1255
- exports.faqPageFields = faqPageFields;
1256
- exports.generateSchemaType = generateSchemaType;
1257
- exports.howToFields = howToFields;
1258
- exports.imageObjectFields = imageObjectFields;
1259
- exports.localBusinessFields = localBusinessFields;
1260
- exports.offerFields = offerFields;
1261
- exports.personFields = personFields;
1262
- exports.placeFields = placeFields;
1263
- exports.postalAddressFields = postalAddressFields;
1264
- exports.productFields = productFields;
1265
- exports.reviewFields = reviewFields;
1266
- exports.schemaOrgAggregateRating = schemaOrgAggregateRating;
1267
- exports.schemaOrgArticle = schemaOrgArticle;
1268
- exports.schemaOrgBlogPosting = schemaOrgBlogPosting;
1269
- exports.schemaOrgBrand = schemaOrgBrand;
1270
- exports.schemaOrgBreadcrumbList = schemaOrgBreadcrumbList;
1271
- exports.schemaOrgContactPoint = schemaOrgContactPoint;
1272
- exports.schemaOrgCourse = schemaOrgCourse;
1273
- exports.schemaOrgEvent = schemaOrgEvent;
1274
- exports.schemaOrgFAQPage = schemaOrgFAQPage;
1275
- exports.schemaOrgHowTo = schemaOrgHowTo;
1276
- exports.schemaOrgImageObject = schemaOrgImageObject;
1277
- exports.schemaOrgLocalBusiness = schemaOrgLocalBusiness;
1278
- exports.schemaOrgOffer = schemaOrgOffer;
1279
- exports.schemaOrgPerson = schemaOrgPerson;
1280
- exports.schemaOrgPlace = schemaOrgPlace;
1281
- exports.schemaOrgPostalAddress = schemaOrgPostalAddress;
1282
- exports.schemaOrgProduct = schemaOrgProduct;
1283
- exports.schemaOrgReview = schemaOrgReview;
1284
- exports.schemaOrgSoftwareApplication = schemaOrgSoftwareApplication;
1285
- exports.schemaOrgVideoObject = schemaOrgVideoObject;
1286
- exports.schemaOrgWebApplication = schemaOrgWebApplication;
1287
- exports.schemaOrgWebPage = schemaOrgWebPage;
1288
- exports.softwareApplicationFields = softwareApplicationFields;
1289
- exports.videoObjectFields = videoObjectFields;
1290
- exports.webApplicationFields = webApplicationFields;
1291
- exports.webPageFields = webPageFields;
1292
- //# sourceMappingURL=chunk-D2GWRRK5.cjs.map
1293
- //# sourceMappingURL=chunk-D2GWRRK5.cjs.map