@payloadcms/plugin-seo 3.0.0-beta.12 → 3.0.0-beta.120

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/dist/defaults.js.map +1 -1
  2. package/dist/exports/client.d.ts +6 -0
  3. package/dist/exports/client.d.ts.map +1 -0
  4. package/dist/exports/client.js +7 -0
  5. package/dist/exports/client.js.map +1 -0
  6. package/dist/exports/fields.d.ts +6 -0
  7. package/dist/exports/fields.d.ts.map +1 -0
  8. package/dist/exports/fields.js +7 -0
  9. package/dist/exports/fields.js.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/exports/types.js +3 -0
  13. package/dist/exports/types.js.map +1 -0
  14. package/dist/fields/MetaDescription/MetaDescriptionComponent.d.ts +8 -0
  15. package/dist/fields/MetaDescription/MetaDescriptionComponent.d.ts.map +1 -0
  16. package/dist/fields/MetaDescription/MetaDescriptionComponent.js +166 -0
  17. package/dist/fields/MetaDescription/MetaDescriptionComponent.js.map +1 -0
  18. package/dist/fields/MetaDescription/index.d.ts +12 -0
  19. package/dist/fields/MetaDescription/index.d.ts.map +1 -0
  20. package/dist/fields/MetaDescription/index.js +20 -0
  21. package/dist/fields/MetaDescription/index.js.map +1 -0
  22. package/dist/fields/MetaImage/MetaImageComponent.d.ts +8 -0
  23. package/dist/fields/MetaImage/MetaImageComponent.d.ts.map +1 -0
  24. package/dist/fields/MetaImage/MetaImageComponent.js +170 -0
  25. package/dist/fields/MetaImage/MetaImageComponent.js.map +1 -0
  26. package/dist/fields/MetaImage/index.d.ts +13 -0
  27. package/dist/fields/MetaImage/index.d.ts.map +1 -0
  28. package/dist/fields/MetaImage/index.js +23 -0
  29. package/dist/fields/MetaImage/index.js.map +1 -0
  30. package/dist/fields/MetaTitle/MetaTitleComponent.d.ts +9 -0
  31. package/dist/fields/MetaTitle/MetaTitleComponent.d.ts.map +1 -0
  32. package/dist/fields/MetaTitle/MetaTitleComponent.js +168 -0
  33. package/dist/fields/MetaTitle/MetaTitleComponent.js.map +1 -0
  34. package/dist/fields/MetaTitle/index.d.ts +12 -0
  35. package/dist/fields/MetaTitle/index.d.ts.map +1 -0
  36. package/dist/fields/MetaTitle/index.js +20 -0
  37. package/dist/fields/MetaTitle/index.js.map +1 -0
  38. package/dist/fields/Overview/OverviewComponent.d.ts +18 -0
  39. package/dist/fields/Overview/OverviewComponent.d.ts.map +1 -0
  40. package/dist/fields/Overview/OverviewComponent.js +63 -0
  41. package/dist/fields/Overview/OverviewComponent.js.map +1 -0
  42. package/dist/fields/Overview/index.d.ts +34 -0
  43. package/dist/fields/Overview/index.d.ts.map +1 -0
  44. package/dist/fields/Overview/index.js +24 -0
  45. package/dist/fields/Overview/index.js.map +1 -0
  46. package/dist/fields/Preview/PreviewComponent.d.ts +10 -0
  47. package/dist/fields/Preview/PreviewComponent.d.ts.map +1 -0
  48. package/dist/fields/Preview/PreviewComponent.js +115 -0
  49. package/dist/fields/Preview/PreviewComponent.js.map +1 -0
  50. package/dist/fields/Preview/index.d.ts +24 -0
  51. package/dist/fields/Preview/index.d.ts.map +1 -0
  52. package/dist/fields/Preview/index.js +22 -0
  53. package/dist/fields/Preview/index.js.map +1 -0
  54. package/dist/fields/index.scss +5 -3
  55. package/dist/index.d.ts +3 -4
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +65 -89
  58. package/dist/index.js.map +1 -1
  59. package/dist/translations/de.d.ts +3 -0
  60. package/dist/translations/de.d.ts.map +1 -0
  61. package/dist/translations/de.js +25 -0
  62. package/dist/translations/de.js.map +1 -0
  63. package/dist/translations/en.d.ts +3 -0
  64. package/dist/translations/en.d.ts.map +1 -0
  65. package/dist/translations/en.js +25 -0
  66. package/dist/translations/en.js.map +1 -0
  67. package/dist/translations/es.d.ts +3 -0
  68. package/dist/translations/es.d.ts.map +1 -0
  69. package/dist/translations/es.js +25 -0
  70. package/dist/translations/es.js.map +1 -0
  71. package/dist/translations/fa.d.ts +3 -0
  72. package/dist/translations/fa.d.ts.map +1 -0
  73. package/dist/translations/fa.js +25 -0
  74. package/dist/translations/fa.js.map +1 -0
  75. package/dist/translations/fr.d.ts +3 -0
  76. package/dist/translations/fr.d.ts.map +1 -0
  77. package/dist/translations/fr.js +25 -0
  78. package/dist/translations/fr.js.map +1 -0
  79. package/dist/translations/index.d.ts +13 -154
  80. package/dist/translations/index.d.ts.map +1 -1
  81. package/dist/translations/index.js +20 -154
  82. package/dist/translations/index.js.map +1 -1
  83. package/dist/translations/it.d.ts +3 -0
  84. package/dist/translations/it.d.ts.map +1 -0
  85. package/dist/translations/it.js +25 -0
  86. package/dist/translations/it.js.map +1 -0
  87. package/dist/translations/nb.d.ts +3 -0
  88. package/dist/translations/nb.d.ts.map +1 -0
  89. package/dist/translations/nb.js +25 -0
  90. package/dist/translations/nb.js.map +1 -0
  91. package/dist/translations/pl.d.ts +3 -0
  92. package/dist/translations/pl.d.ts.map +1 -0
  93. package/dist/translations/pl.js +25 -0
  94. package/dist/translations/pl.js.map +1 -0
  95. package/dist/translations/ru.d.ts +3 -0
  96. package/dist/translations/ru.d.ts.map +1 -0
  97. package/dist/translations/ru.js +25 -0
  98. package/dist/translations/ru.js.map +1 -0
  99. package/dist/translations/translation-schema.json +5 -1
  100. package/dist/translations/uk.d.ts +3 -0
  101. package/dist/translations/uk.d.ts.map +1 -0
  102. package/dist/translations/uk.js +25 -0
  103. package/dist/translations/uk.js.map +1 -0
  104. package/dist/translations/vi.d.ts +3 -0
  105. package/dist/translations/vi.d.ts.map +1 -0
  106. package/dist/translations/vi.js +25 -0
  107. package/dist/translations/vi.js.map +1 -0
  108. package/dist/types.d.ts +27 -14
  109. package/dist/types.d.ts.map +1 -1
  110. package/dist/types.js.map +1 -1
  111. package/dist/ui/LengthIndicator.d.ts.map +1 -1
  112. package/dist/ui/LengthIndicator.js +63 -42
  113. package/dist/ui/LengthIndicator.js.map +1 -1
  114. package/dist/ui/Pill.js +7 -3
  115. package/dist/ui/Pill.js.map +1 -1
  116. package/package.json +56 -37
  117. package/dist/fields/MetaDescription.d.ts +0 -9
  118. package/dist/fields/MetaDescription.d.ts.map +0 -1
  119. package/dist/fields/MetaDescription.js +0 -115
  120. package/dist/fields/MetaDescription.js.map +0 -1
  121. package/dist/fields/MetaImage.d.ts +0 -8
  122. package/dist/fields/MetaImage.d.ts.map +0 -1
  123. package/dist/fields/MetaImage.js +0 -119
  124. package/dist/fields/MetaImage.js.map +0 -1
  125. package/dist/fields/MetaTitle.d.ts +0 -9
  126. package/dist/fields/MetaTitle.d.ts.map +0 -1
  127. package/dist/fields/MetaTitle.js +0 -116
  128. package/dist/fields/MetaTitle.js.map +0 -1
  129. package/dist/translations/en.json +0 -22
  130. package/dist/translations/es.json +0 -22
  131. package/dist/translations/fa.json +0 -22
  132. package/dist/translations/fr.json +0 -22
  133. package/dist/translations/pl.json +0 -22
  134. package/dist/translations/uk.json +0 -22
  135. package/dist/ui/Overview.d.ts +0 -3
  136. package/dist/ui/Overview.d.ts.map +0 -1
  137. package/dist/ui/Overview.js +0 -51
  138. package/dist/ui/Overview.js.map +0 -1
  139. package/dist/ui/Preview.d.ts +0 -8
  140. package/dist/ui/Preview.d.ts.map +0 -1
  141. package/dist/ui/Preview.js +0 -79
  142. package/dist/ui/Preview.js.map +0 -1
  143. package/types.d.ts +0 -1
  144. package/types.js +0 -1
