@justanarthur/payload-plugin-seo 1.3.6

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 (144) hide show
  1. package/README.md +16 -0
  2. package/dist/defaults.d.ts +11 -0
  3. package/dist/defaults.d.ts.map +1 -0
  4. package/dist/exports/client.d.ts +6 -0
  5. package/dist/exports/client.d.ts.map +1 -0
  6. package/dist/exports/fields-components.d.ts +6 -0
  7. package/dist/exports/fields-components.d.ts.map +1 -0
  8. package/dist/exports/fields.d.ts +6 -0
  9. package/dist/exports/fields.d.ts.map +1 -0
  10. package/dist/exports/types.d.ts +2 -0
  11. package/dist/exports/types.d.ts.map +1 -0
  12. package/dist/fields/MetaDescription/MetaDescriptionComponent.d.ts +9 -0
  13. package/dist/fields/MetaDescription/MetaDescriptionComponent.d.ts.map +1 -0
  14. package/dist/fields/MetaDescription/index.d.ts +16 -0
  15. package/dist/fields/MetaDescription/index.d.ts.map +1 -0
  16. package/dist/fields/MetaImage/MetaImageComponent.d.ts +8 -0
  17. package/dist/fields/MetaImage/MetaImageComponent.d.ts.map +1 -0
  18. package/dist/fields/MetaImage/index.d.ts +13 -0
  19. package/dist/fields/MetaImage/index.d.ts.map +1 -0
  20. package/dist/fields/MetaTitle/MetaTitleComponent.d.ts +10 -0
  21. package/dist/fields/MetaTitle/MetaTitleComponent.d.ts.map +1 -0
  22. package/dist/fields/MetaTitle/index.d.ts +16 -0
  23. package/dist/fields/MetaTitle/index.d.ts.map +1 -0
  24. package/dist/fields/Overview/OverviewComponent.d.ts +18 -0
  25. package/dist/fields/Overview/OverviewComponent.d.ts.map +1 -0
  26. package/dist/fields/Overview/index.d.ts +34 -0
  27. package/dist/fields/Overview/index.d.ts.map +1 -0
  28. package/dist/fields/Preview/PreviewComponent.d.ts +9 -0
  29. package/dist/fields/Preview/PreviewComponent.d.ts.map +1 -0
  30. package/dist/fields/Preview/index.d.ts +24 -0
  31. package/dist/fields/Preview/index.d.ts.map +1 -0
  32. package/dist/fields/index.scss +7 -0
  33. package/dist/index.d.ts +4 -0
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/openai/message.d.ts +7 -0
  36. package/dist/openai/message.d.ts.map +1 -0
  37. package/dist/src/defaults.js +12 -0
  38. package/dist/src/defaults.js.map +1 -0
  39. package/dist/src/exports/client.js +7 -0
  40. package/dist/src/exports/client.js.map +1 -0
  41. package/dist/src/exports/fields-components.js +7 -0
  42. package/dist/src/exports/fields-components.js.map +1 -0
  43. package/dist/src/exports/fields.js +7 -0
  44. package/dist/src/exports/fields.js.map +1 -0
  45. package/dist/src/exports/types.js +3 -0
  46. package/dist/src/exports/types.js.map +1 -0
  47. package/dist/src/fields/MetaDescription/MetaDescriptionComponent.js +224 -0
  48. package/dist/src/fields/MetaDescription/MetaDescriptionComponent.js.map +1 -0
  49. package/dist/src/fields/MetaDescription/index.js +22 -0
  50. package/dist/src/fields/MetaDescription/index.js.map +1 -0
  51. package/dist/src/fields/MetaImage/MetaImageComponent.js +173 -0
  52. package/dist/src/fields/MetaImage/MetaImageComponent.js.map +1 -0
  53. package/dist/src/fields/MetaImage/index.js +24 -0
  54. package/dist/src/fields/MetaImage/index.js.map +1 -0
  55. package/dist/src/fields/MetaTitle/MetaTitleComponent.js +225 -0
  56. package/dist/src/fields/MetaTitle/MetaTitleComponent.js.map +1 -0
  57. package/dist/src/fields/MetaTitle/index.js +22 -0
  58. package/dist/src/fields/MetaTitle/index.js.map +1 -0
  59. package/dist/src/fields/Overview/OverviewComponent.js +67 -0
  60. package/dist/src/fields/Overview/OverviewComponent.js.map +1 -0
  61. package/dist/src/fields/Overview/index.js +25 -0
  62. package/dist/src/fields/Overview/index.js.map +1 -0
  63. package/dist/src/fields/Preview/PreviewComponent.js +117 -0
  64. package/dist/src/fields/Preview/PreviewComponent.js.map +1 -0
  65. package/dist/src/fields/Preview/index.js +23 -0
  66. package/dist/src/fields/Preview/index.js.map +1 -0
  67. package/dist/src/index.js +309 -0
  68. package/dist/src/index.js.map +1 -0
  69. package/dist/src/openai/message.js +28 -0
  70. package/dist/src/openai/message.js.map +1 -0
  71. package/dist/src/translations/cs.js +26 -0
  72. package/dist/src/translations/cs.js.map +1 -0
  73. package/dist/src/translations/de.js +26 -0
  74. package/dist/src/translations/de.js.map +1 -0
  75. package/dist/src/translations/en.js +27 -0
  76. package/dist/src/translations/en.js.map +1 -0
  77. package/dist/src/translations/es.js +26 -0
  78. package/dist/src/translations/es.js.map +1 -0
  79. package/dist/src/translations/fa.js +26 -0
  80. package/dist/src/translations/fa.js.map +1 -0
  81. package/dist/src/translations/fr.js +26 -0
  82. package/dist/src/translations/fr.js.map +1 -0
  83. package/dist/src/translations/index.js +30 -0
  84. package/dist/src/translations/index.js.map +1 -0
  85. package/dist/src/translations/it.js +26 -0
  86. package/dist/src/translations/it.js.map +1 -0
  87. package/dist/src/translations/nb.js +26 -0
  88. package/dist/src/translations/nb.js.map +1 -0
  89. package/dist/src/translations/pl.js +26 -0
  90. package/dist/src/translations/pl.js.map +1 -0
  91. package/dist/src/translations/ru.js +26 -0
  92. package/dist/src/translations/ru.js.map +1 -0
  93. package/dist/src/translations/sv.js +26 -0
  94. package/dist/src/translations/sv.js.map +1 -0
  95. package/dist/src/translations/tr.js +26 -0
  96. package/dist/src/translations/tr.js.map +1 -0
  97. package/dist/src/translations/uk.js +26 -0
  98. package/dist/src/translations/uk.js.map +1 -0
  99. package/dist/src/translations/vi.js +26 -0
  100. package/dist/src/translations/vi.js.map +1 -0
  101. package/dist/src/types.js +3 -0
  102. package/dist/src/types.js.map +1 -0
  103. package/dist/src/ui/LengthIndicator.js +135 -0
  104. package/dist/src/ui/LengthIndicator.js.map +1 -0
  105. package/dist/src/ui/Pill.js +23 -0
  106. package/dist/src/ui/Pill.js.map +1 -0
  107. package/dist/translations/cs.d.ts +3 -0
  108. package/dist/translations/cs.d.ts.map +1 -0
  109. package/dist/translations/de.d.ts +3 -0
  110. package/dist/translations/de.d.ts.map +1 -0
  111. package/dist/translations/en.d.ts +3 -0
  112. package/dist/translations/en.d.ts.map +1 -0
  113. package/dist/translations/es.d.ts +3 -0
  114. package/dist/translations/es.d.ts.map +1 -0
  115. package/dist/translations/fa.d.ts +3 -0
  116. package/dist/translations/fa.d.ts.map +1 -0
  117. package/dist/translations/fr.d.ts +3 -0
  118. package/dist/translations/fr.d.ts.map +1 -0
  119. package/dist/translations/index.d.ts +19 -0
  120. package/dist/translations/index.d.ts.map +1 -0
  121. package/dist/translations/it.d.ts +3 -0
  122. package/dist/translations/it.d.ts.map +1 -0
  123. package/dist/translations/nb.d.ts +3 -0
  124. package/dist/translations/nb.d.ts.map +1 -0
  125. package/dist/translations/pl.d.ts +3 -0
  126. package/dist/translations/pl.d.ts.map +1 -0
  127. package/dist/translations/ru.d.ts +3 -0
  128. package/dist/translations/ru.d.ts.map +1 -0
  129. package/dist/translations/sv.d.ts +3 -0
  130. package/dist/translations/sv.d.ts.map +1 -0
  131. package/dist/translations/tr.d.ts +3 -0
  132. package/dist/translations/tr.d.ts.map +1 -0
  133. package/dist/translations/translation-schema.json +96 -0
  134. package/dist/translations/uk.d.ts +3 -0
  135. package/dist/translations/uk.d.ts.map +1 -0
  136. package/dist/translations/vi.d.ts +3 -0
  137. package/dist/translations/vi.d.ts.map +1 -0
  138. package/dist/types.d.ts +82 -0
  139. package/dist/types.d.ts.map +1 -0
  140. package/dist/ui/LengthIndicator.d.ts +7 -0
  141. package/dist/ui/LengthIndicator.d.ts.map +1 -0
  142. package/dist/ui/Pill.d.ts +7 -0
  143. package/dist/ui/Pill.d.ts.map +1 -0
  144. package/package.json +59 -0
