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.
- 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/{SeoPreview-XVAZYHCL.js → SeoPreview-KEGGQSPJ.js} +5 -4
- package/dist/{SeoPreview-PYYVZMY3.cjs.map → SeoPreview-KEGGQSPJ.js.map} +1 -1
- package/dist/{SeoPreview-PYYVZMY3.cjs → SeoPreview-WYH7NYNM.cjs} +6 -5
- package/dist/SeoPreview-WYH7NYNM.cjs.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-25JLWVEU.js → chunk-HDZZQCH7.js} +14 -8
- package/dist/chunk-HDZZQCH7.js.map +1 -0
- package/dist/{chunk-KTL6NYNG.js → chunk-HRKRV2X7.js} +98 -4
- package/dist/chunk-HRKRV2X7.js.map +1 -0
- package/dist/{chunk-IFDLKZET.cjs → chunk-ZBHLMQTS.cjs} +14 -8
- package/dist/chunk-ZBHLMQTS.cjs.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 +42 -17
- 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 +34 -9
- 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/SeoPreview-XVAZYHCL.js.map +0 -1
- package/dist/chunk-25JLWVEU.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-IFDLKZET.cjs.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
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getMetaTitleValidationMessages, getMetaDescriptionValidationMessages, getMetaImageValidation, getOgTitleValidation, getOgDescriptionValidation, getOgImageValidation, getOgImageUrlValidation, getTwitterTitleValidation, getTwitterDescriptionValidation, getTwitterImageValidation, getTwitterImageUrlValidation } from './chunk-
|
|
1
|
+
import { getMetaTitleValidationMessages, getMetaDescriptionValidationMessages, getMetaImageValidation, getOgTitleValidation, getOgDescriptionValidation, getOgImageValidation, getOgImageUrlValidation, getTwitterTitleValidation, getTwitterDescriptionValidation, getTwitterImageValidation, getTwitterImageUrlValidation } from './chunk-HDZZQCH7.js';
|
|
2
2
|
import { __spreadValues, __spreadProps, __objRest } from './chunk-2NMEKWO5.js';
|
|
3
|
-
import { lazy, createElement, Suspense, useMemo } from 'react';
|
|
4
|
-
import { defineType, defineField, definePlugin, useFormValue } from 'sanity';
|
|
3
|
+
import { lazy, createElement, Suspense, useMemo, useState, useEffect } from 'react';
|
|
4
|
+
import { defineType, defineField, definePlugin, useFormValue, useClient } from 'sanity';
|
|
5
5
|
import { Stack, Text } from '@sanity/ui';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
@@ -56,13 +56,37 @@ var MetaImage = (props) => {
|
|
|
56
56
|
};
|
|
57
57
|
var MetaImage_default = MetaImage;
|
|
58
58
|
var MetaTitle = (props) => {
|
|
59
|
-
|
|
59
|
+
var _a, _b;
|
|
60
|
+
const { value, renderDefault, path, schemaType } = props;
|
|
61
|
+
const { options } = schemaType;
|
|
60
62
|
const parent = useFormValue([path[0]]);
|
|
61
63
|
const isParentseoField = parent && (parent == null ? void 0 : parent._type) === "seoFields";
|
|
62
64
|
const keywords = useMemo(() => (parent == null ? void 0 : parent.keywords) || [], [parent == null ? void 0 : parent.keywords]);
|
|
65
|
+
const rootDoc = (_a = useFormValue([])) != null ? _a : {};
|
|
66
|
+
const client = useClient({ apiVersion: (_b = options == null ? void 0 : options.apiVersion) != null ? _b : "2024-01-01" });
|
|
67
|
+
const [groqTitleSuffix, setGroqTitleSuffix] = useState("");
|
|
68
|
+
const titleSuffixQuery = options == null ? void 0 : options.titleSuffixQuery;
|
|
69
|
+
const titleSuffixOption = options == null ? void 0 : options.titleSuffix;
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
if (!titleSuffixQuery) return;
|
|
72
|
+
client.fetch(titleSuffixQuery).then((result) => {
|
|
73
|
+
setGroqTitleSuffix(result === null || result === void 0 ? "" : String(result));
|
|
74
|
+
}).catch(() => {
|
|
75
|
+
setGroqTitleSuffix("");
|
|
76
|
+
});
|
|
77
|
+
}, [titleSuffixQuery, client]);
|
|
78
|
+
const resolvedSuffix = useMemo(() => {
|
|
79
|
+
if (titleSuffixQuery) return groqTitleSuffix;
|
|
80
|
+
if (!titleSuffixOption) return "";
|
|
81
|
+
if (typeof titleSuffixOption === "function") {
|
|
82
|
+
return titleSuffixOption(rootDoc);
|
|
83
|
+
}
|
|
84
|
+
return titleSuffixOption;
|
|
85
|
+
}, [titleSuffixQuery, groqTitleSuffix, titleSuffixOption, rootDoc]);
|
|
86
|
+
const suffixLength = resolvedSuffix ? resolvedSuffix.length + 3 : 0;
|
|
63
87
|
const feedbackItems = useMemo(
|
|
64
|
-
() => getMetaTitleValidationMessages(value || "", keywords, isParentseoField),
|
|
65
|
-
[value, keywords, isParentseoField]
|
|
88
|
+
() => getMetaTitleValidationMessages(value || "", keywords, isParentseoField, suffixLength),
|
|
89
|
+
[value, keywords, isParentseoField, suffixLength]
|
|
66
90
|
);
|
|
67
91
|
return /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
|
|
68
92
|
renderDefault(props),
|
|
@@ -653,7 +677,7 @@ function twitter(config = {}) {
|
|
|
653
677
|
}
|
|
654
678
|
|
|
655
679
|
// src/schemas/index.ts
|
|
656
|
-
var LazySeoPreview = lazy(() => import('./SeoPreview-
|
|
680
|
+
var LazySeoPreview = lazy(() => import('./SeoPreview-KEGGQSPJ.js'));
|
|
657
681
|
var SeoPreviewWrapper = (props) => createElement(Suspense, { fallback: null }, createElement(LazySeoPreview, props));
|
|
658
682
|
function buildFieldGroupMap(groups) {
|
|
659
683
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -732,6 +756,7 @@ function seoFieldsSchema(config = {}) {
|
|
|
732
756
|
components: {
|
|
733
757
|
input: MetaTitle_default
|
|
734
758
|
},
|
|
759
|
+
options: __spreadValues(__spreadValues(__spreadValues({}, config.apiVersion ? { apiVersion: config.apiVersion } : {}), typeof config.seoPreview === "object" && config.seoPreview && config.seoPreview.titleSuffix ? { titleSuffix: config.seoPreview.titleSuffix } : {}), typeof config.seoPreview === "object" && config.seoPreview && config.seoPreview.titleSuffixQuery ? { titleSuffixQuery: config.seoPreview.titleSuffixQuery } : {}),
|
|
735
760
|
hidden: getFieldHiddenFunction("title", config)
|
|
736
761
|
})),
|
|
737
762
|
fieldGroupMap
|
|
@@ -1035,7 +1060,7 @@ var resolveDashboardConfig = (healthDashboard, rootApiVersion) => {
|
|
|
1035
1060
|
var seofields = definePlugin((config = {}) => {
|
|
1036
1061
|
const { healthDashboard = true } = config;
|
|
1037
1062
|
const dash = resolveDashboardConfig(healthDashboard, config.apiVersion);
|
|
1038
|
-
const LazySeoHealthTool = lazy(() => import('./SeoHealthTool-
|
|
1063
|
+
const LazySeoHealthTool = lazy(() => import('./SeoHealthTool-IULT4G25.js'));
|
|
1039
1064
|
const BoundSeoHealthTool = () => createElement(
|
|
1040
1065
|
Suspense,
|
|
1041
1066
|
{ fallback: null },
|
|
@@ -1082,7 +1107,7 @@ var seofields = definePlugin((config = {}) => {
|
|
|
1082
1107
|
});
|
|
1083
1108
|
});
|
|
1084
1109
|
var plugin_default = seofields;
|
|
1085
|
-
var LazySeoHealthDashboard = lazy(() => import('./SeoHealthDashboard-
|
|
1110
|
+
var LazySeoHealthDashboard = lazy(() => import('./SeoHealthDashboard-PTUEVYZL.js'));
|
|
1086
1111
|
function createSeoHealthPane(optionsOrS, optionsWhenS) {
|
|
1087
1112
|
const S = optionsOrS;
|
|
1088
1113
|
const _a = optionsWhenS != null ? optionsWhenS : {}, { query, openInPane = true, title: paneTitle } = _a, rest = __objRest(_a, ["query", "openInPane", "title"]);
|