@ckeditor/ckeditor5-ai 48.5.0-alpha.6 → 48.5.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/dist/aisdk/documentcompare.d.ts +5 -5
- package/dist/index.js +19 -19
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +30 -30
|
@@ -24,10 +24,10 @@ import { type DocumentCompareSnapshot } from "./documentsnapshot.js";
|
|
|
24
24
|
* and applies granular changes:
|
|
25
25
|
*
|
|
26
26
|
* ```ts
|
|
27
|
-
* await documentCompare.process( async
|
|
27
|
+
* await documentCompare.process( async snapshot => callMyService( snapshot.content ) );
|
|
28
28
|
*
|
|
29
29
|
* // Or, to apply changes as suggestions:
|
|
30
|
-
* await documentCompare.process( async
|
|
30
|
+
* await documentCompare.process( async snapshot => callMyService( snapshot.content ), { asSuggestions: true } );
|
|
31
31
|
* ```
|
|
32
32
|
*
|
|
33
33
|
* Some integrations need to process the data in separate steps (e.g. backend processing, or when changes
|
|
@@ -104,7 +104,7 @@ export declare class DocumentCompare extends Plugin {
|
|
|
104
104
|
* external processing (e.g. an AI service), then diffs returned data and applies granular changes to the document.
|
|
105
105
|
*
|
|
106
106
|
* If diffing or applying fails, the underlying error is rethrown and can be further handled,
|
|
107
|
-
* unless `options.
|
|
107
|
+
* unless `options.overwriteOnError` is set, in which case the current document is instead
|
|
108
108
|
* fully replaced with the processed data, the same way as if `editor.setData()` was used.
|
|
109
109
|
* In this case, changes that happened to the document after the snapshot was taken will be overwritten.
|
|
110
110
|
*
|
|
@@ -113,7 +113,7 @@ export declare class DocumentCompare extends Plugin {
|
|
|
113
113
|
* @returns `true` when the process finished successfully and changes were applied granularly,
|
|
114
114
|
* `false` when the full-replacement fallback was used.
|
|
115
115
|
*/
|
|
116
|
-
process(callback: (snapshot: DocumentCompareSnapshot) => Promise<Record<string, string>>, options?: DocumentCompareProcessOptions): Promise<boolean>;
|
|
116
|
+
process(callback: (snapshot: DocumentCompareSnapshot) => Promise<string | Record<string, string>>, options?: DocumentCompareProcessOptions): Promise<boolean>;
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
119
119
|
* Describes how a comparison is computed and, once recorded on a {@link ~DocumentComparePatch patch}, how it is applied.
|
|
@@ -139,7 +139,7 @@ export interface DocumentCompareProcessOptions extends DocumentCompareDiffOption
|
|
|
139
139
|
* Note, that the overwrite is also performed in real-time collaboration environment, and it may roll back some edits made by remote
|
|
140
140
|
* users while `callback` was processing. Opt in only when overwriting the whole document is acceptable.
|
|
141
141
|
*/
|
|
142
|
-
|
|
142
|
+
overwriteOnError?: boolean;
|
|
143
143
|
}
|
|
144
144
|
/**
|
|
145
145
|
* The result of comparing a snapshot against processed data: the operations to bring the document to the new state,
|