@ckeditor/ckeditor5-autosave 48.8.1-alpha.4 → 49.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.
Files changed (157) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/augmentation.d.ts +16 -16
  3. package/dist/autosave.d.ts +216 -216
  4. package/dist/index-content.css +3 -0
  5. package/dist/index-content.css.map +1 -0
  6. package/dist/index-editor.css +3 -0
  7. package/dist/index-editor.css.map +1 -0
  8. package/dist/index.d.ts +7 -7
  9. package/dist/index.js +224 -244
  10. package/dist/index.js.map +1 -1
  11. package/dist/translations/af.js +1 -1
  12. package/dist/translations/af.umd.js +5 -3
  13. package/dist/translations/ar.js +1 -1
  14. package/dist/translations/ar.umd.js +5 -3
  15. package/dist/translations/ast.js +1 -1
  16. package/dist/translations/ast.umd.js +5 -3
  17. package/dist/translations/az.js +1 -1
  18. package/dist/translations/az.umd.js +5 -3
  19. package/dist/translations/be.js +1 -1
  20. package/dist/translations/be.umd.js +5 -3
  21. package/dist/translations/bg.js +1 -1
  22. package/dist/translations/bg.umd.js +5 -3
  23. package/dist/translations/bn.js +1 -1
  24. package/dist/translations/bn.umd.js +5 -3
  25. package/dist/translations/bs.js +1 -1
  26. package/dist/translations/bs.umd.js +5 -3
  27. package/dist/translations/ca.js +1 -1
  28. package/dist/translations/ca.umd.js +5 -3
  29. package/dist/translations/cs.js +1 -1
  30. package/dist/translations/cs.umd.js +5 -3
  31. package/dist/translations/da.js +1 -1
  32. package/dist/translations/da.umd.js +5 -3
  33. package/dist/translations/de-ch.js +1 -1
  34. package/dist/translations/de-ch.umd.js +5 -3
  35. package/dist/translations/de.js +1 -1
  36. package/dist/translations/de.umd.js +5 -3
  37. package/dist/translations/el.js +1 -1
  38. package/dist/translations/el.umd.js +5 -3
  39. package/dist/translations/en-au.js +1 -1
  40. package/dist/translations/en-au.umd.js +5 -3
  41. package/dist/translations/en-gb.js +1 -1
  42. package/dist/translations/en-gb.umd.js +5 -3
  43. package/dist/translations/en.js +1 -1
  44. package/dist/translations/en.umd.js +5 -3
  45. package/dist/translations/eo.js +1 -1
  46. package/dist/translations/eo.umd.js +5 -3
  47. package/dist/translations/es-co.js +1 -1
  48. package/dist/translations/es-co.umd.js +5 -3
  49. package/dist/translations/es.js +1 -1
  50. package/dist/translations/es.umd.js +5 -3
  51. package/dist/translations/et.js +1 -1
  52. package/dist/translations/et.umd.js +5 -3
  53. package/dist/translations/eu.js +1 -1
  54. package/dist/translations/eu.umd.js +5 -3
  55. package/dist/translations/fa.js +1 -1
  56. package/dist/translations/fa.umd.js +5 -3
  57. package/dist/translations/fi.js +1 -1
  58. package/dist/translations/fi.umd.js +5 -3
  59. package/dist/translations/fr.js +1 -1
  60. package/dist/translations/fr.umd.js +5 -3
  61. package/dist/translations/gl.js +1 -1
  62. package/dist/translations/gl.umd.js +5 -3
  63. package/dist/translations/gu.js +1 -1
  64. package/dist/translations/gu.umd.js +5 -3
  65. package/dist/translations/he.js +1 -1
  66. package/dist/translations/he.umd.js +5 -3
  67. package/dist/translations/hi.js +1 -1
  68. package/dist/translations/hi.umd.js +5 -3
  69. package/dist/translations/hr.js +1 -1
  70. package/dist/translations/hr.umd.js +5 -3
  71. package/dist/translations/hu.js +1 -1
  72. package/dist/translations/hu.umd.js +5 -3
  73. package/dist/translations/hy.js +1 -1
  74. package/dist/translations/hy.umd.js +5 -3
  75. package/dist/translations/id.js +1 -1
  76. package/dist/translations/id.umd.js +5 -3
  77. package/dist/translations/it.js +1 -1
  78. package/dist/translations/it.umd.js +5 -3
  79. package/dist/translations/ja.js +1 -1
  80. package/dist/translations/ja.umd.js +5 -3
  81. package/dist/translations/jv.js +1 -1
  82. package/dist/translations/jv.umd.js +5 -3
  83. package/dist/translations/kk.js +1 -1
  84. package/dist/translations/kk.umd.js +5 -3
  85. package/dist/translations/km.js +1 -1
  86. package/dist/translations/km.umd.js +5 -3
  87. package/dist/translations/kn.js +1 -1
  88. package/dist/translations/kn.umd.js +5 -3
  89. package/dist/translations/ko.js +1 -1
  90. package/dist/translations/ko.umd.js +5 -3
  91. package/dist/translations/ku.js +1 -1
  92. package/dist/translations/ku.umd.js +5 -3
  93. package/dist/translations/lt.js +1 -1
  94. package/dist/translations/lt.umd.js +5 -3
  95. package/dist/translations/lv.js +1 -1
  96. package/dist/translations/lv.umd.js +5 -3
  97. package/dist/translations/ms.js +1 -1
  98. package/dist/translations/ms.umd.js +5 -3
  99. package/dist/translations/nb.js +1 -1
  100. package/dist/translations/nb.umd.js +5 -3
  101. package/dist/translations/ne.js +1 -1
  102. package/dist/translations/ne.umd.js +5 -3
  103. package/dist/translations/nl.js +1 -1
  104. package/dist/translations/nl.umd.js +5 -3
  105. package/dist/translations/no.js +1 -1
  106. package/dist/translations/no.umd.js +5 -3
  107. package/dist/translations/oc.js +1 -1
  108. package/dist/translations/oc.umd.js +5 -3
  109. package/dist/translations/pl.js +1 -1
  110. package/dist/translations/pl.umd.js +5 -3
  111. package/dist/translations/pt-br.js +1 -1
  112. package/dist/translations/pt-br.umd.js +5 -3
  113. package/dist/translations/pt.js +1 -1
  114. package/dist/translations/pt.umd.js +5 -3
  115. package/dist/translations/ro.js +1 -1
  116. package/dist/translations/ro.umd.js +5 -3
  117. package/dist/translations/ru.js +1 -1
  118. package/dist/translations/ru.umd.js +5 -3
  119. package/dist/translations/si.js +1 -1
  120. package/dist/translations/si.umd.js +5 -3
  121. package/dist/translations/sk.js +1 -1
  122. package/dist/translations/sk.umd.js +5 -3
  123. package/dist/translations/sl.js +1 -1
  124. package/dist/translations/sl.umd.js +5 -3
  125. package/dist/translations/sq.js +1 -1
  126. package/dist/translations/sq.umd.js +5 -3
  127. package/dist/translations/sr-latn.js +1 -1
  128. package/dist/translations/sr-latn.umd.js +5 -3
  129. package/dist/translations/sr.js +1 -1
  130. package/dist/translations/sr.umd.js +5 -3
  131. package/dist/translations/sv.js +1 -1
  132. package/dist/translations/sv.umd.js +5 -3
  133. package/dist/translations/th.js +1 -1
  134. package/dist/translations/th.umd.js +5 -3
  135. package/dist/translations/ti.js +1 -1
  136. package/dist/translations/ti.umd.js +5 -3
  137. package/dist/translations/tk.js +1 -1
  138. package/dist/translations/tk.umd.js +5 -3
  139. package/dist/translations/tr.js +1 -1
  140. package/dist/translations/tr.umd.js +5 -3
  141. package/dist/translations/tt.js +1 -1
  142. package/dist/translations/tt.umd.js +5 -3
  143. package/dist/translations/ug.js +1 -1
  144. package/dist/translations/ug.umd.js +5 -3
  145. package/dist/translations/uk.js +1 -1
  146. package/dist/translations/uk.umd.js +5 -3
  147. package/dist/translations/ur.js +1 -1
  148. package/dist/translations/ur.umd.js +5 -3
  149. package/dist/translations/uz.js +1 -1
  150. package/dist/translations/uz.umd.js +5 -3
  151. package/dist/translations/vi.js +1 -1
  152. package/dist/translations/vi.umd.js +5 -3
  153. package/dist/translations/zh-cn.js +1 -1
  154. package/dist/translations/zh-cn.umd.js +5 -3
  155. package/dist/translations/zh.js +1 -1
  156. package/dist/translations/zh.umd.js +5 -3
  157. package/package.json +5 -5
