@_sh/strapi-plugin-ckeditor 4.0.11 → 5.0.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 (78) hide show
  1. package/README.md +586 -575
  2. package/dist/_chunks/Field-8Nh0dMSc.mjs +574 -0
  3. package/dist/_chunks/Field-BKtrDFjh.js +598 -0
  4. package/dist/_chunks/index-CNalXcwy.mjs +1330 -0
  5. package/dist/_chunks/index-DO2vqIdx.js +1350 -0
  6. package/dist/admin/index.js +11 -4
  7. package/dist/admin/index.mjs +10 -4
  8. package/dist/admin/src/components/CKEReact.d.ts +6 -0
  9. package/dist/admin/src/components/CKEditorIcon.d.ts +1 -0
  10. package/dist/admin/src/components/Editor.d.ts +1 -0
  11. package/dist/admin/src/components/EditorLayout.d.ts +4 -0
  12. package/dist/admin/src/components/EditorProvider.d.ts +20 -0
  13. package/dist/admin/src/components/Field.d.ts +20 -0
  14. package/dist/admin/src/components/GlobalStyling.d.ts +4 -0
  15. package/dist/admin/src/components/MediaLib.d.ts +9 -0
  16. package/dist/admin/src/config/htmlPreset.d.ts +2 -0
  17. package/dist/admin/src/config/index.d.ts +5 -0
  18. package/dist/admin/src/config/language.d.ts +15 -0
  19. package/dist/admin/src/config/markdownPreset.d.ts +2 -0
  20. package/dist/admin/src/config/pluginConfig.d.ts +23 -0
  21. package/dist/admin/src/config/types.d.ts +123 -0
  22. package/dist/admin/src/exports.d.ts +9 -0
  23. package/dist/admin/src/index.d.ts +6 -0
  24. package/dist/admin/src/plugins/StrapiMediaLib.d.ts +15 -0
  25. package/dist/admin/src/plugins/StrapiUploadAdapter.d.ts +12 -0
  26. package/dist/admin/src/plugins/index.d.ts +2 -0
  27. package/dist/admin/src/theme/additional.d.ts +1 -0
  28. package/dist/admin/src/theme/colors.d.ts +1 -0
  29. package/dist/admin/src/theme/common.d.ts +1 -0
  30. package/dist/admin/src/theme/dark.d.ts +1 -0
  31. package/dist/admin/src/theme/index.d.ts +2 -0
  32. package/dist/admin/src/theme/light.d.ts +1 -0
  33. package/dist/admin/src/utils/index.d.ts +4 -0
  34. package/dist/admin/src/utils/isImageResponsive.d.ts +3 -0
  35. package/dist/admin/src/utils/localStorage.d.ts +3 -0
  36. package/dist/admin/src/utils/pluginId.d.ts +1 -0
  37. package/dist/admin/src/utils/prefixWithBackendUrl.d.ts +1 -0
  38. package/dist/server/index.js +61 -119
  39. package/dist/server/index.mjs +61 -117
  40. package/dist/server/src/index.d.ts +7 -0
  41. package/package.json +50 -22
  42. package/dist/_chunks/index-5LGZsCS3.mjs +0 -1125
  43. package/dist/_chunks/index-5LGZsCS3.mjs.map +0 -1
  44. package/dist/_chunks/index-B5HkOicq.mjs +0 -3530
  45. package/dist/_chunks/index-B5HkOicq.mjs.map +0 -1
  46. package/dist/_chunks/index-BOqpyEaD.js +0 -1150
  47. package/dist/_chunks/index-BOqpyEaD.js.map +0 -1
  48. package/dist/_chunks/index-BQ7yqvCN.mjs +0 -1124
  49. package/dist/_chunks/index-BQ7yqvCN.mjs.map +0 -1
  50. package/dist/_chunks/index-BZP-quaN.mjs +0 -3530
  51. package/dist/_chunks/index-BZP-quaN.mjs.map +0 -1
  52. package/dist/_chunks/index-BZZiYjTp.mjs +0 -3530
  53. package/dist/_chunks/index-BZZiYjTp.mjs.map +0 -1
  54. package/dist/_chunks/index-Be-t5n4r.mjs +0 -1125
  55. package/dist/_chunks/index-Be-t5n4r.mjs.map +0 -1
  56. package/dist/_chunks/index-BiOS6ItS.js +0 -1150
  57. package/dist/_chunks/index-BiOS6ItS.js.map +0 -1
  58. package/dist/_chunks/index-C4BPSFZt.mjs +0 -3530
  59. package/dist/_chunks/index-C4BPSFZt.mjs.map +0 -1
  60. package/dist/_chunks/index-CFskHjqL.js +0 -3548
  61. package/dist/_chunks/index-CFskHjqL.js.map +0 -1
  62. package/dist/_chunks/index-CPBrnTwd.mjs +0 -1124
  63. package/dist/_chunks/index-CPBrnTwd.mjs.map +0 -1
  64. package/dist/_chunks/index-CRK4zk5I.js +0 -3548
  65. package/dist/_chunks/index-CRK4zk5I.js.map +0 -1
  66. package/dist/_chunks/index-CUmwBN9O.js +0 -1151
  67. package/dist/_chunks/index-CUmwBN9O.js.map +0 -1
  68. package/dist/_chunks/index-CaYpAgjX.js +0 -1151
  69. package/dist/_chunks/index-CaYpAgjX.js.map +0 -1
  70. package/dist/_chunks/index-pRK2Er3w.js +0 -3548
  71. package/dist/_chunks/index-pRK2Er3w.js.map +0 -1
  72. package/dist/_chunks/index-uYy-Myyv.js +0 -3548
  73. package/dist/_chunks/index-uYy-Myyv.js.map +0 -1
  74. package/dist/admin/index.js.map +0 -1
  75. package/dist/admin/index.mjs.map +0 -1
  76. package/dist/server/index.js.map +0 -1
  77. package/dist/server/index.mjs.map +0 -1
  78. package/strapi-server.js +0 -3
