sanity-plugin-seofields 1.6.4 → 1.7.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 (72) hide show
  1. package/README.md +355 -79
  2. package/dist/SeoHealthDashboard-IP5BJ322.cjs +10 -0
  3. package/dist/{SeoHealthDashboard-D3XU3CUB.cjs.map → SeoHealthDashboard-IP5BJ322.cjs.map} +1 -1
  4. package/dist/SeoHealthDashboard-PTUEVYZL.js +4 -0
  5. package/dist/{SeoHealthDashboard-BEZVLLFG.js.map → SeoHealthDashboard-PTUEVYZL.js.map} +1 -1
  6. package/dist/{SeoHealthTool-4VZMD4TR.cjs → SeoHealthTool-CZZRMWQK.cjs} +4 -4
  7. package/dist/SeoHealthTool-CZZRMWQK.cjs.map +1 -0
  8. package/dist/{SeoHealthTool-BSTYAKQS.js → SeoHealthTool-IULT4G25.js} +3 -3
  9. package/dist/SeoHealthTool-IULT4G25.js.map +1 -0
  10. package/dist/{SeoPreview-XVAZYHCL.js → SeoPreview-KEGGQSPJ.js} +5 -4
  11. package/dist/{SeoPreview-PYYVZMY3.cjs.map → SeoPreview-KEGGQSPJ.js.map} +1 -1
  12. package/dist/{SeoPreview-PYYVZMY3.cjs → SeoPreview-WYH7NYNM.cjs} +6 -5
  13. package/dist/SeoPreview-WYH7NYNM.cjs.map +1 -0
  14. package/dist/{chunk-BHIZQLY7.cjs → chunk-5YRH47VQ.cjs} +23 -26
  15. package/dist/chunk-5YRH47VQ.cjs.map +1 -0
  16. package/dist/{chunk-BCTPOWXA.cjs → chunk-ARELX3GK.cjs} +131 -111
  17. package/dist/chunk-ARELX3GK.cjs.map +1 -0
  18. package/dist/{chunk-HQTYQMP5.js → chunk-AW7OKBQQ.js} +23 -26
  19. package/dist/chunk-AW7OKBQQ.js.map +1 -0
  20. package/dist/{chunk-XXA6WCWS.js → chunk-FONJYVF2.js} +22 -4
  21. package/dist/chunk-FONJYVF2.js.map +1 -0
  22. package/dist/{chunk-YHXUWGNA.cjs → chunk-GWPOJSGW.cjs} +99 -3
  23. package/dist/chunk-GWPOJSGW.cjs.map +1 -0
  24. package/dist/{chunk-25JLWVEU.js → chunk-HDZZQCH7.js} +14 -8
  25. package/dist/chunk-HDZZQCH7.js.map +1 -0
  26. package/dist/{chunk-KTL6NYNG.js → chunk-HRKRV2X7.js} +98 -4
  27. package/dist/chunk-HRKRV2X7.js.map +1 -0
  28. package/dist/{chunk-IFDLKZET.cjs → chunk-ZBHLMQTS.cjs} +14 -8
  29. package/dist/chunk-ZBHLMQTS.cjs.map +1 -0
  30. package/dist/cli.js +1 -1
  31. package/dist/{component-H52blyfc.d.ts → component-D1sBm6ts.d.cts} +9 -3
  32. package/dist/{component-CIE6Sy4F.d.cts → component-DQ4KuQQD.d.ts} +9 -3
  33. package/dist/index.cjs +42 -17
  34. package/dist/index.cjs.map +1 -1
  35. package/dist/index.d.cts +96 -4
  36. package/dist/index.d.ts +96 -4
  37. package/dist/index.js +34 -9
  38. package/dist/index.js.map +1 -1
  39. package/dist/next.cjs +85 -77
  40. package/dist/next.d.cts +3 -3
  41. package/dist/next.d.ts +3 -3
  42. package/dist/next.js +2 -2
  43. package/dist/schema/next.cjs +88 -80
  44. package/dist/schema/next.d.cts +4 -4
  45. package/dist/schema/next.d.ts +4 -4
  46. package/dist/schema/next.js +3 -3
  47. package/dist/schema.cjs +173 -153
  48. package/dist/schema.cjs.map +1 -1
  49. package/dist/schema.d.cts +10 -6
  50. package/dist/schema.d.ts +10 -6
  51. package/dist/schema.js +18 -3
  52. package/dist/schema.js.map +1 -1
  53. package/dist/{types-BxcJinOf.d.cts → types-9_wbCIi9.d.ts} +20 -2
  54. package/dist/{types-BtSRRG6C.d.cts → types-B91ena4g.d.cts} +1 -16
  55. package/dist/{types-BtSRRG6C.d.ts → types-B91ena4g.d.ts} +1 -16
  56. package/dist/{types-Dp9Pfnt9.d.ts → types-Bb49oRBV.d.cts} +20 -2
  57. package/dist/{types-CbYb4MsN.d.ts → types-CeBULNFF.d.ts} +1 -1
  58. package/dist/{types-CyRdIF-3.d.cts → types-_wBLg6RV.d.cts} +1 -1
  59. package/package.json +1 -1
  60. package/dist/SeoHealthDashboard-BEZVLLFG.js +0 -4
  61. package/dist/SeoHealthDashboard-D3XU3CUB.cjs +0 -10
  62. package/dist/SeoHealthTool-4VZMD4TR.cjs.map +0 -1
  63. package/dist/SeoHealthTool-BSTYAKQS.js.map +0 -1
  64. package/dist/SeoPreview-XVAZYHCL.js.map +0 -1
  65. package/dist/chunk-25JLWVEU.js.map +0 -1
  66. package/dist/chunk-BCTPOWXA.cjs.map +0 -1
  67. package/dist/chunk-BHIZQLY7.cjs.map +0 -1
  68. package/dist/chunk-HQTYQMP5.js.map +0 -1
  69. package/dist/chunk-IFDLKZET.cjs.map +0 -1
  70. package/dist/chunk-KTL6NYNG.js.map +0 -1
  71. package/dist/chunk-XXA6WCWS.js.map +0 -1
  72. package/dist/chunk-YHXUWGNA.cjs.map +0 -1
