loro-crdt 1.4.6 → 1.5.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/CHANGELOG.md +162 -0
- package/base64/index.d.ts +52 -2
- package/base64/index.js +3959 -3643
- package/base64/loro_wasm.d.ts +2133 -2209
- package/base64/loro_wasm_bg-c5907423.js +64 -0
- package/bundler/index.d.ts +52 -2
- package/bundler/index.js +92 -3
- package/bundler/index.js.map +1 -1
- package/bundler/loro_wasm.d.ts +2133 -2209
- package/bundler/loro_wasm_bg.js +3818 -3592
- package/bundler/loro_wasm_bg.wasm +0 -0
- package/bundler/loro_wasm_bg.wasm.d.ts +312 -292
- package/nodejs/index.d.ts +52 -2
- package/nodejs/index.js +92 -1
- package/nodejs/index.js.map +1 -1
- package/nodejs/loro_wasm.d.ts +2133 -2209
- package/nodejs/loro_wasm.js +3784 -3555
- package/nodejs/loro_wasm_bg.wasm +0 -0
- package/nodejs/loro_wasm_bg.wasm.d.ts +312 -292
- package/package.json +1 -1
- package/web/index.d.ts +52 -2
- package/web/index.js +92 -3
- package/web/index.js.map +1 -1
- package/web/loro_wasm.d.ts +2184 -2240
- package/web/loro_wasm.js +3791 -3550
- package/web/loro_wasm_bg.wasm +0 -0
- package/web/loro_wasm_bg.wasm.d.ts +312 -292
- package/base64/loro_wasm_bg-6f5ef18d.js +0 -64
package/package.json
CHANGED
package/web/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./loro_wasm";
|
|
2
2
|
export type * from "./loro_wasm";
|
|
3
|
-
import { AwarenessWasm, PeerID, Container, ContainerID, ContainerType, LoroCounter, LoroDoc, LoroList, LoroMap, LoroText, LoroTree, OpId, Value, AwarenessListener } from "./loro_wasm";
|
|
3
|
+
import { AwarenessWasm, EphemeralStoreWasm, PeerID, Container, ContainerID, ContainerType, LoroCounter, LoroDoc, LoroList, LoroMap, LoroText, LoroTree, OpId, Value, AwarenessListener, EphemeralListener, EphemeralLocalListener } from "./loro_wasm";
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated Please use LoroDoc
|
|
6
6
|
*/
|
|
@@ -46,10 +46,12 @@ export declare function getType<T>(value: T): T extends LoroText ? "Text" : T ex
|
|
|
46
46
|
export declare function newContainerID(id: OpId, type: ContainerType): ContainerID;
|
|
47
47
|
export declare function newRootContainerID(name: string, type: ContainerType): ContainerID;
|
|
48
48
|
/**
|
|
49
|
+
* @deprecated Please use `EphemeralStore` instead.
|
|
50
|
+
*
|
|
49
51
|
* Awareness is a structure that allows to track the ephemeral state of the peers.
|
|
50
52
|
*
|
|
51
53
|
* If we don't receive a state update from a peer within the timeout, we will remove their state.
|
|
52
|
-
* The timeout is in milliseconds. This can be used to handle the
|
|
54
|
+
* The timeout is in milliseconds. This can be used to handle the offline state of a peer.
|
|
53
55
|
*/
|
|
54
56
|
export declare class Awareness<T extends Value = Value> {
|
|
55
57
|
inner: AwarenessWasm<T>;
|
|
@@ -70,3 +72,51 @@ export declare class Awareness<T extends Value = Value> {
|
|
|
70
72
|
destroy(): void;
|
|
71
73
|
private startTimerIfNotEmpty;
|
|
72
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* EphemeralStore is a structure that allows to track the ephemeral state of the peers.
|
|
77
|
+
*
|
|
78
|
+
* It can be used to synchronize cursor positions, selections, and the names of the peers.
|
|
79
|
+
* Each entry uses timestamp-based LWW (Last-Write-Wins) for conflict resolution.
|
|
80
|
+
*
|
|
81
|
+
* If we don't receive a state update from a peer within the timeout, we will remove their state.
|
|
82
|
+
* The timeout is in milliseconds. This can be used to handle the offline state of a peer.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
*
|
|
86
|
+
* ```ts
|
|
87
|
+
* const store = new EphemeralStore();
|
|
88
|
+
* const store2 = new EphemeralStore();
|
|
89
|
+
* // Subscribe to local updates
|
|
90
|
+
* store.subscribeLocalUpdates((data)=>{
|
|
91
|
+
* store2.apply(data);
|
|
92
|
+
* })
|
|
93
|
+
* // Subscribe to all updates
|
|
94
|
+
* store2.subscribe((event)=>{
|
|
95
|
+
* console.log("event: ", event);
|
|
96
|
+
* })
|
|
97
|
+
* // Set a value
|
|
98
|
+
* store.set("key", "value");
|
|
99
|
+
* // Encode the value
|
|
100
|
+
* const encoded = store.encode("key");
|
|
101
|
+
* // Apply the encoded value
|
|
102
|
+
* store2.apply(encoded);
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
export declare class EphemeralStore<T extends Value = Value> {
|
|
106
|
+
inner: EphemeralStoreWasm<T>;
|
|
107
|
+
private timer;
|
|
108
|
+
private timeout;
|
|
109
|
+
constructor(timeout?: number);
|
|
110
|
+
apply(bytes: Uint8Array): void;
|
|
111
|
+
set(key: string, value: T): void;
|
|
112
|
+
get(key: string): T | undefined;
|
|
113
|
+
getAllStates(): Record<string, T>;
|
|
114
|
+
encode(key: string): Uint8Array;
|
|
115
|
+
encodeAll(): Uint8Array;
|
|
116
|
+
keys(): string[];
|
|
117
|
+
destroy(): void;
|
|
118
|
+
subscribe(listener: EphemeralListener): () => void;
|
|
119
|
+
subscribeLocalUpdates(listener: EphemeralLocalListener): () => void;
|
|
120
|
+
private startTimerIfNotEmpty;
|
|
121
|
+
}
|
|
122
|
+
export declare function idStrToId(idStr: `${number}@${PeerID}`): OpId;
|
package/web/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default } from "./loro_wasm.js";
|
|
2
|
-
import { LoroDoc, AwarenessWasm } from "./loro_wasm.js";
|
|
2
|
+
import { LoroDoc, AwarenessWasm, EphemeralStoreWasm } from "./loro_wasm.js";
|
|
3
3
|
export * from "./loro_wasm.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -75,10 +75,12 @@ function newRootContainerID(name, type) {
|
|
|
75
75
|
return `cid:root-${name}:${type}`;
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
+
* @deprecated Please use `EphemeralStore` instead.
|
|
79
|
+
*
|
|
78
80
|
* Awareness is a structure that allows to track the ephemeral state of the peers.
|
|
79
81
|
*
|
|
80
82
|
* If we don't receive a state update from a peer within the timeout, we will remove their state.
|
|
81
|
-
* The timeout is in milliseconds. This can be used to handle the
|
|
83
|
+
* The timeout is in milliseconds. This can be used to handle the offline state of a peer.
|
|
82
84
|
*/
|
|
83
85
|
class Awareness {
|
|
84
86
|
constructor(peer, timeout = 30000) {
|
|
@@ -152,6 +154,86 @@ class Awareness {
|
|
|
152
154
|
}, this.timeout / 2);
|
|
153
155
|
}
|
|
154
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* EphemeralStore is a structure that allows to track the ephemeral state of the peers.
|
|
159
|
+
*
|
|
160
|
+
* It can be used to synchronize cursor positions, selections, and the names of the peers.
|
|
161
|
+
* Each entry uses timestamp-based LWW (Last-Write-Wins) for conflict resolution.
|
|
162
|
+
*
|
|
163
|
+
* If we don't receive a state update from a peer within the timeout, we will remove their state.
|
|
164
|
+
* The timeout is in milliseconds. This can be used to handle the offline state of a peer.
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
*
|
|
168
|
+
* ```ts
|
|
169
|
+
* const store = new EphemeralStore();
|
|
170
|
+
* const store2 = new EphemeralStore();
|
|
171
|
+
* // Subscribe to local updates
|
|
172
|
+
* store.subscribeLocalUpdates((data)=>{
|
|
173
|
+
* store2.apply(data);
|
|
174
|
+
* })
|
|
175
|
+
* // Subscribe to all updates
|
|
176
|
+
* store2.subscribe((event)=>{
|
|
177
|
+
* console.log("event: ", event);
|
|
178
|
+
* })
|
|
179
|
+
* // Set a value
|
|
180
|
+
* store.set("key", "value");
|
|
181
|
+
* // Encode the value
|
|
182
|
+
* const encoded = store.encode("key");
|
|
183
|
+
* // Apply the encoded value
|
|
184
|
+
* store2.apply(encoded);
|
|
185
|
+
* ```
|
|
186
|
+
*/
|
|
187
|
+
class EphemeralStore {
|
|
188
|
+
constructor(timeout = 30000) {
|
|
189
|
+
this.inner = new EphemeralStoreWasm(timeout);
|
|
190
|
+
this.timeout = timeout;
|
|
191
|
+
}
|
|
192
|
+
apply(bytes) {
|
|
193
|
+
this.inner.apply(bytes);
|
|
194
|
+
this.startTimerIfNotEmpty();
|
|
195
|
+
}
|
|
196
|
+
set(key, value) {
|
|
197
|
+
this.inner.set(key, value);
|
|
198
|
+
this.startTimerIfNotEmpty();
|
|
199
|
+
}
|
|
200
|
+
get(key) {
|
|
201
|
+
return this.inner.get(key);
|
|
202
|
+
}
|
|
203
|
+
getAllStates() {
|
|
204
|
+
return this.inner.getAllStates();
|
|
205
|
+
}
|
|
206
|
+
encode(key) {
|
|
207
|
+
return this.inner.encode(key);
|
|
208
|
+
}
|
|
209
|
+
encodeAll() {
|
|
210
|
+
return this.inner.encodeAll();
|
|
211
|
+
}
|
|
212
|
+
keys() {
|
|
213
|
+
return this.inner.keys();
|
|
214
|
+
}
|
|
215
|
+
destroy() {
|
|
216
|
+
clearInterval(this.timer);
|
|
217
|
+
}
|
|
218
|
+
subscribe(listener) {
|
|
219
|
+
return this.inner.subscribe(listener);
|
|
220
|
+
}
|
|
221
|
+
subscribeLocalUpdates(listener) {
|
|
222
|
+
return this.inner.subscribeLocalUpdates(listener);
|
|
223
|
+
}
|
|
224
|
+
startTimerIfNotEmpty() {
|
|
225
|
+
if (this.inner.isEmpty() || this.timer != null) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
this.timer = setInterval(() => {
|
|
229
|
+
this.inner.removeOutdated();
|
|
230
|
+
if (this.inner.isEmpty()) {
|
|
231
|
+
clearInterval(this.timer);
|
|
232
|
+
this.timer = undefined;
|
|
233
|
+
}
|
|
234
|
+
}, this.timeout / 2);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
155
237
|
LoroDoc.prototype.toJsonWithReplacer = function (replacer) {
|
|
156
238
|
const processed = new Set();
|
|
157
239
|
const doc = this;
|
|
@@ -207,6 +289,13 @@ LoroDoc.prototype.toJsonWithReplacer = function (replacer) {
|
|
|
207
289
|
const layer = doc.getShallowValue();
|
|
208
290
|
return run(layer);
|
|
209
291
|
};
|
|
292
|
+
function idStrToId(idStr) {
|
|
293
|
+
const [counter, peer] = idStr.split("@");
|
|
294
|
+
return {
|
|
295
|
+
counter: parseInt(counter),
|
|
296
|
+
peer: peer,
|
|
297
|
+
};
|
|
298
|
+
}
|
|
210
299
|
|
|
211
|
-
export { Awareness, Loro, getType, isContainer, isContainerId, newContainerID, newRootContainerID };
|
|
300
|
+
export { Awareness, EphemeralStore, Loro, getType, idStrToId, isContainer, isContainerId, newContainerID, newRootContainerID };
|
|
212
301
|
//# sourceMappingURL=index.js.map
|
package/web/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAsBA;;AAEG;AACG,MAAO,IAAK,SAAQ,OAAO,CAAA;AAAI,CAAA;AAErC,MAAM,eAAe,GAAG;IACpB,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,aAAa;IACb,SAAS;CACZ,CAAC;AAEI,SAAU,aAAa,CAAC,CAAS,EAAA;AACnC,IAAA,OAAO,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC;AAED;;;;;;;;;;;;;;;;AAgBG;AACG,SAAU,WAAW,CAAC,KAAU,EAAA;IAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,IAAI,IAAI,EAAE;AAC5C,QAAA,OAAO,KAAK,CAAC;KAChB;IAED,MAAM,CAAC,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AACvC,IAAA,IAAI,CAAC,IAAI,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,UAAU,EAAE;AACvE,QAAA,OAAO,KAAK,CAAC;KAChB;IAED,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