sanity-plugin-seofields 1.10.0 → 1.10.1
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/dist/{SeoPreview-LMZAWWOE.cjs → SeoPreview-A2XZVMT2.cjs} +4 -4
- package/dist/{SeoPreview-LMZAWWOE.cjs.map → SeoPreview-A2XZVMT2.cjs.map} +1 -1
- package/dist/{SeoPreview-UNQBKTQO.js → SeoPreview-TATJQFMP.js} +2 -2
- package/dist/{chunk-HHO2AKAP.js → chunk-DB5MBPRK.js} +13 -13
- package/dist/chunk-DB5MBPRK.js.map +1 -0
- package/dist/{chunk-Y46ACXM4.cjs → chunk-LHUFL5LS.cjs} +13 -13
- package/dist/chunk-LHUFL5LS.cjs.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.cjs +72 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +63 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-HHO2AKAP.js.map +0 -1
- package/dist/chunk-Y46ACXM4.cjs.map +0 -1
- /package/dist/{SeoPreview-UNQBKTQO.js.map → SeoPreview-TATJQFMP.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -25,7 +25,7 @@ var _chunk5XTQRILLcjs = require('./chunk-5XTQRILL.cjs');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkLHUFL5LScjs = require('./chunk-LHUFL5LS.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
@@ -545,7 +545,7 @@ var FocusKeywordInput = (props) => {
|
|
|
545
545
|
const title = (parent == null ? void 0 : parent.title) || "";
|
|
546
546
|
const description = (parent == null ? void 0 : parent.description) || "";
|
|
547
547
|
const slug = ((_a2 = rootDoc == null ? void 0 : rootDoc.slug) == null ? void 0 : _a2.current) || "";
|
|
548
|
-
const placement =
|
|
548
|
+
const placement = _chunkLHUFL5LScjs.getFocusKeywordPlacement.call(void 0, value, title, description);
|
|
549
549
|
const items = [];
|
|
550
550
|
if (title) {
|
|
551
551
|
if (placement.atStartOfTitle) {
|
|
@@ -927,14 +927,22 @@ var KeywordsInput_default = KeywordsInput;
|
|
|
927
927
|
|
|
928
928
|
|
|
929
929
|
var MetaDescription = (props) => {
|
|
930
|
+
var _a, _b;
|
|
930
931
|
const { value, renderDefault, path, schemaType, onChange } = props;
|
|
931
932
|
const { options } = schemaType;
|
|
932
933
|
const parent = _sanity.useFormValue.call(void 0, [path[0]]);
|
|
933
934
|
const isParentseoField = parent && (parent == null ? void 0 : parent._type) === "seoFields";
|
|
934
935
|
const keywords = _react.useMemo.call(void 0, () => (parent == null ? void 0 : parent.keywords) || [], [parent == null ? void 0 : parent.keywords]);
|
|
936
|
+
const rootDoc = _sanity.useFormValue.call(void 0, []);
|
|
937
|
+
const keywordsVisible = (_b = (_a = options == null ? void 0 : options.isKeywordsVisible) == null ? void 0 : _a.call(options, rootDoc == null ? void 0 : rootDoc._type)) != null ? _b : true;
|
|
935
938
|
const feedbackItems = _react.useMemo.call(void 0,
|
|
936
|
-
() =>
|
|
937
|
-
|
|
939
|
+
() => _chunkLHUFL5LScjs.getMetaDescriptionValidationMessages.call(void 0,
|
|
940
|
+
value || "",
|
|
941
|
+
keywords,
|
|
942
|
+
isParentseoField,
|
|
943
|
+
keywordsVisible
|
|
944
|
+
),
|
|
945
|
+
[value, keywords, isParentseoField, keywordsVisible]
|
|
938
946
|
);
|
|
939
947
|
const readability = _react.useMemo.call(void 0, () => _chunkEUG4MNRCcjs.analyzeReadability.call(void 0, value || ""), [value]);
|
|
940
948
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ui.Stack, { space: 3, children: [
|
|
@@ -994,7 +1002,7 @@ var MetaImage = (props) => {
|
|
|
994
1002
|
const seoParent = _sanity.useFormValue.call(void 0, [path[0]]);
|
|
995
1003
|
const hasImage = !!(value == null ? void 0 : value.asset);
|
|
996
1004
|
const feedbackItems = _react.useMemo.call(void 0,
|
|
997
|
-
() =>
|
|
1005
|
+
() => _chunkLHUFL5LScjs.getMetaImageValidation.call(void 0, hasImage, seoParent),
|
|
998
1006
|
[hasImage, seoParent]
|
|
999
1007
|
);
|
|
1000
1008
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ui.Stack, { space: 3, children: [
|
|
@@ -1225,7 +1233,7 @@ var MetaTagsPreview_default = MetaTagsPreview;
|
|
|
1225
1233
|
|
|
1226
1234
|
|
|
1227
1235
|
var MetaTitle = (props) => {
|
|
1228
|
-
var _a, _b, _c;
|
|
1236
|
+
var _a, _b, _c, _d, _e;
|
|
1229
1237
|
const { value, renderDefault, path, schemaType, onChange } = props;
|
|
1230
1238
|
const { options } = schemaType;
|
|
1231
1239
|
const parent = _sanity.useFormValue.call(void 0, [path[0]]);
|
|
@@ -1269,9 +1277,16 @@ var MetaTitle = (props) => {
|
|
|
1269
1277
|
return titleSuffixOption;
|
|
1270
1278
|
}, [titleSuffixQuery, groqTitleSuffix, titleSuffixOption, rootDoc]);
|
|
1271
1279
|
const suffixLength = resolvedSuffix ? resolvedSuffix.length + 3 : 0;
|
|
1280
|
+
const keywordsVisible = (_e = (_d = options == null ? void 0 : options.isKeywordsVisible) == null ? void 0 : _d.call(options, rootDoc == null ? void 0 : rootDoc._type)) != null ? _e : true;
|
|
1272
1281
|
const feedbackItems = _react.useMemo.call(void 0,
|
|
1273
|
-
() =>
|
|
1274
|
-
|
|
1282
|
+
() => _chunkLHUFL5LScjs.getMetaTitleValidationMessages.call(void 0,
|
|
1283
|
+
value || "",
|
|
1284
|
+
keywords,
|
|
1285
|
+
isParentseoField,
|
|
1286
|
+
suffixLength,
|
|
1287
|
+
keywordsVisible
|
|
1288
|
+
),
|
|
1289
|
+
[value, keywords, isParentseoField, suffixLength, keywordsVisible]
|
|
1275
1290
|
);
|
|
1276
1291
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ui.Stack, { space: 3, children: [
|
|
1277
1292
|
renderDefault(props),
|
|
@@ -1455,6 +1470,9 @@ var getFieldHiddenFunction = (fieldName, config) => {
|
|
|
1455
1470
|
return isFieldHidden(fieldName, config, documentType);
|
|
1456
1471
|
};
|
|
1457
1472
|
};
|
|
1473
|
+
var getKeywordsVisibilityChecker = (config) => {
|
|
1474
|
+
return (documentType) => !isFieldHidden("keywords", config, documentType);
|
|
1475
|
+
};
|
|
1458
1476
|
|
|
1459
1477
|
// src/utils/utils.ts
|
|
1460
1478
|
var isEmpty = (value) => {
|
|
@@ -1470,14 +1488,17 @@ var isEmpty = (value) => {
|
|
|
1470
1488
|
|
|
1471
1489
|
|
|
1472
1490
|
var OgDescription = (props) => {
|
|
1491
|
+
var _a, _b;
|
|
1473
1492
|
const { value, renderDefault, path, schemaType, onChange } = props;
|
|
1474
1493
|
const { options } = schemaType;
|
|
1475
1494
|
const parent = _sanity.useFormValue.call(void 0, [path[0]]);
|
|
1476
1495
|
const isParentseoField = parent && (parent == null ? void 0 : parent._type) === "seoFields";
|
|
1477
1496
|
const keywords = _react.useMemo.call(void 0, () => (parent == null ? void 0 : parent.keywords) || [], [parent == null ? void 0 : parent.keywords]);
|
|
1497
|
+
const rootDoc = _sanity.useFormValue.call(void 0, []);
|
|
1498
|
+
const keywordsVisible = (_b = (_a = options == null ? void 0 : options.isKeywordsVisible) == null ? void 0 : _a.call(options, rootDoc == null ? void 0 : rootDoc._type)) != null ? _b : true;
|
|
1478
1499
|
const feedbackItems = _react.useMemo.call(void 0,
|
|
1479
|
-
() =>
|
|
1480
|
-
[value, keywords, isParentseoField]
|
|
1500
|
+
() => _chunkLHUFL5LScjs.getOgDescriptionValidation.call(void 0, value || "", keywords, isParentseoField, keywordsVisible),
|
|
1501
|
+
[value, keywords, isParentseoField, keywordsVisible]
|
|
1481
1502
|
);
|
|
1482
1503
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ui.Stack, { space: 3, children: [
|
|
1483
1504
|
renderDefault(props),
|
|
@@ -1520,7 +1541,7 @@ var OgImage = (props) => {
|
|
|
1520
1541
|
const hasImage = !!(imgValue == null ? void 0 : imgValue.asset);
|
|
1521
1542
|
const altText = imgValue == null ? void 0 : imgValue.alt;
|
|
1522
1543
|
const feedbackItems = _react.useMemo.call(void 0,
|
|
1523
|
-
() =>
|
|
1544
|
+
() => _chunkLHUFL5LScjs.getOgImageValidation.call(void 0, hasImage, altText, seoParent),
|
|
1524
1545
|
[hasImage, altText, seoParent]
|
|
1525
1546
|
);
|
|
1526
1547
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ui.Stack, { space: 3, children: [
|
|
@@ -1551,7 +1572,7 @@ var OgImage_default = OgImage;
|
|
|
1551
1572
|
var OgImageUrl = (props) => {
|
|
1552
1573
|
const { value, renderDefault, path } = props;
|
|
1553
1574
|
const seoParent = _sanity.useFormValue.call(void 0, [path[0]]);
|
|
1554
|
-
const feedbackItems = _react.useMemo.call(void 0, () =>
|
|
1575
|
+
const feedbackItems = _react.useMemo.call(void 0, () => _chunkLHUFL5LScjs.getOgImageUrlValidation.call(void 0, value, seoParent), [value, seoParent]);
|
|
1555
1576
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ui.Stack, { space: 3, children: [
|
|
1556
1577
|
renderDefault(props),
|
|
1557
1578
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ui.Stack, { space: 2, children: feedbackItems.map((item) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: { display: "flex", alignItems: "center", gap: 7 }, children: [
|
|
@@ -1578,14 +1599,17 @@ var OgImageUrl_default = OgImageUrl;
|
|
|
1578
1599
|
|
|
1579
1600
|
|
|
1580
1601
|
var OgTitle = (props) => {
|
|
1602
|
+
var _a, _b;
|
|
1581
1603
|
const { value, renderDefault, path, schemaType, onChange } = props;
|
|
1582
1604
|
const { options } = schemaType;
|
|
1583
1605
|
const parent = _sanity.useFormValue.call(void 0, [path[0]]);
|
|
1584
1606
|
const isParentseoField = parent && (parent == null ? void 0 : parent._type) === "seoFields";
|
|
1585
1607
|
const keywords = _react.useMemo.call(void 0, () => (parent == null ? void 0 : parent.keywords) || [], [parent == null ? void 0 : parent.keywords]);
|
|
1608
|
+
const rootDoc = _sanity.useFormValue.call(void 0, []);
|
|
1609
|
+
const keywordsVisible = (_b = (_a = options == null ? void 0 : options.isKeywordsVisible) == null ? void 0 : _a.call(options, rootDoc == null ? void 0 : rootDoc._type)) != null ? _b : true;
|
|
1586
1610
|
const feedbackItems = _react.useMemo.call(void 0,
|
|
1587
|
-
() =>
|
|
1588
|
-
[value, keywords, isParentseoField]
|
|
1611
|
+
() => _chunkLHUFL5LScjs.getOgTitleValidation.call(void 0, value || "", keywords, isParentseoField, keywordsVisible),
|
|
1612
|
+
[value, keywords, isParentseoField, keywordsVisible]
|
|
1589
1613
|
);
|
|
1590
1614
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ui.Stack, { space: 3, children: [
|
|
1591
1615
|
renderDefault(props),
|
|
@@ -1638,7 +1662,9 @@ function openGraph(config = {}) {
|
|
|
1638
1662
|
components: {
|
|
1639
1663
|
input: OgTitle_default
|
|
1640
1664
|
},
|
|
1641
|
-
options: _chunkA57XNQC7cjs.__spreadValues.call(void 0, {}, config.ai ? { ai: withLicense(config.ai, config.licenseKey) } : {})
|
|
1665
|
+
options: _chunkA57XNQC7cjs.__spreadProps.call(void 0, _chunkA57XNQC7cjs.__spreadValues.call(void 0, {}, config.ai ? { ai: withLicense(config.ai, config.licenseKey) } : {}), {
|
|
1666
|
+
isKeywordsVisible: getKeywordsVisibilityChecker(config)
|
|
1667
|
+
})
|
|
1642
1668
|
})),
|
|
1643
1669
|
_sanity.defineField.call(void 0, _chunkA57XNQC7cjs.__spreadProps.call(void 0, _chunkA57XNQC7cjs.__spreadValues.call(void 0, {
|
|
1644
1670
|
name: "description"
|
|
@@ -1649,7 +1675,9 @@ function openGraph(config = {}) {
|
|
|
1649
1675
|
components: {
|
|
1650
1676
|
input: OgDescription_default
|
|
1651
1677
|
},
|
|
1652
|
-
options: _chunkA57XNQC7cjs.__spreadValues.call(void 0, {}, config.ai ? { ai: withLicense(config.ai, config.licenseKey) } : {})
|
|
1678
|
+
options: _chunkA57XNQC7cjs.__spreadProps.call(void 0, _chunkA57XNQC7cjs.__spreadValues.call(void 0, {}, config.ai ? { ai: withLicense(config.ai, config.licenseKey) } : {}), {
|
|
1679
|
+
isKeywordsVisible: getKeywordsVisibilityChecker(config)
|
|
1680
|
+
})
|
|
1653
1681
|
})),
|
|
1654
1682
|
_sanity.defineField.call(void 0, _chunkA57XNQC7cjs.__spreadProps.call(void 0, _chunkA57XNQC7cjs.__spreadValues.call(void 0, {
|
|
1655
1683
|
name: "siteName"
|
|
@@ -1741,14 +1769,17 @@ function openGraph(config = {}) {
|
|
|
1741
1769
|
|
|
1742
1770
|
|
|
1743
1771
|
var TwitterDescription = (props) => {
|
|
1772
|
+
var _a, _b;
|
|
1744
1773
|
const { value, renderDefault, path, schemaType, onChange } = props;
|
|
1745
1774
|
const { options } = schemaType;
|
|
1746
1775
|
const parent = _sanity.useFormValue.call(void 0, [path[0]]);
|
|
1747
1776
|
const isParentseoField = parent && (parent == null ? void 0 : parent._type) === "seoFields";
|
|
1748
1777
|
const keywords = _react.useMemo.call(void 0, () => (parent == null ? void 0 : parent.keywords) || [], [parent == null ? void 0 : parent.keywords]);
|
|
1778
|
+
const rootDoc = _sanity.useFormValue.call(void 0, []);
|
|
1779
|
+
const keywordsVisible = (_b = (_a = options == null ? void 0 : options.isKeywordsVisible) == null ? void 0 : _a.call(options, rootDoc == null ? void 0 : rootDoc._type)) != null ? _b : true;
|
|
1749
1780
|
const feedbackItems = _react.useMemo.call(void 0,
|
|
1750
|
-
() =>
|
|
1751
|
-
[value, keywords, isParentseoField]
|
|
1781
|
+
() => _chunkLHUFL5LScjs.getTwitterDescriptionValidation.call(void 0, value || "", keywords, isParentseoField, keywordsVisible),
|
|
1782
|
+
[value, keywords, isParentseoField, keywordsVisible]
|
|
1752
1783
|
);
|
|
1753
1784
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ui.Stack, { space: 3, children: [
|
|
1754
1785
|
renderDefault(props),
|
|
@@ -1791,7 +1822,7 @@ var TwitterImage = (props) => {
|
|
|
1791
1822
|
const hasImage = !!(imgValue == null ? void 0 : imgValue.asset);
|
|
1792
1823
|
const altText = imgValue == null ? void 0 : imgValue.alt;
|
|
1793
1824
|
const feedbackItems = _react.useMemo.call(void 0,
|
|
1794
|
-
() =>
|
|
1825
|
+
() => _chunkLHUFL5LScjs.getTwitterImageValidation.call(void 0, hasImage, altText, seoParent),
|
|
1795
1826
|
[hasImage, altText, seoParent]
|
|
1796
1827
|
);
|
|
1797
1828
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ui.Stack, { space: 3, children: [
|
|
@@ -1823,7 +1854,7 @@ var TwitterImageUrl = (props) => {
|
|
|
1823
1854
|
const { value, renderDefault, path } = props;
|
|
1824
1855
|
const seoParent = _sanity.useFormValue.call(void 0, [path[0]]);
|
|
1825
1856
|
const feedbackItems = _react.useMemo.call(void 0,
|
|
1826
|
-
() =>
|
|
1857
|
+
() => _chunkLHUFL5LScjs.getTwitterImageUrlValidation.call(void 0, value, seoParent),
|
|
1827
1858
|
[value, seoParent]
|
|
1828
1859
|
);
|
|
1829
1860
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ui.Stack, { space: 3, children: [
|
|
@@ -1852,14 +1883,17 @@ var TwitterImageUrl_default = TwitterImageUrl;
|
|
|
1852
1883
|
|
|
1853
1884
|
|
|
1854
1885
|
var TwitterTitle = (props) => {
|
|
1886
|
+
var _a, _b;
|
|
1855
1887
|
const { value, renderDefault, path, schemaType, onChange } = props;
|
|
1856
1888
|
const { options } = schemaType;
|
|
1857
1889
|
const parent = _sanity.useFormValue.call(void 0, [path[0]]);
|
|
1858
1890
|
const isParentseoField = parent && (parent == null ? void 0 : parent._type) === "seoFields";
|
|
1859
1891
|
const keywords = _react.useMemo.call(void 0, () => (parent == null ? void 0 : parent.keywords) || [], [parent == null ? void 0 : parent.keywords]);
|
|
1892
|
+
const rootDoc = _sanity.useFormValue.call(void 0, []);
|
|
1893
|
+
const keywordsVisible = (_b = (_a = options == null ? void 0 : options.isKeywordsVisible) == null ? void 0 : _a.call(options, rootDoc == null ? void 0 : rootDoc._type)) != null ? _b : true;
|
|
1860
1894
|
const feedbackItems = _react.useMemo.call(void 0,
|
|
1861
|
-
() =>
|
|
1862
|
-
[value, keywords, isParentseoField]
|
|
1895
|
+
() => _chunkLHUFL5LScjs.getTwitterTitleValidation.call(void 0, value || "", keywords, isParentseoField, keywordsVisible),
|
|
1896
|
+
[value, keywords, isParentseoField, keywordsVisible]
|
|
1863
1897
|
);
|
|
1864
1898
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _ui.Stack, { space: 3, children: [
|
|
1865
1899
|
renderDefault(props),
|
|
@@ -1933,7 +1967,9 @@ function twitter(config = {}) {
|
|
|
1933
1967
|
components: {
|
|
1934
1968
|
input: twitterTitle_default
|
|
1935
1969
|
},
|
|
1936
|
-
options: _chunkA57XNQC7cjs.__spreadValues.call(void 0, {}, config.ai ? { ai: withLicense(config.ai, config.licenseKey) } : {})
|
|
1970
|
+
options: _chunkA57XNQC7cjs.__spreadProps.call(void 0, _chunkA57XNQC7cjs.__spreadValues.call(void 0, {}, config.ai ? { ai: withLicense(config.ai, config.licenseKey) } : {}), {
|
|
1971
|
+
isKeywordsVisible: getKeywordsVisibilityChecker(config)
|
|
1972
|
+
})
|
|
1937
1973
|
})),
|
|
1938
1974
|
_sanity.defineField.call(void 0, _chunkA57XNQC7cjs.__spreadProps.call(void 0, _chunkA57XNQC7cjs.__spreadValues.call(void 0, {
|
|
1939
1975
|
name: "description",
|
|
@@ -1944,7 +1980,9 @@ function twitter(config = {}) {
|
|
|
1944
1980
|
components: {
|
|
1945
1981
|
input: twitterDescription_default
|
|
1946
1982
|
},
|
|
1947
|
-
options: _chunkA57XNQC7cjs.__spreadValues.call(void 0, {}, config.ai ? { ai: withLicense(config.ai, config.licenseKey) } : {})
|
|
1983
|
+
options: _chunkA57XNQC7cjs.__spreadProps.call(void 0, _chunkA57XNQC7cjs.__spreadValues.call(void 0, {}, config.ai ? { ai: withLicense(config.ai, config.licenseKey) } : {}), {
|
|
1984
|
+
isKeywordsVisible: getKeywordsVisibilityChecker(config)
|
|
1985
|
+
})
|
|
1948
1986
|
})),
|
|
1949
1987
|
_sanity.defineField.call(void 0, _chunkA57XNQC7cjs.__spreadProps.call(void 0, _chunkA57XNQC7cjs.__spreadValues.call(void 0, {
|
|
1950
1988
|
name: "imageType"
|
|
@@ -2003,7 +2041,7 @@ function twitter(config = {}) {
|
|
|
2003
2041
|
}
|
|
2004
2042
|
|
|
2005
2043
|
// src/schemas/index.ts
|
|
2006
|
-
var LazySeoPreview = _react.lazy.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./SeoPreview-
|
|
2044
|
+
var LazySeoPreview = _react.lazy.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./SeoPreview-A2XZVMT2.cjs"))));
|
|
2007
2045
|
var SeoPreviewWrapper = (props) => _react.createElement.call(void 0, _react.Suspense, { fallback: null }, _react.createElement.call(void 0, LazySeoPreview, props));
|
|
2008
2046
|
function buildFieldGroupMap(groups) {
|
|
2009
2047
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -2067,7 +2105,9 @@ function getAiOption(config) {
|
|
|
2067
2105
|
return config.ai ? { ai: withLicense(config.ai, config.licenseKey) } : {};
|
|
2068
2106
|
}
|
|
2069
2107
|
function getTitleFieldOptions(config) {
|
|
2070
|
-
return _chunkA57XNQC7cjs.__spreadValues.call(void 0, _chunkA57XNQC7cjs.__spreadValues.call(void 0, _chunkA57XNQC7cjs.__spreadValues.call(void 0, {}, config.apiVersion ? { apiVersion: config.apiVersion } : {}), getSeoPreviewSuffixOptions(config.seoPreview)), getAiOption(config))
|
|
2108
|
+
return _chunkA57XNQC7cjs.__spreadProps.call(void 0, _chunkA57XNQC7cjs.__spreadValues.call(void 0, _chunkA57XNQC7cjs.__spreadValues.call(void 0, _chunkA57XNQC7cjs.__spreadValues.call(void 0, {}, config.apiVersion ? { apiVersion: config.apiVersion } : {}), getSeoPreviewSuffixOptions(config.seoPreview)), getAiOption(config)), {
|
|
2109
|
+
isKeywordsVisible: getKeywordsVisibilityChecker(config)
|
|
2110
|
+
});
|
|
2071
2111
|
}
|
|
2072
2112
|
function buildGeoChecklistField(config, fieldGroupMap) {
|
|
2073
2113
|
if (config.geo === false) return [];
|
|
@@ -2163,7 +2203,9 @@ function seoFieldsSchema(config = {}) {
|
|
|
2163
2203
|
components: {
|
|
2164
2204
|
input: MetaDescription_default
|
|
2165
2205
|
},
|
|
2166
|
-
options: getAiOption(config),
|
|
2206
|
+
options: _chunkA57XNQC7cjs.__spreadProps.call(void 0, _chunkA57XNQC7cjs.__spreadValues.call(void 0, {}, getAiOption(config)), {
|
|
2207
|
+
isKeywordsVisible: getKeywordsVisibilityChecker(config)
|
|
2208
|
+
}),
|
|
2167
2209
|
hidden: getFieldHiddenFunction("description", config)
|
|
2168
2210
|
})),
|
|
2169
2211
|
fieldGroupMap
|
|
@@ -2700,17 +2742,17 @@ var scoreKeywordArray = (keywords, title, description) => {
|
|
|
2700
2742
|
}
|
|
2701
2743
|
const issues = [];
|
|
2702
2744
|
let score = 2;
|
|
2703
|
-
if (
|
|
2745
|
+
if (_chunkLHUFL5LScjs.hasMatchingKeyword.call(void 0, title || "", keywords) || _chunkLHUFL5LScjs.hasMatchingKeyword.call(void 0, description || "", keywords)) {
|
|
2704
2746
|
score += 3;
|
|
2705
2747
|
} else {
|
|
2706
2748
|
issues.push("Keywords defined but not used in title or description");
|
|
2707
2749
|
}
|
|
2708
|
-
const stuffed =
|
|
2750
|
+
const stuffed = _chunkLHUFL5LScjs.hasKeywordOveruse.call(void 0, title || "", keywords) || _chunkLHUFL5LScjs.hasKeywordOveruse.call(void 0, description || "", keywords);
|
|
2709
2751
|
if (stuffed) issues.push("Keyword stuffing detected \u2014 reduce repeated keyword usage");
|
|
2710
2752
|
return { score, issues, stuffed };
|
|
2711
2753
|
};
|
|
2712
2754
|
var scoreFocusKeyword = (focusKeyword, title, description) => {
|
|
2713
|
-
const placement =
|
|
2755
|
+
const placement = _chunkLHUFL5LScjs.getFocusKeywordPlacement.call(void 0, focusKeyword, title, description);
|
|
2714
2756
|
if (!placement.hasFocusKeyword) {
|
|
2715
2757
|
return { score: 0, issues: ["No focus keyword defined"], stuffed: false };
|
|
2716
2758
|
}
|