@@ -1267,7 +1267,7 @@ function handleSelectVariant(field, value, result, key) {
1267
1267
  return true;
1268
1268
  }
1269
1269
  const nestedSrc = obj[active.value];
1270
- if (typeof nestedSrc !== "object" || nestedSrc === null) return false;
1270
+ if (typeof nestedSrc !== "object" || nestedSrc === null) return true;
1271
1271
  const nested = buildNestedJsonLd(
1272
1272
  nestedSrc,
1273
1273
  active.fields,
@@ -1388,6 +1388,7 @@ var SchemaOrgIcons = {
1388
1388
  movie: icons.PlayIcon,
1389
1389
  book: icons.BookIcon,
1390
1390
  newsArticle: icons.DocumentTextIcon,
1391
+ opinionNewsArticle: icons.DocumentTextIcon,
1391
1392
  itemList: icons.ListIcon,
1392
1393
  profilePage: icons.UserIcon,
1393
1394
  musicRecording: icons.PlayIcon,
@@ -2889,6 +2890,99 @@ function schemaOrgOffer(config = {}) {
2889
2890
  );
2890
2891
  }
2891
2892
 
2893
+ // src/schema/opinionNewsArticle/schema.ts
2894
+ var opinionNewsArticleFields = [
2895
+ headlineField({
2896
+ required: { key: "headlineRequired", message: "Headline is required." },
2897
+ description: "The headline of the opinion piece (max 110 characters recommended)."
2898
+ }),
2899
+ descriptionField({
2900
+ description: "A short summary of the opinion piece (max 200 characters recommended)."
2901
+ }),
2902
+ polymorphicImage({ description: "Lead image for the article." }),
2903
+ polymorphicAuthor({
2904
+ description: "The author of the opinion piece. Use the Person variant with Job Title and Same As profile links to strengthen E-E-A-T signals."
2905
+ }),
2906
+ polymorphicPublisher({ description: "The publisher of the article." }),
2907
+ datePublishedField({
2908
+ dateType: "datetime",
2909
+ description: "When the article was first published.",
2910
+ required: { key: "datePublishedRequired", message: "Publication date is required." }
2911
+ }),
2912
+ {
2913
+ name: "dateModified",
2914
+ title: "Date Modified",
2915
+ type: "datetime",
2916
+ description: "When the article was last modified."
2917
+ },
2918
+ {
2919
+ name: "articleSection",
2920
+ title: "Article Section",
2921
+ type: "string",
2922
+ description: 'The section of the publication, e.g. "Opinion", "Editorial".'
2923
+ },
2924
+ {
2925
+ name: "articleBody",
2926
+ title: "Article Body",
2927
+ type: "text",
2928
+ rows: 6,
2929
+ description: "The actual body text of the opinion piece."
2930
+ },
2931
+ {
2932
+ name: "dateline",
2933
+ title: "Dateline",
2934
+ type: "string",
2935
+ description: 'The location from which the piece was filed, e.g. "Washington, D.C.".'
2936
+ },
2937
+ {
2938
+ name: "printColumn",
2939
+ title: "Print Column",
2940
+ type: "string",
2941
+ description: "The number of the column in which the article appears in the print edition."
2942
+ },
2943
+ {
2944
+ name: "printEdition",
2945
+ title: "Print Edition",
2946
+ type: "string",
2947
+ description: "The edition of the print product in which the article appears."
2948
+ },
2949
+ {
2950
+ name: "printPage",
2951
+ title: "Print Page",
2952
+ type: "string",
2953
+ description: 'The exact name of the page on which the article is found in print, e.g. "A5", "B18".'
2954
+ },
2955
+ {
2956
+ name: "printSection",
2957
+ title: "Print Section",
2958
+ type: "string",
2959
+ description: "The print section in which the article appeared."
2960
+ },
2961
+ {
2962
+ name: "backstory",
2963
+ title: "Backstory",
2964
+ type: "text",
2965
+ rows: 3,
2966
+ description: "Sources, context, and provenance behind this opinion piece."
2967
+ }
2968
+ ];
2969
+ function schemaOrgOpinionNewsArticle(config = {}) {
2970
+ return generateSchemaType(
2971
+ {
2972
+ name: "schemaOrgOpinionNewsArticle",
2973
+ title: "OpinionNewsArticle",
2974
+ icon: SchemaOrgIcons.opinionNewsArticle,
2975
+ fields: opinionNewsArticleFields,
2976
+ customPrepareSubtitle: (document) => {
2977
+ const headline = document.headline || "Untitled";
2978
+ const section = document.articleSection ? ` \xB7 ${document.articleSection}` : "";
2979
+ return `${headline}${section}`;
2980
+ }
2981
+ },
2982
+ config
2983
+ );
2984
+ }
2985
+
2892
2986
  // src/schema/person/schema.ts
2893
2987
  var personFields = [
2894
2988
  nameField({
@@ -3949,6 +4043,7 @@ exports.musicRecordingFields = musicRecordingFields;
3949
4043
  exports.nameField = nameField;
3950
4044
  exports.newsArticleFields = newsArticleFields;
3951
4045
  exports.offerFields = offerFields;
4046
+ exports.opinionNewsArticleFields = opinionNewsArticleFields;
3952
4047
  exports.personFields = personFields;
3953
4048
  exports.placeFields = placeFields;
3954
4049
  exports.polymorphicAdditionalType = polymorphicAdditionalType;
@@ -4002,6 +4097,7 @@ exports.schemaOrgMusicAlbum = schemaOrgMusicAlbum;
4002
4097
  exports.schemaOrgMusicRecording = schemaOrgMusicRecording;
4003
4098
  exports.schemaOrgNewsArticle = schemaOrgNewsArticle;
4004
4099
  exports.schemaOrgOffer = schemaOrgOffer;
4100
+ exports.schemaOrgOpinionNewsArticle = schemaOrgOpinionNewsArticle;
4005
4101
  exports.schemaOrgPerson = schemaOrgPerson;
4006
4102
  exports.schemaOrgPlace = schemaOrgPlace;
4007
4103
  exports.schemaOrgPostalAddress = schemaOrgPostalAddress;
@@ -4025,5 +4121,5 @@ exports.webApplicationFields = webApplicationFields;
4025
4121
  exports.webPageFields = webPageFields;
4026
4122
  exports.withCreativeWorkCommons = withCreativeWorkCommons;
4027
4123
  exports.withThingCommons = withThingCommons;
4028
- //# sourceMappingURL=chunk-YHXUWGNA.cjs.map
4029
- //# sourceMappingURL=chunk-YHXUWGNA.cjs.map
4124
+ //# sourceMappingURL=chunk-GWPOJSGW.cjs.map
4125
+ //# sourceMappingURL=chunk-GWPOJSGW.cjs.map