@payload-enchants/translator 0.0.1-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +193 -0
  3. package/dist/client/api/index.d.ts +8 -0
  4. package/dist/client/api/index.d.ts.map +1 -0
  5. package/dist/client/api/index.js +28 -0
  6. package/dist/client/api/index.js.map +1 -0
  7. package/dist/client/components/CustomSaveButton/CustomSaveButton.d.ts +4 -0
  8. package/dist/client/components/CustomSaveButton/CustomSaveButton.d.ts.map +1 -0
  9. package/dist/client/components/CustomSaveButton/CustomSaveButton.js +22 -0
  10. package/dist/client/components/CustomSaveButton/CustomSaveButton.js.map +1 -0
  11. package/dist/client/components/CustomSaveButton/index.d.ts +2 -0
  12. package/dist/client/components/CustomSaveButton/index.d.ts.map +1 -0
  13. package/dist/client/components/CustomSaveButton/index.js +3 -0
  14. package/dist/client/components/CustomSaveButton/index.js.map +1 -0
  15. package/dist/client/components/CustomSaveButton/styles.scss +5 -0
  16. package/dist/client/components/LocaleLabel/LocaleLabel.d.ts +6 -0
  17. package/dist/client/components/LocaleLabel/LocaleLabel.d.ts.map +1 -0
  18. package/dist/client/components/LocaleLabel/LocaleLabel.js +19 -0
  19. package/dist/client/components/LocaleLabel/LocaleLabel.js.map +1 -0
  20. package/dist/client/components/LocaleLabel/index.d.ts +2 -0
  21. package/dist/client/components/LocaleLabel/index.d.ts.map +1 -0
  22. package/dist/client/components/LocaleLabel/index.js +3 -0
  23. package/dist/client/components/LocaleLabel/index.js.map +1 -0
  24. package/dist/client/components/ResolverButton/ResolverButton.d.ts +6 -0
  25. package/dist/client/components/ResolverButton/ResolverButton.d.ts.map +1 -0
  26. package/dist/client/components/ResolverButton/ResolverButton.js +16 -0
  27. package/dist/client/components/ResolverButton/ResolverButton.js.map +1 -0
  28. package/dist/client/components/ResolverButton/index.d.ts +2 -0
  29. package/dist/client/components/ResolverButton/index.d.ts.map +1 -0
  30. package/dist/client/components/ResolverButton/index.js +3 -0
  31. package/dist/client/components/ResolverButton/index.js.map +1 -0
  32. package/dist/client/components/TranslatorModal/Content.d.ts +3 -0
  33. package/dist/client/components/TranslatorModal/Content.d.ts.map +1 -0
  34. package/dist/client/components/TranslatorModal/Content.js +42 -0
  35. package/dist/client/components/TranslatorModal/Content.js.map +1 -0
  36. package/dist/client/components/TranslatorModal/TranslatorModal.d.ts +4 -0
  37. package/dist/client/components/TranslatorModal/TranslatorModal.d.ts.map +1 -0
  38. package/dist/client/components/TranslatorModal/TranslatorModal.js +21 -0
  39. package/dist/client/components/TranslatorModal/TranslatorModal.js.map +1 -0
  40. package/dist/client/components/TranslatorModal/index.d.ts +2 -0
  41. package/dist/client/components/TranslatorModal/index.d.ts.map +1 -0
  42. package/dist/client/components/TranslatorModal/index.js +3 -0
  43. package/dist/client/components/TranslatorModal/index.js.map +1 -0
  44. package/dist/client/components/TranslatorModal/styles.scss +76 -0
  45. package/dist/client/providers/Translator/TranslatorProvider.d.ts +5 -0
  46. package/dist/client/providers/Translator/TranslatorProvider.d.ts.map +1 -0
  47. package/dist/client/providers/Translator/TranslatorProvider.js +100 -0
  48. package/dist/client/providers/Translator/TranslatorProvider.js.map +1 -0
  49. package/dist/client/providers/Translator/context.d.ts +22 -0
  50. package/dist/client/providers/Translator/context.d.ts.map +1 -0
  51. package/dist/client/providers/Translator/context.js +9 -0
  52. package/dist/client/providers/Translator/context.js.map +1 -0
  53. package/dist/i18n-translations.d.ts +25 -0
  54. package/dist/i18n-translations.d.ts.map +1 -0
  55. package/dist/i18n-translations.js +26 -0
  56. package/dist/i18n-translations.js.map +1 -0
  57. package/dist/index.d.ts +6 -0
  58. package/dist/index.d.ts.map +1 -0
  59. package/dist/index.js +79 -0
  60. package/dist/index.js.map +1 -0
  61. package/dist/resolvers/copy.d.ts +3 -0
  62. package/dist/resolvers/copy.d.ts.map +1 -0
  63. package/dist/resolvers/copy.js +14 -0
  64. package/dist/resolvers/copy.js.map +1 -0
  65. package/dist/resolvers/google.d.ts +11 -0
  66. package/dist/resolvers/google.d.ts.map +1 -0
  67. package/dist/resolvers/google.js +47 -0
  68. package/dist/resolvers/google.js.map +1 -0
  69. package/dist/resolvers/openAI.d.ts +21 -0
  70. package/dist/resolvers/openAI.d.ts.map +1 -0
  71. package/dist/resolvers/openAI.js +97 -0
  72. package/dist/resolvers/openAI.js.map +1 -0
  73. package/dist/resolvers/types.d.ts +20 -0
  74. package/dist/resolvers/types.d.ts.map +1 -0
  75. package/dist/resolvers/types.js +3 -0
  76. package/dist/resolvers/types.js.map +1 -0
  77. package/dist/translate/endpoint.d.ts +3 -0
  78. package/dist/translate/endpoint.d.ts.map +1 -0
  79. package/dist/translate/endpoint.js +22 -0
  80. package/dist/translate/endpoint.js.map +1 -0
  81. package/dist/translate/findEntityWithConfig.d.ts +15 -0
  82. package/dist/translate/findEntityWithConfig.d.ts.map +1 -0
  83. package/dist/translate/findEntityWithConfig.js +32 -0
  84. package/dist/translate/findEntityWithConfig.js.map +1 -0
  85. package/dist/translate/operation.d.ts +9 -0
  86. package/dist/translate/operation.d.ts.map +1 -0
  87. package/dist/translate/operation.js +74 -0
  88. package/dist/translate/operation.js.map +1 -0
  89. package/dist/translate/traverseFields.d.ts +13 -0
  90. package/dist/translate/traverseFields.d.ts.map +1 -0
  91. package/dist/translate/traverseFields.js +160 -0
  92. package/dist/translate/traverseFields.js.map +1 -0
  93. package/dist/translate/traverseRichText.d.ts +6 -0
  94. package/dist/translate/traverseRichText.d.ts.map +1 -0
  95. package/dist/translate/traverseRichText.js +17 -0
  96. package/dist/translate/traverseRichText.js.map +1 -0
  97. package/dist/translate/types.d.ts +25 -0
  98. package/dist/translate/types.d.ts.map +1 -0
  99. package/dist/translate/types.js +3 -0
  100. package/dist/translate/types.js.map +1 -0
  101. package/dist/translate/updateEntity.d.ts +14 -0
  102. package/dist/translate/updateEntity.d.ts.map +1 -0
  103. package/dist/translate/updateEntity.js +26 -0
  104. package/dist/translate/updateEntity.js.map +1 -0
  105. package/dist/types.d.ts +21 -0
  106. package/dist/types.d.ts.map +1 -0
  107. package/dist/types.js +3 -0
  108. package/dist/types.js.map +1 -0
  109. package/dist/utils/chunkArray.d.ts +2 -0
  110. package/dist/utils/chunkArray.d.ts.map +1 -0
  111. package/dist/utils/chunkArray.js +7 -0
  112. package/dist/utils/chunkArray.js.map +1 -0
  113. package/dist/utils/isEmpty.d.ts +2 -0
  114. package/dist/utils/isEmpty.d.ts.map +1 -0
  115. package/dist/utils/isEmpty.js +8 -0
  116. package/dist/utils/isEmpty.js.map +1 -0
  117. package/package.json +75 -0
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "@payload-enchants/translator",
3
+ "private": false,
4
+ "version": "0.0.1-alpha.1",
5
+ "repository": "https://github.com/r1tsuu/payload-plugin-translator",
6
+ "author": "r1tsuu",
7
+ "bugs": "https://github.com/r1tsuu/payload-plugin-translator/issues",
8
+ "type": "module",
9
+ "peerDependencies": {
10
+ "@payloadcms/translations": "^3.0.0-beta.24",
11
+ "@payloadcms/ui": "^3.0.0-beta.24",
12
+ "payload": "^3.0.0-beta.24",
13
+ "react": "^18.2.0"
14
+ },
15
+ "devDependencies": {
16
+ "@payloadcms/translations": "3.0.0-beta.24",
17
+ "@payloadcms/ui": "3.0.0-beta.24",
18
+ "@types/react": "18.2.64",
19
+ "payload": "3.0.0-beta.24",
20
+ "react": "18.2.0",
21
+ "typescript": "^5.4.2"
22
+ },
23
+ "exports": {
24
+ ".": {
25
+ "import": "./dist/index.js",
26
+ "require": "./dist/index.js",
27
+ "types": "./dist/index.d.ts"
28
+ },
29
+ "./types": {
30
+ "import": "./dist/types.js",
31
+ "require": "./dist/types.js",
32
+ "types": "./dist/types.d.ts"
33
+ },
34
+ "./resolvers/types": {
35
+ "import": "./dist/resolvers/types.js",
36
+ "require": "./dist/resolvers/types.js",
37
+ "types": "./dist/resolvers/types.d.ts"
38
+ },
39
+ "./resolvers/google": {
40
+ "import": "./dist/resolvers/google.js",
41
+ "require": "./dist/resolvers/google.js",
42
+ "types": "./dist/resolvers/google.d.ts"
43
+ },
44
+ "./resolvers/copy": {
45
+ "import": "./dist/resolvers/copy.js",
46
+ "require": "./dist/resolvers/copy.js",
47
+ "types": "./dist/resolvers/copy.d.ts"
48
+ },
49
+ "./resolvers/openAI": {
50
+ "import": "./dist/resolvers/openAI.js",
51
+ "require": "./dist/resolvers/openAI.js",
52
+ "types": "./dist/resolvers/openAI.d.ts"
53
+ }
54
+ },
55
+ "publishConfig": {
56
+ "registry": "https://registry.npmjs.org/"
57
+ },
58
+ "files": [
59
+ "dist"
60
+ ],
61
+ "dependencies": {
62
+ "bson-objectid": "^2.0.4"
63
+ },
64
+ "scripts": {
65
+ "build": "pnpm copyfiles && pnpm build:swc && pnpm build:types",
66
+ "build:swc": "swc ./src -d ./dist --config-file .swcrc",
67
+ "build:types": "tsc --emitDeclarationOnly --outDir dist",
68
+ "lint": "eslint src",
69
+ "lint:fix": "eslint --fix --ext .ts,.tsx src",
70
+ "clean": "rimraf dist && rimraf tsconfig.tsbuildinfo",
71
+ "copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/"
72
+ },
73
+ "main": "./dist/index.js",
74
+ "types": "./dist/index.d.ts"
75
+ }