sanity-plugin-seofields 1.7.0 → 1.8.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 (82) hide show
  1. package/README.md +3 -3
  2. package/dist/SchemaOrgJsonLdPreview-DJLkIPq4.d.cts +78 -0
  3. package/dist/SchemaOrgJsonLdPreview-DJLkIPq4.d.ts +78 -0
  4. package/dist/SeoHealthDashboard-AEKVVMUR-7NWV3C3Y.js +4 -0
  5. package/dist/SeoHealthDashboard-AEKVVMUR-7NWV3C3Y.js.map +1 -0
  6. package/dist/SeoHealthDashboard-AEKVVMUR-XWKJUH24.cjs +10 -0
  7. package/dist/SeoHealthDashboard-AEKVVMUR-XWKJUH24.cjs.map +1 -0
  8. package/dist/SeoHealthTool-2KKQJLJL.cjs +11 -0
  9. package/dist/{SeoHealthDashboard-PTUEVYZL.js.map → SeoHealthTool-2KKQJLJL.cjs.map} +1 -1
  10. package/dist/SeoHealthTool-3CUKGADZ.js +5 -0
  11. package/dist/{SeoHealthDashboard-IP5BJ322.cjs.map → SeoHealthTool-3CUKGADZ.js.map} +1 -1
  12. package/dist/{SeoPreview-WYH7NYNM.cjs → SeoPreview-3EXR6FD4.cjs} +3 -3
  13. package/dist/{SeoPreview-WYH7NYNM.cjs.map → SeoPreview-3EXR6FD4.cjs.map} +1 -1
  14. package/dist/{SeoPreview-KEGGQSPJ.js → SeoPreview-4PPAF4NO.js} +3 -3
  15. package/dist/{SeoPreview-KEGGQSPJ.js.map → SeoPreview-4PPAF4NO.js.map} +1 -1
  16. package/dist/{chunk-S367Y35J.cjs → chunk-254YHUN3.cjs} +2 -15
  17. package/dist/{chunk-S367Y35J.cjs.map → chunk-254YHUN3.cjs.map} +1 -1
  18. package/dist/{chunk-AW7OKBQQ.js → chunk-27XSYENH.js} +59 -5
  19. package/dist/chunk-27XSYENH.js.map +1 -0
  20. package/dist/{chunk-GWPOJSGW.cjs → chunk-B5IVI5LP.cjs} +821 -156
  21. package/dist/chunk-B5IVI5LP.cjs.map +1 -0
  22. package/dist/chunk-BNXMFD3T.cjs +431 -0
  23. package/dist/chunk-BNXMFD3T.cjs.map +1 -0
  24. package/dist/{chunk-2NMEKWO5.js → chunk-DDAAVRWG.js} +3 -15
  25. package/dist/{chunk-2NMEKWO5.js.map → chunk-DDAAVRWG.js.map} +1 -1
  26. package/dist/chunk-P6IOWIO2.cjs +480 -0
  27. package/dist/chunk-P6IOWIO2.cjs.map +1 -0
  28. package/dist/{chunk-FONJYVF2.js → chunk-UOCZFYYP.js} +5 -208
  29. package/dist/chunk-UOCZFYYP.js.map +1 -0
  30. package/dist/{chunk-HRKRV2X7.js → chunk-VR44E62I.js} +802 -147
  31. package/dist/chunk-VR44E62I.js.map +1 -0
  32. package/dist/chunk-WKXHX3GO.js +424 -0
  33. package/dist/chunk-WKXHX3GO.js.map +1 -0
  34. package/dist/{chunk-5YRH47VQ.cjs → chunk-XZDLJ2N6.cjs} +63 -6
  35. package/dist/chunk-XZDLJ2N6.cjs.map +1 -0
  36. package/dist/cli.js +18 -18
  37. package/dist/{component-DQ4KuQQD.d.ts → component-BzI-LHPw.d.cts} +3 -27
  38. package/dist/{component-D1sBm6ts.d.cts → component-DEXwtemT.d.ts} +3 -27
  39. package/dist/define-cli.cjs +1 -1
  40. package/dist/define-cli.js +1 -1
  41. package/dist/index.cjs +1050 -94
  42. package/dist/index.cjs.map +1 -1
  43. package/dist/index.d.cts +76 -295
  44. package/dist/index.d.ts +76 -295
  45. package/dist/index.js +1009 -63
  46. package/dist/index.js.map +1 -1
  47. package/dist/next.cjs +136 -122
  48. package/dist/next.cjs.map +1 -1
  49. package/dist/next.d.cts +9 -3
  50. package/dist/next.d.ts +9 -3
  51. package/dist/next.js +38 -32
  52. package/dist/next.js.map +1 -1
  53. package/dist/schema/next.cjs +103 -95
  54. package/dist/schema/next.d.cts +4 -4
  55. package/dist/schema/next.d.ts +4 -4
  56. package/dist/schema/next.js +4 -4
  57. package/dist/schema.cjs +202 -160
  58. package/dist/schema.cjs.map +1 -1
  59. package/dist/schema.d.cts +26 -16
  60. package/dist/schema.d.ts +26 -16
  61. package/dist/schema.js +25 -7
  62. package/dist/schema.js.map +1 -1
  63. package/dist/{types-9_wbCIi9.d.ts → types-BXSCbl6p.d.cts} +29 -2
  64. package/dist/{types-_wBLg6RV.d.cts → types-B_vjMPtM.d.cts} +1 -1
  65. package/dist/{types-Bb49oRBV.d.cts → types-C19cQx5D.d.ts} +29 -2
  66. package/dist/{types-CeBULNFF.d.ts → types-CW8qFdAn.d.ts} +1 -1
  67. package/dist/{types-B91ena4g.d.cts → types-yVmQfby9.d.cts} +7 -0
  68. package/dist/{types-B91ena4g.d.ts → types-yVmQfby9.d.ts} +7 -0
  69. package/package.json +2 -1
  70. package/dist/SeoHealthDashboard-IP5BJ322.cjs +0 -10
  71. package/dist/SeoHealthDashboard-PTUEVYZL.js +0 -4
  72. package/dist/SeoHealthTool-CZZRMWQK.cjs +0 -14
  73. package/dist/SeoHealthTool-CZZRMWQK.cjs.map +0 -1
  74. package/dist/SeoHealthTool-IULT4G25.js +0 -12
  75. package/dist/SeoHealthTool-IULT4G25.js.map +0 -1
  76. package/dist/chunk-5YRH47VQ.cjs.map +0 -1
  77. package/dist/chunk-ARELX3GK.cjs +0 -689
  78. package/dist/chunk-ARELX3GK.cjs.map +0 -1
  79. package/dist/chunk-AW7OKBQQ.js.map +0 -1
  80. package/dist/chunk-FONJYVF2.js.map +0 -1
  81. package/dist/chunk-GWPOJSGW.cjs.map +0 -1
  82. package/dist/chunk-HRKRV2X7.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,15 +1,16 @@
