@createiq/htmldiff 1.2.0-beta.0 → 1.2.0-beta.2

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.
@@ -99,6 +99,16 @@ declare class HtmlDiff {
99
99
  private newText;
100
100
  private oldText;
101
101
  private tablePreprocessDepth;
102
+ /**
103
+ * Tracks currently-open formatting-tag wraps. Each entry pairs the
104
+ * opening tag (so a later closing tag can find its match) with the
105
+ * styling info needed to RE-OPEN the wrap if an overlapping
106
+ * formatting-tag close forces it to split. Without the styling info,
107
+ * an overlap like `<strong>X</strong>` ↔ `<u>X</u>` produces an
108
+ * unclosable wrap (the closing tag for the outer wrap arrives while
109
+ * an inner wrap is still on the stack); see `insertTag`'s closing
110
+ * handler for the split logic.
111
+ */
102
112
  private specialTagDiffStack;
103
113
  private newWords;
104
114
  private oldWords;
@@ -208,7 +218,26 @@ declare class HtmlDiff {
208
218
  * pairs would project on their own. Pass an explicit boolean to
209
219
  * override.
210
220
  */
211
- static executeThreeWay(v1: string, v2: string, v3: string, options?: ThreeWayOptions): string;
221
+ /**
222
+ * Three-way HTML diff against a shared genesis. Produces attributed
223
+ * HTML that distinguishes CP's accumulated changes (genesis → cpLatest)
224
+ * from Me's accumulated changes (genesis → meCurrent). Use this for
225
+ * blackline UX where the negotiation has gone through multiple turns
226
+ * and the reader wants to see "who proposed what" across the whole
227
+ * history, not just the most recent round.
228
+ *
229
+ * When both parties happen to have made the same change (e.g. CP
230
+ * proposed a wording change in turn N, Me adopted it in turn N+1),
231
+ * the change reads as "settled" and is emitted unmarked — only
232
+ * disagreements and pending proposals carry author attribution.
233
+ *
234
+ * @param genesis the shared common ancestor (per-user — the FE
235
+ * picks between V1.0 and /preview/initialAnswers
236
+ * based on `prefillReceiverAnswers`)
237
+ * @param cpLatest the counterparty's current published version
238
+ * @param meCurrent Me's current draft (the document on screen)
239
+ */
240
+ static executeThreeWay(genesis: string, cpLatest: string, meCurrent: string, options?: ThreeWayOptions): string;
212
241
  private static executeThreeWayWithDepth;
213
242
  /**
214
243
  * Drives a fresh `HtmlDiff` instance through `insertTag` for ins/del
@@ -99,6 +99,16 @@ declare class HtmlDiff {
99
99
  private newText;
100
100
  private oldText;
101
101
  private tablePreprocessDepth;
102
+ /**
103
+ * Tracks currently-open formatting-tag wraps. Each entry pairs the
104
+ * opening tag (so a later closing tag can find its match) with the
105
+ * styling info needed to RE-OPEN the wrap if an overlapping
106
+ * formatting-tag close forces it to split. Without the styling info,
107
+ * an overlap like `<strong>X</strong>` ↔ `<u>X</u>` produces an
108
+ * unclosable wrap (the closing tag for the outer wrap arrives while
109
+ * an inner wrap is still on the stack); see `insertTag`'s closing
110
+ * handler for the split logic.
111
+ */
102
112
  private specialTagDiffStack;
103
113
  private newWords;
104
114
  private oldWords;
@@ -208,7 +218,26 @@ declare class HtmlDiff {
208
218
  * pairs would project on their own. Pass an explicit boolean to
209
219
  * override.
210
220
  */
211
- static executeThreeWay(v1: string, v2: string, v3: string, options?: ThreeWayOptions): string;
221
+ /**
222
+ * Three-way HTML diff against a shared genesis. Produces attributed
223
+ * HTML that distinguishes CP's accumulated changes (genesis → cpLatest)
224
+ * from Me's accumulated changes (genesis → meCurrent). Use this for
225
+ * blackline UX where the negotiation has gone through multiple turns
226
+ * and the reader wants to see "who proposed what" across the whole
227
+ * history, not just the most recent round.
228
+ *
229
+ * When both parties happen to have made the same change (e.g. CP
230
+ * proposed a wording change in turn N, Me adopted it in turn N+1),
231
+ * the change reads as "settled" and is emitted unmarked — only
232
+ * disagreements and pending proposals carry author attribution.
233
+ *
234
+ * @param genesis the shared common ancestor (per-user — the FE
235
+ * picks between V1.0 and /preview/initialAnswers
236
+ * based on `prefillReceiverAnswers`)
237
+ * @param cpLatest the counterparty's current published version
238
+ * @param meCurrent Me's current draft (the document on screen)
239
+ */
240
+ static executeThreeWay(genesis: string, cpLatest: string, meCurrent: string, options?: ThreeWayOptions): string;
212
241
  private static executeThreeWayWithDepth;
213
242
  /**
214
243
  * Drives a fresh `HtmlDiff` instance through `insertTag` for ins/del