@@ -1,10 +1,6 @@
1
- import require$$0$1 from "fs";
2
- function getDefaultExportFromCjs(x) {
3
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
4
- }
5
1
  const name = "@_sh/strapi-plugin-ckeditor";
6
- const version = "4.0.10";
7
- const description = "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Unofficial integration)";
2
+ const version = "5.0.0";
3
+ const description = "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Community Edition)";
8
4
  const keywords = [
9
5
  "strapi",
10
6
  "ckeditor",
@@ -22,80 +18,109 @@ const repository = {
22
18
  type: "git",
23
19
  url: "https://github.com/nshenderov/strapi-plugin-ckeditor.git"
24
20
  };
25
- const strapi$1 = {
21
+ const strapi = {
26
22
  name: "ckeditor5",
27
23
  displayName: "CKEditor 5",
28
- description: "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Unofficial integration)",
24
+ description: "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Community Edition)",
29
25
  kind: "plugin"
30
26
  };
27
+ const type = "commonjs";
31
28
  const exports = {
32
29
  "./package.json": "./package.json",
30
+ ".": {
31
+ types: "./dist/admin/src/index.d.ts",
32
+ source: "./admin/src/index.ts",
33
+ "import": "./dist/admin/index.mjs",
34
+ require: "./dist/admin/index.js",
35
+ "default": "./dist/admin/index.js"
36
+ },
33
37
  "./strapi-admin": {
34
- source: "./admin/src/index.js",
38
+ types: "./dist/admin/src/index.d.ts",
39
+ source: "./admin/src/index.ts",
35
40
  "import": "./dist/admin/index.mjs",
36
41
  require: "./dist/admin/index.js",
37
42
  "default": "./dist/admin/index.js"
38
43
  },
39
44
  "./strapi-server": {
40
- source: "./server/src/index.js",
45
+ types: "./dist/server/src/index.d.ts",
46
+ source: "./server/src/index.ts",
41
47
  "import": "./dist/server/index.mjs",
42
48
  require: "./dist/server/index.js",
43
49
  "default": "./dist/server/index.js"
44
50
  }
45
51
  };
46
52
  const files = [
47
- "dist",
48
- "./strapi-server.js"
53
+ "dist"
49
54
  ];
50
55
  const scripts = {
51
56
  build: "strapi-plugin build",
52
57
  watch: "strapi-plugin watch",
53
58
  "watch:link": "strapi-plugin watch:link",
54
59
  verify: "strapi-plugin verify",
60
+ "test:ts:front": "run -T tsc -p admin/tsconfig.json",
61
+ "test:ts:back": "run -T tsc -p server/tsconfig.json",
55
62
  release: "release-it",
56
63
  "release:info": "release-it --changelog"
57
64
  };
58
65
  const dependencies = {
59
- ckeditor5: "^43.3.1",
60
- "@ckeditor/ckeditor5-react": "^9.3.1",
61
- "@strapi/design-system": "^2.0.0-rc.11",
66
+ "@ckeditor/ckeditor5-react": "^9.4.0",
67
+ "@strapi/design-system": "^2.0.0-rc.13",
68
+ "@strapi/icons": "^2.0.0-rc.13",
69
+ lodash: "^4.17.21",
70
+ ckeditor5: "^44.0.0",
62
71
  "prop-types": "^15.8.1",
63
- "sanitize-html": "^2.13.1"
72
+ "sanitize-html": "^2.13.1",
73
+ yup: "0.32.9"
64
74
  };
65
75
  const devDependencies = {
76
+ "@release-it/conventional-changelog": "^8.0.1",
77
+ "@strapi/sdk-plugin": "^5.2.7",
66
78
  "@strapi/strapi": "^5.0.0",
67
- "@strapi/sdk-plugin": "^5.2.6",
68
- prettier: "^3.3.3",
79
+ "@strapi/typescript-utils": "^5.4.0",
80
+ "@types/react": "^18.3.12",
81
+ "@types/react-dom": "^18.3.1",
82
+ "@types/sanitize-html": "^2.13.0",
83
+ "@typescript-eslint/eslint-plugin": "^7.0.0",
84
+ "@typescript-eslint/parser": "^7.0.0",
85
+ eslint: "^8.2.0",
86
+ "eslint-config-airbnb": "^19.0.4",
87
+ "eslint-config-airbnb-typescript": "^18.0.0",
88
+ "eslint-config-prettier": "^9.1.0",
89
+ "eslint-plugin-import": "^2.25.3",
90
+ "eslint-plugin-jsx-a11y": "^6.10.2",
91
+ "eslint-plugin-prettier": "^5.2.1",
92
+ "eslint-plugin-react": "^7.28.0",
93
+ "eslint-plugin-react-hooks": "^4.3.0",
94
+ prettier: "3.4.0",
69
95
  react: "^18.3.1",
70
96
  "react-dom": "^18.3.1",
71
97
  "react-router-dom": "^6.26.2",
72
- "styled-components": "^6.1.13",
73
98
  "release-it": "^17.6.0",
74
- "@release-it/conventional-changelog": "^8.0.1"
99
+ "styled-components": "^6.1.13",
100
+ typescript: "^5.6.3"
75
101
  };
76
102
  const peerDependencies = {
77
103
  "@strapi/strapi": "^5.0.0",
78
- "@strapi/sdk-plugin": "^5.2.6",
79
- react: "^18.3.1",
80
- "react-dom": "^18.3.1",
81
- "react-router-dom": "^6.26.2",
82
- "styled-components": "^6.1.13"
104
+ react: "^18.0.0",
105
+ "react-dom": "^18.0.0",
106
+ "react-router-dom": "^6.0.0",
107
+ "styled-components": "^6.0.0"
83
108
  };
84
109
  const engines = {
85
- node: ">=18.0.0 <=20.x.x",
110
+ node: ">=18.0.0 <=22.x.x",
86
111
  npm: ">=6.0.0"
87
112
  };
88
113
  const license = "MIT";
89
- const require$$0 = {
114
+ const pluginPkg = {
90
115
  name,
91
116
  version,
92
117
  description,
93
- "private": false,
94
118
  keywords,
95
119
  author,
96
120
  homepage,
97
121
  repository,
98
- strapi: strapi$1,
122
+ strapi,
123
+ type,
99
124
  exports,
100
125
  files,
101
126
  scripts,
@@ -105,96 +130,15 @@ const require$$0 = {
105
130
  engines,
106
131
  license
107
132
  };
108
- const pluginPkg = require$$0;
109
- var pluginId$2 = pluginPkg.strapi.name;
110
- const pluginId$1 = pluginId$2;
111
- var register$1 = ({ strapi: strapi2 }) => {
112
- strapi2.customFields.register({
113
- name: "CKEditor",
114
- plugin: pluginId$1,
115
- type: "richtext"
116
- });
117
- };
118
- const pluginId = pluginId$2;
119
- var config$3 = {
120
- getConfig: async (ctx) => {
121
- const { responsiveDimensions = false } = await strapi.plugin("upload").service("upload").getSettings();
122
- const config2 = await strapi.plugin(pluginId).service("config").getConfig() + `
123
- globalThis.SH_CKE_UPLOAD_ADAPTER_IS_RESPONSIVE = ${responsiveDimensions}`;
124
- ctx.type = "application/javascript";
125
- ctx.send(config2);
126
- }
127
- };
128
- const config$2 = config$3;
129
- var controllers$1 = {
130
- config: config$2
131
- };
132
- var routes$1 = {
133
- config: {
134
- type: "admin",
135
- routes: [
136
- {
137
- method: "GET",
138
- path: "/config/ckeditor",
139
- handler: "config.getConfig",
140
- config: {
141
- auth: false
142
- }
143
- }
144
- ]
133
+ const index = {
134
+ register: ({ strapi: strapi2 }) => {
135
+ strapi2.customFields.register({
136
+ name: "CKEditor",
137
+ plugin: pluginPkg.strapi.name,
138
+ type: "richtext"
139
+ });
145
140
  }
146
141
  };
147
- const fs = require$$0$1;
148
- var config$1 = ({ strapi: strapi2 }) => {
149
- const readConfigFile = () => {
150
- const appDir = process.cwd();
151
- const isTSProject = fs.existsSync(`${appDir}/dist`);
152
- const envName = process.env.NODE_ENV;
153
- const cfgDir = isTSProject ? `${appDir}/dist/config` : `${appDir}/config`;
154
- const cfgFileName = "ckeditor.js";
155
- const envFilePath = `${cfgDir}/env/${envName}/${cfgFileName}`;
156
- const baseFilePath = `${cfgDir}/${cfgFileName}`;
157
- if (fs.existsSync(envFilePath)) {
158
- return fs.readFileSync(envFilePath, "utf8");
159
- } else if (fs.existsSync(baseFilePath)) {
160
- return fs.readFileSync(baseFilePath, "utf8");
161
- } else {
162
- return null;
163
- }
164
- };
165
- const trimConfig = (str) => {
166
- for (const func of ["const CKEConfig", "function CKEConfig"]) {
167
- const idx = str.indexOf(func);
168
- if (idx >= 0) {
169
- return str.substring(idx) + `
170
- globalThis.SH_CKE_CONFIG = CKEConfig()`;
171
- }
172
- }
173
- };
174
- return {
175
- getConfig() {
176
- const configFileContent = readConfigFile();
177
- const config2 = configFileContent && trimConfig(configFileContent);
178
- return config2 || `globalThis.SH_CKE_CONFIG = null`;
179
- }
180
- };
181
- };
182
- const config = config$1;
183
- var services$1 = {
184
- config
185
- };
186
- const register = register$1;
187
- const controllers = controllers$1;
188
- const routes = routes$1;
189
- const services = services$1;
190
- var src = {
191
- register,
192
- controllers,
193
- routes,
194
- services
195
- };
196
- const index = /* @__PURE__ */ getDefaultExportFromCjs(src);
197
142
  export {
198
143
  index as default
199
144
  };
200
- //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ import type { Core } from '@strapi/strapi';
2
+ declare const _default: {
3
+ register: ({ strapi }: {
4
+ strapi: Core.Strapi;
5
+ }) => void;
6
+ };
7
+ export default _default;
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@_sh/strapi-plugin-ckeditor",
3
- "version": "4.0.11",
4
- "description": "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Unofficial integration)",
5
- "private": false,
3
+ "version": "5.0.0",
4
+ "description": "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Community Edition)",
6
5
  "keywords": [
7
6
  "strapi",
8
7
  "ckeditor",
@@ -23,64 +22,93 @@
23
22
  "strapi": {
24
23
  "name": "ckeditor5",
25
24
  "displayName": "CKEditor 5",
26
- "description": "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Unofficial integration)",
25
+ "description": "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Community Edition)",
27
26
  "kind": "plugin"
28
27
  },
28
+ "type": "commonjs",
29
29
  "exports": {
30
30
  "./package.json": "./package.json",
31
+ ".": {
32
+ "types": "./dist/admin/src/index.d.ts",
33
+ "source": "./admin/src/index.ts",
34
+ "import": "./dist/admin/index.mjs",
35
+ "require": "./dist/admin/index.js",
36
+ "default": "./dist/admin/index.js"
37
+ },
31
38
  "./strapi-admin": {
32
- "source": "./admin/src/index.js",
39
+ "types": "./dist/admin/src/index.d.ts",
40
+ "source": "./admin/src/index.ts",
33
41
  "import": "./dist/admin/index.mjs",
34
42
  "require": "./dist/admin/index.js",
35
43
  "default": "./dist/admin/index.js"
36
44
  },
37
45
  "./strapi-server": {
38
- "source": "./server/src/index.js",
46
+ "types": "./dist/server/src/index.d.ts",
47
+ "source": "./server/src/index.ts",
39
48
  "import": "./dist/server/index.mjs",
40
49
  "require": "./dist/server/index.js",
41
50
  "default": "./dist/server/index.js"
42
51
  }
43
52
  },
44
53
  "files": [
45
- "dist",
46
- "./strapi-server.js"
54
+ "dist"
47
55
  ],
48
56
  "scripts": {
49
57
  "build": "strapi-plugin build",
50
58
  "watch": "strapi-plugin watch",
51
59
  "watch:link": "strapi-plugin watch:link",
52
60
  "verify": "strapi-plugin verify",
61
+ "test:ts:front": "run -T tsc -p admin/tsconfig.json",
62
+ "test:ts:back": "run -T tsc -p server/tsconfig.json",
53
63
  "release": "release-it",
54
64
  "release:info": "release-it --changelog"
55
65
  },
56
66
  "dependencies": {
57
- "ckeditor5": "^43.3.1",
58
- "@ckeditor/ckeditor5-react": "^9.3.1",
59
- "@strapi/design-system": "^2.0.0-rc.11",
67
+ "@ckeditor/ckeditor5-react": "^9.4.0",
68
+ "@strapi/design-system": "^2.0.0-rc.13",
69
+ "@strapi/icons": "^2.0.0-rc.13",
70
+ "lodash": "^4.17.21",
71
+ "ckeditor5": "^44.0.0",
60
72
  "prop-types": "^15.8.1",
61
- "sanitize-html": "^2.13.1"
73
+ "sanitize-html": "^2.13.1",
74
+ "yup": "0.32.9"
62
75
  },
63
76
  "devDependencies": {
77
+ "@release-it/conventional-changelog": "^8.0.1",
78
+ "@strapi/sdk-plugin": "^5.2.7",
64
79
  "@strapi/strapi": "^5.0.0",
65
- "@strapi/sdk-plugin": "^5.2.6",
66
- "prettier": "^3.3.3",
80
+ "@strapi/typescript-utils": "^5.4.0",
81
+ "@types/react": "^18.3.12",
82
+ "@types/react-dom": "^18.3.1",
83
+ "@types/sanitize-html": "^2.13.0",
84
+ "@typescript-eslint/eslint-plugin": "^7.0.0",
85
+ "@typescript-eslint/parser": "^7.0.0",
86
+ "eslint": "^8.2.0",
87
+ "eslint-config-airbnb": "^19.0.4",
88
+ "eslint-config-airbnb-typescript": "^18.0.0",
89
+ "eslint-config-prettier": "^9.1.0",
90
+ "eslint-plugin-import": "^2.25.3",
91
+ "eslint-plugin-jsx-a11y": "^6.10.2",
92
+ "eslint-plugin-prettier": "^5.2.1",
93
+ "eslint-plugin-react": "^7.28.0",
94
+ "eslint-plugin-react-hooks": "^4.3.0",
95
+ "prettier": "3.4.0",
67
96
  "react": "^18.3.1",
68
97
  "react-dom": "^18.3.1",
69
98
  "react-router-dom": "^6.26.2",
70
- "styled-components": "^6.1.13",
71
99
  "release-it": "^17.6.0",
72
- "@release-it/conventional-changelog": "^8.0.1"
100
+ "styled-components": "^6.1.13",
101
+ "typescript": "^5.6.3"
73
102
  },
74
103
  "peerDependencies": {
75
104
  "@strapi/strapi": "^5.0.0",
76
- "@strapi/sdk-plugin": "^5.2.6",
77
- "react": "^18.3.1",
78
- "react-dom": "^18.3.1",
79
- "react-router-dom": "^6.26.2",
80
- "styled-components": "^6.1.13"
105
+ "react": "^18.0.0",
106
+ "react-dom": "^18.0.0",
107
+ "react-router-dom": "^6.0.0",
108
+ "styled-components": "^6.0.0"
81
109
  },
82
110
  "engines": {
83
- "node": ">=18.0.0 <=20.x.x",
111
+ "node": ">=18.0.0 <=22.x.x",
84
112
  "npm": ">=6.0.0"
85
113
  },
86
114
  "license": "MIT"