sanity-plugin-seofields 1.6.5 → 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 (61) 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/{chunk-BHIZQLY7.cjs → chunk-5YRH47VQ.cjs} +23 -26
  11. package/dist/chunk-5YRH47VQ.cjs.map +1 -0
  12. package/dist/{chunk-BCTPOWXA.cjs → chunk-ARELX3GK.cjs} +131 -111
  13. package/dist/chunk-ARELX3GK.cjs.map +1 -0
  14. package/dist/{chunk-HQTYQMP5.js → chunk-AW7OKBQQ.js} +23 -26
  15. package/dist/chunk-AW7OKBQQ.js.map +1 -0
  16. package/dist/{chunk-XXA6WCWS.js → chunk-FONJYVF2.js} +22 -4
  17. package/dist/chunk-FONJYVF2.js.map +1 -0
  18. package/dist/{chunk-YHXUWGNA.cjs → chunk-GWPOJSGW.cjs} +99 -3
  19. package/dist/chunk-GWPOJSGW.cjs.map +1 -0
  20. package/dist/{chunk-KTL6NYNG.js → chunk-HRKRV2X7.js} +98 -4
  21. package/dist/chunk-HRKRV2X7.js.map +1 -0
  22. package/dist/cli.js +1 -1
  23. package/dist/{component-H52blyfc.d.ts → component-D1sBm6ts.d.cts} +9 -3
  24. package/dist/{component-CIE6Sy4F.d.cts → component-DQ4KuQQD.d.ts} +9 -3
  25. package/dist/index.cjs +2 -2
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +96 -4
  28. package/dist/index.d.ts +96 -4
  29. package/dist/index.js +2 -2
  30. package/dist/index.js.map +1 -1
  31. package/dist/next.cjs +85 -77
  32. package/dist/next.d.cts +3 -3
  33. package/dist/next.d.ts +3 -3
  34. package/dist/next.js +2 -2
  35. package/dist/schema/next.cjs +88 -80
  36. package/dist/schema/next.d.cts +4 -4
  37. package/dist/schema/next.d.ts +4 -4
  38. package/dist/schema/next.js +3 -3
  39. package/dist/schema.cjs +173 -153
  40. package/dist/schema.cjs.map +1 -1
  41. package/dist/schema.d.cts +10 -6
  42. package/dist/schema.d.ts +10 -6
  43. package/dist/schema.js +18 -3
  44. package/dist/schema.js.map +1 -1
  45. package/dist/{types-BxcJinOf.d.cts → types-9_wbCIi9.d.ts} +20 -2
  46. package/dist/{types-BtSRRG6C.d.cts → types-B91ena4g.d.cts} +1 -16
  47. package/dist/{types-BtSRRG6C.d.ts → types-B91ena4g.d.ts} +1 -16
  48. package/dist/{types-Dp9Pfnt9.d.ts → types-Bb49oRBV.d.cts} +20 -2
  49. package/dist/{types-CbYb4MsN.d.ts → types-CeBULNFF.d.ts} +1 -1
  50. package/dist/{types-CyRdIF-3.d.cts → types-_wBLg6RV.d.cts} +1 -1
  51. package/package.json +1 -1
  52. package/dist/SeoHealthDashboard-BEZVLLFG.js +0 -4
  53. package/dist/SeoHealthDashboard-D3XU3CUB.cjs +0 -10
  54. package/dist/SeoHealthTool-4VZMD4TR.cjs.map +0 -1
  55. package/dist/SeoHealthTool-BSTYAKQS.js.map +0 -1
  56. package/dist/chunk-BCTPOWXA.cjs.map +0 -1
  57. package/dist/chunk-BHIZQLY7.cjs.map +0 -1
  58. package/dist/chunk-HQTYQMP5.js.map +0 -1
  59. package/dist/chunk-KTL6NYNG.js.map +0 -1
  60. package/dist/chunk-XXA6WCWS.js.map +0 -1
  61. package/dist/chunk-YHXUWGNA.cjs.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as sanity from 'sanity';
2
2
  import { SchemaTypeDefinition } from 'sanity';
3
3
  import { ComponentType, ReactNode } from 'react';
4
- import { D as DocumentWithSeoHealth, a as DeprecationWarning } from './types-BtSRRG6C.cjs';
5
- export { S as SeoHealthMetrics, b as SeoHealthStatus } from './types-BtSRRG6C.cjs';
4
+ import { D as DocumentWithSeoHealth$1 } from './types-B91ena4g.cjs';
5
+ export { S as SeoHealthMetrics, a as SeoHealthStatus } from './types-B91ena4g.cjs';
6
6
  import { StructureBuilder, ComponentBuilder } from 'sanity/structure';
7
7
 
