@ckeditor/ckeditor5-upload 48.2.0-alpha.7 → 48.3.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.
@@ -1,46 +1,46 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module upload/adapters/base64uploadadapter
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { FileRepository } from '../filerepository.js';
6
+ * @module upload/adapters/base64uploadadapter
7
+ */
8
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import { FileRepository } from "../filerepository.js";
10
10
  /**
11
- * A plugin that converts images inserted into the editor into [Base64 strings](https://en.wikipedia.org/wiki/Base64)
12
- * in the {@glink getting-started/setup/getting-and-setting-data editor output}.
13
- *
14
- * This kind of image upload does not require server processing – images are stored with the rest of the text and
15
- * displayed by the web browser without additional requests.
16
- *
17
- * Check out the {@glink features/images/image-upload/image-upload comprehensive "Image upload overview"} to learn about
18
- * other ways to upload images into CKEditor 5.
19
- */
11
+ * A plugin that converts images inserted into the editor into [Base64 strings](https://en.wikipedia.org/wiki/Base64)
12
+ * in the {@glink getting-started/setup/getting-and-setting-data editor output}.
13
+ *
14
+ * This kind of image upload does not require server processing – images are stored with the rest of the text and
15
+ * displayed by the web browser without additional requests.
16
+ *
17
+ * Check out the {@glink features/images/image-upload/image-upload comprehensive "Image upload overview"} to learn about
18
+ * other ways to upload images into CKEditor 5.
19
+ */
20
20
  export declare class Base64UploadAdapter extends Plugin {
21
- /**
22
- * @inheritDoc
23
- */
24
- static get requires(): readonly [typeof FileRepository];
25
- /**
26
- * @inheritDoc
27
- */
28
- static get pluginName(): "Base64UploadAdapter";
29
- /**
30
- * @inheritDoc
31
- * @internal
32
- */
33
- static get licenseFeatureCode(): string;
34
- /**
35
- * @inheritDoc
36
- */
37
- static get isOfficialPlugin(): true;
38
- /**
39
- * @inheritDoc
40
- */
41
- static get isPremiumPlugin(): true;
42
- /**
43
- * @inheritDoc
44
- */
45
- init(): void;
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get requires(): PluginDependenciesOf<[FileRepository]>;
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ static get pluginName(): "Base64UploadAdapter";
29
+ /**
30
+ * @inheritDoc
31
+ * @internal
32
+ */
33
+ static get licenseFeatureCode(): string;
34
+ /**
35
+ * @inheritDoc
36
+ */
37
+ static override get isOfficialPlugin(): true;
38
+ /**
39
+ * @inheritDoc
40
+ */
41
+ static override get isPremiumPlugin(): true;
42
+ /**
43
+ * @inheritDoc
44
+ */
45
+ init(): void;
46
46
  }
@@ -1,61 +1,61 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module upload/adapters/simpleuploadadapter
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { FileRepository } from '../filerepository.js';
6
+ * @module upload/adapters/simpleuploadadapter
7
+ */
8
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import { FileRepository } from "../filerepository.js";
10
10
  /**
11
- * The Simple upload adapter allows uploading images to an application running on your server using
12
- * the [`XMLHttpRequest`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) API with a
13
- * minimal {@link module:upload/uploadconfig~SimpleUploadConfig editor configuration}.
14
- *
15
- * ```ts
16
- * ClassicEditor
17
- * .create( {
18
- * simpleUpload: {
19
- * uploadUrl: 'http://example.com',
20
- * headers: {
21
- * ...
22
- * }
23
- * }
24
- * } )
25
- * .then( ... )
26
- * .catch( ... );
27
- * ```
28
- *
29
- * See the {@glink features/images/image-upload/simple-upload-adapter "Simple upload adapter"} guide to learn how to
30
- * learn more about the feature (configuration, server–side requirements, etc.).
31
- *
32
- * Check out the {@glink features/images/image-upload/image-upload comprehensive "Image upload overview"} to learn about
33
- * other ways to upload images into CKEditor 5.
34
- */
11
+ * The Simple upload adapter allows uploading images to an application running on your server using
12
+ * the [`XMLHttpRequest`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) API with a
13
+ * minimal {@link module:upload/uploadconfig~SimpleUploadConfig editor configuration}.
14
+ *
15
+ * ```ts
16
+ * ClassicEditor
17
+ * .create( {
18
+ * simpleUpload: {
19
+ * uploadUrl: 'http://example.com',
20
+ * headers: {
21
+ * ...
22
+ * }
23
+ * }
24
+ * } )
25
+ * .then( ... )
26
+ * .catch( ... );
27
+ * ```
28
+ *
29
+ * See the {@glink features/images/image-upload/simple-upload-adapter "Simple upload adapter"} guide to learn how to
30
+ * learn more about the feature (configuration, server–side requirements, etc.).
31
+ *
32
+ * Check out the {@glink features/images/image-upload/image-upload comprehensive "Image upload overview"} to learn about
33
+ * other ways to upload images into CKEditor 5.
34
+ */
35
35
  export declare class SimpleUploadAdapter extends Plugin {
36
- /**
37
- * @inheritDoc
38
- */
39
- static get requires(): readonly [typeof FileRepository];
40
- /**
41
- * @inheritDoc
42
- */
43
- static get pluginName(): "SimpleUploadAdapter";
44
- /**
45
- * @inheritDoc
46
- * @internal
47
- */
48
- static get licenseFeatureCode(): string;
49
- /**
50
- * @inheritDoc
51
- */
52
- static get isOfficialPlugin(): true;
53
- /**
54
- * @inheritDoc
55
- */
56
- static get isPremiumPlugin(): true;
57
- /**
58
- * @inheritDoc
59
- */
60
- init(): void;
36
+ /**
37
+ * @inheritDoc
38
+ */
39
+ static get requires(): PluginDependenciesOf<[FileRepository]>;
40
+ /**
41
+ * @inheritDoc
42
+ */
43
+ static get pluginName(): "SimpleUploadAdapter";
44
+ /**
45
+ * @inheritDoc
46
+ * @internal
47
+ */
48
+ static get licenseFeatureCode(): string;
49
+ /**
50
+ * @inheritDoc
51
+ */
52
+ static override get isOfficialPlugin(): true;
53
+ /**
54
+ * @inheritDoc
55
+ */
56
+ static override get isPremiumPlugin(): true;
57
+ /**
58
+ * @inheritDoc
59
+ */
60
+ init(): void;
61
61
  }
@@ -1,20 +1,20 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- import type { SimpleUploadConfig, FileRepository, SimpleUploadAdapter, Base64UploadAdapter } from './index.js';
6
- declare module '@ckeditor/ckeditor5-core' {
7
- interface EditorConfig {
8
- /**
9
- * The configuration of the {@link module:upload/adapters/simpleuploadadapter~SimpleUploadAdapter simple upload adapter}.
10
- *
11
- * Read more in {@link module:upload/uploadconfig~SimpleUploadConfig}.
12
- */
13
- simpleUpload?: SimpleUploadConfig;
14
- }
15
- interface PluginsMap {
16
- [FileRepository.pluginName]: FileRepository;
17
- [SimpleUploadAdapter.pluginName]: SimpleUploadAdapter;
18
- [Base64UploadAdapter.pluginName]: Base64UploadAdapter;
19
- }
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import type { SimpleUploadConfig, FileRepository, SimpleUploadAdapter, Base64UploadAdapter } from "./index.js";
6
+ declare module "@ckeditor/ckeditor5-core" {
7
+ interface EditorConfig {
8
+ /**
9
+ * The configuration of the {@link module:upload/adapters/simpleuploadadapter~SimpleUploadAdapter simple upload adapter}.
10
+ *
11
+ * Read more in {@link module:upload/uploadconfig~SimpleUploadConfig}.
12
+ */
13
+ simpleUpload?: SimpleUploadConfig;
14
+ }
15
+ interface PluginsMap {
16
+ [FileRepository.pluginName]: FileRepository;
17
+ [SimpleUploadAdapter.pluginName]: SimpleUploadAdapter;
18
+ [Base64UploadAdapter.pluginName]: Base64UploadAdapter;
19
+ }
20
20
  }
@@ -1,56 +1,57 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- declare const FileReader_base: {
6
- new (): import("@ckeditor/ckeditor5-utils").Observable;
7
- prototype: import("@ckeditor/ckeditor5-utils").Observable;
8
- };
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
9
5
  /**
10
- * Wrapper over the native `FileReader`.
11
- */
12
- export declare class FileReader extends /* #__PURE__ */ FileReader_base {
13
- total: number;
14
- /**
15
- * Instance of native FileReader.
16
- */
17
- private readonly _reader;
18
- /**
19
- * Holds the data of an already loaded file. The file must be first loaded
20
- * by using {@link module:upload/filereader~FileReader#read `read()`}.
21
- */
22
- private _data?;
23
- /**
24
- * Number of bytes loaded.
25
- *
26
- * @readonly
27
- * @observable
28
- */
29
- loaded: number;
30
- /**
31
- * Creates an instance of the FileReader.
32
- */
33
- constructor();
34
- /**
35
- * Returns error that occurred during file reading.
36
- */
37
- get error(): DOMException | null;
38
- /**
39
- * Holds the data of an already loaded file. The file must be first loaded
40
- * by using {@link module:upload/filereader~FileReader#read `read()`}.
41
- */
42
- get data(): string | undefined;
43
- /**
44
- * Reads the provided file.
45
- *
46
- * @param file Native File object.
47
- * @returns Returns a promise that will be resolved with file's content.
48
- * The promise will be rejected in case of an error or when the reading process is aborted.
49
- */
50
- read(file: File): Promise<string>;
51
- /**
52
- * Aborts file reader.
53
- */
54
- abort(): void;
6
+ * @module upload/filereader
7
+ */
8
+ import { type ObservableMixinConstructor } from "@ckeditor/ckeditor5-utils";
9
+ declare const FileReaderBase: ObservableMixinConstructor;
10
+ /**
11
+ * Wrapper over the native `FileReader`.
12
+ */
13
+ export declare class FileReader extends FileReaderBase {
14
+ total: number;
15
+ /**
16
+ * Instance of native FileReader.
17
+ */
18
+ private readonly _reader;
19
+ /**
20
+ * Holds the data of an already loaded file. The file must be first loaded
21
+ * by using {@link module:upload/filereader~FileReader#read `read()`}.
22
+ */
23
+ private _data?;
24
+ /**
25
+ * Number of bytes loaded.
26
+ *
27
+ * @readonly
28
+ * @observable
29
+ */
30
+ loaded: number;
31
+ /**
32
+ * Creates an instance of the FileReader.
33
+ */
34
+ constructor();
35
+ /**
36
+ * Returns error that occurred during file reading.
37
+ */
38
+ get error(): DOMException | null;
39
+ /**
40
+ * Holds the data of an already loaded file. The file must be first loaded
41
+ * by using {@link module:upload/filereader~FileReader#read `read()`}.
42
+ */
43
+ get data(): string | undefined;
44
+ /**
45
+ * Reads the provided file.
46
+ *
47
+ * @param file Native File object.
48
+ * @returns Returns a promise that will be resolved with file's content.
49
+ * The promise will be rejected in case of an error or when the reading process is aborted.
50
+ */
51
+ read(file: File): Promise<string>;
52
+ /**
53
+ * Aborts file reader.
54
+ */
55
+ abort(): void;
55
56
  }
56
57
  export {};