1
1
  import * as sanity from 'sanity';
2
2
  import { SchemaTypeDefinition } from 'sanity';
3
- import { ComponentType, ReactNode } from 'react';
4
- import { D as DocumentWithSeoHealth$1 } from './types-B91ena4g.js';
5
- export { S as SeoHealthMetrics, a as SeoHealthStatus } from './types-B91ena4g.js';
6
- import { StructureBuilder, ComponentBuilder } from 'sanity/structure';
3
+ import { ComponentType } from 'react';
4
+ import { D as DocumentWithSeoHealth, S as SeoHealthMetrics } from './types-yVmQfby9.js';
5
+ export { a as SeoHealthStatus } from './types-yVmQfby9.js';
6
+ export { SeoHealthPaneOptions, createSeoHealthPane } from 'seofields-pro';
7
+ export { S as SchemaOrgDocumentJsonLdPreview, S as SchemaOrgJsonLdPreview, a as SchemaOrgJsonLdPreviewOptions, b as SchemaOrgJsonLdPreviewProps } from './SchemaOrgJsonLdPreview-DJLkIPq4.js';
7
8
 
8
9
  interface SeoFieldConfig {
9
10
  title?: string;
10
11
  description?: string;
11
12
  }
12
- type SeoFieldKeys = 'title' | 'description' | 'canonicalUrl' | 'metaImage' | 'keywords' | 'metaAttributes' | 'robots';
13
+ type SeoFieldKeys = 'title' | 'description' | 'canonicalUrl' | 'metaImage' | 'keywords' | 'metaAttributes' | 'robots' | 'focusKeyword' | 'hreflangs' | 'geoChecklist' | 'metaTagsPreview';
13
14
  type openGraphFieldKeys = 'openGraphUrl' | 'openGraphTitle' | 'openGraphDescription' | 'openGraphSiteName' | 'openGraphType' | 'openGraphImageType' | 'openGraphImage' | 'openGraphImageUrl';
