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.
- package/README.md +355 -79
- package/dist/SeoHealthDashboard-IP5BJ322.cjs +10 -0
- package/dist/{SeoHealthDashboard-D3XU3CUB.cjs.map → SeoHealthDashboard-IP5BJ322.cjs.map} +1 -1
- package/dist/SeoHealthDashboard-PTUEVYZL.js +4 -0
- package/dist/{SeoHealthDashboard-BEZVLLFG.js.map → SeoHealthDashboard-PTUEVYZL.js.map} +1 -1
- package/dist/{SeoHealthTool-4VZMD4TR.cjs → SeoHealthTool-CZZRMWQK.cjs} +4 -4
- package/dist/SeoHealthTool-CZZRMWQK.cjs.map +1 -0
- package/dist/{SeoHealthTool-BSTYAKQS.js → SeoHealthTool-IULT4G25.js} +3 -3
- package/dist/SeoHealthTool-IULT4G25.js.map +1 -0
- package/dist/{chunk-BHIZQLY7.cjs → chunk-5YRH47VQ.cjs} +23 -26
- package/dist/chunk-5YRH47VQ.cjs.map +1 -0
- package/dist/{chunk-BCTPOWXA.cjs → chunk-ARELX3GK.cjs} +131 -111
- package/dist/chunk-ARELX3GK.cjs.map +1 -0
- package/dist/{chunk-HQTYQMP5.js → chunk-AW7OKBQQ.js} +23 -26
- package/dist/chunk-AW7OKBQQ.js.map +1 -0
- package/dist/{chunk-XXA6WCWS.js → chunk-FONJYVF2.js} +22 -4
- package/dist/chunk-FONJYVF2.js.map +1 -0
- package/dist/{chunk-YHXUWGNA.cjs → chunk-GWPOJSGW.cjs} +99 -3
- package/dist/chunk-GWPOJSGW.cjs.map +1 -0
- package/dist/{chunk-KTL6NYNG.js → chunk-HRKRV2X7.js} +98 -4
- package/dist/chunk-HRKRV2X7.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/{component-H52blyfc.d.ts → component-D1sBm6ts.d.cts} +9 -3
- package/dist/{component-CIE6Sy4F.d.cts → component-DQ4KuQQD.d.ts} +9 -3
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +96 -4
- package/dist/index.d.ts +96 -4
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/next.cjs +85 -77
- package/dist/next.d.cts +3 -3
- package/dist/next.d.ts +3 -3
- package/dist/next.js +2 -2
- package/dist/schema/next.cjs +88 -80
- package/dist/schema/next.d.cts +4 -4
- package/dist/schema/next.d.ts +4 -4
- package/dist/schema/next.js +3 -3
- package/dist/schema.cjs +173 -153
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.d.cts +10 -6
- package/dist/schema.d.ts +10 -6
- package/dist/schema.js +18 -3
- package/dist/schema.js.map +1 -1
- package/dist/{types-BxcJinOf.d.cts → types-9_wbCIi9.d.ts} +20 -2
- package/dist/{types-BtSRRG6C.d.cts → types-B91ena4g.d.cts} +1 -16
- package/dist/{types-BtSRRG6C.d.ts → types-B91ena4g.d.ts} +1 -16
- package/dist/{types-Dp9Pfnt9.d.ts → types-Bb49oRBV.d.cts} +20 -2
- package/dist/{types-CbYb4MsN.d.ts → types-CeBULNFF.d.ts} +1 -1
- package/dist/{types-CyRdIF-3.d.cts → types-_wBLg6RV.d.cts} +1 -1
- package/package.json +1 -1
- package/dist/SeoHealthDashboard-BEZVLLFG.js +0 -4
- package/dist/SeoHealthDashboard-D3XU3CUB.cjs +0 -10
- package/dist/SeoHealthTool-4VZMD4TR.cjs.map +0 -1
- package/dist/SeoHealthTool-BSTYAKQS.js.map +0 -1
- package/dist/chunk-BCTPOWXA.cjs.map +0 -1
- package/dist/chunk-BHIZQLY7.cjs.map +0 -1
- package/dist/chunk-HQTYQMP5.js.map +0 -1
- package/dist/chunk-KTL6NYNG.js.map +0 -1
- package/dist/chunk-XXA6WCWS.js.map +0 -1
- 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
|
|
5
|
-
export { S as SeoHealthMetrics,
|
|
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
|
|
5
|
-
export { S as SeoHealthMetrics,
|
|
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-
|
|
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-
|
|
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"]);
|