@payloadcms/plugin-seo 3.0.0-canary.f6e77b8 → 3.0.0-canary.fb04843
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/defaults.js.map +1 -1
- package/dist/exports/client.d.ts +6 -0
- package/dist/exports/client.d.ts.map +1 -0
- package/dist/exports/client.js +7 -0
- package/dist/exports/client.js.map +1 -0
- package/dist/exports/fields.d.ts +6 -0
- package/dist/exports/fields.d.ts.map +1 -0
- package/dist/exports/fields.js +7 -0
- package/dist/exports/fields.js.map +1 -0
- package/dist/exports/types.js.map +1 -1
- package/dist/fields/MetaDescription/MetaDescriptionComponent.d.ts +8 -0
- package/dist/fields/MetaDescription/MetaDescriptionComponent.d.ts.map +1 -0
- package/dist/fields/MetaDescription/MetaDescriptionComponent.js +162 -0
- package/dist/fields/MetaDescription/MetaDescriptionComponent.js.map +1 -0
- package/dist/fields/MetaDescription/index.d.ts +12 -0
- package/dist/fields/MetaDescription/index.d.ts.map +1 -0
- package/dist/fields/MetaDescription/index.js +20 -0
- package/dist/fields/MetaDescription/index.js.map +1 -0
- package/dist/fields/MetaImage/MetaImageComponent.d.ts +8 -0
- package/dist/fields/MetaImage/MetaImageComponent.d.ts.map +1 -0
- package/dist/fields/MetaImage/MetaImageComponent.js +169 -0
- package/dist/fields/MetaImage/MetaImageComponent.js.map +1 -0
- package/dist/fields/MetaImage/index.d.ts +13 -0
- package/dist/fields/MetaImage/index.d.ts.map +1 -0
- package/dist/fields/MetaImage/index.js +23 -0
- package/dist/fields/MetaImage/index.js.map +1 -0
- package/dist/fields/MetaTitle/MetaTitleComponent.d.ts +9 -0
- package/dist/fields/MetaTitle/MetaTitleComponent.d.ts.map +1 -0
- package/dist/fields/MetaTitle/MetaTitleComponent.js +165 -0
- package/dist/fields/MetaTitle/MetaTitleComponent.js.map +1 -0
- package/dist/fields/MetaTitle/index.d.ts +12 -0
- package/dist/fields/MetaTitle/index.d.ts.map +1 -0
- package/dist/fields/MetaTitle/index.js +20 -0
- package/dist/fields/MetaTitle/index.js.map +1 -0
- package/dist/fields/Overview/OverviewComponent.d.ts +18 -0
- package/dist/fields/Overview/OverviewComponent.d.ts.map +1 -0
- package/dist/fields/Overview/OverviewComponent.js +63 -0
- package/dist/fields/Overview/OverviewComponent.js.map +1 -0
- package/dist/fields/Overview/index.d.ts +34 -0
- package/dist/fields/Overview/index.d.ts.map +1 -0
- package/dist/fields/Overview/index.js +24 -0
- package/dist/fields/Overview/index.js.map +1 -0
- package/dist/fields/Preview/PreviewComponent.d.ts +10 -0
- package/dist/fields/Preview/PreviewComponent.d.ts.map +1 -0
- package/dist/fields/Preview/PreviewComponent.js +116 -0
- package/dist/fields/Preview/PreviewComponent.js.map +1 -0
- package/dist/fields/Preview/index.d.ts +24 -0
- package/dist/fields/Preview/index.d.ts.map +1 -0
- package/dist/fields/Preview/index.js +22 -0
- package/dist/fields/Preview/index.js.map +1 -0
- package/dist/fields/index.scss +5 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +68 -103
- package/dist/index.js.map +1 -1
- package/dist/translations/cs.d.ts +3 -0
- package/dist/translations/cs.d.ts.map +1 -0
- package/dist/translations/cs.js +25 -0
- package/dist/translations/cs.js.map +1 -0
- package/dist/translations/de.d.ts +3 -0
- package/dist/translations/de.d.ts.map +1 -0
- package/dist/translations/de.js +25 -0
- package/dist/translations/de.js.map +1 -0
- package/dist/translations/en.d.ts +3 -0
- package/dist/translations/en.d.ts.map +1 -0
- package/dist/translations/en.js +25 -0
- package/dist/translations/en.js.map +1 -0
- package/dist/translations/es.d.ts +3 -0
- package/dist/translations/es.d.ts.map +1 -0
- package/dist/translations/es.js +25 -0
- package/dist/translations/es.js.map +1 -0
- package/dist/translations/fa.d.ts +3 -0
- package/dist/translations/fa.d.ts.map +1 -0
- package/dist/translations/fa.js +25 -0
- package/dist/translations/fa.js.map +1 -0
- package/dist/translations/fr.d.ts +3 -0
- package/dist/translations/fr.d.ts.map +1 -0
- package/dist/translations/fr.js +25 -0
- package/dist/translations/fr.js.map +1 -0
- package/dist/translations/index.d.ts +16 -154
- package/dist/translations/index.d.ts.map +1 -1
- package/dist/translations/index.js +26 -154
- package/dist/translations/index.js.map +1 -1
- package/dist/translations/it.d.ts +3 -0
- package/dist/translations/it.d.ts.map +1 -0
- package/dist/translations/it.js +25 -0
- package/dist/translations/it.js.map +1 -0
- package/dist/translations/nb.d.ts +3 -0
- package/dist/translations/nb.d.ts.map +1 -0
- package/dist/translations/nb.js +25 -0
- package/dist/translations/nb.js.map +1 -0
- package/dist/translations/pl.d.ts +3 -0
- package/dist/translations/pl.d.ts.map +1 -0
- package/dist/translations/pl.js +25 -0
- package/dist/translations/pl.js.map +1 -0
- package/dist/translations/ru.d.ts +3 -0
- package/dist/translations/ru.d.ts.map +1 -0
- package/dist/translations/ru.js +25 -0
- package/dist/translations/ru.js.map +1 -0
- package/dist/translations/sv.d.ts +3 -0
- package/dist/translations/sv.d.ts.map +1 -0
- package/dist/translations/sv.js +25 -0
- package/dist/translations/sv.js.map +1 -0
- package/dist/translations/tr.d.ts +3 -0
- package/dist/translations/tr.d.ts.map +1 -0
- package/dist/translations/tr.js +25 -0
- package/dist/translations/tr.js.map +1 -0
- package/dist/translations/translation-schema.json +5 -1
- package/dist/translations/uk.d.ts +3 -0
- package/dist/translations/uk.d.ts.map +1 -0
- package/dist/translations/uk.js +25 -0
- package/dist/translations/uk.js.map +1 -0
- package/dist/translations/vi.d.ts +3 -0
- package/dist/translations/vi.d.ts.map +1 -0
- package/dist/translations/vi.js +25 -0
- package/dist/translations/vi.js.map +1 -0
- package/dist/types.d.ts +49 -16
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/ui/LengthIndicator.d.ts.map +1 -1
- package/dist/ui/LengthIndicator.js +63 -42
- package/dist/ui/LengthIndicator.js.map +1 -1
- package/dist/ui/Pill.js +7 -3
- package/dist/ui/Pill.js.map +1 -1
- package/license.md +22 -0
- package/package.json +44 -21
- package/dist/fields/MetaDescription.d.ts +0 -9
- package/dist/fields/MetaDescription.d.ts.map +0 -1
- package/dist/fields/MetaDescription.js +0 -116
- package/dist/fields/MetaDescription.js.map +0 -1
- package/dist/fields/MetaImage.d.ts +0 -8
- package/dist/fields/MetaImage.d.ts.map +0 -1
- package/dist/fields/MetaImage.js +0 -120
- package/dist/fields/MetaImage.js.map +0 -1
- package/dist/fields/MetaTitle.d.ts +0 -9
- package/dist/fields/MetaTitle.d.ts.map +0 -1
- package/dist/fields/MetaTitle.js +0 -117
- package/dist/fields/MetaTitle.js.map +0 -1
- package/dist/translations/en.json +0 -22
- package/dist/translations/es.json +0 -22
- package/dist/translations/fa.json +0 -22
- package/dist/translations/fr.json +0 -22
- package/dist/translations/pl.json +0 -22
- package/dist/translations/uk.json +0 -22
- package/dist/ui/Overview.d.ts +0 -3
- package/dist/ui/Overview.d.ts.map +0 -1
- package/dist/ui/Overview.js +0 -51
- package/dist/ui/Overview.js.map +0 -1
- package/dist/ui/Preview.d.ts +0 -8
- package/dist/ui/Preview.d.ts.map +0 -1
- package/dist/ui/Preview.js +0 -79
- package/dist/ui/Preview.js.map +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const tr = {
|
|
2
|
+
$schema: './translation-schema.json',
|
|
3
|
+
'plugin-seo': {
|
|
4
|
+
almostThere: 'Neredeyse tamam',
|
|
5
|
+
autoGenerate: 'Otomatik oluştur',
|
|
6
|
+
bestPractices: 'en iyi uygulamalar',
|
|
7
|
+
characterCount: '{{current}}/{{minLength}}-{{maxLength}} karakter, ',
|
|
8
|
+
charactersLeftOver: '{{characters}} karakter kaldı',
|
|
9
|
+
charactersToGo: '{{characters}} karakter kaldı',
|
|
10
|
+
charactersTooMany: '{{characters}} karakter fazla',
|
|
11
|
+
checksPassing: '{{current}}/{{max}} kontrol başarılı',
|
|
12
|
+
good: 'İyi',
|
|
13
|
+
imageAutoGenerationTip: 'Otomatik oluşturma, seçilen ana görseli alacaktır.',
|
|
14
|
+
lengthTipDescription: '{{minLength}} ile {{maxLength}} karakter arasında olmalıdır. Kaliteli meta açıklamaları yazmak için yardım almak için bkz. ',
|
|
15
|
+
lengthTipTitle: '{{minLength}} ile {{maxLength}} karakter arasında olmalıdır. Kaliteli meta başlıkları yazmak için yardım almak için bkz. ',
|
|
16
|
+
missing: 'Eksik',
|
|
17
|
+
noImage: 'Görsel yok',
|
|
18
|
+
preview: 'Önizleme',
|
|
19
|
+
previewDescription: 'Kesin sonuç listeleri içeriğe ve arama alâkasına göre değişebilir.',
|
|
20
|
+
tooLong: 'Çok uzun',
|
|
21
|
+
tooShort: 'Çok kısa'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=tr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/translations/tr.ts"],"sourcesContent":["import type { GenericTranslationsObject } from '@payloadcms/translations'\n\nexport const tr: GenericTranslationsObject = {\n $schema: './translation-schema.json',\n 'plugin-seo': {\n almostThere: 'Neredeyse tamam',\n autoGenerate: 'Otomatik oluştur',\n bestPractices: 'en iyi uygulamalar',\n characterCount: '{{current}}/{{minLength}}-{{maxLength}} karakter, ',\n charactersLeftOver: '{{characters}} karakter kaldı',\n charactersToGo: '{{characters}} karakter kaldı',\n charactersTooMany: '{{characters}} karakter fazla',\n checksPassing: '{{current}}/{{max}} kontrol başarılı',\n good: 'İyi',\n imageAutoGenerationTip: 'Otomatik oluşturma, seçilen ana görseli alacaktır.',\n lengthTipDescription:\n '{{minLength}} ile {{maxLength}} karakter arasında olmalıdır. Kaliteli meta açıklamaları yazmak için yardım almak için bkz. ',\n lengthTipTitle:\n '{{minLength}} ile {{maxLength}} karakter arasında olmalıdır. Kaliteli meta başlıkları yazmak için yardım almak için bkz. ',\n missing: 'Eksik',\n noImage: 'Görsel yok',\n preview: 'Önizleme',\n previewDescription: 'Kesin sonuç listeleri içeriğe ve arama alâkasına göre değişebilir.',\n tooLong: 'Çok uzun',\n tooShort: 'Çok kısa',\n },\n}\n"],"names":["tr","$schema","almostThere","autoGenerate","bestPractices","characterCount","charactersLeftOver","charactersToGo","charactersTooMany","checksPassing","good","imageAutoGenerationTip","lengthTipDescription","lengthTipTitle","missing","noImage","preview","previewDescription","tooLong","tooShort"],"mappings":"AAEA,OAAO,MAAMA,KAAgC;IAC3CC,SAAS;IACT,cAAc;QACZC,aAAa;QACbC,cAAc;QACdC,eAAe;QACfC,gBAAgB;QAChBC,oBAAoB;QACpBC,gBAAgB;QAChBC,mBAAmB;QACnBC,eAAe;QACfC,MAAM;QACNC,wBAAwB;QACxBC,sBACE;QACFC,gBACE;QACFC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,oBAAoB;QACpBC,SAAS;QACTC,UAAU;IACZ;AACF,EAAC"}
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
"type": "object",
|
|
11
11
|
"additionalProperties": false,
|
|
12
12
|
"properties": {
|
|
13
|
+
"missing": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
13
16
|
"almostThere": {
|
|
14
17
|
"type": "string"
|
|
15
18
|
},
|
|
@@ -79,7 +82,8 @@
|
|
|
79
82
|
"noImage",
|
|
80
83
|
"checksPassing",
|
|
81
84
|
"preview",
|
|
82
|
-
"previewDescription"
|
|
85
|
+
"previewDescription",
|
|
86
|
+
"missing"
|
|
83
87
|
]
|
|
84
88
|
}
|
|
85
89
|
},
|
|
@@ -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,yBAyBhB,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const uk = {
|
|
2
|
+
$schema: './translation-schema.json',
|
|
3
|
+
'plugin-seo': {
|
|
4
|
+
almostThere: 'Ще трошки',
|
|
5
|
+
autoGenerate: 'Згенерувати',
|
|
6
|
+
bestPractices: 'найкращі практики',
|
|
7
|
+
characterCount: '{{current}}/{{minLength}}-{{maxLength}} символів, ',
|
|
8
|
+
charactersLeftOver: 'залишилось {{characters}} символів',
|
|
9
|
+
charactersToGo: ' на {{characters}} символів коротше',
|
|
10
|
+
charactersTooMany: 'на {{characters}} символів довше',
|
|
11
|
+
checksPassing: '{{current}}/{{max}} перевірок пройдено',
|
|
12
|
+
good: 'Чудово',
|
|
13
|
+
imageAutoGenerationTip: 'Автоматична генерація використає зображення з головного блоку',
|
|
14
|
+
lengthTipDescription: 'Має бути від {{minLength}} до {{maxLength}} символів. Щоб дізнатися, як писати якісні метаописи — перегляньте ',
|
|
15
|
+
lengthTipTitle: 'Має бути від {{minLength}} до {{maxLength}} символів. Щоб дізнатися, як писати якісні метазаголовки — перегляньте ',
|
|
16
|
+
missing: 'Відсутнє',
|
|
17
|
+
noImage: 'Немає зображення',
|
|
18
|
+
preview: 'Попередній перегляд',
|
|
19
|
+
previewDescription: 'Реальне відображення може відрізнятися в залежності від вмісту та релевантності пошуку.',
|
|
20
|
+
tooLong: 'Задовгий',
|
|
21
|
+
tooShort: 'Закороткий'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=uk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/translations/uk.ts"],"sourcesContent":["import type { GenericTranslationsObject } from '@payloadcms/translations'\n\nexport const uk: GenericTranslationsObject = {\n $schema: './translation-schema.json',\n 'plugin-seo': {\n almostThere: 'Ще трошки',\n autoGenerate: 'Згенерувати',\n bestPractices: 'найкращі практики',\n characterCount: '{{current}}/{{minLength}}-{{maxLength}} символів, ',\n charactersLeftOver: 'залишилось {{characters}} символів',\n charactersToGo: ' на {{characters}} символів коротше',\n charactersTooMany: 'на {{characters}} символів довше',\n checksPassing: '{{current}}/{{max}} перевірок пройдено',\n good: 'Чудово',\n imageAutoGenerationTip: 'Автоматична генерація використає зображення з головного блоку',\n lengthTipDescription:\n 'Має бути від {{minLength}} до {{maxLength}} символів. Щоб дізнатися, як писати якісні метаописи — перегляньте ',\n lengthTipTitle:\n 'Має бути від {{minLength}} до {{maxLength}} символів. Щоб дізнатися, як писати якісні метазаголовки — перегляньте ',\n missing: 'Відсутнє',\n noImage: 'Немає зображення',\n preview: 'Попередній перегляд',\n previewDescription:\n 'Реальне відображення може відрізнятися в залежності від вмісту та релевантності пошуку.',\n tooLong: 'Задовгий',\n tooShort: 'Закороткий',\n },\n}\n"],"names":["uk","$schema","almostThere","autoGenerate","bestPractices","characterCount","charactersLeftOver","charactersToGo","charactersTooMany","checksPassing","good","imageAutoGenerationTip","lengthTipDescription","lengthTipTitle","missing","noImage","preview","previewDescription","tooLong","tooShort"],"mappings":"AAEA,OAAO,MAAMA,KAAgC;IAC3CC,SAAS;IACT,cAAc;QACZC,aAAa;QACbC,cAAc;QACdC,eAAe;QACfC,gBAAgB;QAChBC,oBAAoB;QACpBC,gBAAgB;QAChBC,mBAAmB;QACnBC,eAAe;QACfC,MAAM;QACNC,wBAAwB;QACxBC,sBACE;QACFC,gBACE;QACFC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,oBACE;QACFC,SAAS;QACTC,UAAU;IACZ;AACF,EAAC"}
|
|
@@ -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,yBAwBhB,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const vi = {
|
|
2
|
+
$schema: './translation-schema.json',
|
|
3
|
+
'plugin-seo': {
|
|
4
|
+
almostThere: 'Gần đạt',
|
|
5
|
+
autoGenerate: 'Tự động tạo',
|
|
6
|
+
bestPractices: 'các phương pháp hay nhất',
|
|
7
|
+
characterCount: '{{current}}/{{minLength}}-{{maxLength}} kí tự, ',
|
|
8
|
+
charactersLeftOver: 'còn lại {{characters}}',
|
|
9
|
+
charactersToGo: 'Còn {{characters}} ký tự nữa',
|
|
10
|
+
charactersTooMany: 'vượt quá {{characters}} ký tự',
|
|
11
|
+
checksPassing: '{{current}}/{{max}} đã đạt',
|
|
12
|
+
good: 'Tốt',
|
|
13
|
+
imageAutoGenerationTip: 'Tính năng tự động tạo sẽ lấy ảnh đầu tiên được chọn.',
|
|
14
|
+
lengthTipDescription: 'Độ dài nên từ {{minLength}}-{{maxLength}} kí tự. Để được hướng dẫn viết mô tả meta chất lượng, hãy xem ',
|
|
15
|
+
lengthTipTitle: 'Độ dài nên từ {{minLength}}-{{maxLength}} kí tự. Để được hướng dẫn viết mô tả meta chất lượng, hãy xem ',
|
|
16
|
+
missing: 'Không đạt',
|
|
17
|
+
noImage: 'Chưa có ảnh',
|
|
18
|
+
preview: 'Xem trước',
|
|
19
|
+
previewDescription: 'Kết quả hiển thị có thể thay đổi tuỳ theo nội dung và công cụ tìm kiếm.',
|
|
20
|
+
tooLong: 'Quá dài',
|
|
21
|
+
tooShort: 'Quá ngắn'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=vi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/translations/vi.ts"],"sourcesContent":["import type { GenericTranslationsObject } from '@payloadcms/translations'\n\nexport const vi: GenericTranslationsObject = {\n $schema: './translation-schema.json',\n 'plugin-seo': {\n almostThere: 'Gần đạt',\n autoGenerate: 'Tự động tạo',\n bestPractices: 'các phương pháp hay nhất',\n characterCount: '{{current}}/{{minLength}}-{{maxLength}} kí tự, ',\n charactersLeftOver: 'còn lại {{characters}}',\n charactersToGo: 'Còn {{characters}} ký tự nữa',\n charactersTooMany: 'vượt quá {{characters}} ký tự',\n checksPassing: '{{current}}/{{max}} đã đạt',\n good: 'Tốt',\n imageAutoGenerationTip: 'Tính năng tự động tạo sẽ lấy ảnh đầu tiên được chọn.',\n lengthTipDescription:\n 'Độ dài nên từ {{minLength}}-{{maxLength}} kí tự. Để được hướng dẫn viết mô tả meta chất lượng, hãy xem ',\n lengthTipTitle:\n 'Độ dài nên từ {{minLength}}-{{maxLength}} kí tự. Để được hướng dẫn viết mô tả meta chất lượng, hãy xem ',\n missing: 'Không đạt',\n noImage: 'Chưa có ảnh',\n preview: 'Xem trước',\n previewDescription: 'Kết quả hiển thị có thể thay đổi tuỳ theo nội dung và công cụ tìm kiếm.',\n tooLong: 'Quá dài',\n tooShort: 'Quá ngắn',\n },\n}\n"],"names":["vi","$schema","almostThere","autoGenerate","bestPractices","characterCount","charactersLeftOver","charactersToGo","charactersTooMany","checksPassing","good","imageAutoGenerationTip","lengthTipDescription","lengthTipTitle","missing","noImage","preview","previewDescription","tooLong","tooShort"],"mappings":"AAEA,OAAO,MAAMA,KAAgC;IAC3CC,SAAS;IACT,cAAc;QACZC,aAAa;QACbC,cAAc;QACdC,eAAe;QACfC,gBAAgB;QAChBC,oBAAoB;QACpBC,gBAAgB;QAChBC,mBAAmB;QACnBC,eAAe;QACfC,MAAM;QACNC,wBAAwB;QACxBC,sBACE;QACFC,gBACE;QACFC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,oBAAoB;QACpBC,SAAS;QACTC,UAAU;IACZ;AACF,EAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,36 +1,69 @@
|
|
|
1
|
-
import type { DocumentInfoContext } from '@payloadcms/ui
|
|
2
|
-
import type {
|
|
3
|
-
export type
|
|
1
|
+
import type { DocumentInfoContext } from '@payloadcms/ui';
|
|
2
|
+
import type { CollectionConfig, Field, GlobalConfig, PayloadRequest } from 'payload';
|
|
3
|
+
export type FieldsOverride = (args: {
|
|
4
|
+
defaultFields: Field[];
|
|
5
|
+
}) => Field[];
|
|
6
|
+
export type PartialDocumentInfoContext = Pick<DocumentInfoContext, 'collectionSlug' | 'docPermissions' | 'globalSlug' | 'hasPublishedDoc' | 'hasPublishPermission' | 'hasSavePermission' | 'id' | 'initialData' | 'initialState' | 'preferencesKey' | 'title' | 'versionCount'>;
|
|
7
|
+
export type GenerateTitle<T = any> = (args: {
|
|
8
|
+
collectionConfig?: CollectionConfig;
|
|
4
9
|
doc: T;
|
|
10
|
+
globalConfig?: GlobalConfig;
|
|
5
11
|
locale?: string;
|
|
6
|
-
|
|
7
|
-
|
|
12
|
+
req: PayloadRequest;
|
|
13
|
+
} & PartialDocumentInfoContext) => Promise<string> | string;
|
|
14
|
+
export type GenerateDescription<T = any> = (args: {
|
|
15
|
+
collectionConfig?: CollectionConfig;
|
|
8
16
|
doc: T;
|
|
17
|
+
globalConfig?: GlobalConfig;
|
|
9
18
|
locale?: string;
|
|
10
|
-
|
|
11
|
-
|
|
19
|
+
req: PayloadRequest;
|
|
20
|
+
} & PartialDocumentInfoContext) => Promise<string> | string;
|
|
21
|
+
export type GenerateImage<T = any> = (args: {
|
|
22
|
+
collectionConfig?: CollectionConfig;
|
|
12
23
|
doc: T;
|
|
24
|
+
globalConfig?: GlobalConfig;
|
|
13
25
|
locale?: string;
|
|
14
|
-
|
|
15
|
-
|
|
26
|
+
req: PayloadRequest;
|
|
27
|
+
} & PartialDocumentInfoContext) => Promise<string> | string;
|
|
28
|
+
export type GenerateURL<T = any> = (args: {
|
|
29
|
+
collectionConfig?: CollectionConfig;
|
|
16
30
|
doc: T;
|
|
31
|
+
globalConfig?: GlobalConfig;
|
|
17
32
|
locale?: string;
|
|
18
|
-
|
|
33
|
+
req: PayloadRequest;
|
|
34
|
+
} & PartialDocumentInfoContext) => Promise<string> | string;
|
|
19
35
|
export type SEOPluginConfig = {
|
|
36
|
+
/**
|
|
37
|
+
* Collections to include the SEO fields in
|
|
38
|
+
*/
|
|
20
39
|
collections?: string[];
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
fields?:
|
|
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/beta/plugins/seo#direct-use-of-fields
|
|
44
|
+
*/
|
|
45
|
+
fields?: FieldsOverride;
|
|
27
46
|
generateDescription?: GenerateDescription;
|
|
28
47
|
generateImage?: GenerateImage;
|
|
29
48
|
generateTitle?: GenerateTitle;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
30
52
|
generateURL?: GenerateURL;
|
|
53
|
+
/**
|
|
54
|
+
* Globals to include the SEO fields in
|
|
55
|
+
*/
|
|
31
56
|
globals?: string[];
|
|
32
57
|
interfaceName?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Group fields into tabs, your content will be automatically put into a general tab and the SEO fields into an SEO tab
|
|
60
|
+
*
|
|
61
|
+
* If you need more flexibility you can insert the fields manually as needed. @link https://payloadcms.com/docs/beta/plugins/seo#direct-use-of-fields
|
|
62
|
+
*/
|
|
33
63
|
tabbedUI?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* The slug of the collection used to handle image uploads
|
|
66
|
+
*/
|
|
34
67
|
uploadsCollection?: string;
|
|
35
68
|
};
|
|
36
69
|
export type Meta = {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"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"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { DocumentInfoContext } from '@payloadcms/ui
|
|
1
|
+
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { DocumentInfoContext } from '@payloadcms/ui'\nimport type { CollectionConfig, Field, GlobalConfig, PayloadRequest } from 'payload'\n\nexport type FieldsOverride = (args: { defaultFields: Field[] }) => Field[]\n\nexport type PartialDocumentInfoContext = Pick<\n DocumentInfoContext,\n | 'collectionSlug'\n | 'docPermissions'\n | 'globalSlug'\n | 'hasPublishedDoc'\n | 'hasPublishPermission'\n | 'hasSavePermission'\n | 'id'\n | 'initialData'\n | 'initialState'\n | 'preferencesKey'\n | 'title'\n | 'versionCount'\n>\n\nexport type GenerateTitle<T = any> = (\n args: {\n collectionConfig?: CollectionConfig\n doc: T\n globalConfig?: GlobalConfig\n locale?: string\n req: PayloadRequest\n } & PartialDocumentInfoContext,\n) => Promise<string> | string\n\nexport type GenerateDescription<T = any> = (\n args: {\n collectionConfig?: CollectionConfig\n doc: T\n globalConfig?: GlobalConfig\n locale?: string\n req: PayloadRequest\n } & PartialDocumentInfoContext,\n) => Promise<string> | string\n\nexport type GenerateImage<T = any> = (\n args: {\n collectionConfig?: CollectionConfig\n doc: T\n globalConfig?: GlobalConfig\n locale?: string\n req: PayloadRequest\n } & PartialDocumentInfoContext,\n) => Promise<string> | string\n\nexport type GenerateURL<T = any> = (\n args: {\n collectionConfig?: CollectionConfig\n doc: T\n globalConfig?: GlobalConfig\n locale?: string\n req: PayloadRequest\n } & PartialDocumentInfoContext,\n) => Promise<string> | string\n\nexport type SEOPluginConfig = {\n /**\n * Collections to include the SEO fields in\n */\n collections?: string[]\n /**\n * Override the default fields inserted by the SEO plugin via a function that receives the default fields and returns the new fields\n *\n * If you need more flexibility you can insert the fields manually as needed. @link https://payloadcms.com/docs/beta/plugins/seo#direct-use-of-fields\n */\n fields?: FieldsOverride\n generateDescription?: GenerateDescription\n generateImage?: GenerateImage\n generateTitle?: GenerateTitle\n /**\n *\n */\n generateURL?: GenerateURL\n /**\n * Globals to include the SEO fields in\n */\n globals?: string[]\n interfaceName?: string\n /**\n * Group fields into tabs, your content will be automatically put into a general tab and the SEO fields into an SEO tab\n *\n * If you need more flexibility you can insert the fields manually as needed. @link https://payloadcms.com/docs/beta/plugins/seo#direct-use-of-fields\n */\n tabbedUI?: boolean\n /**\n * The slug of the collection used to handle image uploads\n */\n uploadsCollection?: string\n}\n\nexport type Meta = {\n description?: string\n image?: any // TODO: type this\n keywords?: string\n title?: string\n}\n"],"names":[],"mappings":"AAgGA,WAKC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LengthIndicator.d.ts","sourceRoot":"","sources":["../../src/ui/LengthIndicator.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAwC,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"LengthIndicator.d.ts","sourceRoot":"","sources":["../../src/ui/LengthIndicator.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAwC,MAAM,OAAO,CAAA;AAM5D,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,CA2HA,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useTranslation } from '@payloadcms/ui';
|
|
3
4
|
import React, { Fragment, useEffect, useState } from 'react';
|
|
4
5
|
import { Pill } from './Pill.js';
|
|
5
6
|
export const LengthIndicator = (props)=>{
|
|
@@ -14,7 +15,7 @@ export const LengthIndicator = (props)=>{
|
|
|
14
15
|
useEffect(()=>{
|
|
15
16
|
const textLength = text?.length || 0;
|
|
16
17
|
if (textLength === 0) {
|
|
17
|
-
setLabel('
|
|
18
|
+
setLabel(t('plugin-seo:missing'));
|
|
18
19
|
setLabelStyle({
|
|
19
20
|
backgroundColor: 'red',
|
|
20
21
|
color: 'white'
|
|
@@ -65,50 +66,70 @@ export const LengthIndicator = (props)=>{
|
|
|
65
66
|
const textLength = text?.length || 0;
|
|
66
67
|
const charsUntilMax = maxLength - textLength;
|
|
67
68
|
const charsUntilMin = minLength - textLength;
|
|
68
|
-
return /*#__PURE__*/
|
|
69
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
69
70
|
style: {
|
|
70
71
|
alignItems: 'center',
|
|
71
72
|
display: 'flex',
|
|
72
73
|
width: '100%'
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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
|
+
});
|
|
112
133
|
};
|
|
113
134
|
|
|
114
135
|
//# sourceMappingURL=LengthIndicator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ui/LengthIndicator.tsx"],"sourcesContent":["'use client'\n\nimport { useTranslation } from '@payloadcms/ui
|
|
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'\n\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 const [barWidth, setBarWidth] = useState<number>(0)\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 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;AAI5D,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;IACnC,MAAM,CAACa,UAAUC,YAAY,GAAGd,SAAiB;IACjD,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,WAAW,AAACF,CAAAA,aAAaX,SAAQ,IAAMD,CAAAA,YAAYC,SAAQ;YAEjE,IAAIa,WAAW,GAAG;gBAChB,MAAMC,gBAAgBH,aAAaX;gBAEnC,IAAIc,gBAAgB,KAAK;oBACvBP,SAASG,EAAE;oBACXP,cAAc;wBACZC,iBAAiB;wBACjBC,OAAO;oBACT;gBACF,OAAO;oBACLE,SAASG,EAAE;oBACXP,cAAc;wBACZC,iBAAiB;wBACjBC,OAAO;oBACT;gBACF;gBAEAI,YAAYK;YACd;YAEA,IAAID,YAAY,KAAKA,YAAY,GAAG;gBAClCN,SAASG,EAAE;gBACXP,cAAc;oBACZC,iBAAiB;oBACjBC,OAAO;gBACT;gBACAI,YAAYI;YACd;YAEA,IAAIA,WAAW,GAAG;gBAChBN,SAASG,EAAE;gBACXP,cAAc;oBACZC,iBAAiB;oBACjBC,OAAO;gBACT;gBACAI,YAAY;YACd;QACF;IACF,GAAG;QAACT;QAAWD;QAAWE;QAAMS;KAAE;IAElC,MAAMC,aAAaV,MAAMW,UAAU;IAEnC,MAAMG,gBAAgBhB,YAAYY;IAClC,MAAMK,gBAAgBhB,YAAYW;IAElC,qBACE,MAACM;QACCC,OAAO;YACLC,YAAY;YACZC,SAAS;YACTC,OAAO;QACT;;0BAEA,KAACzB;gBAAKQ,iBAAiBF,WAAWE,eAAe;gBAAEC,OAAOH,WAAWG,KAAK;gBAAEC,OAAOA;;0BACnF,KAACW;gBACCC,OAAO;oBACLI,YAAY;oBACZC,YAAY;oBACZC,aAAa;oBACbC,YAAY;gBACd;0BAEA,cAAA,MAACC;;wBACEhB,EAAE,6BAA6B;4BAAEiB,SAAS1B,MAAMW,UAAU;4BAAGb;4BAAWC;wBAAU;wBACjFW,CAAAA,eAAe,KAAKK,gBAAgB,CAAA,mBACpC,KAACvB;sCAAUiB,EAAE,6BAA6B;gCAAEkB,YAAYZ;4BAAc;;wBAEvEA,iBAAiB,KAAKD,iBAAiB,mBACtC,KAACtB;sCAAUiB,EAAE,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,CAAC,EAAEb,WAAW,IAAI,CAAC,CAAC;oBAC7B;;;;;AAKV,EAAC"}
|
package/dist/ui/Pill.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
export const Pill = (props)=>{
|
|
4
5
|
const { backgroundColor, color, label } = props;
|
|
5
|
-
return /*#__PURE__*/
|
|
6
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
6
7
|
style: {
|
|
7
8
|
backgroundColor,
|
|
8
9
|
borderRadius: '2px',
|
|
@@ -12,8 +13,11 @@ export const Pill = (props)=>{
|
|
|
12
13
|
marginRight: '10px',
|
|
13
14
|
padding: '4px 6px',
|
|
14
15
|
whiteSpace: 'nowrap'
|
|
15
|
-
}
|
|
16
|
-
|
|
16
|
+
},
|
|
17
|
+
children: /*#__PURE__*/ _jsx("small", {
|
|
18
|
+
children: label
|
|
19
|
+
})
|
|
20
|
+
});
|
|
17
21
|
};
|
|
18
22
|
|
|
19
23
|
//# sourceMappingURL=Pill.js.map
|
package/dist/ui/Pill.js.map
CHANGED
|
@@ -1 +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"],"
|
|
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"}
|
package/license.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018-2024 Payload CMS, Inc. <info@payloadcms.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/plugin-seo",
|
|
3
|
-
"version": "3.0.0-canary.
|
|
3
|
+
"version": "3.0.0-canary.fb04843",
|
|
4
4
|
"description": "SEO plugin for Payload",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"payload",
|
|
@@ -18,17 +18,34 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"author": "Payload <dev@payloadcms.com> (https://payloadcms.com)",
|
|
21
|
+
"maintainers": [
|
|
22
|
+
{
|
|
23
|
+
"name": "Payload",
|
|
24
|
+
"email": "info@payloadcms.com",
|
|
25
|
+
"url": "https://payloadcms.com"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
21
28
|
"type": "module",
|
|
22
29
|
"exports": {
|
|
23
30
|
".": {
|
|
24
31
|
"import": "./dist/index.js",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"default": "./dist/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./types": {
|
|
36
|
+
"import": "./dist/exports/types.js",
|
|
37
|
+
"types": "./dist/exports/types.d.ts",
|
|
38
|
+
"default": "./dist/exports/types.js"
|
|
27
39
|
},
|
|
28
|
-
"
|
|
29
|
-
"import": "./dist/exports
|
|
30
|
-
"
|
|
31
|
-
"
|
|
40
|
+
"./fields": {
|
|
41
|
+
"import": "./dist/exports/fields.js",
|
|
42
|
+
"types": "./dist/exports/fields.d.ts",
|
|
43
|
+
"default": "./dist/exports/fields.js"
|
|
44
|
+
},
|
|
45
|
+
"./client": {
|
|
46
|
+
"import": "./dist/exports/client.js",
|
|
47
|
+
"types": "./dist/exports/client.d.ts",
|
|
48
|
+
"default": "./dist/exports/client.js"
|
|
32
49
|
}
|
|
33
50
|
},
|
|
34
51
|
"main": "./dist/index.js",
|
|
@@ -36,31 +53,37 @@
|
|
|
36
53
|
"files": [
|
|
37
54
|
"dist"
|
|
38
55
|
],
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@payloadcms/translations": "3.0.0-canary.fb04843",
|
|
58
|
+
"@payloadcms/ui": "3.0.0-canary.fb04843"
|
|
59
|
+
},
|
|
39
60
|
"devDependencies": {
|
|
40
|
-
"@types/react": "
|
|
41
|
-
"@
|
|
42
|
-
"@payloadcms/
|
|
43
|
-
"@payloadcms/
|
|
44
|
-
"payload": "3.0.0-canary.
|
|
45
|
-
"@payloadcms/ui": "3.0.0-canary.f6e77b8"
|
|
61
|
+
"@types/react": "npm:types-react@19.0.0-rc.1",
|
|
62
|
+
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
|
63
|
+
"@payloadcms/eslint-config": "3.0.0-beta.112",
|
|
64
|
+
"@payloadcms/next": "3.0.0-canary.fb04843",
|
|
65
|
+
"payload": "3.0.0-canary.fb04843"
|
|
46
66
|
},
|
|
47
67
|
"peerDependencies": {
|
|
48
|
-
"react": "^
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"payload": "3.0.0-canary.f6e77b8"
|
|
68
|
+
"react": "^19.0.0 || ^19.0.0-rc-65a56d0e-20241020",
|
|
69
|
+
"react-dom": "^19.0.0 || ^19.0.0-rc-65a56d0e-20241020",
|
|
70
|
+
"payload": "3.0.0-canary.fb04843"
|
|
52
71
|
},
|
|
53
72
|
"publishConfig": {
|
|
54
73
|
"registry": "https://registry.npmjs.org/"
|
|
55
74
|
},
|
|
56
75
|
"homepage:": "https://payloadcms.com",
|
|
76
|
+
"overrides": {
|
|
77
|
+
"@types/react": "npm:types-react@19.0.0-rc.1",
|
|
78
|
+
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
|
|
79
|
+
},
|
|
57
80
|
"scripts": {
|
|
58
|
-
"build": "pnpm copyfiles && pnpm build:
|
|
59
|
-
"build:swc": "swc ./src -d ./dist --config-file .swcrc",
|
|
81
|
+
"build": "pnpm copyfiles && pnpm build:types && pnpm build:swc",
|
|
82
|
+
"build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
|
|
60
83
|
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
|
61
84
|
"clean": "rimraf {dist,*.tsbuildinfo}",
|
|
62
85
|
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
|
|
63
|
-
"lint": "eslint
|
|
64
|
-
"lint:fix": "eslint --fix
|
|
86
|
+
"lint": "eslint .",
|
|
87
|
+
"lint:fix": "eslint . --fix"
|
|
65
88
|
}
|
|
66
89
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { FormFieldBase } from '@payloadcms/ui/fields/shared';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
type MetaDescriptionProps = FormFieldBase & {
|
|
4
|
-
hasGenerateDescriptionFn: boolean;
|
|
5
|
-
path: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const MetaDescription: React.FC<MetaDescriptionProps>;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=MetaDescription.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MetaDescription.d.ts","sourceRoot":"","sources":["../../src/fields/MetaDescription.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAWjE,OAAO,KAAsB,MAAM,OAAO,CAAA;AAU1C,KAAK,oBAAoB,GAAG,aAAa,GAAG;IAC1C,wBAAwB,EAAE,OAAO,CAAA;IACjC,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAoH1D,CAAA"}
|