@crowdin/app-project-module 0.66.1 → 0.68.0

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 (45) hide show
  1. package/README.md +3 -17
  2. package/out/index.js +25 -10
  3. package/out/middlewares/crowdin-client.d.ts +13 -2
  4. package/out/middlewares/crowdin-client.js +17 -3
  5. package/out/middlewares/ui-module.d.ts +5 -1
  6. package/out/middlewares/ui-module.js +5 -1
  7. package/out/modules/ai-prompt-provider/index.js +7 -2
  8. package/out/modules/ai-provider/handlers/chat-completions.js +75 -5
  9. package/out/modules/ai-provider/handlers/get-model-list.js +3 -2
  10. package/out/modules/ai-provider/index.js +13 -3
  11. package/out/modules/ai-provider/types.d.ts +5 -2
  12. package/out/modules/ai-tools/index.js +7 -2
  13. package/out/modules/ai-tools/types.d.ts +2 -2
  14. package/out/modules/api/api.js +66 -11
  15. package/out/modules/context-menu/index.js +1 -1
  16. package/out/modules/custom-mt/index.js +6 -1
  17. package/out/modules/custom-mt/types.d.ts +4 -2
  18. package/out/modules/custom-spell-check/index.js +14 -4
  19. package/out/modules/custom-spell-check/types.d.ts +2 -2
  20. package/out/modules/editor-right-panel/index.js +1 -1
  21. package/out/modules/external-qa-check/index.js +7 -2
  22. package/out/modules/external-qa-check/types.d.ts +2 -2
  23. package/out/modules/file-processing/index.js +30 -5
  24. package/out/modules/file-processing/types.d.ts +3 -2
  25. package/out/modules/file-processing/util/files.d.ts +1 -0
  26. package/out/modules/install.js +10 -2
  27. package/out/modules/integration/index.js +109 -18
  28. package/out/modules/integration/types.d.ts +2 -2
  29. package/out/modules/manifest.js +48 -22
  30. package/out/modules/modal/index.js +1 -1
  31. package/out/modules/organization-menu/index.js +1 -1
  32. package/out/modules/profile-resources-menu/index.js +1 -1
  33. package/out/modules/project-menu/index.js +1 -1
  34. package/out/modules/project-menu-crowdsource/index.js +1 -1
  35. package/out/modules/project-reports/index.js +1 -1
  36. package/out/modules/project-tools/index.js +1 -1
  37. package/out/static/css/crowdin-ui-colors.css +115 -0
  38. package/out/static/js/form.js +10 -10
  39. package/out/types.d.ts +16 -2
  40. package/out/util/handlebars.js +2 -2
  41. package/out/util/index.d.ts +0 -1
  42. package/out/util/index.js +1 -9
  43. package/out/views/main.handlebars +3 -19
  44. package/out/views/partials/head.handlebars +1 -0
  45. package/package.json +12 -12
@@ -13,6 +13,6 @@ function register({ config, app }) {
13
13
  }
14
14
  app.get((0, util_1.getLogoUrl)(config.profileResourcesMenu, '/resources'), (req, res) => { var _a; return res.sendFile(((_a = config.profileResourcesMenu) === null || _a === void 0 ? void 0 : _a.imagePath) || config.imagePath); });
15
15
  const allowUnauthorized = !(0, util_1.isAuthorizedConfig)(config);
16
- app.use('/resources', (0, ui_module_1.default)(config, allowUnauthorized), (0, render_ui_module_1.default)(config.profileResourcesMenu));
16
+ app.use('/resources', (0, ui_module_1.default)({ config, allowUnauthorized, moduleType: config.profileResourcesMenu.key }), (0, render_ui_module_1.default)(config.profileResourcesMenu));
17
17
  }
18
18
  exports.register = register;
@@ -12,6 +12,6 @@ function register({ config, app }) {
12
12
  return;
13
13
  }
14
14
  const allowUnauthorized = !(0, util_1.isAuthorizedConfig)(config);
15
- app.use('/project-menu', (0, ui_module_1.default)(config, allowUnauthorized), (0, render_ui_module_1.default)(config.projectMenu));
15
+ app.use('/project-menu', (0, ui_module_1.default)({ config, allowUnauthorized, moduleType: config.projectMenu.key }), (0, render_ui_module_1.default)(config.projectMenu));
16
16
  }
17
17
  exports.register = register;
@@ -12,6 +12,6 @@ function register({ config, app }) {
12
12
  return;
13
13
  }
14
14
  const allowUnauthorized = !(0, util_1.isAuthorizedConfig)(config);
15
- app.use('/project-menu-crowdsource', (0, ui_module_1.default)(config, allowUnauthorized), (0, render_ui_module_1.default)(config.projectMenuCrowdsource));
15
+ app.use('/project-menu-crowdsource', (0, ui_module_1.default)({ config, allowUnauthorized, moduleType: config.projectMenuCrowdsource.key }), (0, render_ui_module_1.default)(config.projectMenuCrowdsource));
16
16
  }
17
17
  exports.register = register;
@@ -13,6 +13,6 @@ function register({ config, app }) {
13
13
  }
14
14
  const allowUnauthorized = !(0, util_1.isAuthorizedConfig)(config);