@@ -0,0 +1,135 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useTranslation } from '@payloadcms/ui';
4
+ import React, { Fragment, useEffect, useState } from 'react';
5
+ import { Pill } from './Pill.js';
6
+ export const LengthIndicator = (props)=>{
7
+ const { maxLength = 0, minLength = 0, text } = props;
8
+ const [labelStyle, setLabelStyle] = useState({
9
+ backgroundColor: '',
10
+ color: ''
11
+ });
12
+ const [label, setLabel] = useState('');
13
+ const [barWidth, setBarWidth] = useState(0);
14
+ const { t } = useTranslation();
15
+ useEffect(()=>{
16
+ const textLength = text?.length || 0;
17
+ if (textLength === 0) {
18
+ setLabel(t('plugin-seo:missing'));
19
+ setLabelStyle({
20
+ backgroundColor: 'red',
21
+ color: 'white'
22
+ });
23
+ setBarWidth(0);
24
+ } else {
25
+ const progress = (textLength - minLength) / (maxLength - minLength);
26
+ if (progress < 0) {
27
+ const ratioUntilMin = textLength / minLength;
28
+ if (ratioUntilMin > 0.9) {
29
+ setLabel(t('plugin-seo:almostThere'));
30
+ setLabelStyle({
31
+ backgroundColor: 'orange',
32
+ color: 'white'
33
+ });
34
+ } else {
35
+ setLabel(t('plugin-seo:tooShort'));
36
+ setLabelStyle({
37
+ backgroundColor: 'orangered',
38
+ color: 'white'
39
+ });
40
+ }
41
+ setBarWidth(ratioUntilMin);
42
+ }
43
+ if (progress >= 0 && progress <= 1) {
44
+ setLabel(t('plugin-seo:good'));
45
+ setLabelStyle({
46
+ backgroundColor: 'green',
47
+ color: 'white'
48
+ });
49
+ setBarWidth(progress);
50
+ }
51
+ if (progress > 1) {
52
+ setLabel(t('plugin-seo:tooLong'));
53
+ setLabelStyle({
54
+ backgroundColor: 'red',
55
+ color: 'white'
56
+ });
57
+ setBarWidth(1);
58
+ }
59
+ }
60
+ }, [
61
+ minLength,
62
+ maxLength,
63
+ text,
64
+ t
65
+ ]);
66
+ const textLength = text?.length || 0;
67
+ const charsUntilMax = maxLength - textLength;
68
+ const charsUntilMin = minLength - textLength;
69
+ return /*#__PURE__*/ _jsxs("div", {
70
+ style: {
71
+ alignItems: 'center',
72
+ display: 'flex',
73
+ width: '100%'
74
+ },
75
+ children: [
76
+ /*#__PURE__*/ _jsx(Pill, {
77
+ backgroundColor: labelStyle.backgroundColor,
78
+ color: labelStyle.color,
79
+ label: label
80
+ }),
81
+ /*#__PURE__*/ _jsx("div", {
82
+ style: {
83
+ flexShrink: 0,
84
+ lineHeight: 1,
85
+ marginRight: '10px',
86
+ whiteSpace: 'nowrap'
87
+ },
88
+ children: /*#__PURE__*/ _jsxs("small", {
89
+ children: [
90
+ t('plugin-seo:characterCount', {
91
+ current: text?.length || 0,
92
+ maxLength,
93
+ minLength
94
+ }),
95
+ (textLength === 0 || charsUntilMin > 0) && /*#__PURE__*/ _jsx(Fragment, {
96
+ children: t('plugin-seo:charactersToGo', {
97
+ characters: charsUntilMin
98
+ })
99
+ }),
100
+ charsUntilMin <= 0 && charsUntilMax >= 0 && /*#__PURE__*/ _jsx(Fragment, {
101
+ children: t('plugin-seo:charactersLeftOver', {
102
+ characters: charsUntilMax
103
+ })
104
+ }),
105
+ charsUntilMax < 0 && /*#__PURE__*/ _jsx(Fragment, {
106
+ children: t('plugin-seo:charactersTooMany', {
107
+ characters: charsUntilMax * -1
108
+ })
109
+ })
110
+ ]
111
+ })
112
+ }),
113
+ /*#__PURE__*/ _jsx("div", {
114
+ style: {
115
+ backgroundColor: '#F3F3F3',
116
+ height: '2px',
117
+ position: 'relative',
118
+ width: '100%'
119
+ },
120
+ children: /*#__PURE__*/ _jsx("div", {
121
+ style: {
122
+ backgroundColor: labelStyle.backgroundColor,
123
+ height: '100%',
124
+ left: 0,
125
+ position: 'absolute',
126
+ top: 0,
127
+ width: `${barWidth * 100}%`
128
+ }
129
+ })
130
+ })
131
+ ]
132
+ });
133
+ };
134
+
135
+ //# sourceMappingURL=LengthIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/ui/LengthIndicator.tsx"],"sourcesContent":["'use client'\n\nimport { useTranslation } from '@payloadcms/ui'\nimport React, { Fragment, useEffect, useState } from 'react'\n\nimport type { PluginSEOTranslationKeys, PluginSEOTranslations } from '../translations/index.js'\nimport { Pill } from './Pill.js'\n\nexport const LengthIndicator: React.FC<{\n maxLength?: number\n minLength?: number\n text?: string\n}> = (props) => {\n const { maxLength = 0, minLength = 0, text } = props\n\n const [labelStyle, setLabelStyle] = useState({\n backgroundColor: '',\n color: '',\n })\n\n const [label, setLabel] = useState('')\n\n const [barWidth, setBarWidth] = useState<number>(0)\n\n const { t } = useTranslation<PluginSEOTranslations, PluginSEOTranslationKeys>()\n\n useEffect(() => {\n const textLength = text?.length || 0\n\n if (textLength === 0) {\n setLabel(t('plugin-seo:missing'))\n setLabelStyle({\n backgroundColor: 'red',\n color: 'white',\n })\n setBarWidth(0)\n } else {\n const progress = (textLength - minLength) / (maxLength - minLength)\n\n if (progress < 0) {\n const ratioUntilMin = textLength / minLength\n\n if (ratioUntilMin > 0.9) {\n setLabel(t('plugin-seo:almostThere'))\n setLabelStyle({\n backgroundColor: 'orange',\n color: 'white',\n })\n } else {\n setLabel(t('plugin-seo:tooShort'))\n setLabelStyle({\n backgroundColor: 'orangered',\n color: 'white',\n })\n }\n\n setBarWidth(ratioUntilMin)\n }\n\n if (progress >= 0 && progress <= 1) {\n setLabel(t('plugin-seo:good'))\n setLabelStyle({\n backgroundColor: 'green',\n color: 'white',\n })\n setBarWidth(progress)\n }\n\n if (progress > 1) {\n setLabel(t('plugin-seo:tooLong'))\n setLabelStyle({\n backgroundColor: 'red',\n color: 'white',\n })\n setBarWidth(1)\n }\n }\n }, [minLength, maxLength, text, t])\n\n const textLength = text?.length || 0\n\n const charsUntilMax = maxLength - textLength\n\n const charsUntilMin = minLength - textLength\n\n return (\n <div\n style={{\n alignItems: 'center',\n display: 'flex',\n width: '100%',\n }}\n >\n <Pill backgroundColor={labelStyle.backgroundColor} color={labelStyle.color} label={label} />\n <div\n style={{\n flexShrink: 0,\n lineHeight: 1,\n marginRight: '10px',\n whiteSpace: 'nowrap',\n }}\n >\n <small>\n {t('plugin-seo:characterCount', { current: text?.length || 0, maxLength, minLength })}\n {(textLength === 0 || charsUntilMin > 0) && (\n <Fragment>{t('plugin-seo:charactersToGo', { characters: charsUntilMin })}</Fragment>\n )}\n {charsUntilMin <= 0 && charsUntilMax >= 0 && (\n <Fragment>{t('plugin-seo:charactersLeftOver', { characters: charsUntilMax })}</Fragment>\n )}\n {charsUntilMax < 0 && (\n <Fragment>\n {t('plugin-seo:charactersTooMany', { characters: charsUntilMax * -1 })}\n </Fragment>\n )}\n </small>\n </div>\n <div\n style={{\n backgroundColor: '#F3F3F3',\n height: '2px',\n position: 'relative',\n width: '100%',\n }}\n >\n <div\n style={{\n backgroundColor: labelStyle.backgroundColor,\n height: '100%',\n left: 0,\n position: 'absolute',\n top: 0,\n width: `${barWidth * 100}%`,\n }}\n />\n </div>\n </div>\n )\n}\n"],"names":["useTranslation","React","Fragment","useEffect","useState","Pill","LengthIndicator","props","maxLength","minLength","text","labelStyle","setLabelStyle","backgroundColor","color","label","setLabel","barWidth","setBarWidth","t","textLength","length","progress","ratioUntilMin","charsUntilMax","charsUntilMin","div","style","alignItems","display","width","flexShrink","lineHeight","marginRight","whiteSpace","small","current","characters","height","position","left","top"],"mappings":"AAAA;;AAEA,SAASA,cAAc,QAAQ,iBAAgB;AAC/C,OAAOC,SAASC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAG5D,SAASC,IAAI,QAAQ,YAAW;AAEhC,OAAO,MAAMC,kBAIR,CAACC;IACJ,MAAM,EAAEC,YAAY,CAAC,EAAEC,YAAY,CAAC,EAAEC,IAAI,EAAE,GAAGH;IAE/C,MAAM,CAACI,YAAYC,cAAc,GAAGR,SAAS;QAC3CS,iBAAiB;QACjBC,OAAO;IACT;IAEA,MAAM,CAACC,OAAOC,SAAS,GAAGZ,SAAS;IAEnC,MAAM,CAACa,UAAUC,YAAY,GAAGd,SAAiB;IAEjD,MAAM,EAAEe,CAAC,EAAE,GAAGnB;IAEdG,UAAU;QACR,MAAMiB,aAAaV,MAAMW,UAAU;QAEnC,IAAID,eAAe,GAAG;YACpBJ,SAASG,EAAE;YACXP,cAAc;gBACZC,iBAAiB;gBACjBC,OAAO;YACT;YACAI,YAAY;QACd,OAAO;YACL,MAAMI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AE,iCAAiC;gCAAEkB,YAAYb;4BAAc;;wBAE3EA,gBAAgB,mBACf,KAACtB;sCACEiB,EAAE,gCAAgC;gCAAEkB,YAAYb,gBAAgB,CAAC;4BAAE;;;;;0BAK5E,KAACE;gBACCC,OAAO;oBACLd,iBAAiB;oBACjByB,QAAQ;oBACRC,UAAU;oBACVT,OAAO;gBACT;0BAEA,cAAA,KAACJ;oBACCC,OAAO;wBACLd,iBAAiBF,WAAWE,eAAe;wBAC3CyB,QAAQ;wBACRE,MAAM;wBACND,UAAU;wBACVE,KAAK;wBACLX,OAAO,GAAGb,WAAW,IAAI,CAAC,CAAC;oBAC7B;;;;;AAKV,EAAC"}
@@ -0,0 +1,23 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import React from 'react';
4
+ export const Pill = (props)=>{
5
+ const { backgroundColor, color, label } = props;
6
+ return /*#__PURE__*/ _jsx("div", {
7
+ style: {
8
+ backgroundColor,
9
+ borderRadius: '2px',
10
+ color,
11
+ flexShrink: 0,
12
+ lineHeight: 1,
13
+ marginRight: '10px',
14
+ padding: '4px 6px',
15
+ whiteSpace: 'nowrap'
16
+ },
17
+ children: /*#__PURE__*/ _jsx("small", {
18
+ children: label
19
+ })
20
+ });
21
+ };
22
+
23
+ //# sourceMappingURL=Pill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/ui/Pill.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\n\nexport const Pill: React.FC<{\n backgroundColor: string\n color: string\n label: string\n}> = (props) => {\n const { backgroundColor, color, label } = props\n\n return (\n <div\n style={{\n backgroundColor,\n borderRadius: '2px',\n color,\n flexShrink: 0,\n lineHeight: 1,\n marginRight: '10px',\n padding: '4px 6px',\n whiteSpace: 'nowrap',\n }}\n >\n <small>{label}</small>\n </div>\n )\n}\n"],"names":["React","Pill","props","backgroundColor","color","label","div","style","borderRadius","flexShrink","lineHeight","marginRight","padding","whiteSpace","small"],"mappings":"AAAA;;AAEA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,OAIR,CAACC;IACJ,MAAM,EAAEC,eAAe,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGH;IAE1C,qBACE,KAACI;QACCC,OAAO;YACLJ;YACAK,cAAc;YACdJ;YACAK,YAAY;YACZC,YAAY;YACZC,aAAa;YACbC,SAAS;YACTC,YAAY;QACd;kBAEA,cAAA,KAACC;sBAAOT;;;AAGd,EAAC"}
@@ -0,0 +1,3 @@
1
+ import type { GenericTranslationsObject } from '@payloadcms/translations';
2
+ export declare const cs: GenericTranslationsObject;
3
+ //# sourceMappingURL=cs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cs.d.ts","sourceRoot":"","sources":["../../src/translations/cs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBA0BhB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { GenericTranslationsObject } from '@payloadcms/translations';
2
+ export declare const de: GenericTranslationsObject;
3
+ //# sourceMappingURL=de.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../src/translations/de.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBA0BhB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { GenericTranslationsObject } from '@payloadcms/translations';
2
+ export declare const en: GenericTranslationsObject;
3
+ //# sourceMappingURL=en.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/translations/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBA0BhB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { GenericTranslationsObject } from '@payloadcms/translations';
2
+ export declare const es: GenericTranslationsObject;
3
+ //# sourceMappingURL=es.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../src/translations/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBA0BhB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { GenericTranslationsObject } from '@payloadcms/translations';
2
+ export declare const fa: GenericTranslationsObject;
3
+ //# sourceMappingURL=fa.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fa.d.ts","sourceRoot":"","sources":["../../src/translations/fa.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBA0BhB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { GenericTranslationsObject } from '@payloadcms/translations';
2
+ export declare const fr: GenericTranslationsObject;
3
+ //# sourceMappingURL=fr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/translations/fr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBA0BhB,CAAA"}
@@ -0,0 +1,19 @@
1
+ import type { GenericTranslationsObject, NestedKeysStripped } from '@payloadcms/translations';
2
+ export declare const translations: {
3
+ cs: GenericTranslationsObject;
4
+ de: GenericTranslationsObject;
5
+ en: GenericTranslationsObject;
6
+ es: GenericTranslationsObject;
7
+ fa: GenericTranslationsObject;
8
+ fr: GenericTranslationsObject;
9
+ it: GenericTranslationsObject;
10
+ nb: GenericTranslationsObject;
11
+ pl: GenericTranslationsObject;
12
+ ru: GenericTranslationsObject;
13
+ sv: GenericTranslationsObject;
14
+ tr: GenericTranslationsObject;
15
+ uk: GenericTranslationsObject;
16
+ };
17
+ export type PluginSEOTranslations = GenericTranslationsObject;
18
+ export type PluginSEOTranslationKeys = NestedKeysStripped<PluginSEOTranslations>;
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/translations/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAgB7F,eAAO,MAAM,YAAY;;;;;;;;;;;;;;CAcxB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,yBAAyB,CAAA;AAE7D,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,CAAC,qBAAqB,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { GenericTranslationsObject } from '@payloadcms/translations';
2
+ export declare const it: GenericTranslationsObject;
3
+ //# sourceMappingURL=it.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"it.d.ts","sourceRoot":"","sources":["../../src/translations/it.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBA2BhB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { GenericTranslationsObject } from '@payloadcms/translations';
2
+ export declare const nb: GenericTranslationsObject;
3
+ //# sourceMappingURL=nb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nb.d.ts","sourceRoot":"","sources":["../../src/translations/nb.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBA0BhB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { GenericTranslationsObject } from '@payloadcms/translations';
2
+ export declare const pl: GenericTranslationsObject;
3
+ //# sourceMappingURL=pl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pl.d.ts","sourceRoot":"","sources":["../../src/translations/pl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBA0BhB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { GenericTranslationsObject } from '@payloadcms/translations';
2
+ export declare const ru: GenericTranslationsObject;
3
+ //# sourceMappingURL=ru.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ru.d.ts","sourceRoot":"","sources":["../../src/translations/ru.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBA0BhB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { GenericTranslationsObject } from '@payloadcms/translations';
2
+ export declare const sv: GenericTranslationsObject;
3
+ //# sourceMappingURL=sv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sv.d.ts","sourceRoot":"","sources":["../../src/translations/sv.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBA0BhB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { GenericTranslationsObject } from '@payloadcms/translations';
2
+ export declare const tr: GenericTranslationsObject;
3
+ //# sourceMappingURL=tr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../src/translations/tr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBAyBhB,CAAA"}
@@ -0,0 +1,96 @@
1
+ {
2
+ "type": "object",
3
+ "$schema": "http://json-schema.org/draft-04/schema#",
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "$schema": {
7
+ "type": "string"
8
+ },
9
+ "plugin-seo": {
10
+ "type": "object",
11
+ "additionalProperties": false,
12
+ "properties": {
13
+ "missing": {
14
+ "type": "string"
15
+ },
16
+ "almostThere": {
17
+ "type": "string"
18
+ },
19
+ "autoGenerate": {
20
+ "type": "string"
21
+ },
22
+ "generateAi": {
23
+ "type": "string"
24
+ },
25
+ "bestPractices": {
26
+ "type": "string"
27
+ },
28
+ "characterCount": {
29
+ "type": "string"
30
+ },
31
+ "charactersLeftOver": {
32
+ "type": "string"
33
+ },
34
+ "charactersToGo": {
35
+ "type": "string"
36
+ },
37
+ "charactersTooMany": {
38
+ "type": "string"
39
+ },
40
+ "checksPassing": {
41
+ "type": "string"
42
+ },
43
+ "good": {
44
+ "type": "string"
45
+ },
46
+ "imageAutoGenerationTip": {
47
+ "type": "string"
48
+ },
49
+ "lengthTipDescription": {
50
+ "type": "string"
51
+ },
52
+ "lengthTipTitle": {
53
+ "type": "string"
54
+ },
55
+ "noImage": {
56
+ "type": "string"
57
+ },
58
+ "preview": {
59
+ "type": "string"
60
+ },
61
+ "previewDescription": {
62
+ "type": "string"
63
+ },
64
+ "tooLong": {
65
+ "type": "string"
66
+ },
67
+ "tooShort": {
68
+ "type": "string"
69
+ }
70
+ },
71
+ "required": [
72
+ "autoGenerate",
73
+ "imageAutoGenerationTip",
74
+ "bestPractices",
75
+ "lengthTipTitle",
76
+ "lengthTipDescription",
77
+ "good",
78
+ "tooLong",
79
+ "tooShort",
80
+ "almostThere",
81
+ "characterCount",
82
+ "charactersToGo",
83
+ "charactersLeftOver",
84
+ "charactersTooMany",
85
+ "noImage",
86
+ "checksPassing",
87
+ "preview",
88
+ "previewDescription",
89
+ "missing"
90
+ ]
91
+ }
92
+ },
93
+ "required": [
94
+ "plugin-seo"
95
+ ]
96
+ }
@@ -0,0 +1,3 @@
1
+ import type { GenericTranslationsObject } from '@payloadcms/translations';
2
+ export declare const uk: GenericTranslationsObject;
3
+ //# sourceMappingURL=uk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uk.d.ts","sourceRoot":"","sources":["../../src/translations/uk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBA0BhB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { GenericTranslationsObject } from '@payloadcms/translations';
2
+ export declare const vi: GenericTranslationsObject;
3
+ //# sourceMappingURL=vi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vi.d.ts","sourceRoot":"","sources":["../../src/translations/vi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEzE,eAAO,MAAM,EAAE,EAAE,yBAyBhB,CAAA"}
@@ -0,0 +1,82 @@
1
+ import type { DocumentInfoContext } from '@payloadcms/ui';
2
+ import type { CollectionConfig, CollectionSlug, Field, GlobalConfig, GlobalSlug, PayloadRequest } from 'payload';
3
+ export type FieldsOverride = (args: {
4
+ defaultFields: Field[];
5
+ }) => Field[];
6
+ export type PartialDocumentInfoContext = Pick<DocumentInfoContext, 'collectionSlug' | 'docPermissions' | 'globalSlug' | 'hasPublishPermission' | 'hasPublishedDoc' | 'hasSavePermission' | 'id' | 'initialData' | 'initialState' | 'preferencesKey' | 'title' | 'versionCount'>;
7
+ export type GenerateTitle<T = any> = (args: {
8
+ collectionConfig?: CollectionConfig;
9
+ doc: T;
10
+ globalConfig?: GlobalConfig;
11
+ locale?: string;
12
+ req: PayloadRequest;
13
+ } & PartialDocumentInfoContext) => Promise<string> | string;
14
+ export type GenerateDescription<T = any> = (args: {
15
+ collectionConfig?: CollectionConfig;
16
+ doc: T;
17
+ globalConfig?: GlobalConfig;
18
+ locale?: string;
19
+ req: PayloadRequest;
20
+ } & PartialDocumentInfoContext) => Promise<string> | string;
21
+ export type GenerateImage<T = any> = (args: {
22
+ collectionConfig?: CollectionConfig;
23
+ doc: T;
24
+ globalConfig?: GlobalConfig;
25
+ locale?: string;
26
+ req: PayloadRequest;
27
+ } & PartialDocumentInfoContext) => Promise<string> | string;
28
+ export type GenerateURL<T = any> = (args: {
29
+ collectionConfig?: CollectionConfig;
30
+ doc: T;
31
+ globalConfig?: GlobalConfig;
32
+ locale?: string;
33
+ req: PayloadRequest;
34
+ } & PartialDocumentInfoContext) => Promise<string> | string;
35
+ export type SEOPluginConfig = {
36
+ /**
37
+ * Collections to include the SEO fields in
38
+ */
39
+ collections?: CollectionSlug[];
40
+ /**
41
+ * Override the default fields inserted by the SEO plugin via a function that receives the default fields and returns the new fields
42
+ *
43
+ * If you need more flexibility you can insert the fields manually as needed. @link https://payloadcms.com/docs/plugins/seo#direct-use-of-fields
44
+ */
45
+ fields?: FieldsOverride;
46
+ generateDescription?: GenerateDescription;
47
+ generateDescriptionAi?: GenerateDescription;
48
+ generateImage?: GenerateImage;
49
+ generateTitle?: GenerateTitle;
50
+ generateTitleAi?: GenerateTitle;
51
+ /**
52
+ *
53
+ */
54
+ generateURL?: GenerateURL;
55
+ /**
56
+ * Globals to include the SEO fields in
57
+ */
58
+ globals?: GlobalSlug[];
59
+ interfaceName?: string;
60
+ /**
61
+ * OpenAI API key for generating descriptions and titles
62
+ * @link https://platform.openai.com/docs/guides/authentication
63
+ */
64
+ openaiApiKey?: string;
65
+ /**
66
+ * Group fields into tabs, your content will be automatically put into a general tab and the SEO fields into an SEO tab
67
+ *
68
+ * If you need more flexibility you can insert the fields manually as needed. @link https://payloadcms.com/docs/plugins/seo#direct-use-of-fields
69
+ */
70
+ tabbedUI?: boolean;
71
+ /**
72
+ * The slug of the collection used to handle image uploads
73
+ */
74
+ uploadsCollection?: CollectionSlug;
75
+ };
76
+ export type Meta = {
77
+ description?: string;
78
+ image?: any;
79
+ keywords?: string;
80
+ title?: string;
81
+ };
82
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3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AAM,MAAM,IAAI,GAAG;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare const LengthIndicator: React.FC<{
3
+ maxLength?: number;
4
+ minLength?: number;
5
+ text?: string;
6
+ }>;
7
+ //# sourceMappingURL=LengthIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LengthIndicator.d.ts","sourceRoot":"","sources":["../../src/ui/LengthIndicator.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAwC,MAAM,OAAO,CAAA;AAK5D,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CA8HA,CAAA"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare const Pill: React.FC<{
3
+ backgroundColor: string;
4
+ color: string;
5
+ label: string;
6
+ }>;
7
+ //# sourceMappingURL=Pill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pill.d.ts","sourceRoot":"","sources":["../../src/ui/Pill.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,CAmBA,CAAA"}
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@justanarthur/payload-plugin-seo",
3
+ "version": "1.3.6",
4
+ "private": false,
5
+ "bugs": "https://github.com/r1tsuu/payload-enchants/issues",
6
+ "repository": "https://github.com/r1tsuu/payload-enchants",
7
+ "license": "MIT",
8
+ "author": "r1tsuu",
9
+ "type": "module",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.js",
14
+ "types": "./dist/index.d.ts"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "dependencies": {
21
+ "bson-objectid": "^2.0.4"
22
+ },
23
+ "devDependencies": {
24
+ "@payloadcms/translations": "3.47.0",
25
+ "@payloadcms/ui": "3.47.0",
26
+ "@swc/cli": "^0.7.8",
27
+ "@swc/core": "^1.12.11",
28
+ "@types/react": "*",
29
+ "@types/react-dom": "*",
30
+ "copyfiles": "^2.4.1",
31
+ "openai": "^4.52.0",
32
+ "payload": "3.47.0",
33
+ "react": "*",
34
+ "react-dom": "*",
35
+ "rimraf": "^6.0.1",
36
+ "typescript": "*"
37
+ },
38
+ "peerDependencies": {
39
+ "@payloadcms/next": "^3.1.0",
40
+ "@payloadcms/translations": "^3.1.0",
41
+ "@payloadcms/ui": "^3.1.0",
42
+ "openai": "^4.52.0",
43
+ "payload": "^3.1.0"
44
+ },
45
+ "publishConfig": {
46
+ "registry": "https://registry.npmjs.org/"
47
+ },
48
+ "scripts": {
49
+ "build": "pnpm copyfiles && pnpm build:swc && pnpm build:types",
50
+ "build:swc": "swc ./src -d ./dist --config-file .swcrc",
51
+ "build:types": "tsc --emitDeclarationOnly --outDir dist",
52
+ "clean": "rimraf dist && rimraf tsconfig.tsbuildinfo",
53
+ "copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
54
+ "lint": "eslint src",
55
+ "lint:fix": "eslint --fix --ext .ts,.tsx src"
56
+ },
57
+ "main": "./dist/index.js",
58
+ "types": "./dist/index.d.ts"
59
+ }