@ckeditor/ckeditor5-ckbox 41.3.0-alpha.3 → 41.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. package/build/ckbox.js +1 -1
  2. package/package.json +2 -3
  3. package/src/ckboxui.d.ts +4 -0
  4. package/src/ckboxui.js +24 -13
  5. package/dist/content-index.css +0 -4
  6. package/dist/editor-index.css +0 -31
  7. package/dist/index.css +0 -55
  8. package/dist/index.css.map +0 -1
  9. package/dist/translations/ar.d.ts +0 -8
  10. package/dist/translations/ar.js +0 -5
  11. package/dist/translations/az.d.ts +0 -8
  12. package/dist/translations/az.js +0 -5
  13. package/dist/translations/bg.d.ts +0 -8
  14. package/dist/translations/bg.js +0 -5
  15. package/dist/translations/bn.d.ts +0 -8
  16. package/dist/translations/bn.js +0 -5
  17. package/dist/translations/ca.d.ts +0 -8
  18. package/dist/translations/ca.js +0 -5
  19. package/dist/translations/cs.d.ts +0 -8
  20. package/dist/translations/cs.js +0 -5
  21. package/dist/translations/da.d.ts +0 -8
  22. package/dist/translations/da.js +0 -5
  23. package/dist/translations/de.d.ts +0 -8
  24. package/dist/translations/de.js +0 -5
  25. package/dist/translations/el.d.ts +0 -8
  26. package/dist/translations/el.js +0 -5
  27. package/dist/translations/en-au.d.ts +0 -8
  28. package/dist/translations/en-au.js +0 -5
  29. package/dist/translations/en.d.ts +0 -8
  30. package/dist/translations/en.js +0 -5
  31. package/dist/translations/es-co.d.ts +0 -8
  32. package/dist/translations/es-co.js +0 -5
  33. package/dist/translations/es.d.ts +0 -8
  34. package/dist/translations/es.js +0 -5
  35. package/dist/translations/et.d.ts +0 -8
  36. package/dist/translations/et.js +0 -5
  37. package/dist/translations/fa.d.ts +0 -8
  38. package/dist/translations/fa.js +0 -5
  39. package/dist/translations/fi.d.ts +0 -8
  40. package/dist/translations/fi.js +0 -5
  41. package/dist/translations/fr.d.ts +0 -8
  42. package/dist/translations/fr.js +0 -5
  43. package/dist/translations/gl.d.ts +0 -8
  44. package/dist/translations/gl.js +0 -5
  45. package/dist/translations/he.d.ts +0 -8
  46. package/dist/translations/he.js +0 -5
  47. package/dist/translations/hi.d.ts +0 -8
  48. package/dist/translations/hi.js +0 -5
  49. package/dist/translations/hr.d.ts +0 -8
  50. package/dist/translations/hr.js +0 -5
  51. package/dist/translations/hu.d.ts +0 -8
  52. package/dist/translations/hu.js +0 -5
  53. package/dist/translations/id.d.ts +0 -8
  54. package/dist/translations/id.js +0 -5
  55. package/dist/translations/it.d.ts +0 -8
  56. package/dist/translations/it.js +0 -5
  57. package/dist/translations/ja.d.ts +0 -8
  58. package/dist/translations/ja.js +0 -5
  59. package/dist/translations/ko.d.ts +0 -8
  60. package/dist/translations/ko.js +0 -5
  61. package/dist/translations/lt.d.ts +0 -8
  62. package/dist/translations/lt.js +0 -5
  63. package/dist/translations/lv.d.ts +0 -8
  64. package/dist/translations/lv.js +0 -5
  65. package/dist/translations/ms.d.ts +0 -8
  66. package/dist/translations/ms.js +0 -5
  67. package/dist/translations/nl.d.ts +0 -8
  68. package/dist/translations/nl.js +0 -5
  69. package/dist/translations/no.d.ts +0 -8
  70. package/dist/translations/no.js +0 -5
  71. package/dist/translations/pl.d.ts +0 -8
  72. package/dist/translations/pl.js +0 -5
  73. package/dist/translations/pt-br.d.ts +0 -8
  74. package/dist/translations/pt-br.js +0 -5
  75. package/dist/translations/pt.d.ts +0 -8
  76. package/dist/translations/pt.js +0 -5
  77. package/dist/translations/ro.d.ts +0 -8
  78. package/dist/translations/ro.js +0 -5
  79. package/dist/translations/ru.d.ts +0 -8
  80. package/dist/translations/ru.js +0 -5
  81. package/dist/translations/sk.d.ts +0 -8
  82. package/dist/translations/sk.js +0 -5
  83. package/dist/translations/sq.d.ts +0 -8
  84. package/dist/translations/sq.js +0 -5
  85. package/dist/translations/sr-latn.d.ts +0 -8
  86. package/dist/translations/sr-latn.js +0 -5
  87. package/dist/translations/sr.d.ts +0 -8
  88. package/dist/translations/sr.js +0 -5
  89. package/dist/translations/sv.d.ts +0 -8
  90. package/dist/translations/sv.js +0 -5
  91. package/dist/translations/th.d.ts +0 -8
  92. package/dist/translations/th.js +0 -5
  93. package/dist/translations/tr.d.ts +0 -8
  94. package/dist/translations/tr.js +0 -5
  95. package/dist/translations/ug.d.ts +0 -8
  96. package/dist/translations/ug.js +0 -5
  97. package/dist/translations/uk.d.ts +0 -8
  98. package/dist/translations/uk.js +0 -5
  99. package/dist/translations/ur.d.ts +0 -8
  100. package/dist/translations/ur.js +0 -5
  101. package/dist/translations/uz.d.ts +0 -8
  102. package/dist/translations/uz.js +0 -5
  103. package/dist/translations/vi.d.ts +0 -8
  104. package/dist/translations/vi.js +0 -5
  105. package/dist/translations/zh-cn.d.ts +0 -8
  106. package/dist/translations/zh-cn.js +0 -5
  107. package/dist/translations/zh.d.ts +0 -8
  108. package/dist/translations/zh.js +0 -5
  109. package/dist/types/augmentation.d.ts +0 -36
  110. package/dist/types/ckbox.d.ts +0 -37
  111. package/dist/types/ckboxcommand.d.ts +0 -118
  112. package/dist/types/ckboxconfig.d.ts +0 -329
  113. package/dist/types/ckboxediting.d.ts +0 -58
  114. package/dist/types/ckboximageedit/ckboximageeditcommand.d.ts +0 -101
  115. package/dist/types/ckboximageedit/ckboximageeditediting.d.ts +0 -32
  116. package/dist/types/ckboximageedit/ckboximageeditui.d.ts +0 -28
  117. package/dist/types/ckboximageedit/utils.d.ts +0 -14
  118. package/dist/types/ckboximageedit.d.ts +0 -28
  119. package/dist/types/ckboxui.d.ts +0 -25
  120. package/dist/types/ckboxuploadadapter.d.ts +0 -37
  121. package/dist/types/ckboxutils.d.ts +0 -54
  122. package/dist/types/index.d.ts +0 -21
  123. package/dist/types/utils.d.ts +0 -67