package/LICENSE.md CHANGED
@@ -18,7 +18,7 @@ Where not otherwise indicated, all CKEditor 5 content is authored by CKSour
18
18
 
19
19
  The following libraries are included in CKEditor 5 under the [MIT license](https://opensource.org/licenses/MIT):
20
20
 
21
- * es-toolkit - Copyright (c) 2024 Viva Republica, Inc and Copyright OpenJS Foundation and other contributors.
21
+ * es-toolkit - Copyright (c) 2024 Viva Republica, Inc.
22
22
 
23
23
  Trademarks
24
24
  ----------
@@ -1,18 +1,18 @@
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 { Autosave, AutosaveConfig } from './index.js';
6
- declare module '@ckeditor/ckeditor5-core' {
7
- interface PluginsMap {
8
- [Autosave.pluginName]: Autosave;
9
- }
10
- interface EditorConfig {
11
- /**
12
- * The configuration of the {@link module:autosave/autosave~Autosave autosave feature}.
13
- *
14
- * Read more in {@link module:autosave/autosave~AutosaveConfig}.
15
- */
16
- autosave?: AutosaveConfig;
17
- }
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 { Autosave, AutosaveConfig } from "./index.js";
6
+ declare module "@ckeditor/ckeditor5-core" {
7
+ interface PluginsMap {
8
+ [Autosave.pluginName]: Autosave;
9
+ }
10
+ interface EditorConfig {
11
+ /**
12
+ * The configuration of the {@link module:autosave/autosave~Autosave autosave feature}.
13
+ *
14
+ * Read more in {@link module:autosave/autosave~AutosaveConfig}.
15
+ */
16
+ autosave?: AutosaveConfig;
17
+ }
18
18
  }
@@ -1,227 +1,227 @@
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 autosave/autosave
7
- */
8
- import { Plugin, PendingActions, type Editor } from '@ckeditor/ckeditor5-core';
6
+ * @module autosave/autosave
7
+ */
8
+ import { Plugin, PendingActions, type Editor, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
9
  /**
10
- * The {@link module:autosave/autosave~Autosave} plugin allows you to automatically save the data (e.g. send it to the server)
11
- * when needed (when the user changed the content).
12
- *
13
- * It listens to the {@link module:engine/model/document~ModelDocument#event:change:data `editor.model.document#change:data`}
14
- * and `window#beforeunload` events and calls the
15
- * {@link module:autosave/autosave~AutosaveAdapter#save `config.autosave.save()`} function.
16
- *
17
- * ```ts
18
- * ClassicEditor
19
- * .create( {
20
- * attachTo: document.querySelector( '#editor' ),
21
- * plugins: [ ArticlePluginSet, Autosave ],
22
- * toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ],
23
- * image: {
24
- * toolbar: [ 'imageStyle:block', 'imageStyle:side', '|', 'toggleImageCaption', 'imageTextAlternative' ],
25
- * },
26
- * autosave: {
27
- * save( editor: Editor ) {
28
- * // The saveData() function must return a promise
29
- * // which should be resolved when the data is successfully saved.
30
- * return saveData( editor.getData() );
31
- * }
32
- * }
33
- * } );
34
- * ```
35
- *
36
- * Read more about this feature in the {@glink features/autosave Autosave} feature guide.
37
- */
10
+ * The {@link module:autosave/autosave~Autosave} plugin allows you to automatically save the data (e.g. send it to the server)
11
+ * when needed (when the user changed the content).
12
+ *
13
+ * It listens to the {@link module:engine/model/document~ModelDocument#event:change:data `editor.model.document#change:data`}
14
+ * and `window#beforeunload` events and calls the
15
+ * {@link module:autosave/autosave~AutosaveAdapter#save `config.autosave.save()`} function.
16
+ *
17
+ * ```ts
18
+ * ClassicEditor
19
+ * .create( {
20
+ * attachTo: document.querySelector( '#editor' ),
21
+ * plugins: [ ArticlePluginSet, Autosave ],
22
+ * toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' ],
23
+ * image: {
24
+ * toolbar: [ 'imageStyle:block', 'imageStyle:side', '|', 'toggleImageCaption', 'imageTextAlternative' ],
25
+ * },
26
+ * autosave: {
27
+ * save( editor: Editor ) {
28
+ * // The saveData() function must return a promise
29
+ * // which should be resolved when the data is successfully saved.
30
+ * return saveData( editor.getData() );
31
+ * }
32
+ * }
33
+ * } );
34
+ * ```
35
+ *
36
+ * Read more about this feature in the {@glink features/autosave Autosave} feature guide.
37
+ */
38
38
  export declare class Autosave extends Plugin {
39
- /**
40
- * The adapter is an object with a `save()` method. That method will be called whenever
41
- * the data changes. It might be called some time after the change,
42
- * since the event is throttled for performance reasons.
43
- */
44
- adapter?: AutosaveAdapter;
45
- /**
46
- * The state of this plugin.
47
- *
48
- * The plugin can be in the following states:
49
- *
50
- * * synchronized – When all changes are saved.
51
- * * waiting – When the plugin is waiting for other changes before calling `adapter#save()` and `config.autosave.save()`.
52
- * * saving – When the provided save method is called and the plugin waits for the response.
53
- * * error &ndash When the provided save method will throw an error. This state immediately changes to the `saving` state and
54
- * the save method will be called again in the short period of time.
55
- *
56
- * @observable
57
- * @readonly
58
- */
59
- state: 'synchronized' | 'waiting' | 'saving' | 'error';
60
- /**
61
- * Debounced save method. The `save()` method is called the specified `waitingTime` after `debouncedSave()` is called,
62
- * unless a new action happens in the meantime.
63
- */
64
- private _debouncedSave;
65
- /**
66
- * The last saved document version.
67
- */
68
- private _lastDocumentVersion;
69
- /**
70
- * Promise used for asynchronous save calls.
71
- *
72
- * Created to handle the autosave call to an external data source. It resolves when that call is finished. It is re-used if
73
- * save is called before the promise has been resolved. It is set to `null` if there is no call in progress.
74
- */
75
- private _savePromise;
76
- /**
77
- * DOM emitter.
78
- */
79
- private _domEmitter;
80
- /**
81
- * The configuration of this plugins.
82
- */
83
- private _config;
84
- /**
85
- * Editor's pending actions manager.
86
- */
87
- private _pendingActions;
88
- /**
89
- * Informs whether there should be another autosave callback performed, immediately after current autosave callback finishes.
90
- *
91
- * This is set to `true` when there is a save request while autosave callback is already being processed
92
- * and the model has changed since the last save.
93
- */
94
- private _makeImmediateSave;
95
- /**
96
- * An action that will be added to the pending action manager for actions happening in that plugin.
97
- */
98
- private _action;
99
- /**
100
- * @inheritDoc
101
- */
102
- static get pluginName(): "Autosave";
103
- /**
104
- * @inheritDoc
105
- */
106
- static get isOfficialPlugin(): true;
107
- /**
108
- * @inheritDoc
109
- */
110
- static get requires(): readonly [typeof PendingActions];
111
- /**
112
- * @inheritDoc
113
- */
114
- constructor(editor: Editor);
115
- /**
116
- * @inheritDoc
117
- */
118
- init(): void;
119
- /**
120
- * @inheritDoc
121
- */
122
- destroy(): void;
123
- /**
124
- * Immediately calls autosave callback. All previously queued (debounced) callbacks are cleared. If there is already an autosave
125
- * callback in progress, then the requested save will be performed immediately after the current callback finishes.
126
- *
127
- * @returns A promise that will be resolved when the autosave callback is finished.
128
- */
129
- save(): Promise<void>;
130
- /**
131
- * Invokes the remaining `_save()` method call.
132
- */
133
- private _flush;
134
- /**
135
- * If the adapter is set and a new document version exists,
136
- * the `_save()` method creates a pending action and calls the `adapter.save()` method.
137
- * It waits for the result and then removes the created pending action.
138
- *
139
- * @returns A promise that will be resolved when the autosave callback is finished.
140
- */
141
- private _save;
142
- /**
143
- * Creates a pending action if it is not set already.
144
- */
145
- private _setPendingAction;
146
- /**
147
- * Saves callbacks.
148
- */
149
- private get _saveCallbacks();
39
+ /**
40
+ * The adapter is an object with a `save()` method. That method will be called whenever
41
+ * the data changes. It might be called some time after the change,
42
+ * since the event is throttled for performance reasons.
43
+ */
44
+ adapter?: AutosaveAdapter;
45
+ /**
46
+ * The state of this plugin.
47
+ *
48
+ * The plugin can be in the following states:
49
+ *
50
+ * * synchronized &ndash; When all changes are saved.
51
+ * * waiting &ndash; When the plugin is waiting for other changes before calling `adapter#save()` and `config.autosave.save()`.
52
+ * * saving &ndash; When the provided save method is called and the plugin waits for the response.
53
+ * * error &ndash When the provided save method will throw an error. This state immediately changes to the `saving` state and
54
+ * the save method will be called again in the short period of time.
55
+ *
56
+ * @observable
57
+ * @readonly
58
+ */
59
+ state: "synchronized" | "waiting" | "saving" | "error";
60
+ /**
61
+ * Debounced save method. The `save()` method is called the specified `waitingTime` after `debouncedSave()` is called,
62
+ * unless a new action happens in the meantime.
63
+ */
64
+ private _debouncedSave;
65
+ /**
66
+ * The last saved document version.
67
+ */
68
+ private _lastDocumentVersion;
69
+ /**
70
+ * Promise used for asynchronous save calls.
71
+ *
72
+ * Created to handle the autosave call to an external data source. It resolves when that call is finished. It is re-used if
73
+ * save is called before the promise has been resolved. It is set to `null` if there is no call in progress.
74
+ */
75
+ private _savePromise;
76
+ /**
77
+ * DOM emitter.
78
+ */
79
+ private _domEmitter;
80
+ /**
81
+ * The configuration of this plugins.
82
+ */
83
+ private _config;
84
+ /**
85
+ * Editor's pending actions manager.
86
+ */
87
+ private _pendingActions;
88
+ /**
89
+ * Informs whether there should be another autosave callback performed, immediately after current autosave callback finishes.
90
+ *
91
+ * This is set to `true` when there is a save request while autosave callback is already being processed
92
+ * and the model has changed since the last save.
93
+ */
94
+ private _makeImmediateSave;
95
+ /**
96
+ * An action that will be added to the pending action manager for actions happening in that plugin.
97
+ */
98
+ private _action;
99
+ /**
100
+ * @inheritDoc
101
+ */
102
+ static get pluginName(): "Autosave";
103
+ /**
104
+ * @inheritDoc
105
+ */
106
+ static override get isOfficialPlugin(): true;
107
+ /**
108
+ * @inheritDoc
109
+ */
110
+ static get requires(): PluginDependenciesOf<[PendingActions]>;
111
+ /**
112
+ * @inheritDoc
113
+ */
114
+ constructor(editor: Editor);
115
+ /**
116
+ * @inheritDoc
117
+ */
118
+ init(): void;
119
+ /**
120
+ * @inheritDoc
121
+ */
122
+ override destroy(): void;
123
+ /**
124
+ * Immediately calls autosave callback. All previously queued (debounced) callbacks are cleared. If there is already an autosave
125
+ * callback in progress, then the requested save will be performed immediately after the current callback finishes.
126
+ *
127
+ * @returns A promise that will be resolved when the autosave callback is finished.
128
+ */
129
+ save(): Promise<void>;
130
+ /**
131
+ * Invokes the remaining `_save()` method call.
132
+ */
133
+ private _flush;
134
+ /**
135
+ * If the adapter is set and a new document version exists,
136
+ * the `_save()` method creates a pending action and calls the `adapter.save()` method.
137
+ * It waits for the result and then removes the created pending action.
138
+ *
139
+ * @returns A promise that will be resolved when the autosave callback is finished.
140
+ */
141
+ private _save;
142
+ /**
143
+ * Creates a pending action if it is not set already.
144
+ */
145
+ private _setPendingAction;
146
+ /**
147
+ * Saves callbacks.
148
+ */
149
+ private get _saveCallbacks();
150
150
  }
151
151
  /**
152
- * An interface that requires the `save()` method.
153
- *
154
- * Used by {@link module:autosave/autosave~Autosave#adapter}.
155
- */
152
+ * An interface that requires the `save()` method.
153
+ *
154
+ * Used by {@link module:autosave/autosave~Autosave#adapter}.
155
+ */
156
156
  export interface AutosaveAdapter {
157
- /**
158
- * The method that will be called when the data changes. It should return a promise (e.g. in case of saving content to the database),
159
- * so the autosave plugin will wait for that action before removing it from pending actions.
160
- */
161
- save(editor: Editor): Promise<unknown>;
157
+ /**
158
+ * The method that will be called when the data changes. It should return a promise (e.g. in case of saving content to the database),
159
+ * so the autosave plugin will wait for that action before removing it from pending actions.
160
+ */
161
+ save(editor: Editor): Promise<unknown>;
162
162
  }
163
163
  /**
164
- * The configuration of the {@link module:autosave/autosave~Autosave autosave feature}.
165
- *
166
- * ```ts
167
- * ClassicEditor
168
- * .create( {
169
- * attachTo: editorElement,
170
- * autosave: {
171
- * save( editor: Editor ) {
172
- * // The saveData() function must return a promise
173
- * // which should be resolved when the data is successfully saved.
174
- * return saveData( editor.getData() );
175
- * }
176
- * }
177
- * } );
178
- * .then( ... )
179
- * .catch( ... );
180
- * ```
181
- *
182
- * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
183
- *
184
- * See also the demo of the {@glink features/autosave autosave feature}.
185
- */
164
+ * The configuration of the {@link module:autosave/autosave~Autosave autosave feature}.
165
+ *
166
+ * ```ts
167
+ * ClassicEditor
168
+ * .create( {
169
+ * attachTo: editorElement,
170
+ * autosave: {
171
+ * save( editor: Editor ) {
172
+ * // The saveData() function must return a promise
173
+ * // which should be resolved when the data is successfully saved.
174
+ * return saveData( editor.getData() );
175
+ * }
176
+ * }
177
+ * } );
178
+ * .then( ... )
179
+ * .catch( ... );
180
+ * ```
181
+ *
182
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
183
+ *
184
+ * See also the demo of the {@glink features/autosave autosave feature}.
185
+ */
186
186
  export interface AutosaveConfig {
187
- /**
188
- * The callback to be executed when the data needs to be saved.
189
- *
190
- * This function must return a promise which should be resolved when the data is successfully saved.
191
- *
192
- * ```ts
193
- * ClassicEditor
194
- * .create( {
195
- * attachTo: editorElement,
196
- * autosave: {
197
- * save( editor: Editor ) {
198
- * return saveData( editor.getData() );
199
- * }
200
- * }
201
- * } );
202
- * .then( ... )
203
- * .catch( ... );
204
- * ```
205
- */
206
- save?: (editor: Editor) => Promise<unknown>;
207
- /**
208
- * The minimum amount of time that needs to pass after the last action to call the provided callback.
209
- * By default it is 1000 ms.
210
- *
211
- * ```ts
212
- * ClassicEditor
213
- * .create( {
214
- * attachTo: editorElement,
215
- * autosave: {
216
- * save( editor: Editor ) {
217
- * return saveData( editor.getData() );
218
- * },
219
- * waitingTime: 2000
220
- * }
221
- * } );
222
- * .then( ... )
223
- * .catch( ... );
224
- * ```
225
- */
226
- waitingTime?: number;
187
+ /**
188
+ * The callback to be executed when the data needs to be saved.
189
+ *
190
+ * This function must return a promise which should be resolved when the data is successfully saved.
191
+ *
192
+ * ```ts
193
+ * ClassicEditor
194
+ * .create( {
195
+ * attachTo: editorElement,
196
+ * autosave: {
197
+ * save( editor: Editor ) {
198
+ * return saveData( editor.getData() );
199
+ * }
200
+ * }
201
+ * } );
202
+ * .then( ... )
203
+ * .catch( ... );
204
+ * ```
205
+ */
206
+ save?: (editor: Editor) => Promise<unknown>;
207
+ /**
208
+ * The minimum amount of time that needs to pass after the last action to call the provided callback.
209
+ * By default it is 1000 ms.
210
+ *
211
+ * ```ts
212
+ * ClassicEditor
213
+ * .create( {
214
+ * attachTo: editorElement,
215
+ * autosave: {
216
+ * save( editor: Editor ) {
217
+ * return saveData( editor.getData() );
218
+ * },
219
+ * waitingTime: 2000
220
+ * }
221
+ * } );
222
+ * .then( ... )
223
+ * .catch( ... );
224
+ * ```
225
+ */
226
+ waitingTime?: number;
227
227
  }
@@ -2,3 +2,6 @@
2
2
  * @license Copyright (c) 2003-2026, 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
+
6
+
7
+ /*# sourceMappingURL=index-content.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index-content.css"],"names":[],"mappings":";;;;;;AAEA,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"index-content.css.map","sourcesContent":["\n\n/*# sourceMappingURL=index-content.css.map */"]}
@@ -2,3 +2,6 @@
2
2
  * @license Copyright (c) 2003-2026, 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
+
6
+
7
+ /*# sourceMappingURL=index-editor.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index-editor.css"],"names":[],"mappings":";;;;;;AAEA,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"index-editor.css.map","sourcesContent":["\n\n/*# sourceMappingURL=index-editor.css.map */"]}
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
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 autosave
7
- */
8
- export { Autosave, type AutosaveConfig, type AutosaveAdapter } from './autosave.js';
9
- import './augmentation.js';
6
+ * @module autosave
7
+ */
8
+ export { Autosave, type AutosaveConfig, type AutosaveAdapter } from "./autosave.js";
9
+ import "./augmentation.js";