sanity-plugin-seofields 1.6.1 → 1.6.3

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 (31) hide show
  1. package/README.md +15 -3
  2. package/dist/SeoHealthDashboard-BEZVLLFG.js +4 -0
  3. package/dist/{SeoHealthDashboard-PY5MKJCZ.js.map → SeoHealthDashboard-BEZVLLFG.js.map} +1 -1
  4. package/dist/SeoHealthDashboard-D3XU3CUB.cjs +10 -0
  5. package/dist/{SeoHealthDashboard-FZTP4GS7.cjs.map → SeoHealthDashboard-D3XU3CUB.cjs.map} +1 -1
  6. package/dist/{SeoHealthTool-Z3O6NEKF.cjs → SeoHealthTool-4VZMD4TR.cjs} +4 -4
  7. package/dist/{SeoHealthTool-Z3O6NEKF.cjs.map → SeoHealthTool-4VZMD4TR.cjs.map} +1 -1
  8. package/dist/{SeoHealthTool-SKY7FAKK.js → SeoHealthTool-BSTYAKQS.js} +3 -3
  9. package/dist/{SeoHealthTool-SKY7FAKK.js.map → SeoHealthTool-BSTYAKQS.js.map} +1 -1
  10. package/dist/{SeoPreview-LWSWTIF5.cjs → SeoPreview-PYYVZMY3.cjs} +3 -3
  11. package/dist/SeoPreview-PYYVZMY3.cjs.map +1 -0
  12. package/dist/{SeoPreview-BQBKMYSG.js → SeoPreview-XVAZYHCL.js} +3 -3
  13. package/dist/SeoPreview-XVAZYHCL.js.map +1 -0
  14. package/dist/{chunk-77U7CMJP.cjs → chunk-BHIZQLY7.cjs} +135 -16
  15. package/dist/chunk-BHIZQLY7.cjs.map +1 -0
  16. package/dist/{chunk-KFFDQX22.js → chunk-HQTYQMP5.js} +135 -16
  17. package/dist/chunk-HQTYQMP5.js.map +1 -0
  18. package/dist/cli.js +1 -1
  19. package/dist/index.cjs +3 -3
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +8 -6
  22. package/dist/index.d.ts +8 -6
  23. package/dist/index.js +3 -3
  24. package/dist/index.js.map +1 -1
  25. package/package.json +19 -4
  26. package/dist/SeoHealthDashboard-FZTP4GS7.cjs +0 -10
  27. package/dist/SeoHealthDashboard-PY5MKJCZ.js +0 -4
  28. package/dist/SeoPreview-BQBKMYSG.js.map +0 -1
  29. package/dist/SeoPreview-LWSWTIF5.cjs.map +0 -1
  30. package/dist/chunk-77U7CMJP.cjs.map +0 -1
  31. package/dist/chunk-KFFDQX22.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -48,14 +48,15 @@ interface SeoFieldsPluginConfig {
48
48
  * If set to `true`, the SEO preview will be enabled with default settings.
49
49
  * If set to an object, you can provide a custom `prefix` function to modify the URL prefix
50
50
  * and/or a `titleSuffix` to append text (e.g. a brand name) after the meta title in the preview.
51
+ * The plugin automatically adds a `|` separator — only provide the suffix text itself.
51
52
  *
52
53
  * Example:
53
54
  * ```
54
55
  * seoPreview: {
55
56
  * prefix: (doc) => `/${doc.slug?.current || 'untitled'}`,
56
- * titleSuffix: ' | Acme Corp',
57
+ * titleSuffix: 'Acme Corp',
57
58
  * // or dynamically:
58
- * titleSuffix: (doc) => ` | ${doc.brandName || 'Acme Corp'}`,
59
+ * titleSuffix: (doc) => doc.brandName || 'Acme Corp',
59
60
  * }
60
61
  * ```
61
62
  */
@@ -65,11 +66,12 @@ interface SeoFieldsPluginConfig {
65
66
  } & Record<string, unknown>) => string;
66
67
  /**
67
68
  * A static string or function appended to the meta title in the Live Preview.
68
- * Useful for showing a brand suffix (e.g. `' | Acme Corp'`) that is added
69
+ * Useful for showing a brand suffix (e.g. `'Acme Corp'`) that is added
69
70
  * via your Next.js title template but not stored in the Sanity field.
70
- * The suffix is rendered in a muted style so editors can distinguish it from
71
- * the typed title. The combined length is checked against the 60-character
72
- * SERP limit.
71
+ * The plugin automatically prepends a `|` separator so only provide the
72
+ * text itself. The suffix is rendered in a muted style so editors can
73
+ * distinguish it from the typed title. The combined length (including the
74
+ * separator) is checked against the 60-character SERP limit.
73
75
  */
74
76
  titleSuffix?: string | ((doc: {
75
77
  _type?: string;
package/dist/index.js CHANGED
@@ -653,7 +653,7 @@ function twitter(config = {}) {
653
653
  }
654
654
 
655
655
  // src/schemas/index.ts
656
- var LazySeoPreview = lazy(() => import('./SeoPreview-BQBKMYSG.js'));
656
+ var LazySeoPreview = lazy(() => import('./SeoPreview-XVAZYHCL.js'));
657
657
  var SeoPreviewWrapper = (props) => createElement(Suspense, { fallback: null }, createElement(LazySeoPreview, props));
658
658
  function buildFieldGroupMap(groups) {
659
659
  const map = /* @__PURE__ */ new Map();
@@ -1035,7 +1035,7 @@ var resolveDashboardConfig = (healthDashboard, rootApiVersion) => {
1035
1035
  var seofields = definePlugin((config = {}) => {
1036
1036
  const { healthDashboard = true } = config;
1037
1037
  const dash = resolveDashboardConfig(healthDashboard, config.apiVersion);
1038
- const LazySeoHealthTool = lazy(() => import('./SeoHealthTool-SKY7FAKK.js'));
1038
+ const LazySeoHealthTool = lazy(() => import('./SeoHealthTool-BSTYAKQS.js'));
1039
1039
  const BoundSeoHealthTool = () => createElement(
1040
1040
  Suspense,
1041
1041
  { fallback: null },
@@ -1082,7 +1082,7 @@ var seofields = definePlugin((config = {}) => {
1082
1082
  });
1083
1083
  });
1084
1084
  var plugin_default = seofields;
1085
- var LazySeoHealthDashboard = lazy(() => import('./SeoHealthDashboard-PY5MKJCZ.js'));
1085
+ var LazySeoHealthDashboard = lazy(() => import('./SeoHealthDashboard-BEZVLLFG.js'));
1086
1086
  function createSeoHealthPane(optionsOrS, optionsWhenS) {
1087
1087
  const S = optionsOrS;
1088
1088
  const _a = optionsWhenS != null ? optionsWhenS : {}, { query, openInPane = true, title: paneTitle } = _a, rest = __objRest(_a, ["query", "openInPane", "title"]);