@@ -1,58 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
- */
9
- import { Plugin } from 'ckeditor5/src/core.js';
10
- import CKBoxUploadAdapter from './ckboxuploadadapter.js';
11
- import CKBoxUtils from './ckboxutils.js';
12
- /**
13
- * The CKBox editing feature. It introduces the {@link module:ckbox/ckboxcommand~CKBoxCommand CKBox command} and
14
- * {@link module:ckbox/ckboxuploadadapter~CKBoxUploadAdapter CKBox upload adapter}.
15
- */
16
- export default class CKBoxEditing extends Plugin {
17
- /**
18
- * CKEditor Cloud Services access token.
19
- */
20
- private _token;
21
- /**
22
- * @inheritDoc
23
- */
24
- static get pluginName(): "CKBoxEditing";
25
- /**
26
- * @inheritDoc
27
- */
28
- static get requires(): readonly ["LinkEditing", "PictureEditing", typeof CKBoxUploadAdapter, typeof CKBoxUtils];
29
- /**
30
- * @inheritDoc
31
- */
32
- init(): void;
33
- /**
34
- * @inheritDoc
35
- */
36
- afterInit(): void;
37
- /**
38
- * Returns true only when the integrator intentionally wants to use the plugin, i.e. when the `config.ckbox` exists or
39
- * the CKBox JavaScript library is loaded.
40
- */
41
- private _shouldBeInitialised;
42
- /**
43
- * Checks if at least one image plugin is loaded.
44
- */
45
- private _checkImagePlugins;
46
- /**
47
- * Extends the schema to allow the `ckboxImageId` and `ckboxLinkId` attributes for links and images.
48
- */
49
- private _initSchema;
50
- /**
51
- * Configures the upcast and downcast conversions for the `ckboxImageId` and `ckboxLinkId` attributes.
52
- */
53
- private _initConversion;
54
- /**
55
- * Registers post-fixers that add or remove the `ckboxLinkId` and `ckboxImageId` attributes.
56
- */
57
- private _initFixers;
58
- }
@@ -1,101 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
- */
9
- /**
10
- * @module ckbox/ckboximageedit/ckboximageeditcommand
11
- */
12
- import { Command, type Editor } from 'ckeditor5/src/core.js';
13
- /**
14
- * The CKBox edit image command.
15
- *
16
- * Opens the CKBox dialog for editing the image.
17
- */
18
- export default class CKBoxImageEditCommand extends Command {
19
- /**
20
- * Flag indicating whether the command is active, i.e. dialog is open.
21
- */
22
- value: boolean;
23
- /**
24
- * The DOM element that acts as a mounting point for the CKBox Edit Image dialog.
25
- */
26
- private _wrapper;
27
- /**
28
- * The states of image processing in progress.
29
- */
30
- private _processInProgress;
31
- /**
32
- * Determines if the element can be edited.
33
- */
34
- private _canEdit;
35
- /**
36
- * A wrapper function to prepare mount options. Ensures that at most one preparation is in-flight.
37
- */
38
- private _prepareOptions;
39
- /**
40
- * @inheritDoc
41
- */
42
- constructor(editor: Editor);
43
- /**
44
- * @inheritDoc
45
- */
46
- refresh(): void;
47
- /**
48
- * Opens the CKBox Image Editor dialog for editing the image.
49
- */
50
- execute(): void;
51
- /**
52
- * @inheritDoc
53
- */
54
- destroy(): void;
55
- /**
56
- * Indicates if the CKBox Image Editor dialog is already opened.
57
- */
58
- private _getValue;
59
- /**
60
- * Creates the options object for the CKBox Image Editor dialog.
61
- */
62
- private _prepareOptionsAbortable;
63
- /**
64
- * Initializes event lister for an event of removing an image.
65
- */
66
- private _prepareListeners;
67
- /**
68
- * Gets processing states of images that have been deleted in the mean time.
69
- */
70
- private _getProcessingStatesOfDeletedImages;
71
- private _checkIfElementIsBeingProcessed;
72
- /**
73
- * Closes the CKBox Image Editor dialog.
74
- */
75
- private _handleImageEditorClose;
76
- /**
77
- * Save edited image. In case server respond with "success" replace with edited image,
78
- * otherwise show notification error.
79
- */
80
- private _handleImageEditorSave;
81
- /**
82
- * Get asset's status on server. If server responds with "success" status then
83
- * image is already proceeded and ready for saving.
84
- */
85
- private _getAssetStatusFromServer;
86
- /**
87
- * Waits for an asset to be processed.
88
- * It retries retrieving asset status from the server in case of failure.
89
- */
90
- private _waitForAssetProcessed;
91
- /**
92
- * Shows processing indicator while image is processing.
93
- *
94
- * @param asset Data about certain asset.
95
- */
96
- private _showImageProcessingIndicator;
97
- /**
98
- * Replace the edited image with the new one.
99
- */
100
- private _replaceImage;
101
- }
@@ -1,32 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
- */
9
- /**
10
- * @module ckbox/ckboximageedit/ckboximageeditediting
11
- */
12
- import { PendingActions, Plugin } from 'ckeditor5/src/core.js';
13
- import { Notification } from 'ckeditor5/src/ui.js';
14
- import CKBoxEditing from '../ckboxediting.js';
15
- import CKBoxUtils from '../ckboxutils.js';
16
- /**
17
- * The CKBox image edit editing plugin.
18
- */
19
- export default class CKBoxImageEditEditing extends Plugin {
20
- /**
21
- * @inheritDoc
22
- */
23
- static get pluginName(): "CKBoxImageEditEditing";
24
- /**
25
- * @inheritDoc
26
- */
27
- static get requires(): readonly [typeof CKBoxEditing, typeof CKBoxUtils, typeof PendingActions, typeof Notification, "ImageUtils", "ImageEditing"];
28
- /**
29
- * @inheritDoc
30
- */
31
- init(): void;
32
- }
@@ -1,28 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
- */
9
- /**
10
- * @module ckbox/ckboximageedit/ckboximageeditui
11
- */
12
- import { Plugin } from 'ckeditor5/src/core.js';
13
- /**
14
- * The UI plugin of the CKBox image edit feature.
15
- *
16
- * It registers the `'ckboxImageEdit'` UI button in the editor's {@link module:ui/componentfactory~ComponentFactory component factory}
17
- * that allows you to open the CKBox dialog and edit the image.
18
- */
19
- export default class CKBoxImageEditUI extends Plugin {
20
- /**
21
- * @inheritDoc
22
- */
23
- static get pluginName(): "CKBoxImageEditUI";
24
- /**
25
- * @inheritDoc
26
- */
27
- init(): void;
28
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
- */
9
- import type { Element } from 'ckeditor5/src/engine.js';
10
- import type { CKBoxConfig } from '../ckboxconfig.js';
11
- /**
12
- * @internal
13
- */
14
- export declare function createEditabilityChecker(allowExternalImagesEditing: CKBoxConfig['allowExternalImagesEditing']): (element: Element) => boolean;
@@ -1,28 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
- */
9
- /**
10
- * @module ckbox/ckboximageedit
11
- */
12
- import { Plugin } from 'ckeditor5/src/core.js';
13
- import CKBoxImageEditEditing from './ckboximageedit/ckboximageeditediting.js';
14
- import CKBoxImageEditUI from './ckboximageedit/ckboximageeditui.js';
15
- import '../theme/ckboximageedit.css';
16
- /**
17
- * The CKBox image edit feature.
18
- */
19
- export default class CKBoxImageEdit extends Plugin {
20
- /**
21
- * @inheritDoc
22
- */
23
- static get pluginName(): "CKBoxImageEdit";
24
- /**
25
- * @inheritDoc
26
- */
27
- static get requires(): readonly [typeof CKBoxImageEditEditing, typeof CKBoxImageEditUI];
28
- }
@@ -1,25 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
- */
9
- /**
10
- * @module ckbox/ckboxui
11
- */
12
- import { Plugin } from 'ckeditor5/src/core.js';
13
- /**
14
- * The CKBoxUI plugin. It introduces the `'ckbox'` toolbar button.
15
- */
16
- export default class CKBoxUI extends Plugin {
17
- /**
18
- * @inheritDoc
19
- */
20
- static get pluginName(): "CKBoxUI";
21
- /**
22
- * @inheritDoc
23
- */
24
- afterInit(): void;
25
- }
@@ -1,37 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
- */
9
- /**
10
- * @module ckbox/ckboxuploadadapter
11
- */
12
- import { Plugin } from 'ckeditor5/src/core.js';
13
- import { FileRepository } from 'ckeditor5/src/upload.js';
14
- import CKBoxEditing from './ckboxediting.js';
15
- /**
16
- * A plugin that enables file uploads in CKEditor 5 using the CKBox server–side connector.
17
- * See the {@glink features/file-management/ckbox CKBox file manager integration} guide to learn how to configure
18
- * and use this feature as well as find out more about the full integration with the file manager
19
- * provided by the {@link module:ckbox/ckbox~CKBox} plugin.
20
- *
21
- * Check out the {@glink features/images/image-upload/image-upload Image upload overview} guide to learn about
22
- * other ways to upload images into CKEditor 5.
23
- */
24
- export default class CKBoxUploadAdapter extends Plugin {
25
- /**
26
- * @inheritDoc
27
- */
28
- static get requires(): readonly ["ImageUploadEditing", "ImageUploadProgress", typeof FileRepository, typeof CKBoxEditing];
29
- /**
30
- * @inheritDoc
31
- */
32
- static get pluginName(): "CKBoxUploadAdapter";
33
- /**
34
- * @inheritDoc
35
- */
36
- afterInit(): Promise<void>;
37
- }
@@ -1,54 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
- */
9
- /**
10
- * @module ckbox/ckboxutils
11
- */
12
- import type { InitializedToken } from '@ckeditor/ckeditor5-cloud-services';
13
- import { Plugin } from 'ckeditor5/src/core.js';
14
- /**
15
- * The CKBox utilities plugin.
16
- */
17
- export default class CKBoxUtils extends Plugin {
18
- /**
19
- * CKEditor Cloud Services access token.
20
- */
21
- private _token;
22
- /**
23
- * @inheritDoc
24
- */
25
- static get pluginName(): "CKBoxUtils";
26
- /**
27
- * @inheritDoc
28
- */
29
- static get requires(): readonly ["CloudServices"];
30
- /**
31
- * @inheritDoc
32
- */
33
- init(): Promise<void>;
34
- /**
35
- * Returns a token used by the CKBox plugin for communication with the CKBox service.
36
- */
37
- getToken(): InitializedToken;
38
- /**
39
- * The ID of workspace to use when uploading an image.
40
- */
41
- getWorkspaceId(): string;
42
- /**
43
- * Resolves a promise with an object containing a category with which the uploaded file is associated or an error code.
44
- */
45
- getCategoryIdForFile(fileOrUrl: File | string, options: {
46
- signal: AbortSignal;
47
- }): Promise<string>;
48
- /**
49
- * Resolves a promise with an array containing available categories with which the uploaded file can be associated.
50
- *
51
- * If the API returns limited results, the method will collect all items.
52
- */
53
- private _getAvailableCategories;
54
- }
@@ -1,21 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
- */
9
- /**
10
- * @module ckbox
11
- */
12
- export { default as CKBox } from './ckbox.js';
13
- export { default as CKBoxEditing } from './ckboxediting.js';
14
- export { default as CKBoxUI } from './ckboxui.js';
15
- export { default as CKBoxImageEditEditing } from './ckboximageedit/ckboximageeditediting.js';
16
- export { default as CKBoxImageEditUI } from './ckboximageedit/ckboximageeditui.js';
17
- export { default as CKBoxImageEdit } from './ckboximageedit.js';
18
- export type { default as CKBoxCommand } from './ckboxcommand.js';
19
- export type { default as CKBoxImageEditCommand } from './ckboximageedit/ckboximageeditcommand.js';
20
- export type { CKBoxConfig } from './ckboxconfig.js';
21
- import './augmentation.js';
@@ -1,67 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
- */
9
- /**
10
- * @module ckbox/utils
11
- */
12
- import type { InitializedToken } from '@ckeditor/ckeditor5-cloud-services';
13
- import type { CKBoxImageUrls } from './ckboxconfig.js';
14
- /**
15
- * Converts image source set provided by the CKBox into an object containing:
16
- * - responsive URLs for the "webp" image format,
17
- * - one fallback URL for browsers that do not support the "webp" format.
18
- */
19
- export declare function getImageUrls(imageUrls: CKBoxImageUrls): {
20
- imageFallbackUrl: string;
21
- imageSources: Array<{
22
- srcset: string;
23
- sizes: string;
24
- type: string;
25
- }>;
26
- };
27
- /**
28
- * Returns a workspace id to use for communication with the CKBox service.
29
- *
30
- * @param defaultWorkspaceId The default workspace to use taken from editor config.
31
- */
32
- export declare function getWorkspaceId(token: InitializedToken, defaultWorkspaceId?: string): string | null;
33
- /**
34
- * Generates an image data URL from its `blurhash` representation.
35
- */
36
- export declare function blurHashToDataUrl(hash?: string): string | undefined;
37
- /**
38
- * Sends the HTTP request.
39
- *
40
- * @internal
41
- * @param config.url the URL where the request will be sent.
42
- * @param config.method The HTTP method.
43
- * @param config.data Additional data to send.
44
- * @param config.onUploadProgress A callback informing about the upload progress.
45
- */
46
- export declare function sendHttpRequest({ url, method, data, onUploadProgress, signal, authorization }: {
47
- url: URL;
48
- signal: AbortSignal;
49
- authorization: string;
50
- method?: 'GET' | 'POST';
51
- data?: FormData | null;
52
- onUploadProgress?: (evt: ProgressEvent) => void;
53
- }): Promise<any>;
54
- /**
55
- * Returns an extension a typical file in the specified `mimeType` format would have.
56
- */
57
- export declare function convertMimeTypeToExtension(mimeType: string): string;
58
- /**
59
- * Tries to fetch the given `url` and returns 'content-type' of the response.
60
- */
61
- export declare function getContentTypeOfUrl(url: string, options: {
62
- signal: AbortSignal;
63
- }): Promise<string>;
64
- /**
65
- * Returns an extension from the given value.
66
- */
67
- export declare function getFileExtension(file: File): string;