@wildwinter/toolkit 0.2.0 → 0.2.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.
@@ -49,7 +49,52 @@
49
49
  "base": { "k": { "a": 1 } }, "ours": { "k": { "a": 2 } }, "theirs": { "k": { "a": 1, "b": 1 } },
50
50
  "merged": { "k": { "a": 2, "b": 1 } }, "conflicts": [] },
51
51
  { "name": "a value whose shape no longer fits its strategy merges as one value", "strategy": { "kind": "map", "of": { "kind": "atomic" } },
52
- "base": { "a": 1 }, "ours": "gone", "theirs": { "a": 2 }, "merged": "gone", "conflicts": [{ "path": "", "kind": "both-changed" }] }
52
+ "base": { "a": 1 }, "ours": "gone", "theirs": { "a": 2 }, "merged": "gone", "conflicts": [{ "path": "", "kind": "both-changed" }] },
53
+ { "name": "comments: two replies to one thread both land, in time order", "strategy": { "kind": "comments" },
54
+ "base": [{ "id": "t1", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }] }],
55
+ "ours": [{ "id": "t1", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }, { "author": "Bo", "ts": "2026-01-01T12:00", "body": "Pacing." }] }],
56
+ "theirs": [{ "id": "t1", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }, { "author": "Cy", "ts": "2026-01-01T11:00", "body": "Ask Bo." }] }],
57
+ "merged": [{ "id": "t1", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }, { "author": "Cy", "ts": "2026-01-01T11:00", "body": "Ask Bo." }, { "author": "Bo", "ts": "2026-01-01T12:00", "body": "Pacing." }] }],
58
+ "conflicts": [] },
59
+ { "name": "comments: a message withdrawn on one side stays withdrawn", "strategy": { "kind": "comments" },
60
+ "base": [{ "id": "t1", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }, { "author": "Bo", "ts": "2026-01-01T11:00", "body": "Oops" }] }],
61
+ "ours": [{ "id": "t1", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }, { "author": "Bo", "ts": "2026-01-01T11:00", "body": "", "deleted": true }] }],
62
+ "theirs": [{ "id": "t1", "anchor": "c1", "resolved": true, "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }, { "author": "Bo", "ts": "2026-01-01T11:00", "body": "Oops" }] }],
63
+ "merged": [{ "id": "t1", "anchor": "c1", "resolved": true, "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }, { "author": "Bo", "ts": "2026-01-01T11:00", "body": "", "deleted": true }] }],
64
+ "conflicts": [] },
65
+ { "name": "comments: a message one side removed outright is withdrawn, not brought back", "strategy": { "kind": "comments" },
66
+ "base": [{ "id": "t1", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }, { "author": "Bo", "ts": "2026-01-01T11:00", "body": "Oops" }] }],
67
+ "ours": [{ "id": "t1", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }] }],
68
+ "theirs": [{ "id": "t1", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }, { "author": "Bo", "ts": "2026-01-01T11:00", "body": "Oops" }] }],
69
+ "merged": [{ "id": "t1", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }, { "author": "Bo", "ts": "2026-01-01T11:00", "body": "", "deleted": true }] }],
70
+ "conflicts": [] },
71
+ { "name": "comments: a thread one side removed goes, unless the other side replied", "strategy": { "kind": "comments" },
72
+ "base": [{ "id": "t1", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }] },
73
+ { "id": "t2", "anchor": "c2", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:30", "body": "Typo" }] }],
74
+ "ours": [],
75
+ "theirs": [{ "id": "t1", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }, { "author": "Bo", "ts": "2026-01-01T12:00", "body": "Pacing." }] },
76
+ { "id": "t2", "anchor": "c2", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:30", "body": "Typo" }] }],
77
+ "merged": [{ "id": "t1", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "", "deleted": true }, { "author": "Bo", "ts": "2026-01-01T12:00", "body": "Pacing." }] }],
78
+ "conflicts": [] },
79
+ { "name": "comments: one message edited two ways clashes and keeps ours", "strategy": { "kind": "comments" },
80
+ "base": [{ "id": "t1", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }] }],
81
+ "ours": [{ "id": "t1", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why this?" }] }],
82
+ "theirs": [{ "id": "t1", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why that?" }] }],
83
+ "merged": [{ "id": "t1", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why this?" }] }],
84
+ "conflicts": [{ "path": "[t1].messages[Ann|2026-01-01T10:00]", "kind": "both-changed" }] },
85
+ { "name": "comments: a thread's own fields merge one by one, a marker moved two ways clashes", "strategy": { "kind": "comments" },
86
+ "base": [{ "id": "t1", "anchor": "c1", "mark": { "canvas": "d1", "x": 0, "y": 0 }, "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }] }],
87
+ "ours": [{ "id": "t1", "anchor": "c1", "mark": { "canvas": "d1", "x": 5, "y": 0 }, "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }] }],
88
+ "theirs": [{ "id": "t1", "anchor": "c1", "resolved": true, "mark": { "canvas": "d1", "x": 9, "y": 9 }, "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }] }],
89
+ "merged": [{ "id": "t1", "anchor": "c1", "resolved": true, "mark": { "canvas": "d1", "x": 5, "y": 0 }, "messages": [{ "author": "Ann", "ts": "2026-01-01T10:00", "body": "Why?" }] }],
90
+ "conflicts": [{ "path": "[t1].mark", "kind": "both-changed" }] },
91
+ { "name": "comments: threads come back oldest first, whatever their ids", "strategy": { "kind": "comments" },
92
+ "base": [],
93
+ "ours": [{ "id": "zz", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T09:00", "body": "First" }] }],
94
+ "theirs": [{ "id": "aa", "anchor": "c2", "messages": [{ "author": "Bo", "ts": "2026-01-02T09:00", "body": "Second" }] }],
95
+ "merged": [{ "id": "zz", "anchor": "c1", "messages": [{ "author": "Ann", "ts": "2026-01-01T09:00", "body": "First" }] },
96
+ { "id": "aa", "anchor": "c2", "messages": [{ "author": "Bo", "ts": "2026-01-02T09:00", "body": "Second" }] }],
97
+ "conflicts": [] }
53
98
  ],
54
99
  "manifest": {
55
100
  "schema": "wildwinter/extension@0", "id": "probe", "name": "Probe", "version": "1.0.0",