@@ -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,22 +1,35 @@
1
- import type { DocumentInfoContext } from '@payloadcms/ui/providers/DocumentInfo';
2
- import type { Field, TextField, TextareaField, UploadField } from 'payload/types';
3
- export type GenerateTitle = <T = any>(args: DocumentInfoContext & {
1
+ import type { DocumentInfoContext } from '@payloadcms/ui';
2
+ import type { CollectionConfig, Field, GlobalConfig, PayloadRequest, TextareaField, TextField, UploadField } from 'payload';
3
+ export type PartialDocumentInfoContext = Pick<DocumentInfoContext, 'collectionSlug' | 'docPermissions' | 'globalSlug' | 'hasPublishPermission' | 'hasSavePermission' | 'id' | 'initialData' | 'initialState' | 'preferencesKey' | 'publishedDoc' | 'title' | 'versionsCount'>;
4
+ export type GenerateTitle<T = any> = (args: {
5
+ collectionConfig?: CollectionConfig;
4
6
  doc: T;
7
+ globalConfig?: GlobalConfig;
5
8
  locale?: string;
6
- }) => Promise<string> | string;
7
- export type GenerateDescription = <T = any>(args: DocumentInfoContext & {
9
+ req: PayloadRequest;
10
+ } & PartialDocumentInfoContext) => Promise<string> | string;
11
+ export type GenerateDescription<T = any> = (args: {
12
+ collectionConfig?: CollectionConfig;
8
13
  doc: T;
14
+ globalConfig?: GlobalConfig;
9
15
  locale?: string;
10
- }) => Promise<string> | string;
11
- export type GenerateImage = <T = any>(args: DocumentInfoContext & {
16
+ req: PayloadRequest;
17
+ } & PartialDocumentInfoContext) => Promise<string> | string;
18
+ export type GenerateImage<T = any> = (args: {
19
+ collectionConfig?: CollectionConfig;
12
20
  doc: T;
21
+ globalConfig?: GlobalConfig;
13
22
  locale?: string;
14
- }) => Promise<string> | string;
15
- export type GenerateURL = <T = any>(args: DocumentInfoContext & {
23
+ req: PayloadRequest;
24
+ } & PartialDocumentInfoContext) => Promise<string> | string;
25
+ export type GenerateURL<T = any> = (args: {
26
+ collectionConfig?: CollectionConfig;
16
27
  doc: T;
28
+ globalConfig?: GlobalConfig;
17
29
  locale?: string;
18
- }) => Promise<string> | string;
19
- export interface PluginConfig {
30
+ req: PayloadRequest;
31
+ } & PartialDocumentInfoContext) => Promise<string> | string;
32
+ export type SEOPluginConfig = {
20
33
  collections?: string[];
21
34
  fieldOverrides?: {
22
35
  description?: Partial<TextareaField>;
@@ -32,11 +45,11 @@ export interface PluginConfig {
32
45
  interfaceName?: string;
33
46
  tabbedUI?: boolean;
34
47
  uploadsCollection?: string;
35
- }
36
- export interface Meta {
48
+ };
49
+ export type Meta = {
37
50
  description?: string;
38
51
  image?: any;
39
52
  keywords?: string;
40
53
  title?: string;
41
- }
54
+ };
42
55
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAA;AAChF,OA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AA;KAC3B,CAAA;IACD,MAAM,CAAC,EAAE,KAAK,EAAE,CAAA;IAChB,mBAAmB,CAAC,EAAE,mBAAmB,CAAA;IACzC,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B,CAAA;AAED,MAAM,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"}
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { DocumentInfoContext } from '@payloadcms/ui/providers/DocumentInfo'\nimport type { Field, TextField, TextareaField, UploadField } from 'payload/types'\n\nexport type GenerateTitle = <T = any>(\n args: DocumentInfoContext & { doc: T; locale?: string },\n) => Promise<string> | string\n\nexport type GenerateDescription = <T = any>(\n args: DocumentInfoContext & {\n doc: T\n locale?: string\n },\n) => Promise<string> | string\n\nexport type GenerateImage = <T = any>(\n args: DocumentInfoContext & { doc: T; locale?: string },\n) => Promise<string> | string\n\nexport type GenerateURL = <T = any>(\n args: DocumentInfoContext & { doc: T; locale?: string },\n) => Promise<string> | string\n\nexport interface PluginConfig {\n collections?: string[]\n fieldOverrides?: {\n description?: Partial<TextareaField>\n image?: Partial<UploadField>\n title?: Partial<TextField>\n }\n fields?: Field[]\n generateDescription?: GenerateDescription\n generateImage?: GenerateImage\n generateTitle?: GenerateTitle\n generateURL?: GenerateURL\n globals?: string[]\n interfaceName?: string\n tabbedUI?: boolean\n uploadsCollection?: string\n}\n\nexport interface Meta {\n description?: string\n image?: any // TODO: type this\n keywords?: string\n title?: string\n}\n"],"names":[],"rangeMappings":"","mappings":"AAwCA,WAKC"}
1
+ {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { DocumentInfoContext } from '@payloadcms/ui'\nimport type {\n CollectionConfig,\n Field,\n GlobalConfig,\n PayloadRequest,\n TextareaField,\n TextField,\n UploadField,\n} from 'payload'\n\nexport type PartialDocumentInfoContext = Pick<\n DocumentInfoContext,\n | 'collectionSlug'\n | 'docPermissions'\n | 'globalSlug'\n | 'hasPublishPermission'\n | 'hasSavePermission'\n | 'id'\n | 'initialData'\n | 'initialState'\n | 'preferencesKey'\n | 'publishedDoc'\n | 'title'\n | 'versionsCount'\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 collections?: string[]\n fieldOverrides?: {\n description?: Partial<TextareaField>\n image?: Partial<UploadField>\n title?: Partial<TextField>\n }\n fields?: Field[]\n generateDescription?: GenerateDescription\n generateImage?: GenerateImage\n generateTitle?: GenerateTitle\n generateURL?: GenerateURL\n globals?: string[]\n interfaceName?: string\n tabbedUI?: boolean\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":"AAqFA,WAKC"}
@@ -1 +1 @@
1
- {"version":3,"file":"LengthIndicator.d.ts","sourceRoot":"","sources":["../../src/ui/LengthIndicator.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAwC,MAAM,OAAO,CAAA;AAI5D,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
+ {"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 { useTranslation } from '@payloadcms/ui/providers/Translation';
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('Missing');
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__*/ React.createElement("div", {
69
+ return /*#__PURE__*/ _jsxs("div", {
69
70
  style: {
70
71
  alignItems: 'center',
71
72
  display: 'flex',
72
73
  width: '100%'
73
- }
74
- }, /*#__PURE__*/ React.createElement(Pill, {
75
- backgroundColor: labelStyle.backgroundColor,
76
- color: labelStyle.color,
77
- label: label
78
- }), /*#__PURE__*/ React.createElement("div", {
79
- style: {
80
- flexShrink: 0,
81
- lineHeight: 1,
82
- marginRight: '10px',
83
- whiteSpace: 'nowrap'
84
- }
85
- }, /*#__PURE__*/ React.createElement("small", null, t('plugin-seo:characterCount', {
86
- current: text?.length || 0,
87
- maxLength,
88
- minLength
89
- }), (textLength === 0 || charsUntilMin > 0) && /*#__PURE__*/ React.createElement(Fragment, null, t('plugin-seo:charactersToGo', {
90
- characters: charsUntilMin
91
- })), charsUntilMin <= 0 && charsUntilMax >= 0 && /*#__PURE__*/ React.createElement(Fragment, null, t('plugin-seo:charactersLeftOver', {
92
- characters: charsUntilMax
93
- })), charsUntilMax < 0 && /*#__PURE__*/ React.createElement(Fragment, null, t('plugin-seo:charactersTooMany', {
94
- characters: charsUntilMax * -1
95
- })))), /*#__PURE__*/ React.createElement("div", {
96
- style: {
97
- backgroundColor: '#F3F3F3',
98
- height: '2px',
99
- position: 'relative',
100
- width: '100%'
101
- }
102
- }, /*#__PURE__*/ React.createElement("div", {
103
- style: {
104
- backgroundColor: labelStyle.backgroundColor,
105
- height: '100%',
106
- left: 0,
107
- position: 'absolute',
108
- top: 0,
109
- width: `${barWidth * 100}%`
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/providers/Translation'\nimport React, { Fragment, useEffect, useState } from 'react'\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()\n\n useEffect(() => {\n const textLength = text?.length || 0\n\n if (textLength === 0) {\n setLabel('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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,cAAc,QAAQ,uCAAsC;AACrE,OAAOC,SAASC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAE5D,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,SAAS;YACTJ,cAAc;gBACZC,iBAAiB;gBACjBC,OAAO;YACT;YACAI,YAAY;QACd,OAAO;YACL,MAAMI,WAAW,AAACF,CAAAA,aAAaX,SAAQ,IAAMD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tB,gBACEiB,EAAE,gCAAgC;QAAEkB,YAAYb,gBAAgB,CAAC;IAAE,qBAK5E,oBAACE;QACCC,OAAO;YACLd,iBAAiB;YACjByB,QAAQ;YACRC,UAAU;YACVT,OAAO;QACT;qBAEA,oBAACJ;QACCC,OAAO;YACLd,iBAAiBF,WAAWE,eAAe;YAC3CyB,QAAQ;YACRE,MAAM;YACND,UAAU;YACVE,KAAK;YACLX,OAAO,CAAC,EAAEb,WAAW,IAAI,CAAC,CAAC;QAC7B;;AAKV,EAAC"}
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,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W,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__*/ React.createElement("div", {
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
- }, /*#__PURE__*/ React.createElement("small", null, label));
16
+ },
17
+ children: /*#__PURE__*/ _jsx("small", {
18
+ children: label
19
+ })
20
+ });
17
21
  };
18
22
 
19
23
  //# sourceMappingURL=Pill.js.map
@@ -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"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,OAIR,CAACC;IACJ,MAAM,EAAEC,eAAe,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGH;IAE1C,qBACE,oBAACI;QACCC,OAAO;YACLJ;YACAK,cAAc;YACdJ;YACAK,YAAY;YACZC,YAAY;YACZC,aAAa;YACbC,SAAS;YACTC,YAAY;QACd;qBAEA,oBAACC,eAAOT;AAGd,EAAC"}
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/package.json CHANGED
@@ -1,16 +1,7 @@
1
1
  {
2
2
  "name": "@payloadcms/plugin-seo",
3
- "version": "3.0.0-beta.12",
4
- "homepage:": "https://payloadcms.com",
5
- "repository": {
6
- "type": "git",
7
- "url": "https://github.com/payloadcms/payload.git",
8
- "directory": "packages/plugin-seo"
9
- },
3
+ "version": "3.0.0-beta.120",
10
4
  "description": "SEO plugin for Payload",
11
- "main": "./dist/index.js",
12
- "types": "./dist/index.d.ts",
13
- "type": "module",
14
5
  "keywords": [
15
6
  "payload",
16
7
  "cms",
@@ -20,44 +11,72 @@
20
11
  "seo",
21
12
  "yoast"
22
13
  ],
23
- "author": "dev@payloadcms.com",
24
- "license": "MIT",
25
- "peerDependencies": {
26
- "react": "^18.0.0",
27
- "payload": "3.0.0-beta.12",
28
- "@payloadcms/translations": "3.0.0-beta.12",
29
- "@payloadcms/ui": "3.0.0-beta.12"
30
- },
31
- "devDependencies": {
32
- "@types/react": "18.2.74",
33
- "react": "^18.0.0",
34
- "payload": "3.0.0-beta.12",
35
- "@payloadcms/translations": "3.0.0-beta.12",
36
- "@payloadcms/ui": "3.0.0-beta.12",
37
- "@payloadcms/eslint-config": "1.1.1"
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/payloadcms/payload.git",
17
+ "directory": "packages/plugin-seo"
38
18
  },
19
+ "license": "MIT",
20
+ "author": "Payload <dev@payloadcms.com> (https://payloadcms.com)",
21
+ "type": "module",
39
22
  "exports": {
40
23
  ".": {
41
24
  "import": "./dist/index.js",
42
- "require": "./dist/index.js",
43
- "types": "./dist/index.d.ts"
25
+ "types": "./dist/index.d.ts",
26
+ "default": "./dist/index.js"
27
+ },
28
+ "./types": {
29
+ "import": "./dist/exports/types.js",
30
+ "types": "./dist/exports/types.d.ts",
31
+ "default": "./dist/exports/types.js"
32
+ },
33
+ "./fields": {
34
+ "import": "./dist/exports/fields.js",
35
+ "types": "./dist/exports/fields.d.ts",
36
+ "default": "./dist/exports/fields.js"
37
+ },
38
+ "./client": {
39
+ "import": "./dist/exports/client.js",
40
+ "types": "./dist/exports/client.d.ts",
41
+ "default": "./dist/exports/client.js"
44
42
  }
45
43
  },
44
+ "main": "./dist/index.js",
45
+ "types": "./dist/index.d.ts",
46
+ "files": [
47
+ "dist"
48
+ ],
49
+ "dependencies": {
50
+ "@payloadcms/translations": "3.0.0-beta.120",
51
+ "@payloadcms/ui": "3.0.0-beta.120"
52
+ },
53
+ "devDependencies": {
54
+ "@types/react": "npm:types-react@19.0.0-rc.1",
55
+ "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
56
+ "@payloadcms/next": "3.0.0-beta.120",
57
+ "payload": "3.0.0-beta.120",
58
+ "@payloadcms/eslint-config": "3.0.0-beta.112"
59
+ },
60
+ "peerDependencies": {
61
+ "react": "^19.0.0 || ^19.0.0-rc-65a56d0e-20241020",
62
+ "react-dom": "^19.0.0 || ^19.0.0-rc-65a56d0e-20241020",
63
+ "payload": "3.0.0-beta.120"
64
+ },
46
65
  "publishConfig": {
47
66
  "registry": "https://registry.npmjs.org/"
48
67
  },
49
- "files": [
50
- "dist",
51
- "types.js",
52
- "types.d.ts"
53
- ],
68
+ "homepage:": "https://payloadcms.com",
69
+ "overrides": {
70
+ "@types/react": "npm:types-react@19.0.0-rc.1",
71
+ "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
72
+ },
54
73
  "scripts": {
55
- "build": "pnpm copyfiles && pnpm build:swc && pnpm build:types",
56
- "build:swc": "swc ./src -d ./dist --config-file .swcrc",
74
+ "build": "pnpm copyfiles && pnpm build:types && pnpm build:swc",
75
+ "build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
57
76
  "build:types": "tsc --emitDeclarationOnly --outDir dist",
77
+ "clean": "rimraf {dist,*.tsbuildinfo}",
58
78
  "copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
59
- "lint": "eslint src",
60
- "lint:fix": "eslint --fix --ext .ts,.tsx src",
61
- "clean": "rimraf {dist,*.tsbuildinfo}"
79
+ "lint": "eslint .",
80
+ "lint:fix": "eslint . --fix"
62
81
  }
63
82
  }
@@ -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"}
@@ -1,115 +0,0 @@
1
- 'use client';
2
- import { TextareaInput } from '@payloadcms/ui/fields/Textarea';
3
- import { FieldLabel } from '@payloadcms/ui/forms/FieldLabel';
4
- import { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider';
5
- import { useAllFormFields } from '@payloadcms/ui/forms/Form';
6
- import { useField } from '@payloadcms/ui/forms/useField';
7
- import { useDocumentInfo } from '@payloadcms/ui/providers/DocumentInfo';
8
- import { useLocale } from '@payloadcms/ui/providers/Locale';
9
- import { useTranslation } from '@payloadcms/ui/providers/Translation';
10
- import React, { useCallback } from 'react';
11
- import { defaults } from '../defaults.js';
12
- import { LengthIndicator } from '../ui/LengthIndicator.js';
13
- const { maxLength, minLength } = defaults.description;
14
- export const MetaDescription = (props)=>{
15
- const { CustomLabel, hasGenerateDescriptionFn, labelProps, path, required } = props;
16
- const { path: pathFromContext } = useFieldProps();
17
- const { t } = useTranslation();
18
- const locale = useLocale();
19
- const [fields] = useAllFormFields();
20
- const docInfo = useDocumentInfo();
21
- const field = useField({
22
- path
23
- });
24
- const { errorMessage, setValue, showError, value } = field;
25
- const regenerateDescription = useCallback(async ()=>{
26
- if (!hasGenerateDescriptionFn) return;
27
- const genDescriptionResponse = await fetch('/api/plugin-seo/generate-description', {
28
- body: JSON.stringify({
29
- ...docInfo,
30
- doc: {
31
- ...fields
32
- },
33
- locale: typeof locale === 'object' ? locale?.code : locale
34
- }),
35
- credentials: 'include',
36
- headers: {
37
- 'Content-Type': 'application/json'
38
- },
39
- method: 'POST'
40
- });
41
- const { result: generatedDescription } = await genDescriptionResponse.json();
42
- setValue(generatedDescription || '');
43
- }, [
44
- fields,
45
- setValue,
46
- hasGenerateDescriptionFn,
47
- locale,
48
- docInfo
49
- ]);
50
- return /*#__PURE__*/ React.createElement("div", {
51
- style: {
52
- marginBottom: '20px'
53
- }
54
- }, /*#__PURE__*/ React.createElement("div", {
55
- style: {
56
- marginBottom: '5px',
57
- position: 'relative'
58
- }
59
- }, /*#__PURE__*/ React.createElement("div", {
60
- className: "plugin-seo__field"
61
- }, /*#__PURE__*/ React.createElement(FieldLabel, {
62
- CustomLabel: CustomLabel,
63
- ...labelProps || {}
64
- }), hasGenerateDescriptionFn && /*#__PURE__*/ React.createElement(React.Fragment, null, "  —  ", /*#__PURE__*/ React.createElement("button", {
65
- onClick: regenerateDescription,
66
- style: {
67
- background: 'none',
68
- backgroundColor: 'transparent',
69
- border: 'none',
70
- color: 'currentcolor',
71
- cursor: 'pointer',
72
- padding: 0,
73
- textDecoration: 'underline'
74
- },
75
- type: "button"
76
- }, t('plugin-seo:autoGenerate')))), /*#__PURE__*/ React.createElement("div", {
77
- style: {
78
- color: '#9A9A9A'
79
- }
80
- }, t('plugin-seo:lengthTipDescription', {
81
- maxLength,
82
- minLength
83
- }), /*#__PURE__*/ React.createElement("a", {
84
- href: "https://developers.google.com/search/docs/advanced/appearance/snippet#meta-descriptions",
85
- rel: "noopener noreferrer",
86
- target: "_blank"
87
- }, t('plugin-seo:bestPractices')))), /*#__PURE__*/ React.createElement("div", {
88
- style: {
89
- marginBottom: '10px',
90
- position: 'relative'
91
- }
92
- }, /*#__PURE__*/ React.createElement(TextareaInput, {
93
- CustomError: errorMessage,
94
- onChange: setValue,
95
- path: pathFromContext,
96
- required: required,
97
- showError: showError,
98
- style: {
99
- marginBottom: 0
100
- },
101
- value: value
102
- })), /*#__PURE__*/ React.createElement("div", {
103
- style: {
104
- alignItems: 'center',
105
- display: 'flex',
106
- width: '100%'
107
- }
108
- }, /*#__PURE__*/ React.createElement(LengthIndicator, {
109
- maxLength: maxLength,
110
- minLength: minLength,
111
- text: value
112
- })));
113
- };
114
-
115
- //# sourceMappingURL=MetaDescription.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/fields/MetaDescription.tsx"],"sourcesContent":["'use client'\n\nimport type { FormFieldBase } from '@payloadcms/ui/fields/shared'\nimport type { FieldType, Options } from '@payloadcms/ui/forms/useField'\n\nimport { TextareaInput } from '@payloadcms/ui/fields/Textarea'\nimport { FieldLabel } from '@payloadcms/ui/forms/FieldLabel'\nimport { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider'\nimport { useAllFormFields } from '@payloadcms/ui/forms/Form'\nimport { useField } from '@payloadcms/ui/forms/useField'\nimport { useDocumentInfo } from '@payloadcms/ui/providers/DocumentInfo'\nimport { useLocale } from '@payloadcms/ui/providers/Locale'\nimport { useTranslation } from '@payloadcms/ui/providers/Translation'\nimport React, { useCallback } from 'react'\n\nimport type { GenerateDescription } from '../types.js'\n\nimport { defaults } from '../defaults.js'\nimport { LengthIndicator } from '../ui/LengthIndicator.js'\n\nconst { maxLength, minLength } = defaults.description\n\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\ntype MetaDescriptionProps = FormFieldBase & {\n hasGenerateDescriptionFn: boolean\n path: string\n}\n\nexport const MetaDescription: React.FC<MetaDescriptionProps> = (props) => {\n const { CustomLabel, hasGenerateDescriptionFn, labelProps, path, required } = props\n const { path: pathFromContext } = useFieldProps()\n\n const { t } = useTranslation()\n\n const locale = useLocale()\n const [fields] = useAllFormFields()\n const docInfo = useDocumentInfo()\n\n const field: FieldType<string> = useField({\n path,\n } as Options)\n\n const { errorMessage, setValue, showError, value } = field\n\n const regenerateDescription = useCallback(async () => {\n if (!hasGenerateDescriptionFn) return\n\n const genDescriptionResponse = await fetch('/api/plugin-seo/generate-description', {\n body: JSON.stringify({\n ...docInfo,\n doc: { ...fields },\n locale: typeof locale === 'object' ? locale?.code : locale,\n } satisfies Parameters<GenerateDescription>[0]),\n credentials: 'include',\n headers: {\n 'Content-Type': 'application/json',\n },\n method: 'POST',\n })\n\n const { result: generatedDescription } = await genDescriptionResponse.json()\n\n setValue(generatedDescription || '')\n }, [fields, setValue, hasGenerateDescriptionFn, locale, docInfo])\n\n return (\n <div\n style={{\n marginBottom: '20px',\n }}\n >\n <div\n style={{\n marginBottom: '5px',\n position: 'relative',\n }}\n >\n <div className=\"plugin-seo__field\">\n <FieldLabel CustomLabel={CustomLabel} {...(labelProps || {})} />\n {hasGenerateDescriptionFn && (\n <React.Fragment>\n &nbsp; &mdash; &nbsp;\n <button\n onClick={regenerateDescription}\n style={{\n background: 'none',\n backgroundColor: 'transparent',\n border: 'none',\n color: 'currentcolor',\n cursor: 'pointer',\n padding: 0,\n textDecoration: 'underline',\n }}\n type=\"button\"\n >\n {t('plugin-seo:autoGenerate')}\n </button>\n </React.Fragment>\n )}\n </div>\n <div\n style={{\n color: '#9A9A9A',\n }}\n >\n {t('plugin-seo:lengthTipDescription', { maxLength, minLength })}\n <a\n href=\"https://developers.google.com/search/docs/advanced/appearance/snippet#meta-descriptions\"\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n >\n {t('plugin-seo:bestPractices')}\n </a>\n </div>\n </div>\n <div\n style={{\n marginBottom: '10px',\n position: 'relative',\n }}\n >\n <TextareaInput\n CustomError={errorMessage}\n onChange={setValue}\n path={pathFromContext}\n required={required}\n showError={showError}\n style={{\n marginBottom: 0,\n }}\n value={value}\n />\n </div>\n <div\n style={{\n alignItems: 'center',\n display: 'flex',\n width: '100%',\n }}\n >\n <LengthIndicator maxLength={maxLength} minLength={minLength} text={value} />\n </div>\n </div>\n )\n}\n"],"names":["TextareaInput","FieldLabel","useFieldProps","useAllFormFields","useField","useDocumentInfo","useLocale","useTranslation","React","useCallback","defaults","LengthIndicator","maxLength","minLength","description","MetaDescription","props","CustomLabel","hasGenerateDescriptionFn","labelProps","path","required","pathFromContext","t","locale","fields","docInfo","field","errorMessage","setValue","showError","value","regenerateDescription","genDescriptionResponse","fetch","body","JSON","stringify","doc","code","credentials","headers","method","result","generatedDescription","json","div","style","marginBottom","position","className","Fragment","button","onClick","background","backgroundColor","border","color","cursor","padding","textDecoration","type","a","href","rel","target","CustomError","onChange","alignItems","display","width","text"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAKA,SAASA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,uBAAuBY,IAAI;QAE1EhB,SAASe,wBAAwB;IACnC,GAAG;QAACnB;QAAQI;QAAUX;QAA0BM;QAAQE;KAAQ;IAEhE,qBACE,oBAACoB;QACCC,OAAO;YACLC,cAAc;QAChB;qBAEA,oBAACF;QACCC,OAAO;YACLC,cAAc;YACdC,UAAU;QACZ;qBAEA,oBAACH;QAAII,WAAU;qBACb,oBAACjD;QAAWgB,aAAaA;QAAc,GAAIE,cAAc,CAAC,CAAC;QAC1DD,0CACC,oBAACV,MAAM2C,QAAQ,QAAC,uBAEd,oBAACC;QACCC,SAASrB;QACTe,OAAO;YACLO,YAAY;YACZC,iBAAiB;YACjBC,QAAQ;YACRC,OAAO;YACPC,QAAQ;YACRC,SAAS;YACTC,gBAAgB;QAClB;QACAC,MAAK;OAEJtC,EAAE,6CAKX,oBAACuB;QACCC,OAAO;YACLU,OAAO;QACT;OAEClC,EAAE,mCAAmC;QAAEX;QAAWC;IAAU,kBAC7D,oBAACiD;QACCC,MAAK;QACLC,KAAI;QACJC,QAAO;OAEN1C,EAAE,8CAIT,oBAACuB;QACCC,OAAO;YACLC,cAAc;YACdC,UAAU;QACZ;qBAEA,oBAACjD;QACCkE,aAAatC;QACbuC,UAAUtC;QACVT,MAAME;QACND,UAAUA;QACVS,WAAWA;QACXiB,OAAO;YACLC,cAAc;QAChB;QACAjB,OAAOA;uBAGX,oBAACe;QACCC,OAAO;YACLqB,YAAY;YACZC,SAAS;YACTC,OAAO;QACT;qBAEA,oBAAC3D;QAAgBC,WAAWA;QAAWC,WAAWA;QAAW0D,MAAMxC;;AAI3E,EAAC"}
@@ -1,8 +0,0 @@
1
- import type { UploadInputProps } from '@payloadcms/ui/fields/Upload';
2
- import React from 'react';
3
- type MetaImageProps = UploadInputProps & {
4
- hasGenerateImageFn: boolean;
5
- };
6
- export declare const MetaImage: React.FC<MetaImageProps>;
7
- export {};
8
- //# sourceMappingURL=MetaImage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MetaImage.d.ts","sourceRoot":"","sources":["../../src/fields/MetaImage.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAWpE,OAAO,KAAsB,MAAM,OAAO,CAAA;AAO1C,KAAK,cAAc,GAAG,gBAAgB,GAAG;IACvC,kBAAkB,EAAE,OAAO,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAoI9C,CAAA"}