@adeu/core 1.9.0 → 1.10.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/index.cjs +615 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -2
- package/dist/index.d.ts +15 -2
- package/dist/index.js +615 -102
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/comments.ts +33 -14
- package/src/consistency.test.ts +62 -4
- package/src/diff.ts +42 -6
- package/src/docx/dom.ts +2 -2
- package/src/engine.bugs.test.ts +38 -0
- package/src/engine.feedback.test.ts +144 -0
- package/src/engine.issue23.test.ts +511 -0
- package/src/engine.ts +513 -64
- package/src/sanitize/core.ts +1 -0
- package/src/sanitize/sanitize.test.ts +48 -6
- package/src/sanitize/transforms.ts +88 -1
package/dist/index.d.cts
CHANGED
|
@@ -180,6 +180,8 @@ declare class RedlineEngine {
|
|
|
180
180
|
clean_mapper: DocumentMapper | null;
|
|
181
181
|
skipped_details: string[];
|
|
182
182
|
constructor(doc: DocumentObject, author?: string);
|
|
183
|
+
private _check_punctuation_warning;
|
|
184
|
+
private _build_edit_context_previews;
|
|
183
185
|
private _scan_existing_ids;
|
|
184
186
|
accept_all_revisions(): void;
|
|
185
187
|
private _getNextId;
|
|
@@ -198,7 +200,8 @@ declare class RedlineEngine {
|
|
|
198
200
|
* and the comment is open from start_element through end_element.
|
|
199
201
|
* Ported from Python `RedlineEngine._attach_comment_spanning`.
|
|
200
202
|
*/
|
|
201
|
-
private _attach_comment_spanning;
|
|
203
|
+
private _attach_comment_spanning;
|
|
204
|
+
/**
|
|
202
205
|
* Inserts `text` as one or more tracked paragraphs anchored relative to
|
|
203
206
|
* either an existing run or a paragraph. Returns:
|
|
204
207
|
* { first_node, last_p, last_ins, used_block_mode }
|
|
@@ -261,10 +264,20 @@ declare class RedlineEngine {
|
|
|
261
264
|
private _delete_comments_in_element;
|
|
262
265
|
validate_edits(edits: any[]): string[];
|
|
263
266
|
validate_review_actions(actions: any[]): string[];
|
|
264
|
-
process_batch(changes: DocumentChange[]): any;
|
|
267
|
+
process_batch(changes: DocumentChange[], dry_run?: boolean): any;
|
|
268
|
+
private _process_batch_internal;
|
|
265
269
|
apply_edits(edits: any[]): [number, number];
|
|
266
270
|
apply_review_actions(actions: any[]): [number, number];
|
|
267
271
|
private _apply_table_edit;
|
|
272
|
+
/**
|
|
273
|
+
* Returns the first match of `target_text` in the raw mapper that is NOT
|
|
274
|
+
* entirely contained within a tracked deletion (<w:del>). Tracked-deleted
|
|
275
|
+
* copies are not live, editable text, so an edit must resolve to a live
|
|
276
|
+
* occurrence even when a dead copy appears earlier in the document
|
|
277
|
+
* (BUG-23-5). Falls back to the plain first match when no live copy is
|
|
278
|
+
* found (e.g. fuzzy/normalized matches the span filter cannot align).
|
|
279
|
+
*/
|
|
280
|
+
private _first_live_match;
|
|
268
281
|
private _pre_resolve_heuristic_edit;
|
|
269
282
|
private _apply_single_edit_indexed;
|
|
270
283
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -180,6 +180,8 @@ declare class RedlineEngine {
|
|
|
180
180
|
clean_mapper: DocumentMapper | null;
|
|
181
181
|
skipped_details: string[];
|
|
182
182
|
constructor(doc: DocumentObject, author?: string);
|
|
183
|
+
private _check_punctuation_warning;
|
|
184
|
+
private _build_edit_context_previews;
|
|
183
185
|
private _scan_existing_ids;
|
|
184
186
|
accept_all_revisions(): void;
|
|
185
187
|
private _getNextId;
|
|
@@ -198,7 +200,8 @@ declare class RedlineEngine {
|
|
|
198
200
|
* and the comment is open from start_element through end_element.
|
|
199
201
|
* Ported from Python `RedlineEngine._attach_comment_spanning`.
|
|
200
202
|
*/
|
|
201
|
-
private _attach_comment_spanning;
|
|
203
|
+
private _attach_comment_spanning;
|
|
204
|
+
/**
|
|
202
205
|
* Inserts `text` as one or more tracked paragraphs anchored relative to
|
|
203
206
|
* either an existing run or a paragraph. Returns:
|
|
204
207
|
* { first_node, last_p, last_ins, used_block_mode }
|
|
@@ -261,10 +264,20 @@ declare class RedlineEngine {
|
|
|
261
264
|
private _delete_comments_in_element;
|
|
262
265
|
validate_edits(edits: any[]): string[];
|
|
263
266
|
validate_review_actions(actions: any[]): string[];
|
|
264
|
-
process_batch(changes: DocumentChange[]): any;
|
|
267
|
+
process_batch(changes: DocumentChange[], dry_run?: boolean): any;
|
|
268
|
+
private _process_batch_internal;
|
|
265
269
|
apply_edits(edits: any[]): [number, number];
|
|
266
270
|
apply_review_actions(actions: any[]): [number, number];
|
|
267
271
|
private _apply_table_edit;
|
|
272
|
+
/**
|
|
273
|
+
* Returns the first match of `target_text` in the raw mapper that is NOT
|
|
274
|
+
* entirely contained within a tracked deletion (<w:del>). Tracked-deleted
|
|
275
|
+
* copies are not live, editable text, so an edit must resolve to a live
|
|
276
|
+
* occurrence even when a dead copy appears earlier in the document
|
|
277
|
+
* (BUG-23-5). Falls back to the plain first match when no live copy is
|
|
278
|
+
* found (e.g. fuzzy/normalized matches the span filter cannot align).
|
|
279
|
+
*/
|
|
280
|
+
private _first_live_match;
|
|
268
281
|
private _pre_resolve_heuristic_edit;
|
|
269
282
|
private _apply_single_edit_indexed;
|
|
270
283
|
}
|