15
15
  app.get((0, util_1.getLogoUrl)(config.projectReports, '/reports'), (req, res) => { var _a; return res.sendFile(((_a = config.projectReports) === null || _a === void 0 ? void 0 : _a.imagePath) || config.imagePath); });
16
- app.use('/reports', (0, ui_module_1.default)(config, allowUnauthorized), (0, render_ui_module_1.default)(config.projectReports));
16
+ app.use('/reports', (0, ui_module_1.default)({ config, allowUnauthorized, moduleType: config.projectReports.key }), (0, render_ui_module_1.default)(config.projectReports));
17
17
  }
18
18
  exports.register = register;
@@ -13,6 +13,6 @@ function register({ config, app }) {
13
13
  }
14
14
  const allowUnauthorized = !(0, util_1.isAuthorizedConfig)(config);
15
15
  app.get((0, util_1.getLogoUrl)(config.projectTools, '/tools'), (req, res) => { var _a; return res.sendFile(((_a = config.projectTools) === null || _a === void 0 ? void 0 : _a.imagePath) || config.imagePath); });
16
- app.use('/tools', (0, ui_module_1.default)(config, allowUnauthorized), (0, render_ui_module_1.default)(config.projectTools));
16
+ app.use('/tools', (0, ui_module_1.default)({ config, allowUnauthorized, moduleType: config.projectTools.key }), (0, render_ui_module_1.default)(config.projectTools));
17
17
  }
18
18
  exports.register = register;
@@ -0,0 +1,115 @@
1
+ /* text color */
2
+ *[class*="crdn-text"] {
3
+ color: var(--crdn-color, var(--crowdin-body-color));
4
+ }
5
+
6
+ .crdn-text\:primary {
7
+ --crdn-color: var(--crowdin-primary);
8
+ }
9
+
10
+ .crdn-text\:title {
11
+ --crdn-color: var(--crowdin-title-color);
12
+ }
13
+
14
+ .crdn-text\:body {
15
+ --crdn-color: var(--crowdin-body-color);
16
+ }
17
+
18
+ .crdn-text\:muted {
19
+ --crdn-color: var(--crowdin-text-muted);
20
+ }
21
+
22
+ .crdn-text\:disabled {
23
+ --crdn-color: var(--crowdin-text-disabled);
24
+ }
25
+
26
+ .crdn-text\:info {
27
+ --crdn-color: var(--crowdin-info)
28
+ }
29
+
30
+ .crdn-text\:success {
31
+ --crdn-color: var(--crowdin-success)
32
+ }
33
+
34
+ .crdn-text\:warning {
35
+ --crdn-color: var(--crowdin-warning)
36
+ }
37
+
38
+ .crdn-text\:danger {
39
+ --crdn-color: var(--crowdin-danger)
40
+ }
41
+
42
+ /* backgrounds */
43
+
44
+ *[class*="crdn-bg"] {
45
+ background-color: var(--crdn-bg, var(--crowdin-body-bg));
46
+ }
47
+
48
+ .crdn-bg\:lvl-0 {
49
+ --crdn-bg: var(--crowdin-level-0-bg);
50
+ }
51
+
52
+ .crdn-bg\:lvl-1 {
53
+ --crdn-bg: var(--crowdin-level-1-bg);
54
+ }
55
+
56
+ .crdn-bg\:lvl-2 {
57
+ --crdn-bg: var(--crowdin-level-2-bg);
58
+ }
59
+
60
+ .crdn-bg\:lvl-2\:05 {
61
+ --crdn-bg: var(--crowdin-level-2-bg-05);
62
+ }
63
+
64
+ .crdn-bg\:lvl-3 {
65
+ --crdn-bg: var(--crowdin-level-3-bg);
66
+ }
67
+
68
+ .crdn-bg\:primary {
69
+ --crdn-bg: var(--crowdin-primary);
70
+ }
71
+
72
+ .crdn-bg\:success {
73
+ --crdn-bg: var(--crowdin-success-bg)
74
+ }
75
+
76
+ .crdn-bg\:success {
77
+ --crdn-bg: var(--crowdin-success-bg)
78
+ }
79
+
80
+
81
+ .crdn-bg\:warning {
82
+ --crdn-bg: var(--crowdin-warning-bg)
83
+ }
84
+
85
+ .crdn-bg\:danger {
86
+ --crdn-bg: var(--crowdin-danger-bg)
87
+ }
88
+
89
+ /* borders */
90
+
91
+ *[class*="crdn-border"] {
92
+ border-width: 1px;
93
+ border-style: solid;
94
+ border-color: var(--crdn-border, var(--crowdin-border-color));
95
+ }
96
+
97
+ .crdn-border\:primary {
98
+ --crdn-border: var(--crowdin-primary);
99
+ }
100
+
101
+ .crdn-border\:danger {
102
+ --crdn-border: var(--crowdin-danger);
103
+ }
104
+
105
+ .crdn-border\:info {
106
+ --crdn-border: var(--crowdin-danger);
107
+ }
108
+
109
+ .crdn-border\:success {
110
+ --crdn-border: var(--crowdin-success);
111
+ }
112
+
113
+ .crdn-border\:warning {
114
+ --crdn-border: var(--crowdin-warning);
115
+ }