@createiq/htmldiff 1.2.0-beta.0 → 1.2.0-beta.1
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/README.md +46 -19
- package/dist/HtmlDiff.cjs +381 -407
- package/dist/HtmlDiff.cjs.map +1 -1
- package/dist/HtmlDiff.d.cts +20 -1
- package/dist/HtmlDiff.d.mts +20 -1
- package/dist/HtmlDiff.mjs +381 -407
- package/dist/HtmlDiff.mjs.map +1 -1
- package/package.json +1 -1
- package/src/HtmlDiff.ts +49 -29
- package/src/ThreeWayDiff.ts +173 -127
- package/src/ThreeWayTable.ts +408 -484
- package/test/HtmlDiff.threeWay.spec.ts +107 -109
- package/test/HtmlDiff.threeWay.tables.spec.ts +88 -194
package/dist/HtmlDiff.d.cts
CHANGED
|
@@ -208,7 +208,26 @@ declare class HtmlDiff {
|
|
|
208
208
|
* pairs would project on their own. Pass an explicit boolean to
|
|
209
209
|
* override.
|
|
210
210
|
*/
|
|
211
|
-
|
|
211
|
+
/**
|
|
212
|
+
* Three-way HTML diff against a shared genesis. Produces attributed
|
|
213
|
+
* HTML that distinguishes CP's accumulated changes (genesis → cpLatest)
|
|
214
|
+
* from Me's accumulated changes (genesis → meCurrent). Use this for
|
|
215
|
+
* blackline UX where the negotiation has gone through multiple turns
|
|
216
|
+
* and the reader wants to see "who proposed what" across the whole
|
|
217
|
+
* history, not just the most recent round.
|
|
218
|
+
*
|
|
219
|
+
* When both parties happen to have made the same change (e.g. CP
|
|
220
|
+
* proposed a wording change in turn N, Me adopted it in turn N+1),
|
|
221
|
+
* the change reads as "settled" and is emitted unmarked — only
|
|
222
|
+
* disagreements and pending proposals carry author attribution.
|
|
223
|
+
*
|
|
224
|
+
* @param genesis the shared common ancestor (per-user — the FE
|
|
225
|
+
* picks between V1.0 and /preview/initialAnswers
|
|
226
|
+
* based on `prefillReceiverAnswers`)
|
|
227
|
+
* @param cpLatest the counterparty's current published version
|
|
228
|
+
* @param meCurrent Me's current draft (the document on screen)
|
|
229
|
+
*/
|
|
230
|
+
static executeThreeWay(genesis: string, cpLatest: string, meCurrent: string, options?: ThreeWayOptions): string;
|
|
212
231
|
private static executeThreeWayWithDepth;
|
|
213
232
|
/**
|
|
214
233
|
* Drives a fresh `HtmlDiff` instance through `insertTag` for ins/del
|
package/dist/HtmlDiff.d.mts
CHANGED
|
@@ -208,7 +208,26 @@ declare class HtmlDiff {
|
|
|
208
208
|
* pairs would project on their own. Pass an explicit boolean to
|
|
209
209
|
* override.
|
|
210
210
|
*/
|
|
211
|
-
|
|
211
|
+
/**
|
|
212
|
+
* Three-way HTML diff against a shared genesis. Produces attributed
|
|
213
|
+
* HTML that distinguishes CP's accumulated changes (genesis → cpLatest)
|
|
214
|
+
* from Me's accumulated changes (genesis → meCurrent). Use this for
|
|
215
|
+
* blackline UX where the negotiation has gone through multiple turns
|
|
216
|
+
* and the reader wants to see "who proposed what" across the whole
|
|
217
|
+
* history, not just the most recent round.
|
|
218
|
+
*
|
|
219
|
+
* When both parties happen to have made the same change (e.g. CP
|
|
220
|
+
* proposed a wording change in turn N, Me adopted it in turn N+1),
|
|
221
|
+
* the change reads as "settled" and is emitted unmarked — only
|
|
222
|
+
* disagreements and pending proposals carry author attribution.
|
|
223
|
+
*
|
|
224
|
+
* @param genesis the shared common ancestor (per-user — the FE
|
|
225
|
+
* picks between V1.0 and /preview/initialAnswers
|
|
226
|
+
* based on `prefillReceiverAnswers`)
|
|
227
|
+
* @param cpLatest the counterparty's current published version
|
|
228
|
+
* @param meCurrent Me's current draft (the document on screen)
|
|
229
|
+
*/
|
|
230
|
+
static executeThreeWay(genesis: string, cpLatest: string, meCurrent: string, options?: ThreeWayOptions): string;
|
|
212
231
|
private static executeThreeWayWithDepth;
|
|
213
232
|
/**
|
|
214
233
|
* Drives a fresh `HtmlDiff` instance through `insertTag` for ins/del
|