14
15
  type twitterFieldKeys = 'twitterCard' | 'twitterSite' | 'twitterCreator' | 'twitterTitle' | 'twitterDescription' | 'twitterImageType' | 'twitterImage' | 'twitterImageUrl';
15
16
  type AllFieldKeys = SeoFieldKeys | openGraphFieldKeys | twitterFieldKeys;
@@ -17,7 +18,7 @@ type AllFieldKeys = SeoFieldKeys | openGraphFieldKeys | twitterFieldKeys;
17
18
  * Names of top-level fields inside the `seoFields` object type.
18
19
  * Use these when assigning fields to groups in `fieldGroups`.
19
20
  */
20
- type SeoObjectFieldName = 'robots' | 'preview' | 'title' | 'description' | 'metaImage' | 'metaAttributes' | 'keywords' | 'canonicalUrl' | 'openGraph' | 'twitter';
21
+ type SeoObjectFieldName = 'robots' | 'preview' | 'title' | 'description' | 'metaImage' | 'metaAttributes' | 'keywords' | 'canonicalUrl' | 'openGraph' | 'twitter' | 'focusKeyword' | 'hreflangs' | 'geoChecklist' | 'metaTagsPreview';
21
22
  /**
22
23
  * Defines a single tab/group within the `seoFields` object.
23
24
  */
@@ -42,7 +43,17 @@ type ValidHiddenFieldKeys = Exclude<AllFieldKeys, 'openGraphImageUrl' | 'twitter
42
43
  interface FieldVisibilityConfig {
43
44
  hiddenFields?: ValidHiddenFieldKeys[];
44
45
  }