8
8
  interface SeoFieldConfig {
@@ -267,7 +267,7 @@ interface SeoFieldsPluginConfig {
267
267
  * return { label: 'Private', bgColor: '#fef3c7', textColor: '#92400e' }
268
268
  * }
269
269
  */
270
- getDocumentBadge?: (doc: DocumentWithSeoHealth & Record<string, unknown>) => {
270
+ getDocumentBadge?: (doc: DocumentWithSeoHealth$1 & Record<string, unknown>) => {
271
271
  label: string;
272
272
  bgColor?: string;
273
273
  textColor?: string;
@@ -347,6 +347,98 @@ declare const _default: {
347
347
 
348
348
  declare function twitter(config?: SeoFieldsPluginConfig): SchemaTypeDefinition;
349
349
 
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
+
350
442
  interface SeoHealthDashboardProps {
351
443
  icon?: string;
352
444
  title?: string;
@@ -543,4 +635,4 @@ interface SeoHealthPaneOptions extends Omit<SeoHealthDashboardProps, 'customQuer
543
635
  */
544
636
  declare function createSeoHealthPane(optionsOrS: StructureBuilder, optionsWhenS: SeoHealthPaneOptions): ComponentBuilder;
545
637
 
546
- export { type AllFieldKeys, 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 };
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 };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as sanity from 'sanity';
2
2
  import { SchemaTypeDefinition } from 'sanity';
3
3
  import { ComponentType, ReactNode } from 'react';
4
- import { D as DocumentWithSeoHealth, a as DeprecationWarning } from './types-BtSRRG6C.js';
5
- export { S as SeoHealthMetrics, b as SeoHealthStatus } from './types-BtSRRG6C.js';
4
+ import { D as DocumentWithSeoHealth$1 } from './types-B91ena4g.js';
5
+ export { S as SeoHealthMetrics, a as SeoHealthStatus } from './types-B91ena4g.js';
6
6
  import { StructureBuilder, ComponentBuilder } from 'sanity/structure';
7
7
 
8
8
  interface SeoFieldConfig {
@@ -267,7 +267,7 @@ interface SeoFieldsPluginConfig {
267
267
  * return { label: 'Private', bgColor: '#fef3c7', textColor: '#92400e' }
268
268
  * }
269
269
  */
270
- getDocumentBadge?: (doc: DocumentWithSeoHealth & Record<string, unknown>) => {
270
+ getDocumentBadge?: (doc: DocumentWithSeoHealth$1 & Record<string, unknown>) => {
271
271
  label: string;
272
272
  bgColor?: string;
273
273
  textColor?: string;
@@ -347,6 +347,98 @@ declare const _default: {
347
347
 
348
348
  declare function twitter(config?: SeoFieldsPluginConfig): SchemaTypeDefinition;
349
349
 
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
+
350
442
  interface SeoHealthDashboardProps {
351
443
  icon?: string;
352
444
  title?: string;
@@ -543,4 +635,4 @@ interface SeoHealthPaneOptions extends Omit<SeoHealthDashboardProps, 'customQuer
543
635
  */
544
636
  declare function createSeoHealthPane(optionsOrS: StructureBuilder, optionsWhenS: SeoHealthPaneOptions): ComponentBuilder;
545
637
 
546
- export { type AllFieldKeys, 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 };
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 };
package/dist/index.js CHANGED
@@ -1060,7 +1060,7 @@ var resolveDashboardConfig = (healthDashboard, rootApiVersion) => {
1060
1060
  var seofields = definePlugin((config = {}) => {
1061
1061
  const { healthDashboard = true } = config;
1062
1062
  const dash = resolveDashboardConfig(healthDashboard, config.apiVersion);
1063
- const LazySeoHealthTool = lazy(() => import('./SeoHealthTool-BSTYAKQS.js'));
1063
+ const LazySeoHealthTool = lazy(() => import('./SeoHealthTool-IULT4G25.js'));
1064
1064
  const BoundSeoHealthTool = () => createElement(
1065
1065
  Suspense,
1066
1066
  { fallback: null },
@@ -1107,7 +1107,7 @@ var seofields = definePlugin((config = {}) => {
1107
1107
  });
1108
1108
  });
1109
1109
  var plugin_default = seofields;
1110
- var LazySeoHealthDashboard = lazy(() => import('./SeoHealthDashboard-BEZVLLFG.js'));
1110
+ var LazySeoHealthDashboard = lazy(() => import('./SeoHealthDashboard-PTUEVYZL.js'));
1111
1111
  function createSeoHealthPane(optionsOrS, optionsWhenS) {
1112
1112
  const S = optionsOrS;
1113
1113
  const _a = optionsWhenS != null ? optionsWhenS : {}, { query, openInPane = true, title: paneTitle } = _a, rest = __objRest(_a, ["query", "openInPane", "title"]);