@ckeditor/ckeditor5-ckbox 0.0.0-nightly-20231211.0 → 0.0.0-nightly-20231213.0
Sign up to get free protection for your applications and to get access to all the features.
- package/build/ckbox.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/lang/translations/ar.po +4 -4
- package/lang/translations/bg.po +4 -4
- package/lang/translations/bn.po +4 -4
- package/lang/translations/ca.po +4 -4
- package/lang/translations/cs.po +4 -4
- package/lang/translations/da.po +4 -4
- package/lang/translations/de.po +4 -4
- package/lang/translations/el.po +4 -4
- package/lang/translations/es.po +4 -4
- package/lang/translations/et.po +4 -4
- package/lang/translations/fi.po +4 -4
- package/lang/translations/fr.po +4 -4
- package/lang/translations/he.po +4 -4
- package/lang/translations/hi.po +4 -4
- package/lang/translations/hu.po +4 -4
- package/lang/translations/id.po +4 -4
- package/lang/translations/it.po +4 -4
- package/lang/translations/ja.po +4 -4
- package/lang/translations/ko.po +4 -4
- package/lang/translations/lt.po +4 -4
- package/lang/translations/lv.po +4 -4
- package/lang/translations/ms.po +4 -4
- package/lang/translations/nl.po +4 -4
- package/lang/translations/no.po +4 -4
- package/lang/translations/pl.po +4 -4
- package/lang/translations/pt-br.po +4 -4
- package/lang/translations/pt.po +4 -4
- package/lang/translations/ro.po +4 -4
- package/lang/translations/ru.po +4 -4
- package/lang/translations/sk.po +4 -4
- package/lang/translations/sr.po +4 -4
- package/lang/translations/sv.po +4 -4
- package/lang/translations/th.po +4 -4
- package/lang/translations/tr.po +4 -4
- package/lang/translations/uk.po +4 -4
- package/lang/translations/vi.po +4 -4
- package/lang/translations/zh-cn.po +4 -4
- package/lang/translations/zh.po +4 -4
- package/package.json +3 -3
- package/src/ckboxcommand.d.ts +1 -0
- package/src/ckboxcommand.js +2 -0
- package/src/ckboxediting.d.ts +1 -1
- package/src/ckboxediting.js +1 -1
- package/src/ckboximageedit/ckboximageeditcommand.js +2 -2
- package/src/ckboximageedit/utils.js +1 -1
- package/src/ckboxutils.d.ts +1 -2
- package/src/ckboxutils.js +1 -2
- package/src/utils.d.ts +6 -0
- package/src/utils.js +6 -0
package/lang/translations/th.po
CHANGED
@@ -31,16 +31,16 @@ msgstr "ไม่สามารถเข้าถึงพื้นที่ท
|
|
31
31
|
|
32
32
|
msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
|
33
33
|
msgid "Edit image"
|
34
|
-
msgstr ""
|
34
|
+
msgstr "แก้ไขภาพ"
|
35
35
|
|
36
36
|
msgctxt "A message stating that image editing is in progress."
|
37
37
|
msgid "Processing the edited image."
|
38
|
-
msgstr ""
|
38
|
+
msgstr "กำลังประมวลผลภาพที่แก้ไข"
|
39
39
|
|
40
40
|
msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
|
41
41
|
msgid "Server failed to process the image."
|
42
|
-
msgstr ""
|
42
|
+
msgstr "เซิร์ฟเวอร์ประมวลผลภาพไม่สำเร็จ"
|
43
43
|
|
44
44
|
msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
|
45
45
|
msgid "Failed to determine category of edited image."
|
46
|
-
msgstr ""
|
46
|
+
msgstr "ระบุหมวดหมู่ของภาพที่แก้ไขไม่สำเร็จ"
|
package/lang/translations/tr.po
CHANGED
@@ -31,16 +31,16 @@ msgstr "Varsayılan çalışma alanına erişilemiyor."
|
|
31
31
|
|
32
32
|
msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
|
33
33
|
msgid "Edit image"
|
34
|
-
msgstr ""
|
34
|
+
msgstr "Görüntüyü düzenle"
|
35
35
|
|
36
36
|
msgctxt "A message stating that image editing is in progress."
|
37
37
|
msgid "Processing the edited image."
|
38
|
-
msgstr ""
|
38
|
+
msgstr "Düzenlenen görüntü işleniyor."
|
39
39
|
|
40
40
|
msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
|
41
41
|
msgid "Server failed to process the image."
|
42
|
-
msgstr ""
|
42
|
+
msgstr "Sunucu görüntüyü işlemede başarısız oldu."
|
43
43
|
|
44
44
|
msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
|
45
45
|
msgid "Failed to determine category of edited image."
|
46
|
-
msgstr ""
|
46
|
+
msgstr "Düzenlenen görselin kategorisinin belirlenmesi başarısız oldu."
|
package/lang/translations/uk.po
CHANGED
@@ -31,16 +31,16 @@ msgstr "Немає доступу до робочого простору за з
|
|
31
31
|
|
32
32
|
msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
|
33
33
|
msgid "Edit image"
|
34
|
-
msgstr ""
|
34
|
+
msgstr "Редагувати зображення"
|
35
35
|
|
36
36
|
msgctxt "A message stating that image editing is in progress."
|
37
37
|
msgid "Processing the edited image."
|
38
|
-
msgstr ""
|
38
|
+
msgstr "Обробка відредагованого зображення."
|
39
39
|
|
40
40
|
msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
|
41
41
|
msgid "Server failed to process the image."
|
42
|
-
msgstr ""
|
42
|
+
msgstr "Серверу не вдалося обробити зображення."
|
43
43
|
|
44
44
|
msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
|
45
45
|
msgid "Failed to determine category of edited image."
|
46
|
-
msgstr ""
|
46
|
+
msgstr "Не вдалося визначити категорію відредагованого зображення."
|
package/lang/translations/vi.po
CHANGED
@@ -31,16 +31,16 @@ msgstr "Không thể truy cập vào không gian làm việc mặc định."
|
|
31
31
|
|
32
32
|
msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
|
33
33
|
msgid "Edit image"
|
34
|
-
msgstr ""
|
34
|
+
msgstr "Chỉnh sửa hình ảnh"
|
35
35
|
|
36
36
|
msgctxt "A message stating that image editing is in progress."
|
37
37
|
msgid "Processing the edited image."
|
38
|
-
msgstr ""
|
38
|
+
msgstr "Xử lý hình ảnh đã chỉnh sửa."
|
39
39
|
|
40
40
|
msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
|
41
41
|
msgid "Server failed to process the image."
|
42
|
-
msgstr ""
|
42
|
+
msgstr "Máy chủ không thể xử lý hình ảnh."
|
43
43
|
|
44
44
|
msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
|
45
45
|
msgid "Failed to determine category of edited image."
|
46
|
-
msgstr ""
|
46
|
+
msgstr "Không thể xác định danh mục hình ảnh đã chỉnh sửa."
|
@@ -31,16 +31,16 @@ msgstr "无法访问默认工作区"
|
|
31
31
|
|
32
32
|
msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
|
33
33
|
msgid "Edit image"
|
34
|
-
msgstr ""
|
34
|
+
msgstr "编辑图片"
|
35
35
|
|
36
36
|
msgctxt "A message stating that image editing is in progress."
|
37
37
|
msgid "Processing the edited image."
|
38
|
-
msgstr ""
|
38
|
+
msgstr "正在处理已编辑的图片。"
|
39
39
|
|
40
40
|
msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
|
41
41
|
msgid "Server failed to process the image."
|
42
|
-
msgstr ""
|
42
|
+
msgstr "服务器未能处理图片。"
|
43
43
|
|
44
44
|
msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
|
45
45
|
msgid "Failed to determine category of edited image."
|
46
|
-
msgstr ""
|
46
|
+
msgstr "未能确定已编辑图片的类别。"
|
package/lang/translations/zh.po
CHANGED
@@ -31,16 +31,16 @@ msgstr "無法存取預設工作區。"
|
|
31
31
|
|
32
32
|
msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
|
33
33
|
msgid "Edit image"
|
34
|
-
msgstr ""
|
34
|
+
msgstr "編輯圖片"
|
35
35
|
|
36
36
|
msgctxt "A message stating that image editing is in progress."
|
37
37
|
msgid "Processing the edited image."
|
38
|
-
msgstr ""
|
38
|
+
msgstr "正在處理已編輯的圖片。"
|
39
39
|
|
40
40
|
msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
|
41
41
|
msgid "Server failed to process the image."
|
42
|
-
msgstr ""
|
42
|
+
msgstr "伺服器無法處理該圖片。"
|
43
43
|
|
44
44
|
msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
|
45
45
|
msgid "Failed to determine category of edited image."
|
46
|
-
msgstr ""
|
46
|
+
msgstr "無法判斷已編輯圖片的類別。"
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-ckbox",
|
3
|
-
"version": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20231213.0",
|
4
4
|
"description": "CKBox integration for CKEditor 5.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
@@ -12,8 +12,8 @@
|
|
12
12
|
],
|
13
13
|
"main": "src/index.js",
|
14
14
|
"dependencies": {
|
15
|
-
"ckeditor5": "0.0.0-nightly-
|
16
|
-
"blurhash": "
|
15
|
+
"ckeditor5": "0.0.0-nightly-20231213.0",
|
16
|
+
"blurhash": "2.0.5",
|
17
17
|
"lodash-es": "4.17.21"
|
18
18
|
},
|
19
19
|
"author": "CKSource (http://cksource.com/)",
|
package/src/ckboxcommand.d.ts
CHANGED
@@ -73,6 +73,7 @@ export default class CKBoxCommand extends Command {
|
|
73
73
|
* - language The language for CKBox dialog.
|
74
74
|
* - tokenUrl The token endpoint URL.
|
75
75
|
* - serviceOrigin The base URL of the API service.
|
76
|
+
* - forceDemoLabel Whether to force "Powered by CKBox" link.
|
76
77
|
* - dialog.onClose The callback function invoked after closing the CKBox dialog.
|
77
78
|
* - assets.onChoose The callback function invoked after choosing the assets.
|
78
79
|
*/
|
package/src/ckboxcommand.js
CHANGED
@@ -94,6 +94,7 @@ export default class CKBoxCommand extends Command {
|
|
94
94
|
* - language The language for CKBox dialog.
|
95
95
|
* - tokenUrl The token endpoint URL.
|
96
96
|
* - serviceOrigin The base URL of the API service.
|
97
|
+
* - forceDemoLabel Whether to force "Powered by CKBox" link.
|
97
98
|
* - dialog.onClose The callback function invoked after closing the CKBox dialog.
|
98
99
|
* - assets.onChoose The callback function invoked after choosing the assets.
|
99
100
|
*/
|
@@ -105,6 +106,7 @@ export default class CKBoxCommand extends Command {
|
|
105
106
|
language: ckboxConfig.language,
|
106
107
|
tokenUrl: ckboxConfig.tokenUrl,
|
107
108
|
serviceOrigin: ckboxConfig.serviceOrigin,
|
109
|
+
forceDemoLabel: ckboxConfig.forceDemoLabel,
|
108
110
|
dialog: {
|
109
111
|
onClose: () => this.fire('ckbox:close')
|
110
112
|
},
|
package/src/ckboxediting.d.ts
CHANGED
package/src/ckboxediting.js
CHANGED
@@ -280,10 +280,10 @@ export default class CKBoxImageEditCommand extends Command {
|
|
280
280
|
source: {
|
281
281
|
src: imageFallbackUrl,
|
282
282
|
sources: imageSources,
|
283
|
-
alt: element.getAttribute('alt'),
|
284
283
|
width: imageWidth,
|
285
284
|
height: imageHeight,
|
286
|
-
...(imagePlaceholder ? { placeholder: imagePlaceholder } : null)
|
285
|
+
...(imagePlaceholder ? { placeholder: imagePlaceholder } : null),
|
286
|
+
...(element.hasAttribute('alt') ? { alt: element.getAttribute('alt') } : null)
|
287
287
|
}
|
288
288
|
});
|
289
289
|
const previousChildren = element.getChildren();
|
@@ -33,7 +33,7 @@ function createUrlChecker(allowExternalImagesEditing) {
|
|
33
33
|
}
|
34
34
|
if (allowExternalImagesEditing == 'origin') {
|
35
35
|
const origin = global.window.location.origin;
|
36
|
-
return src => src.
|
36
|
+
return src => new URL(src, global.document.baseURI).origin == origin;
|
37
37
|
}
|
38
38
|
if (typeof allowExternalImagesEditing == 'function') {
|
39
39
|
return allowExternalImagesEditing;
|
package/src/ckboxutils.d.ts
CHANGED
@@ -8,8 +8,7 @@
|
|
8
8
|
import type { InitializedToken } from '@ckeditor/ckeditor5-cloud-services';
|
9
9
|
import { Plugin } from 'ckeditor5/src/core';
|
10
10
|
/**
|
11
|
-
* The CKBox
|
12
|
-
* {@link module:ckbox/ckboxuploadadapter~CKBoxUploadAdapter CKBox upload adapter}.
|
11
|
+
* The CKBox utilities plugin.
|
13
12
|
*/
|
14
13
|
export default class CKBoxUtils extends Plugin {
|
15
14
|
/**
|
package/src/ckboxutils.js
CHANGED
@@ -7,8 +7,7 @@ import { Plugin } from 'ckeditor5/src/core';
|
|
7
7
|
import { convertMimeTypeToExtension, getContentTypeOfUrl, getFileExtension, getWorkspaceId, sendHttpRequest } from './utils';
|
8
8
|
const DEFAULT_CKBOX_THEME_NAME = 'lark';
|
9
9
|
/**
|
10
|
-
* The CKBox
|
11
|
-
* {@link module:ckbox/ckboxuploadadapter~CKBoxUploadAdapter CKBox upload adapter}.
|
10
|
+
* The CKBox utilities plugin.
|
12
11
|
*/
|
13
12
|
export default class CKBoxUtils extends Plugin {
|
14
13
|
/**
|
package/src/utils.d.ts
CHANGED
@@ -47,7 +47,13 @@ export declare function sendHttpRequest({ url, method, data, onUploadProgress, s
|
|
47
47
|
data?: FormData | null;
|
48
48
|
onUploadProgress?: (evt: ProgressEvent) => void;
|
49
49
|
}): Promise<any>;
|
50
|
+
/**
|
51
|
+
* Returns an extension a typical file in the specified `mimeType` format would have.
|
52
|
+
*/
|
50
53
|
export declare function convertMimeTypeToExtension(mimeType: string): string;
|
54
|
+
/**
|
55
|
+
* Tries to fetch the given `url` and returns 'content-type' of the response.
|
56
|
+
*/
|
51
57
|
export declare function getContentTypeOfUrl(url: string, options: {
|
52
58
|
signal: AbortSignal;
|
53
59
|
}): Promise<string>;
|
package/src/utils.js
CHANGED
@@ -139,9 +139,15 @@ const MIME_TO_EXTENSION = {
|
|
139
139
|
'image/bmp': 'bmp',
|
140
140
|
'image/tiff': 'tiff'
|
141
141
|
};
|
142
|
+
/**
|
143
|
+
* Returns an extension a typical file in the specified `mimeType` format would have.
|
144
|
+
*/
|
142
145
|
export function convertMimeTypeToExtension(mimeType) {
|
143
146
|
return MIME_TO_EXTENSION[mimeType];
|
144
147
|
}
|
148
|
+
/**
|
149
|
+
* Tries to fetch the given `url` and returns 'content-type' of the response.
|
150
|
+
*/
|
145
151
|
export async function getContentTypeOfUrl(url, options) {
|
146
152
|
try {
|
147
153
|
const response = await fetch(url, {
|