@vuer-ai/vuer-rtc 0.0.4 → 0.1.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/dist/crdt/RangeTree.d.ts +76 -0
- package/dist/crdt/RangeTree.d.ts.map +1 -0
- package/dist/crdt/RangeTree.js +231 -0
- package/dist/crdt/RangeTree.js.map +1 -0
- package/dist/crdt/Rope.d.ts +121 -0
- package/dist/crdt/Rope.d.ts.map +1 -0
- package/dist/crdt/Rope.js +485 -0
- package/dist/crdt/Rope.js.map +1 -0
- package/dist/crdt/StringCRDT.d.ts +151 -0
- package/dist/crdt/StringCRDT.d.ts.map +1 -0
- package/dist/crdt/StringCRDT.js +548 -0
- package/dist/crdt/StringCRDT.js.map +1 -0
- package/dist/crdt/index.d.ts +8 -0
- package/dist/crdt/index.d.ts.map +1 -0
- package/dist/crdt/index.js +8 -0
- package/dist/crdt/index.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/operations/OperationTypes.d.ts +49 -1
- package/dist/operations/OperationTypes.d.ts.map +1 -1
- package/dist/operations/apply/index.d.ts +1 -0
- package/dist/operations/apply/index.d.ts.map +1 -1
- package/dist/operations/apply/index.js +2 -0
- package/dist/operations/apply/index.js.map +1 -1
- package/dist/operations/apply/text.d.ts +26 -0
- package/dist/operations/apply/text.d.ts.map +1 -0
- package/dist/operations/apply/text.js +104 -0
- package/dist/operations/apply/text.js.map +1 -0
- package/dist/operations/dispatcher.d.ts +22 -4
- package/dist/operations/dispatcher.d.ts.map +1 -1
- package/dist/operations/dispatcher.js +65 -18
- package/dist/operations/dispatcher.js.map +1 -1
- package/dist/operations/index.d.ts +2 -1
- package/dist/operations/index.d.ts.map +1 -1
- package/dist/operations/index.js +4 -0
- package/dist/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/src/crdt/RangeTree.ts +313 -0
- package/src/crdt/Rope.ts +603 -0
- package/src/crdt/index.ts +41 -0
- package/src/index.ts +34 -0
- package/src/operations/OperationTypes.ts +51 -0
- package/src/operations/apply/index.ts +8 -0
- package/src/operations/apply/text.ts +149 -0
- package/src/operations/dispatcher.ts +103 -50
- package/src/operations/index.ts +10 -0
- package/tests/crdt/rope.test.ts +427 -0
- package/tests/crdt/text-operations.test.ts +314 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RangeTree - B-tree optimized for string CRDT operations
|
|
3
|
+
*
|
|
4
|
+
* This implements a B-tree where each internal node stores the total character
|
|
5
|
+
* count of its subtree. This allows O(log n) lookups by position.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Item ID type
|
|
9
|
+
*/
|
|
10
|
+
export interface ItemId {
|
|
11
|
+
agent: string;
|
|
12
|
+
seq: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Item stored in the tree
|
|
16
|
+
*/
|
|
17
|
+
export interface Item {
|
|
18
|
+
id: ItemId;
|
|
19
|
+
content: string;
|
|
20
|
+
isDeleted: boolean;
|
|
21
|
+
parentId: ItemId | null;
|
|
22
|
+
seq: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Leaf node - stores actual items
|
|
26
|
+
*/
|
|
27
|
+
export interface LeafNode {
|
|
28
|
+
type: 'leaf';
|
|
29
|
+
items: Item[];
|
|
30
|
+
charCount: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Internal node
|
|
34
|
+
*/
|
|
35
|
+
export interface InternalNode {
|
|
36
|
+
type: 'internal';
|
|
37
|
+
children: TreeNode[];
|
|
38
|
+
childCounts: number[];
|
|
39
|
+
charCount: number;
|
|
40
|
+
}
|
|
41
|
+
export type TreeNode = LeafNode | InternalNode;
|
|
42
|
+
/**
|
|
43
|
+
* Position lookup result
|
|
44
|
+
*/
|
|
45
|
+
export interface PositionResult {
|
|
46
|
+
leaf: LeafNode;
|
|
47
|
+
itemIndex: number;
|
|
48
|
+
offset: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* B-tree for efficient string operations
|
|
52
|
+
*/
|
|
53
|
+
export declare class RangeTree {
|
|
54
|
+
root: TreeNode;
|
|
55
|
+
private idMap;
|
|
56
|
+
constructor();
|
|
57
|
+
get length(): number;
|
|
58
|
+
get itemCount(): number;
|
|
59
|
+
private makeKey;
|
|
60
|
+
findByPosition(position: number): PositionResult | null;
|
|
61
|
+
findById(id: ItemId): Item | undefined;
|
|
62
|
+
insert(item: Item): void;
|
|
63
|
+
private insertIntoLeaf;
|
|
64
|
+
private splitLeaf;
|
|
65
|
+
private splitInternal;
|
|
66
|
+
private countChars;
|
|
67
|
+
private recalcCounts;
|
|
68
|
+
private updateCounts;
|
|
69
|
+
delete(id: ItemId): boolean;
|
|
70
|
+
private recalcAllCounts;
|
|
71
|
+
getContent(): string;
|
|
72
|
+
private collectContent;
|
|
73
|
+
items(): Generator<Item>;
|
|
74
|
+
private iterateItems;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=RangeTree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RangeTree.d.ts","sourceRoot":"","sources":["../../src/crdt/RangeTree.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;CACb;AAID;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,S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B-tree where each internal node stores the total character
|
|
5
|
+
* count of its subtree. This allows O(log n) lookups by position.
|
|
6
|
+
*/
|
|
7
|
+
const MAX_LEAF_SIZE = 32;
|
|
8
|
+
/**
|
|
9
|
+
* B-tree for efficient string operations
|
|
10
|
+
*/
|
|
11
|
+
export class RangeTree {
|
|
12
|
+
root;
|
|
13
|
+
idMap;
|
|
14
|
+
constructor() {
|
|
15
|
+
this.root = { type: 'leaf', items: [], charCount: 0 };
|
|
16
|
+
this.idMap = new Map();
|
|
17
|
+
}
|
|
18
|
+
get length() {
|
|
19
|
+
return this.root.charCount;
|
|
20
|
+
}
|
|
21
|
+
get itemCount() {
|
|
22
|
+
return this.idMap.size;
|
|
23
|
+
}
|
|
24
|
+
makeKey(id) {
|
|
25
|
+
return `${id.agent}:${id.seq}`;
|
|
26
|
+
}
|
|
27
|
+
findByPosition(position) {
|
|
28
|
+
if (position < 0 || position > this.root.charCount) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
let node = this.root;
|
|
32
|
+
let remainingPos = position;
|
|
33
|
+
while (node.type === 'internal') {
|
|
34
|
+
let childIndex = 0;
|
|
35
|
+
let accumulated = 0;
|
|
36
|
+
for (let i = 0; i < node.children.length; i++) {
|
|
37
|
+
const childCount = node.childCounts[i] - accumulated;
|
|
38
|
+
if (remainingPos < childCount || i === node.children.length - 1) {
|
|
39
|
+
childIndex = i;
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
remainingPos -= childCount;
|
|
43
|
+
accumulated = node.childCounts[i];
|
|
44
|
+
}
|
|
45
|
+
node = node.children[childIndex];
|
|
46
|
+
}
|
|
47
|
+
const leaf = node;
|
|
48
|
+
let pos = 0;
|
|
49
|
+
for (let i = 0; i < leaf.items.length; i++) {
|
|
50
|
+
const item = leaf.items[i];
|
|
51
|
+
if (!item.isDeleted) {
|
|
52
|
+
const itemLen = item.content.length;
|
|
53
|
+
if (pos + itemLen > remainingPos) {
|
|
54
|
+
return { leaf, itemIndex: i, offset: remainingPos - pos };
|
|
55
|
+
}
|
|
56
|
+
pos += itemLen;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
leaf,
|
|
61
|
+
itemIndex: leaf.items.length - 1,
|
|
62
|
+
offset: leaf.items.length > 0 ? leaf.items[leaf.items.length - 1].content.length : 0,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
findById(id) {
|
|
66
|
+
return this.idMap.get(this.makeKey(id));
|
|
67
|
+
}
|
|
68
|
+
insert(item) {
|
|
69
|
+
this.idMap.set(this.makeKey(item.id), item);
|
|
70
|
+
this.insertIntoLeaf(item);
|
|
71
|
+
}
|
|
72
|
+
insertIntoLeaf(item) {
|
|
73
|
+
let node = this.root;
|
|
74
|
+
const path = [];
|
|
75
|
+
while (node.type === 'internal') {
|
|
76
|
+
path.push(node);
|
|
77
|
+
node = node.children[node.children.length - 1];
|
|
78
|
+
}
|
|
79
|
+
const leaf = node;
|
|
80
|
+
leaf.items.push(item);
|
|
81
|
+
if (!item.isDeleted) {
|
|
82
|
+
leaf.charCount += item.content.length;
|
|
83
|
+
}
|
|
84
|
+
if (leaf.items.length > MAX_LEAF_SIZE) {
|
|
85
|
+
this.splitLeaf(path, leaf);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
this.updateCounts(path);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
splitLeaf(path, leaf) {
|
|
92
|
+
const mid = Math.floor(leaf.items.length / 2);
|
|
93
|
+
const leftItems = leaf.items.slice(0, mid);
|
|
94
|
+
const rightItems = leaf.items.slice(mid);
|
|
95
|
+
const leftCount = this.countChars(leftItems);
|
|
96
|
+
const rightCount = this.countChars(rightItems);
|
|
97
|
+
leaf.items = leftItems;
|
|
98
|
+
leaf.charCount = leftCount;
|
|
99
|
+
const rightLeaf = {
|
|
100
|
+
type: 'leaf',
|
|
101
|
+
items: rightItems,
|
|
102
|
+
charCount: rightCount,
|
|
103
|
+
};
|
|
104
|
+
if (path.length === 0) {
|
|
105
|
+
this.root = {
|
|
106
|
+
type: 'internal',
|
|
107
|
+
children: [leaf, rightLeaf],
|
|
108
|
+
childCounts: [leftCount, leftCount + rightCount],
|
|
109
|
+
charCount: leftCount + rightCount,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
const parent = path[path.length - 1];
|
|
114
|
+
const idx = parent.children.indexOf(leaf);
|
|
115
|
+
parent.children.splice(idx + 1, 0, rightLeaf);
|
|
116
|
+
this.recalcCounts(parent);
|
|
117
|
+
if (parent.children.length > MAX_LEAF_SIZE) {
|
|
118
|
+
this.splitInternal(path.slice(0, -1), parent);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
this.updateCounts(path.slice(0, -1));
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
splitInternal(path, node) {
|
|
126
|
+
const mid = Math.floor(node.children.length / 2);
|
|
127
|
+
const leftChildren = node.children.slice(0, mid);
|
|
128
|
+
const rightChildren = node.children.slice(mid);
|
|
129
|
+
node.children = leftChildren;
|
|
130
|
+
this.recalcCounts(node);
|
|
131
|
+
const rightNode = {
|
|
132
|
+
type: 'internal',
|
|
133
|
+
children: rightChildren,
|
|
134
|
+
childCounts: [],
|
|
135
|
+
charCount: 0,
|
|
136
|
+
};
|
|
137
|
+
this.recalcCounts(rightNode);
|
|
138
|
+
if (path.length === 0) {
|
|
139
|
+
this.root = {
|
|
140
|
+
type: 'internal',
|
|
141
|
+
children: [node, rightNode],
|
|
142
|
+
childCounts: [node.charCount, node.charCount + rightNode.charCount],
|
|
143
|
+
charCount: node.charCount + rightNode.charCount,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
const parent = path[path.length - 1];
|
|
148
|
+
const idx = parent.children.indexOf(node);
|
|
149
|
+
parent.children.splice(idx + 1, 0, rightNode);
|
|
150
|
+
this.recalcCounts(parent);
|
|
151
|
+
if (parent.children.length > MAX_LEAF_SIZE) {
|
|
152
|
+
this.splitInternal(path.slice(0, -1), parent);
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
this.updateCounts(path.slice(0, -1));
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
countChars(items) {
|
|
160
|
+
return items.reduce((sum, item) => sum + (item.isDeleted ? 0 : item.content.length), 0);
|
|
161
|
+
}
|
|
162
|
+
recalcCounts(node) {
|
|
163
|
+
let total = 0;
|
|
164
|
+
node.childCounts = [];
|
|
165
|
+
for (const child of node.children) {
|
|
166
|
+
total += child.charCount;
|
|
167
|
+
node.childCounts.push(total);
|
|
168
|
+
}
|
|
169
|
+
node.charCount = total;
|
|
170
|
+
}
|
|
171
|
+
updateCounts(path) {
|
|
172
|
+
for (let i = path.length - 1; i >= 0; i--) {
|
|
173
|
+
this.recalcCounts(path[i]);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
delete(id) {
|
|
177
|
+
const item = this.findById(id);
|
|
178
|
+
if (!item || item.isDeleted)
|
|
179
|
+
return false;
|
|
180
|
+
item.isDeleted = true;
|
|
181
|
+
this.recalcAllCounts(this.root);
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
recalcAllCounts(node) {
|
|
185
|
+
if (node.type === 'leaf') {
|
|
186
|
+
node.charCount = this.countChars(node.items);
|
|
187
|
+
return node.charCount;
|
|
188
|
+
}
|
|
189
|
+
let total = 0;
|
|
190
|
+
node.childCounts = [];
|
|
191
|
+
for (const child of node.children) {
|
|
192
|
+
total += this.recalcAllCounts(child);
|
|
193
|
+
node.childCounts.push(total);
|
|
194
|
+
}
|
|
195
|
+
node.charCount = total;
|
|
196
|
+
return total;
|
|
197
|
+
}
|
|
198
|
+
getContent() {
|
|
199
|
+
const parts = [];
|
|
200
|
+
this.collectContent(this.root, parts);
|
|
201
|
+
return parts.join('');
|
|
202
|
+
}
|
|
203
|
+
collectContent(node, parts) {
|
|
204
|
+
if (node.type === 'leaf') {
|
|
205
|
+
for (const item of node.items) {
|
|
206
|
+
if (!item.isDeleted) {
|
|
207
|
+
parts.push(item.content);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
for (const child of node.children) {
|
|
213
|
+
this.collectContent(child, parts);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
*items() {
|
|
218
|
+
yield* this.iterateItems(this.root);
|
|
219
|
+
}
|
|
220
|
+
*iterateItems(node) {
|
|
221
|
+
if (node.type === 'leaf') {
|
|
222
|
+
yield* node.items;
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
for (const child of node.children) {
|
|
226
|
+
yield* this.iterateItems(child);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
//# sourceMappingURL=RangeTree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RangeTree.js","sourceRoot":"","sources":["../../src/crdt/RangeTree.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAqBH,MAAM,aAAa,GAAG,EAAE,CAAC;AAgCzB;;GAEG;AACH,MAAM,OAAO,SAAS;IACpB,IAAI,CAAW;IACP,KAAK,CAAoB;IAEjC;QACE,IAAI,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;QACtD,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;IACzB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;IAC7B,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;IAEO,OAAO,CAAC,EAAU;QACxB,OAAO,GAAG,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,EAAE,C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CAAC;QACpB,CAAC;aAAM,CAAC;YACN,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClC,KAAK,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;YAClC,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TextRope - High-performance text CRDT based on RGA/YATA
|
|
3
|
+
*
|
|
4
|
+
* A plain object container for text CRDT state.
|
|
5
|
+
* Uses flat list representation with the YATA ordering algorithm.
|
|
6
|
+
* All operations are uniform - no local/remote distinction.
|
|
7
|
+
*/
|
|
8
|
+
export interface ItemId {
|
|
9
|
+
agent: string;
|
|
10
|
+
seq: number;
|
|
11
|
+
}
|
|
12
|
+
export interface Item {
|
|
13
|
+
id: ItemId;
|
|
14
|
+
content: string;
|
|
15
|
+
isDeleted: boolean;
|
|
16
|
+
parentId: ItemId | null;
|
|
17
|
+
seq: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* TextRope - Plain object container for text CRDT state
|
|
21
|
+
*/
|
|
22
|
+
export interface TextRope {
|
|
23
|
+
items: Item[];
|
|
24
|
+
agentId: string;
|
|
25
|
+
clock: number;
|
|
26
|
+
maxSeq: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Insert operation
|
|
30
|
+
*/
|
|
31
|
+
export interface InsertOp {
|
|
32
|
+
id: ItemId;
|
|
33
|
+
content: string;
|
|
34
|
+
parentId: ItemId | null;
|
|
35
|
+
seq: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Delete operation
|
|
39
|
+
*/
|
|
40
|
+
export interface DeleteOp {
|
|
41
|
+
ids: ItemId[];
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Move operation - delete + insert
|
|
45
|
+
*/
|
|
46
|
+
export interface MoveOp {
|
|
47
|
+
delete: DeleteOp;
|
|
48
|
+
insert: InsertOp;
|
|
49
|
+
}
|
|
50
|
+
export declare function itemIdEquals(a: ItemId | null, b: ItemId | null): boolean;
|
|
51
|
+
export declare function itemIdCompare(a: ItemId, b: ItemId): number;
|
|
52
|
+
export declare function create(agentId: string): TextRope;
|
|
53
|
+
export declare function getText(rope: TextRope): string;
|
|
54
|
+
export declare function getLength(rope: TextRope): number;
|
|
55
|
+
export declare function findItemById(rope: TextRope, id: ItemId | null): number;
|
|
56
|
+
export declare function getStats(rope: TextRope): {
|
|
57
|
+
itemCount: number;
|
|
58
|
+
charCount: number;
|
|
59
|
+
deletedCount: number;
|
|
60
|
+
avgSpanLength: number;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Insert text at position
|
|
64
|
+
*/
|
|
65
|
+
export declare function insert(rope: TextRope, position: number, content: string): InsertOp;
|
|
66
|
+
/**
|
|
67
|
+
* Insert with span splitting support
|
|
68
|
+
*/
|
|
69
|
+
export declare function insertWithSplit(rope: TextRope, position: number, content: string): InsertOp;
|
|
70
|
+
/**
|
|
71
|
+
* Apply an insert operation
|
|
72
|
+
*/
|
|
73
|
+
export declare function apply(rope: TextRope, op: InsertOp): void;
|
|
74
|
+
/**
|
|
75
|
+
* Delete text at position
|
|
76
|
+
*/
|
|
77
|
+
export declare function remove(rope: TextRope, position: number, length: number): DeleteOp;
|
|
78
|
+
/**
|
|
79
|
+
* Apply a delete operation
|
|
80
|
+
*/
|
|
81
|
+
export declare function applyDelete(rope: TextRope, op: DeleteOp): void;
|
|
82
|
+
/**
|
|
83
|
+
* Move text from one position to another
|
|
84
|
+
*/
|
|
85
|
+
export declare function move(rope: TextRope, fromPosition: number, length: number, toPosition: number): MoveOp;
|
|
86
|
+
/**
|
|
87
|
+
* Apply a move operation
|
|
88
|
+
*/
|
|
89
|
+
export declare function applyMove(rope: TextRope, op: MoveOp): void;
|
|
90
|
+
/**
|
|
91
|
+
* Merge another rope into this one
|
|
92
|
+
*/
|
|
93
|
+
export declare function merge(rope: TextRope, other: TextRope): void;
|
|
94
|
+
/**
|
|
95
|
+
* Create a snapshot (full state)
|
|
96
|
+
*/
|
|
97
|
+
export declare function snapshot(rope: TextRope): TextRope;
|
|
98
|
+
/**
|
|
99
|
+
* Create a compacted snapshot (removes tombstones, keeps only visible text)
|
|
100
|
+
* Use this for storage/transfer when you don't need undo history
|
|
101
|
+
*/
|
|
102
|
+
export declare function compact(rope: TextRope): TextRope;
|
|
103
|
+
/**
|
|
104
|
+
* Raw snapshot format - minimal data for storage
|
|
105
|
+
* Format: [agentId, clock, maxSeq, [[agent, seq, content, parentAgent, parentSeq], ...]]
|
|
106
|
+
*/
|
|
107
|
+
export type RawTextRope = [string, number, number, Array<[string, number, string, string | null, number | null]>];
|
|
108
|
+
/**
|
|
109
|
+
* Convert to raw format for minimal storage
|
|
110
|
+
* Only stores visible items (no tombstones)
|
|
111
|
+
*/
|
|
112
|
+
export declare function toRaw(rope: TextRope): RawTextRope;
|
|
113
|
+
/**
|
|
114
|
+
* Restore from raw format
|
|
115
|
+
*/
|
|
116
|
+
export declare function fromRaw(raw: RawTextRope, newAgentId?: string): TextRope;
|
|
117
|
+
/**
|
|
118
|
+
* Restore from a snapshot
|
|
119
|
+
*/
|
|
120
|
+
export declare function fromSnapshot(snap: TextRope, newAgentId?: string): TextRope;
|
|
121
|
+
//# sourceMappingURL=Rope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Rope.d.ts","sourceRoot":"","sources":["../../src/crdt/Rope.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,GAAG,EAAE,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