@ckeditor/ckeditor5-ckbox 45.2.1-alpha.9 → 46.0.0-alpha.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-ckbox",
3
- "version": "45.2.1-alpha.9",
3
+ "version": "46.0.0-alpha.0",
4
4
  "description": "CKBox integration for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -13,17 +13,17 @@
13
13
  "type": "module",
14
14
  "main": "src/index.js",
15
15
  "dependencies": {
16
- "@ckeditor/ckeditor5-cloud-services": "45.2.1-alpha.9",
17
- "@ckeditor/ckeditor5-core": "45.2.1-alpha.9",
18
- "@ckeditor/ckeditor5-engine": "45.2.1-alpha.9",
19
- "@ckeditor/ckeditor5-icons": "45.2.1-alpha.9",
20
- "@ckeditor/ckeditor5-image": "45.2.1-alpha.9",
21
- "@ckeditor/ckeditor5-ui": "45.2.1-alpha.9",
22
- "@ckeditor/ckeditor5-upload": "45.2.1-alpha.9",
23
- "@ckeditor/ckeditor5-utils": "45.2.1-alpha.9",
24
- "ckeditor5": "45.2.1-alpha.9",
16
+ "@ckeditor/ckeditor5-cloud-services": "46.0.0-alpha.0",
17
+ "@ckeditor/ckeditor5-core": "46.0.0-alpha.0",
18
+ "@ckeditor/ckeditor5-engine": "46.0.0-alpha.0",
19
+ "@ckeditor/ckeditor5-icons": "46.0.0-alpha.0",
20
+ "@ckeditor/ckeditor5-image": "46.0.0-alpha.0",
21
+ "@ckeditor/ckeditor5-ui": "46.0.0-alpha.0",
22
+ "@ckeditor/ckeditor5-upload": "46.0.0-alpha.0",
23
+ "@ckeditor/ckeditor5-utils": "46.0.0-alpha.0",
24
+ "ckeditor5": "46.0.0-alpha.0",
25
25
  "blurhash": "2.0.5",
26
- "es-toolkit": "1.32.0"
26
+ "es-toolkit": "1.39.5"
27
27
  },
28
28
  "author": "CKSource (http://cksource.com/)",
29
29
  "license": "SEE LICENSE IN LICENSE.md",
package/src/ckbox.d.ts CHANGED
@@ -6,8 +6,8 @@
6
6
  * @module ckbox/ckbox
7
7
  */
8
8
  import { Plugin } from 'ckeditor5/src/core.js';
9
- import CKBoxUI from './ckboxui.js';
10
- import CKBoxEditing from './ckboxediting.js';
9
+ import { CKBoxUI } from './ckboxui.js';
10
+ import { CKBoxEditing } from './ckboxediting.js';
11
11
  /**
12
12
  * The CKBox feature, a bridge between the CKEditor 5 WYSIWYG editor and the CKBox file manager and uploader.
13
13
  *
@@ -21,7 +21,7 @@ import CKBoxEditing from './ckboxediting.js';
21
21
  * Check out the {@glink features/images/image-upload/image-upload Image upload} guide to learn about other ways to upload
22
22
  * images into CKEditor 5.
23
23
  */