46
+ /**
47
+ * Individual SEO fields that must be non-empty before publishing.
48
+ * Dot-notation for nested fields (e.g. 'openGraph.title').
49
+ */
50
+ type PublishGateRequiredField = 'title' | 'description' | 'metaImage' | 'keywords' | 'canonicalUrl' | 'openGraph.title' | 'openGraph.description' | 'openGraph.image' | 'openGraph.type' | 'twitter.title' | 'twitter.description' | 'twitter.image' | 'twitter.card';
45
51
  interface SeoFieldsPluginConfig {
52
+ /**
53
+ * License key for pro features (SEO Health Dashboard, Publish Gate).
54
+ * Obtain at https://sanity-plugin-seofields.thehardik.in
55
+ */
56
+ licenseKey?: string;
46
57
  /**
47
58
  * Enable or configure the SEO preview feature.
48
59
  * If set to `true`, the SEO preview will be enabled with default settings.
@@ -127,6 +138,16 @@ interface SeoFieldsPluginConfig {
127
138
  * ]
128
139
  */
129
140
  fieldGroups?: SeoFieldGroup[];
141
+ /**
142
+ * Show the GEO / AI Overview readiness checklist inside seoFields.
143
+ * Defaults to `true`.
144
+ */
145
+ geo?: boolean;
146
+ /**
147
+ * Show the Meta Tags HTML preview inside seoFields.
148
+ * Defaults to `true`.
149
+ */
150
+ metaTagsPreview?: boolean;
130
151
  /**
131
152
  * The base URL of your website, used for generating full URLs in the SEO preview.
132
153
  * Defaults to 'https://www.example.com' if not provided.
@@ -224,7 +245,7 @@ interface SeoFieldsPluginConfig {
224
245
  apiVersion?: string;
225
246
  /**
226
247
  * License key for the SEO Health Dashboard pro feature.
227
- * Obtain a license at https://sanity-plugin-seofields.thehardik.in
248
+ * @deprecated Use the root-level `licenseKey` option instead.
228
249
  */
229
250
  licenseKey?: string;
230
251
  /**
@@ -267,7 +288,7 @@ interface SeoFieldsPluginConfig {
267
288
  * return { label: 'Private', bgColor: '#fef3c7', textColor: '#92400e' }
268
289
  * }
269
290
  */
270
- getDocumentBadge?: (doc: DocumentWithSeoHealth$1 & Record<string, unknown>) => {
291
+ getDocumentBadge?: (doc: DocumentWithSeoHealth & Record<string, unknown>) => {
271
292
  label: string;
272
293
  bgColor?: string;
273
294
  textColor?: string;
@@ -309,6 +330,49 @@ interface SeoFieldsPluginConfig {
309
330
  */
310
331
  compactStats?: boolean;
311
332
  };
333
+ /**
334
+ * Gate publishing based on SEO score or required field presence.
335
+ * Requires a valid root-level `licenseKey` — silently disabled if key is absent or invalid.
336
+ *
337
+ * @example
338
+ * ```ts
339
+ * publishGate: {
340
+ * mode: 'warn',
341
+ * minScore: 70,
342
+ * requiredFields: ['title', 'description', 'openGraph.title'],
343
+ * types: ['post', 'page'],
344
+ * }
345
+ * ```
346
+ */
347
+ publishGate?: {
348
+ /**
349
+ * 'block' — disables the Publish button with a tooltip reason (default).
350
+ * 'warn' — shows a confirm dialog; editor can bypass and publish anyway.
351
+ * @default 'block'
352
+ */
353
+ mode?: 'block' | 'warn';
354
+ /**
355
+ * Minimum overall SEO health score (0–100) required to publish.
356
+ * Gate fires when the document's score is below this threshold.
357
+ * @default 60
358
+ */
359
+ minScore?: number;
360
+ /**
361
+ * Individual fields that MUST be non-empty. Gate fires if any are missing.
362
+ * Use dot-notation for nested fields: 'openGraph.title', 'twitter.image', etc.
363
+ */
364
+ requiredFields?: PublishGateRequiredField[];
365
+ /**
366
+ * Restrict the gate to specific document types.
367
+ * Omit to apply to all document types that have an `seo` field.
368
+ */
369
+ types?: string[];
370
+ /**
371
+ * Custom message shown in the block tooltip or warn dialog.
372
+ * Accepts a string or a function receiving (score, issues[]).
373
+ */
374
+ message?: string | ((score: number, issues: string[]) => string);
375
+ };
312
376
  }
313
377
  declare const seofields: sanity.Plugin<void | SeoFieldsPluginConfig>;
314
378
 
@@ -347,292 +411,9 @@ declare const _default: {
347
411
 
348
412
  declare function twitter(config?: SeoFieldsPluginConfig): SchemaTypeDefinition;
349
413
 
350
- interface SanityImage {
351
- _type: 'image';
352
- asset: {
353
- _ref: string;
354
- _type: 'reference';
355
- };
356
- hotspot?: {
357
- x: number;
358
- y: number;
359
- height: number;
360
- width: number;
361
- };
362
- crop?: {
363
- top: number;
364
- bottom: number;
365
- left: number;
366
- right: number;
367
- };
368
- alt?: string;
369
- }
370
- interface SanityImageWithAlt extends SanityImage {
371
- alt: string;
372
- }
373
- interface RobotsSettings {
374
- noIndex?: boolean;
375
- noFollow?: boolean;
376
- }
377
- interface MetaAttribute {
378
- _type: 'metaAttribute';
379
- key?: string;
380
- type?: 'string' | 'image';
381
- value?: string;
382
- image?: SanityImage;
383
- }
384
- interface OpenGraphSettings {
385
- _type: 'openGraph';
386
- url?: string;
387
- title?: string;
388
- description?: string;
389
- siteName?: string;
390
- type?: 'website' | 'article' | 'profile' | 'book' | 'music' | 'video' | 'product';
391
- imageType?: 'upload' | 'url';
392
- image?: SanityImageWithAlt;
393
- imageUrl?: string;
394
- }
395
- interface TwitterCardSettings {
396
- _type: 'twitter';
397
- card?: 'summary' | 'summary_large_image' | 'app' | 'player';
398
- site?: string;
399
- creator?: string;
400
- title?: string;
401
- description?: string;
402
- imageType?: 'upload' | 'url';
403
- image?: SanityImageWithAlt;
404
- imageUrl?: string;
405
- }
406
- interface SeoFields {
407
- _type: 'seoFields';
408
- robots?: RobotsSettings;
409
- preview?: string;
410
- title?: string;
411
- description?: string;
412
- metaImage?: SanityImage;
413
- metaAttributes?: MetaAttribute[];
414
- keywords?: string[];
415
- canonicalUrl?: string;
416
- openGraph?: OpenGraphSettings;
417
- twitter?: TwitterCardSettings;
418
- }
419
- type SeoHealthStatus = 'excellent' | 'good' | 'fair' | 'poor' | 'missing';
420
- interface SeoHealthMetrics {
421
- score: number;
422
- status: SeoHealthStatus;
423
- issues: string[];
424
- }
425
- interface DocumentWithSeoHealth {
426
- _id: string;
427
- _type: string;
428
- title?: string;
429
- slug?: {
430
- current: string;
431
- };
432
- seo?: SeoFields;
433
- _updatedAt?: string;
434
- health: SeoHealthMetrics;
435
- }
436
- interface DeprecationWarning {
437
- key: string;
438
- version: string;
439
- changelogUrl: string;
440
- }
441
-
442
- interface SeoHealthDashboardProps {
443
- icon?: string;
444
- title?: string;
445
- description?: string;
446
- showTypeColumn?: boolean;
447
- showDocumentId?: boolean;
448
- /**
449
- * Limit the dashboard to specific document type names.
450
- * If both queryTypes and customQuery are provided, customQuery takes precedence.
451
- */
452
- queryTypes?: string[];
453
- /**
454
- * When using `queryTypes`, also filter by `seo != null`.
455
- * Set to `false` to include documents of those types even without an seo field.
456
- * Defaults to `true`.
457
- */
458
- queryRequireSeo?: boolean;
459
- /**
460
- * A fully custom GROQ query used to fetch documents.
461
- * Must return objects with at least: _id, _type, title, seo, _updatedAt
462
- * Takes precedence over queryTypes.
463
- */
464
- customQuery?: string;
465
- /**
466
- * The Sanity API version to use for the client (e.g. '2023-01-01').
467
- * Defaults to '2023-01-01'.
468
- */
469
- apiVersion?: string;
470
- /**
471
- * License key for the SEO Health Dashboard.
472
- * Obtain a key at https://sanity-plugin-seofields.thehardik.in
473
- */
474
- licenseKey?: string;
475
- /**
476
- * Map raw `_type` values to human-readable display labels used in the
477
- * Type column and the Type filter dropdown.
478
- * Any type without an entry falls back to the raw `_type` string.
479
- *
480
- * @example
481
- * typeDisplayLabels={{ productDrug: 'Products', singleCondition: 'Condition' }}
482
- */
483
- typeDisplayLabels?: Record<string, string>;
484
- /**
485
- * Controls how the type is rendered in the Type column.
486
- * - `'badge'` (default) — coloured pill, consistent with score badges
487
- * - `'text'` — plain text, useful for dense layouts
488
- */
489
- typeColumnMode?: 'badge' | 'text';
490
- /**
491
- * The document field to use as the display title.
492
- *
493
- * - `string` — use this field for every document type (e.g. `'name'`)
494
- * - `Record<string, string>` — per-type mapping; unmapped types fall back to `title`
495
- *
496
- * @example
497
- * // Same field for all types
498
- * titleField: 'name'
499
- *
500
- * @example
501
- * // Different field per type
502
- * titleField: { post: 'title', product: 'name', category: 'label' }
503
- */
504
- titleField?: string | Record<string, string>;
505
- /**
506
- * Callback function to render a custom badge next to the document title.
507
- * Receives the full document and should return badge data or undefined.
508
- *
509
- * @example
510
- * getDocumentBadge: (doc) => {
511
- * if (doc.services === 'NHS')
512
- * return { label: 'NHS', bgColor: '#e0f2fe', textColor: '#0369a1' }
513
- * if (doc.services === 'Private')
514
- * return { label: 'Private', bgColor: '#fef3c7', textColor: '#92400e' }
515
- * }
516
- */
517
- getDocumentBadge?: (doc: DocumentWithSeoHealth & Record<string, unknown>) => {
518
- label: string;
519
- bgColor?: string;
520
- textColor?: string;
521
- fontSize?: string;
522
- } | undefined;
523
- /**
524
- * Custom text shown while the license key is being verified.
525
- * Defaults to `"Verifying license…"`.
526
- */
527
- loadingLicense?: ReactNode;
528
- /**
529
- * Custom text shown while documents are being fetched.
530
- * Defaults to `"Loading documents…"`.
531
- */
532
- loadingDocuments?: ReactNode;
533
- /**
534
- * Custom text shown when the query returns zero results.
535
- * Defaults to `"No documents found"`.
536
- */
537
- noDocuments?: ReactNode;
538
- /**
539
- * Enable preview/demo mode to show dummy data.
540
- * Useful for testing, documentation, or showcasing the dashboard.
541
- * When enabled, displays realistic sample documents with various SEO scores.
542
- * Defaults to `false`.
543
- */
544
- previewMode?: boolean;
545
- /**
546
- * When `true`, clicking a document title opens the document editor as a split
547
- * pane to the right, keeping the SEO Health pane visible on the left.
548
- * This uses Sanity's pane router and requires the component to be rendered
549
- * inside a desk-structure pane context (i.e. via `createSeoHealthPane`).
550
- *
551
- * When `false` (default), clicking navigates to the document via the standard
552
- * intent-link system (full navigation).
553
- *
554
- * This is set to `true` automatically by `createSeoHealthPane`.
555
- */
556
- openInPane?: boolean;
557
- /**
558
- * The `name` of the Sanity structure tool that contains the monitored documents.
559
- * When provided, clicking a document title navigates directly to that tool's
560
- * intent URL (`/{basePath}/{structureTool}/intent/edit/id=…;type=…/`) instead of
561
- * using the generic intent resolver, which always picks the first registered tool.
562
- *
563
- * Required when you have multiple structure tools and the documents live in a
564
- * non-default one (e.g. `name: 'common'`).
565
- *
566
- * @example
567
- * structureTool: 'common'
568
- */
569
- structureTool?: string;
570
- /**
571
- * @internal — populated by the plugin when deprecated config keys are detected.
572
- * Each entry carries the migration hint, the version it was deprecated in, and
573
- * the matching changelog URL so the banner can group warnings by release.
574
- */
575
- _deprecationWarnings?: DeprecationWarning[];
576
- /**
577
- * Whether the export (CSV / JSON) feature is enabled.
578
- * Defaults to `true`.
579
- */
580
- exportEnabled?: boolean;
581
- /**
582
- * Which export formats to offer.
583
- * Defaults to `['csv', 'json']`.
584
- */
585
- exportFormats?: Array<'csv' | 'json'>;
586
- /**
587
- * Render compact inline stat pills in the header instead of the full stats grid.
588
- * Defaults to `false`.
589
- */
590
- compactStats?: boolean;
591
- }
592
-
593
- /**
594
- * Options accepted by `createSeoHealthPane`.
595
- * All props from `SeoHealthDashboardProps` are supported.
596
- *
597
- * `licenseKey` is **required** — the dashboard will not render without it.
598
- */
599
- interface SeoHealthPaneOptions extends Omit<SeoHealthDashboardProps, 'customQuery'> {
600
- /** Required license key (format: `SEOF-XXXX-XXXX-XXXX`). */
601
- licenseKey: string;
602
- /**
603
- * A fully custom GROQ query used to fetch documents for the dashboard.
604
- * The query must return documents with at least: `_id`, `_type`, `title`, `seo`, `_updatedAt`.
605
- *
606
- * Takes precedence over `queryTypes` when both are provided.
607
- *
608
- * @example
609
- * query: `*[_type in ["post","page"] && defined(seo)]{ _id, _type, title, slug, seo, _updatedAt }`
610
- */
611
- query?: string;
414
+ interface SeoDocument {
415
+ seo?: Record<string, unknown>;
612
416
  }
613
- /**
614
- * Creates a desk-structure pane for the SEO Health Dashboard.
615
- *
616
- * Returns a **`ComponentBuilder`** with a built-in `.child()` resolver so that
617
- * clicking any document row opens the document editor as a split pane to the right.
618
- *
619
- * Use it **directly** as the `.child()` value — do **not** wrap it in `S.component()`.
620
- *
621
- * ```ts
622
- * // sanity.config.ts
623
- * structure: (S) =>
624
- * S.list().items([
625
- * S.listItem()
626
- * .title('SEO Health')
627
- * .child(
628
- * createSeoHealthPane(S, {
629
- * licenseKey: 'SEOF-XXXX-XXXX-XXXX',
630
- * query: `*[_type == "post" && defined(seo)]{ _id, _type, title, slug, seo, _updatedAt }`,
631
- * })
632
- * ),
633
- * ])
634
- * ```
635
- */
636
- declare function createSeoHealthPane(optionsOrS: StructureBuilder, optionsWhenS: SeoHealthPaneOptions): ComponentBuilder;
417
+ declare const calculateHealthScore: (doc: SeoDocument) => SeoHealthMetrics;
637
418
 
638
- export { type AllFieldKeys, DocumentWithSeoHealth$1 as DocumentWithSeoHealth, type FieldVisibilityConfig, type SeoFieldConfig, type SeoFieldGroup, type SeoFieldKeys, type SeoFieldsPluginConfig, type SeoHealthPaneOptions, type SeoObjectFieldName, type ValidHiddenFieldKeys, types as allSchemas, baseMeta as baseMetaSchema, createSeoHealthPane, seofields as default, _default$2 as metaAttributeSchema, _default$1 as metaTagSchema, type openGraphFieldKeys, openGraph as openGraphSchema, _default as robotsSchema, seoFieldsSchema, type twitterFieldKeys, twitter as twitterSchema };
419
+ export { type AllFieldKeys, DocumentWithSeoHealth, type FieldVisibilityConfig, type PublishGateRequiredField, type SeoFieldConfig, type SeoFieldGroup, type SeoFieldKeys, type SeoFieldsPluginConfig, SeoHealthMetrics, type SeoObjectFieldName, type ValidHiddenFieldKeys, types as allSchemas, baseMeta as baseMetaSchema, calculateHealthScore, seofields as default, _default$2 as metaAttributeSchema, _default$1 as metaTagSchema, type openGraphFieldKeys, openGraph as openGraphSchema, _default as robotsSchema, seoFieldsSchema, type twitterFieldKeys, twitter as twitterSchema };