24
- export default class CKBox extends Plugin {
24
+ export declare class CKBox extends Plugin {
25
25
  /**
26
26
  * @inheritDoc
27
27
  */
package/src/ckbox.js CHANGED
@@ -6,8 +6,8 @@
6
6
  * @module ckbox/ckbox
7
7
  */
8
8
  import { Plugin } from 'ckeditor5/src/core.js';
9
- import CKBoxUI from './ckboxui.js';
10
- import CKBoxEditing from './ckboxediting.js';
9
+ import { CKBoxUI } from './ckboxui.js';
10
+ import { CKBoxEditing } from './ckboxediting.js';
11
11
  /**
12
12
  * The CKBox feature, a bridge between the CKEditor 5 WYSIWYG editor and the CKBox file manager and uploader.
13
13
  *
@@ -21,7 +21,7 @@ import CKBoxEditing from './ckboxediting.js';
21
21
  * Check out the {@glink features/images/image-upload/image-upload Image upload} guide to learn about other ways to upload
22
22
  * images into CKEditor 5.
23
23
  */
24
- export default class CKBox extends Plugin {
24
+ export class CKBox extends Plugin {
25
25
  /**
26
26
  * @inheritDoc
27
27
  */
@@ -18,7 +18,7 @@ import type { CKBoxAssetDefinition, CKBoxAssetImageAttributesDefinition, CKBoxRa
18
18
  * - To insert links to other files it uses the {@link module:link/linkcommand~LinkCommand 'link'} command from the
19
19
  * {@link module:link/link~Link Link feature}.
20
20
  */
21
- export default class CKBoxCommand extends Command {
21
+ export declare class CKBoxCommand extends Command {
22
22
  value: boolean;
23
23
  /**
24
24
  * A set of all chosen assets. They are stored temporarily and they are automatically removed 1 second after being chosen.
@@ -23,7 +23,7 @@ const ASSET_INSERTION_WAIT_TIMEOUT = 1000;
23
23
  * - To insert links to other files it uses the {@link module:link/linkcommand~LinkCommand 'link'} command from the
24
24
  * {@link module:link/link~Link Link feature}.
25
25
  */
26
- export default class CKBoxCommand extends Command {
26
+ export class CKBoxCommand extends Command {
27
27
  /**
28
28
  * A set of all chosen assets. They are stored temporarily and they are automatically removed 1 second after being chosen.
29
29
  * Chosen assets have to be "remembered" for a while to be able to map the given asset with the element inserted into the model.
@@ -247,12 +247,16 @@ export interface CKBoxUploadConfig {
247
247
  * Asset definition.
248
248
  *
249
249
  * The definition contains the unique `id`, asset `type` and an `attributes` definition.
250
+ *
251
+ * @internal
250
252
  */
251
253
  export type CKBoxAssetDefinition = CKBoxAssetImageDefinition | CKBoxAssetLinkDefinition;
252
254
  /**
253
255
  * Image asset definition.
254
256
  *
255
257
  * The definition contains the unique `id`, asset `type` and an `attributes` definition.
258
+ *
259
+ * @internal
256
260
  */
257
261
  export interface CKBoxAssetImageDefinition {
258
262
  /**
@@ -272,6 +276,8 @@ export interface CKBoxAssetImageDefinition {
272
276
  * Link asset definition.
273
277
  *
274
278
  * The definition contains the unique `id`, asset `type` and an `attributes` definition.
279
+ *
280
+ * @internal
275
281
  */
276
282
  export interface CKBoxAssetLinkDefinition {
277
283
  /**
@@ -316,6 +322,8 @@ export interface CKBoxAssetLinkDefinition {
316
322
  * imageTextAlternative: 'An alternative text for the image'
317
323
  * }
318
324
  * ```
325
+ *
326
+ * @internal
319
327
  */
320
328
  export interface CKBoxAssetImageAttributesDefinition {
321
329
  /**
@@ -358,6 +366,8 @@ export interface CKBoxAssetImageAttributesDefinition {
358
366
  * linkHref: 'https://example.com/assets/asset-id/file.pdf'
359
367
  * }
360
368
  * ```
369
+ *
370
+ * @internal
361
371
  */
362
372
  export interface CKBoxAssetLinkAttributesDefinition {
363
373
  /**
@@ -6,13 +6,13 @@
6
6
  * @module ckbox/ckboxediting
7
7
  */
8
8
  import { Plugin } from 'ckeditor5/src/core.js';
9
- import CKBoxUploadAdapter from './ckboxuploadadapter.js';
10
- import CKBoxUtils from './ckboxutils.js';
9
+ import { CKBoxUploadAdapter } from './ckboxuploadadapter.js';
10
+ import { CKBoxUtils } from './ckboxutils.js';
11
11
  /**
12
12
  * The CKBox editing feature. It introduces the {@link module:ckbox/ckboxcommand~CKBoxCommand CKBox command} and
13
13
  * {@link module:ckbox/ckboxuploadadapter~CKBoxUploadAdapter CKBox upload adapter}.
14
14
  */
15
- export default class CKBoxEditing extends Plugin {
15
+ export declare class CKBoxEditing extends Plugin {
16
16
  /**
17
17
  * @inheritDoc
18
18
  */
@@ -6,18 +6,18 @@
6
6
  * @module ckbox/ckboxediting
7
7
  */
8
8
  import { Plugin } from 'ckeditor5/src/core.js';
9
- import { Range } from 'ckeditor5/src/engine.js';
9
+ import { ModelRange } from 'ckeditor5/src/engine.js';
10
10
  import { logError } from 'ckeditor5/src/utils.js';
11
- import CKBoxCommand from './ckboxcommand.js';
12
- import CKBoxUploadAdapter from './ckboxuploadadapter.js';
13
- import CKBoxUtils from './ckboxutils.js';
11
+ import { CKBoxCommand } from './ckboxcommand.js';
12
+ import { CKBoxUploadAdapter } from './ckboxuploadadapter.js';
13
+ import { CKBoxUtils } from './ckboxutils.js';
14
14
  import { sendHttpRequest } from './utils.js';
15
15
  const COMMAND_FORCE_DISABLE_ID = 'NoPermission';
16
16
  /**
17
17
  * The CKBox editing feature. It introduces the {@link module:ckbox/ckboxcommand~CKBoxCommand CKBox command} and
18
18
  * {@link module:ckbox/ckboxuploadadapter~CKBoxUploadAdapter CKBox upload adapter}.
19
19
  */
20
- export default class CKBoxEditing extends Plugin {
20
+ export class CKBoxEditing extends Plugin {
21
21
  /**
22
22
  * @inheritDoc
23
23
  */
@@ -283,7 +283,7 @@ function syncDataIdPostFixer(editor) {
283
283
  continue;
284
284
  }
285
285
  const range = entry.type === 'insert' ?
286
- new Range(entry.position, entry.position.getShiftedBy(entry.length)) :
286
+ new ModelRange(entry.position, entry.position.getShiftedBy(entry.length)) :
287
287
  entry.range;
288
288
  const isLinkHrefAttributeRemoval = entry.type === 'attribute' &&
289
289
  entry.attributeKey === 'linkHref' &&
@@ -11,7 +11,7 @@ import { Command, type Editor } from 'ckeditor5/src/core.js';
11
11
  *
12
12
  * Opens the CKBox dialog for editing the image.
13
13
  */
14
- export default class CKBoxImageEditCommand extends Command {
14
+ export declare class CKBoxImageEditCommand extends Command {
15
15
  /**
16
16
  * Flag indicating whether the command is active, i.e. dialog is open.
17
17
  */
@@ -12,13 +12,13 @@ import { isEqual } from 'es-toolkit/compat';
12
12
  import { sendHttpRequest } from '../utils.js';
13
13
  import { prepareImageAssetAttributes } from '../ckboxcommand.js';
14
14
  import { createEditabilityChecker } from './utils.js';
15
- import CKBoxUtils from '../ckboxutils.js';
15
+ import { CKBoxUtils } from '../ckboxutils.js';
16
16
  /**
17
17
  * The CKBox edit image command.
18
18
  *
19
19
  * Opens the CKBox dialog for editing the image.
20
20
  */
21
- export default class CKBoxImageEditCommand extends Command {
21
+ export class CKBoxImageEditCommand extends Command {
22
22
  /**
23
23
  * The DOM element that acts as a mounting point for the CKBox Edit Image dialog.
24
24
  */
@@ -7,12 +7,12 @@
7
7
  */
8
8
  import { PendingActions, Plugin } from 'ckeditor5/src/core.js';
9
9
  import { Notification } from 'ckeditor5/src/ui.js';
10
- import CKBoxEditing from '../ckboxediting.js';
11
- import CKBoxUtils from '../ckboxutils.js';
10
+ import { CKBoxEditing } from '../ckboxediting.js';
11
+ import { CKBoxUtils } from '../ckboxutils.js';
12
12
  /**
13
13
  * The CKBox image edit editing plugin.
14
14
  */
15
- export default class CKBoxImageEditEditing extends Plugin {
15
+ export declare class CKBoxImageEditEditing extends Plugin {
16
16
  /**
17
17
  * @inheritDoc
18
18
  */
@@ -7,13 +7,13 @@
7
7
  */
8
8
  import { PendingActions, Plugin } from 'ckeditor5/src/core.js';
9
9
  import { Notification } from 'ckeditor5/src/ui.js';
10
- import CKBoxImageEditCommand from './ckboximageeditcommand.js';
11
- import CKBoxEditing from '../ckboxediting.js';
12
- import CKBoxUtils from '../ckboxutils.js';
10
+ import { CKBoxImageEditCommand } from './ckboximageeditcommand.js';
11
+ import { CKBoxEditing } from '../ckboxediting.js';
12
+ import { CKBoxUtils } from '../ckboxutils.js';
13
13
  /**
14
14
  * The CKBox image edit editing plugin.
15
15
  */
16
- export default class CKBoxImageEditEditing extends Plugin {
16
+ export class CKBoxImageEditEditing extends Plugin {
17
17
  /**
18
18
  * @inheritDoc
19
19
  */
@@ -12,7 +12,7 @@ import { Plugin } from 'ckeditor5/src/core.js';
12
12
  * It registers the `'ckboxImageEdit'` UI button in the editor's {@link module:ui/componentfactory~ComponentFactory component factory}
13
13
  * that allows you to open the CKBox dialog and edit the image.
14
14
  */
15
- export default class CKBoxImageEditUI extends Plugin {
15
+ export declare class CKBoxImageEditUI extends Plugin {
16
16
  /**
17
17
  * @inheritDoc
18
18
  */
@@ -14,7 +14,7 @@ import { IconCkboxImageEdit } from 'ckeditor5/src/icons.js';
14
14
  * It registers the `'ckboxImageEdit'` UI button in the editor's {@link module:ui/componentfactory~ComponentFactory component factory}
15
15
  * that allows you to open the CKBox dialog and edit the image.
16
16
  */
17
- export default class CKBoxImageEditUI extends Plugin {
17
+ export class CKBoxImageEditUI extends Plugin {
18
18
  /**
19
19
  * @inheritDoc
20
20
  */
@@ -2,9 +2,9 @@
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
- import type { Element } from 'ckeditor5/src/engine.js';
5
+ import type { ModelElement } from 'ckeditor5/src/engine.js';
6
6
  import type { CKBoxConfig } from '../ckboxconfig.js';
7
7
  /**
8
8
  * @internal
9
9
  */
10
- export declare function createEditabilityChecker(allowExternalImagesEditing: CKBoxConfig['allowExternalImagesEditing']): (element: Element) => boolean;
10
+ export declare function createEditabilityChecker(allowExternalImagesEditing: CKBoxConfig['allowExternalImagesEditing']): (element: ModelElement) => boolean;
@@ -6,13 +6,13 @@
6
6
  * @module ckbox/ckboximageedit
7
7
  */
8
8
  import { Plugin } from 'ckeditor5/src/core.js';
9
- import CKBoxImageEditEditing from './ckboximageedit/ckboximageeditediting.js';
10
- import CKBoxImageEditUI from './ckboximageedit/ckboximageeditui.js';
9
+ import { CKBoxImageEditEditing } from './ckboximageedit/ckboximageeditediting.js';
10
+ import { CKBoxImageEditUI } from './ckboximageedit/ckboximageeditui.js';
11
11
  import '../theme/ckboximageedit.css';
12
12
  /**
13
13
  * The CKBox image edit feature.
14
14
  */
15
- export default class CKBoxImageEdit extends Plugin {
15
+ export declare class CKBoxImageEdit extends Plugin {
16
16
  /**
17
17
  * @inheritDoc
18
18
  */
@@ -6,13 +6,13 @@
6
6
  * @module ckbox/ckboximageedit
7
7
  */
8
8
  import { Plugin } from 'ckeditor5/src/core.js';
9
- import CKBoxImageEditEditing from './ckboximageedit/ckboximageeditediting.js';
10
- import CKBoxImageEditUI from './ckboximageedit/ckboximageeditui.js';
9
+ import { CKBoxImageEditEditing } from './ckboximageedit/ckboximageeditediting.js';
10
+ import { CKBoxImageEditUI } from './ckboximageedit/ckboximageeditui.js';
11
11
  import '../theme/ckboximageedit.css';
12
12
  /**
13
13
  * The CKBox image edit feature.
14
14
  */
15
- export default class CKBoxImageEdit extends Plugin {
15
+ export class CKBoxImageEdit extends Plugin {
16
16
  /**
17
17
  * @inheritDoc
18
18
  */
package/src/ckboxui.d.ts CHANGED
@@ -16,7 +16,7 @@ import { Plugin } from 'ckeditor5/src/core.js';
16
16
  *
17
17
  * It also integrates with the `insertImage` toolbar component and `menuBar:insertImage` menu component.
18
18
  */
19
- export default class CKBoxUI extends Plugin {
19
+ export declare class CKBoxUI extends Plugin {
20
20
  /**
21
21
  * @inheritDoc
22
22
  */
package/src/ckboxui.js CHANGED
@@ -18,7 +18,7 @@ import { IconBrowseFiles, IconImageAssetManager } from 'ckeditor5/src/icons.js';
18
18
  *
19
19
  * It also integrates with the `insertImage` toolbar component and `menuBar:insertImage` menu component.
20
20
  */
21
- export default class CKBoxUI extends Plugin {
21
+ export class CKBoxUI extends Plugin {
22
22
  /**
23
23
  * @inheritDoc
24
24
  */
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { Plugin } from 'ckeditor5/src/core.js';
9
9
  import { FileRepository } from 'ckeditor5/src/upload.js';
10
- import CKBoxEditing from './ckboxediting.js';
10
+ import { CKBoxEditing } from './ckboxediting.js';
11
11
  /**
12
12
  * A plugin that enables file uploads in CKEditor 5 using the CKBox server–side connector.
13
13
  * See the {@glink features/file-management/ckbox CKBox file manager integration} guide to learn how to configure
@@ -17,7 +17,7 @@ import CKBoxEditing from './ckboxediting.js';
17
17
  * Check out the {@glink features/images/image-upload/image-upload Image upload overview} guide to learn about
18
18
  * other ways to upload images into CKEditor 5.
19
19
  */
20
- export default class CKBoxUploadAdapter extends Plugin {
20
+ export declare class CKBoxUploadAdapter extends Plugin {
21
21
  /**
22
22
  * @inheritDoc
23
23
  */
@@ -7,9 +7,9 @@
7
7
  */
8
8
  import { Plugin } from 'ckeditor5/src/core.js';
9
9
  import { FileRepository } from 'ckeditor5/src/upload.js';
10
- import CKBoxEditing from './ckboxediting.js';
10
+ import { CKBoxEditing } from './ckboxediting.js';
11
11
  import { getImageUrls, sendHttpRequest } from './utils.js';
12
- import CKBoxUtils from './ckboxutils.js';
12
+ import { CKBoxUtils } from './ckboxutils.js';
13
13
  /**
14
14
  * A plugin that enables file uploads in CKEditor 5 using the CKBox server–side connector.
15
15
  * See the {@glink features/file-management/ckbox CKBox file manager integration} guide to learn how to configure
@@ -19,7 +19,7 @@ import CKBoxUtils from './ckboxutils.js';
19
19
  * Check out the {@glink features/images/image-upload/image-upload Image upload overview} guide to learn about
20
20
  * other ways to upload images into CKEditor 5.
21
21
  */
22
- export default class CKBoxUploadAdapter extends Plugin {
22
+ export class CKBoxUploadAdapter extends Plugin {
23
23
  /**
24
24
  * @inheritDoc
25
25
  */
@@ -10,7 +10,7 @@ import { Plugin } from 'ckeditor5/src/core.js';
10
10
  /**
11
11
  * The CKBox utilities plugin.
12
12
  */
13
- export default class CKBoxUtils extends Plugin {
13
+ export declare class CKBoxUtils extends Plugin {
14
14
  /**
15
15
  * CKEditor Cloud Services access token.
16
16
  */
package/src/ckboxutils.js CHANGED
@@ -9,7 +9,7 @@ const DEFAULT_CKBOX_THEME_NAME = 'lark';
9
9
  /**
10
10
  * The CKBox utilities plugin.
11
11
  */
12
- export default class CKBoxUtils extends Plugin {
12
+ export class CKBoxUtils extends Plugin {
13
13
  /**
14
14
  * CKEditor Cloud Services access token.
15
15
  */
package/src/index.d.ts CHANGED
@@ -5,13 +5,19 @@
5
5
  /**
6
6
  * @module ckbox
7
7
  */
8
- export { default as CKBox } from './ckbox.js';
9
- export { default as CKBoxEditing } from './ckboxediting.js';
10
- export { default as CKBoxUI } from './ckboxui.js';
11
- export { default as CKBoxImageEditEditing } from './ckboximageedit/ckboximageeditediting.js';
12
- export { default as CKBoxImageEditUI } from './ckboximageedit/ckboximageeditui.js';
13
- export { default as CKBoxImageEdit } from './ckboximageedit.js';
14
- export type { default as CKBoxCommand } from './ckboxcommand.js';
15
- export type { default as CKBoxImageEditCommand } from './ckboximageedit/ckboximageeditcommand.js';
16
- export type { CKBoxConfig } from './ckboxconfig.js';
8
+ export { CKBox } from './ckbox.js';
9
+ export { CKBoxEditing } from './ckboxediting.js';
10
+ export { CKBoxUI } from './ckboxui.js';
11
+ export { CKBoxImageEditEditing } from './ckboximageedit/ckboximageeditediting.js';
12
+ export { CKBoxImageEditUI } from './ckboximageedit/ckboximageeditui.js';
13
+ export { CKBoxImageEdit } from './ckboximageedit.js';
14
+ export { CKBoxCommand } from './ckboxcommand.js';
15
+ export { CKBoxImageEditCommand } from './ckboximageedit/ckboximageeditcommand.js';
16
+ export { CKBoxUploadAdapter } from './ckboxuploadadapter.js';
17
+ export { CKBoxUtils } from './ckboxutils.js';
18
+ export type { CKBoxConfig, CKBoxDialogConfig, CKBoxCategoriesConfig, CKBoxViewConfig, CKBoxUploadConfig, CKBoxImageUrls, CKBoxRawAssetDefinition, CKBoxRawAssetDataDefinition, CKBoxRawAssetMetadataDefinition } from './ckboxconfig.js';
19
+ export { getImageUrls as _getCKBoxImageUrls, getWorkspaceId as _getCKBoxWorkspaceId, blurHashToDataUrl as _ckboxBlurHashToDataUrl, sendHttpRequest as _sendCKBoxHttpRequest, convertMimeTypeToExtension as _ckBoxConvertMimeTypeToExtension, getContentTypeOfUrl as _getCKBoxContentTypeOfUrl, getFileExtension as _getCKBoxFileExtension } from './utils.js';
20
+ export type { CKBoxAssetDefinition as _CKBoxAssetDefinition, CKBoxAssetImageDefinition as _CKBoxAssetImageDefinition, CKBoxAssetLinkDefinition as _CKBoxAssetLinkDefinition, CKBoxAssetImageAttributesDefinition as _CKBoxAssetImageAttributesDefinition, CKBoxAssetLinkAttributesDefinition as _CKBoxAssetLinkAttributesDefinition } from './ckboxconfig.js';
21
+ export { createEditabilityChecker as _createCKBoxEditabilityChecker } from './ckboximageedit/utils.js';
22
+ export { prepareImageAssetAttributes as _prepareCKBoxImageAssetAttributes } from './ckboxcommand.js';
17
23
  import './augmentation.js';
package/src/index.js CHANGED
@@ -5,10 +5,17 @@
5
5
  /**
6
6
  * @module ckbox
7
7
  */
8
- export { default as CKBox } from './ckbox.js';
9
- export { default as CKBoxEditing } from './ckboxediting.js';
10
- export { default as CKBoxUI } from './ckboxui.js';
11
- export { default as CKBoxImageEditEditing } from './ckboximageedit/ckboximageeditediting.js';
12
- export { default as CKBoxImageEditUI } from './ckboximageedit/ckboximageeditui.js';
13
- export { default as CKBoxImageEdit } from './ckboximageedit.js';
8
+ export { CKBox } from './ckbox.js';
9
+ export { CKBoxEditing } from './ckboxediting.js';
10
+ export { CKBoxUI } from './ckboxui.js';
11
+ export { CKBoxImageEditEditing } from './ckboximageedit/ckboximageeditediting.js';
12
+ export { CKBoxImageEditUI } from './ckboximageedit/ckboximageeditui.js';
13
+ export { CKBoxImageEdit } from './ckboximageedit.js';
14
+ export { CKBoxCommand } from './ckboxcommand.js';
15
+ export { CKBoxImageEditCommand } from './ckboximageedit/ckboximageeditcommand.js';
16
+ export { CKBoxUploadAdapter } from './ckboxuploadadapter.js';
17
+ export { CKBoxUtils } from './ckboxutils.js';
18
+ export { getImageUrls as _getCKBoxImageUrls, getWorkspaceId as _getCKBoxWorkspaceId, blurHashToDataUrl as _ckboxBlurHashToDataUrl, sendHttpRequest as _sendCKBoxHttpRequest, convertMimeTypeToExtension as _ckBoxConvertMimeTypeToExtension, getContentTypeOfUrl as _getCKBoxContentTypeOfUrl, getFileExtension as _getCKBoxFileExtension } from './utils.js';
19
+ export { createEditabilityChecker as _createCKBoxEditabilityChecker } from './ckboximageedit/utils.js';
20
+ export { prepareImageAssetAttributes as _prepareCKBoxImageAssetAttributes } from './ckboxcommand.js';
14
21
  import './augmentation.js';
package/src/utils.d.ts CHANGED
@@ -11,6 +11,8 @@ import type { CKBoxImageUrls } from './ckboxconfig.js';
11
11
  * Converts image source set provided by the CKBox into an object containing:
12
12
  * - responsive URLs for the "webp" image format,
13
13
  * - one fallback URL for browsers that do not support the "webp" format.
14
+ *
15
+ * @internal
14
16
  */
15
17
  export declare function getImageUrls(imageUrls: CKBoxImageUrls): {
16
18
  imageFallbackUrl: string;
@@ -24,10 +26,13 @@ export declare function getImageUrls(imageUrls: CKBoxImageUrls): {
24
26
  * Returns a workspace id to use for communication with the CKBox service.
25
27
  *
26
28
  * @param defaultWorkspaceId The default workspace to use taken from editor config.
29
+ * @internal
27
30
  */
28
31
  export declare function getWorkspaceId(token: InitializedToken, defaultWorkspaceId?: string): string | null;
29
32
  /**
30
33
  * Generates an image data URL from its `blurhash` representation.
34
+ *
35
+ * @internal
31
36
  */
32
37
  export declare function blurHashToDataUrl(hash?: string): string | undefined;
33
38
  /**
@@ -52,15 +57,21 @@ export declare function sendHttpRequest({ url, method, data, onUploadProgress, s
52
57
  }): Promise<any>;
53
58
  /**
54
59
  * Returns an extension a typical file in the specified `mimeType` format would have.
60
+ *
61
+ * @internal
55
62
  */
56
63
  export declare function convertMimeTypeToExtension(mimeType: string): string;
57
64
  /**
58
65
  * Tries to fetch the given `url` and returns 'content-type' of the response.
66
+ *
67
+ * @internal
59
68
  */
60
69
  export declare function getContentTypeOfUrl(url: string, options: {
61
70
  signal: AbortSignal;
62
71
  }): Promise<string>;
63
72
  /**
64
73
  * Returns an extension from the given value.
74
+ *
75
+ * @internal
65
76
  */
66
77
  export declare function getFileExtension(file: File): string;
package/src/utils.js CHANGED
@@ -7,6 +7,8 @@ import { decode } from 'blurhash';
7
7
  * Converts image source set provided by the CKBox into an object containing:
8
8
  * - responsive URLs for the "webp" image format,
9
9
  * - one fallback URL for browsers that do not support the "webp" format.
10
+ *
11
+ * @internal
10
12
  */
11
13
  export function getImageUrls(imageUrls) {
12
14
  const responsiveUrls = [];
@@ -34,6 +36,7 @@ export function getImageUrls(imageUrls) {
34
36
  * Returns a workspace id to use for communication with the CKBox service.
35
37
  *
36
38
  * @param defaultWorkspaceId The default workspace to use taken from editor config.
39
+ * @internal
37
40
  */
38
41
  export function getWorkspaceId(token, defaultWorkspaceId) {
39
42
  const [, binaryTokenPayload] = token.value.split('.');
@@ -54,6 +57,8 @@ export function getWorkspaceId(token, defaultWorkspaceId) {
54
57
  const BLUR_RESOLUTION = 32;
55
58
  /**
56
59
  * Generates an image data URL from its `blurhash` representation.
60
+ *
61
+ * @internal
57
62
  */
58
63
  export function blurHashToDataUrl(hash) {
59
64
  if (!hash) {
@@ -143,12 +148,16 @@ const MIME_TO_EXTENSION = {
143
148
  };
144
149
  /**
145
150
  * Returns an extension a typical file in the specified `mimeType` format would have.
151
+ *
152
+ * @internal
146
153
  */
147
154
  export function convertMimeTypeToExtension(mimeType) {
148
155
  return MIME_TO_EXTENSION[mimeType];
149
156
  }
150
157
  /**
151
158
  * Tries to fetch the given `url` and returns 'content-type' of the response.
159
+ *
160
+ * @internal
152
161
  */
153
162
  export async function getContentTypeOfUrl(url, options) {
154
163
  try {
@@ -168,6 +177,8 @@ export async function getContentTypeOfUrl(url, options) {
168
177
  }
169
178
  /**
170
179
  * Returns an extension from the given value.
180
+ *
181
+ * @internal
171
182
  */
172
183
  export function getFileExtension(file) {
173
184
  const fileName = file.name;