@pluv/crdt-loro 3.2.1 → 4.0.0

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/index.mjs CHANGED
@@ -1,366 +1,319 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __typeError = (msg) => {
8
- throw TypeError(msg);
9
- };
10
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
- var __spreadValues = (a, b) => {
12
- for (var prop in b || (b = {}))
13
- if (__hasOwnProp.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- if (__getOwnPropSymbols)
16
- for (var prop of __getOwnPropSymbols(b)) {
17
- if (__propIsEnum.call(b, prop))
18
- __defNormalProp(a, prop, b[prop]);
19
- }
20
- return a;
21
- };
22
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
- var __export = (target, all) => {
24
- for (var name in all)
25
- __defProp(target, name, { get: all[name], enumerable: true });
26
- };
27
- var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
28
- var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
29
- var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
30
- var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
31
- var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
32
-
33
- // src/loro.ts
34
- var loro_exports = {};
35
- __export(loro_exports, {
36
- CrdtLoroDoc: () => CrdtLoroDoc,
37
- counter: () => counter,
38
- doc: () => doc,
39
- kind: () => kind,
40
- list: () => list,
41
- map: () => map,
42
- movableList: () => movableList,
43
- object: () => object,
44
- text: () => text,
45
- tree: () => tree
46
- });
1
+ import { t as __exportAll } from "./chunk-15K8U1wQ.mjs";
2
+ import { LoroCounter, LoroDoc, LoroList, LoroMap, LoroMovableList, LoroText, LoroTree, UndoManager, isContainer } from "loro-crdt";
3
+ import { fromUint8Array, toUint8Array } from "js-base64";
4
+ import { AbstractCrdtDocFactory } from "@pluv/crdt";
47
5
 
48
- // src/counter.ts
49
- import { LoroCounter } from "loro-crdt";
50
- var counter = () => {
51
- const counter2 = new LoroCounter();
52
- return counter2;
6
+ //#region src/counter.ts
7
+ const counter = () => {
8
+ return new LoroCounter();
53
9
  };
54
10
 
55
- // src/doc/CrdtLoroDoc.ts
56
- import { fromUint8Array, toUint8Array } from "js-base64";
57
- import {
58
- LoroCounter as LoroCounter2,
59
- LoroDoc,
60
- LoroList,
61
- LoroMap,
62
- LoroMovableList,
63
- LoroText,
64
- LoroTree,
65
- UndoManager
66
- } from "loro-crdt";
67
-
68
- // src/doc/builder.ts
69
- import { isContainer } from "loro-crdt";
70
- var builder = (doc2) => {
71
- return {
72
- counter(name) {
73
- return doc2.getCounter(name);
74
- },
75
- list(name, value = []) {
76
- const list2 = doc2.getList(name);
77
- value.forEach((item, i) => {
78
- if (isContainer(item)) list2.insertContainer(i, item);
79
- else list2.insert(i, item);
80
- });
81
- return list2;
82
- },
83
- map(name, value = {}) {
84
- const container = doc2.getMap(name);
85
- Object.entries(value).forEach(([key, item]) => {
86
- if (isContainer(item)) container.setContainer(key, item);
87
- else container.set(key, item);
88
- });
89
- return container;
90
- },
91
- moveableList(name, value = []) {
92
- const list2 = doc2.getMovableList(name);
93
- value.forEach((item, i) => {
94
- if (isContainer(item)) list2.insertContainer(i, item);
95
- else list2.insert(i, item);
96
- });
97
- return list2;
98
- },
99
- text(name, value = "") {
100
- const text2 = doc2.getText(name);
101
- text2.insert(0, value);
102
- return text2;
103
- },
104
- tree(name) {
105
- return doc2.getTree(name);
106
- }
107
- };
11
+ //#endregion
12
+ //#region src/doc/builder.ts
13
+ const builder = (doc$1) => {
14
+ return {
15
+ counter(name) {
16
+ return doc$1.getCounter(name);
17
+ },
18
+ list(name, value = []) {
19
+ const list$1 = doc$1.getList(name);
20
+ value.forEach((item, i) => {
21
+ if (isContainer(item)) list$1.insertContainer(i, item);
22
+ else list$1.insert(i, item);
23
+ });
24
+ return list$1;
25
+ },
26
+ map(name, value = {}) {
27
+ const container = doc$1.getMap(name);
28
+ Object.entries(value).forEach(([key, item]) => {
29
+ if (isContainer(item)) container.setContainer(key, item);
30
+ else container.set(key, item);
31
+ });
32
+ return container;
33
+ },
34
+ moveableList(name, value = []) {
35
+ const list$1 = doc$1.getMovableList(name);
36
+ value.forEach((item, i) => {
37
+ if (isContainer(item)) list$1.insertContainer(i, item);
38
+ else list$1.insert(i, item);
39
+ });
40
+ return list$1;
41
+ },
42
+ text(name, value = "") {
43
+ const text$1 = doc$1.getText(name);
44
+ text$1.insert(0, value);
45
+ return text$1;
46
+ },
47
+ tree(name) {
48
+ return doc$1.getTree(name);
49
+ }
50
+ };
108
51
  };
109
52
 
110
- // src/doc/CrdtLoroDoc.ts
111
- var MAX_UNDO_STEPS = 100;
112
- var MERGE_INTERVAL_MS = 1e3;
113
- var PLUV_ID_FIELD = "__$pluv";
114
- var __storage, __undoManager, _CrdtLoroDoc_instances, _setPluvId_fn;
53
+ //#endregion
54
+ //#region src/doc/CrdtLoroDoc.ts
55
+ const MAX_UNDO_STEPS = 100;
56
+ const MERGE_INTERVAL_MS = 1e3;
57
+ const PLUV_ID_FIELD = "__$pluv";
115
58
  var CrdtLoroDoc = class {
116
- constructor(params = () => ({})) {
117
- __privateAdd(this, _CrdtLoroDoc_instances);
118
- this.value = new LoroDoc();
119
- __privateAdd(this, __storage);
120
- __privateAdd(this, __undoManager, null);
121
- const storage = params(builder(this.value));
122
- const keys = Object.keys(this.value.toJSON()).reduce(
123
- (set, key) => set.add(key),
124
- /* @__PURE__ */ new Set()
125
- );
126
- __privateSet(this, __storage, Object.entries(storage).reduce(
127
- (acc, [key, node]) => keys.has(key) ? __spreadProps(__spreadValues({}, acc), { [key]: node }) : acc,
128
- {}
129
- ));
130
- if (!!Object.keys(storage).length) __privateMethod(this, _CrdtLoroDoc_instances, _setPluvId_fn).call(this);
131
- this.value.commit();
132
- }
133
- applyEncodedState(params) {
134
- const update = typeof params.update === "string" ? toUint8Array(params.update) : params.update;
135
- if (!update) return this;
136
- this.value.import(update);
137
- return this;
138
- }
139
- batchApplyEncodedState(params) {
140
- var _a, _b;
141
- const updates = (_a = params.updates) != null ? _a : [];
142
- const filtered = updates.reduce((acc, update) => {
143
- if (!update) return acc;
144
- if (typeof update === "string") {
145
- acc.push(toUint8Array(update));
146
- return acc;
147
- }
148
- if (typeof update === "object") {
149
- acc.push(update);
150
- return acc;
151
- }
152
- return acc;
153
- }, []);
154
- if (!filtered.length) return this;
155
- if (filtered.length === 1) {
156
- const update = (_b = filtered[0]) != null ? _b : null;
157
- if (!!update) this.value.import(update);
158
- return this;
159
- }
160
- this.value.importBatch(filtered);
161
- return this;
162
- }
163
- canRedo() {
164
- if (!__privateGet(this, __undoManager)) return false;
165
- return __privateGet(this, __undoManager).canRedo();
166
- }
167
- canUndo() {
168
- if (!__privateGet(this, __undoManager)) return false;
169
- return __privateGet(this, __undoManager).canUndo();
170
- }
171
- destroy() {
172
- return;
173
- }
174
- get(key) {
175
- if (typeof key === "undefined") return __privateGet(this, __storage);
176
- return __privateGet(this, __storage)[key];
177
- }
178
- getEncodedState() {
179
- return fromUint8Array(this.value.export({ mode: "snapshot" }));
180
- }
181
- toJson(type) {
182
- if (typeof type === "string") {
183
- const container = __privateGet(this, __storage)[type];
184
- return container instanceof LoroText ? container.toString() : container instanceof LoroCounter2 ? container.value : container.toJSON();
185
- }
186
- return Object.entries(__privateGet(this, __storage)).reduce(
187
- (acc, [key, value]) => __spreadProps(__spreadValues({}, acc), {
188
- [key]: value instanceof LoroText ? value.toString() : value.toJSON()
189
- }),
190
- {}
191
- );
192
- }
193
- isEmpty() {
194
- const serialized = this.value.toJSON();
195
- return !serialized || !Object.keys(serialized).length;
196
- }
197
- rebuildStorage(reference) {
198
- const isBuilt = !!Object.keys(__privateGet(this, __storage)).length;
199
- if (isBuilt) {
200
- console.warn("Attempted to rebuild storage multiple times");
201
- return this;
202
- }
203
- __privateSet(this, __storage, Object.entries(reference).reduce((acc, [key, node]) => {
204
- if (node instanceof LoroCounter2) return __spreadProps(__spreadValues({}, acc), { [key]: this.value.getCounter(key) });
205
- if (node instanceof LoroList) return __spreadProps(__spreadValues({}, acc), { [key]: this.value.getList(key) });
206
- if (node instanceof LoroMap) return __spreadProps(__spreadValues({}, acc), { [key]: this.value.getMap(key) });
207
- if (node instanceof LoroMovableList) {
208
- return __spreadProps(__spreadValues({}, acc), { [key]: this.value.getMovableList(key) });
209
- }
210
- if (node instanceof LoroText) return __spreadProps(__spreadValues({}, acc), { [key]: this.value.getText(key) });
211
- if (node instanceof LoroTree) return __spreadProps(__spreadValues({}, acc), { [key]: this.value.getTree(key) });
212
- return acc;
213
- }, {}));
214
- return this.track();
215
- }
216
- redo() {
217
- var _a;
218
- (_a = __privateGet(this, __undoManager)) == null ? void 0 : _a.redo();
219
- return this;
220
- }
221
- subscribe(listener) {
222
- const fn = (event) => {
223
- const update = fromUint8Array(this.value.export({ mode: "update" }));
224
- listener({
225
- doc: this,
226
- local: event.by === "local",
227
- origin: event.origin ? String(event.origin) : null,
228
- update
229
- });
230
- };
231
- const unsubcribeAll = Object.values(__privateGet(this, __storage)).reduce(
232
- (acc, crdtType) => {
233
- const container = crdtType;
234
- const unsubscribe = container.subscribe(fn);
235
- return () => {
236
- acc();
237
- unsubscribe();
238
- };
239
- },
240
- () => void 0
241
- );
242
- return unsubcribeAll;
243
- }
244
- track() {
245
- if (__privateGet(this, __undoManager)) {
246
- __privateGet(this, __undoManager).clear();
247
- __privateGet(this, __undoManager).free();
248
- __privateSet(this, __undoManager, null);
249
- }
250
- __privateSet(this, __undoManager, new UndoManager(this.value, {
251
- maxUndoSteps: MAX_UNDO_STEPS,
252
- mergeInterval: MERGE_INTERVAL_MS
253
- }));
254
- return this;
255
- }
256
- /**
257
- * @description Unlike Yjs, this method is required to be called after each loro operation.
258
- * @date January 12, 2025
259
- */
260
- transact(fn) {
261
- fn();
262
- this.value.commit();
263
- return this;
264
- }
265
- undo() {
266
- var _a;
267
- (_a = __privateGet(this, __undoManager)) == null ? void 0 : _a.undo();
268
- return this;
269
- }
270
- };
271
- __storage = new WeakMap();
272
- __undoManager = new WeakMap();
273
- _CrdtLoroDoc_instances = new WeakSet();
274
- _setPluvId_fn = function() {
275
- const text2 = this.value.getText(PLUV_ID_FIELD);
276
- const id = typeof crypto !== "undefined" ? crypto.randomUUID() : Math.random().toString();
277
- text2.insert(0, id);
59
+ value = new LoroDoc();
60
+ #_storage;
61
+ #_undoManager = null;
62
+ constructor(params = () => ({})) {
63
+ const storage = params(builder(this.value));
64
+ const keys = Object.keys(this.value.toJSON()).reduce((set, key) => set.add(key), /* @__PURE__ */ new Set());
65
+ this.#_storage = Object.entries(storage).reduce((acc, [key, node]) => keys.has(key) ? {
66
+ ...acc,
67
+ [key]: node
68
+ } : acc, {});
69
+ if (!!Object.keys(storage).length) this.#_setPluvId();
70
+ this.value.commit();
71
+ }
72
+ applyEncodedState(params) {
73
+ const update = typeof params.update === "string" ? toUint8Array(params.update) : params.update;
74
+ if (!update) return this;
75
+ this.value.import(update);
76
+ return this;
77
+ }
78
+ batchApplyEncodedState(params) {
79
+ const filtered = (params.updates ?? []).reduce((acc, update) => {
80
+ if (!update) return acc;
81
+ if (typeof update === "string") {
82
+ acc.push(toUint8Array(update));
83
+ return acc;
84
+ }
85
+ if (typeof update === "object") {
86
+ acc.push(update);
87
+ return acc;
88
+ }
89
+ return acc;
90
+ }, []);
91
+ if (!filtered.length) return this;
92
+ if (filtered.length === 1) {
93
+ const update = filtered[0] ?? null;
94
+ if (!!update) this.value.import(update);
95
+ return this;
96
+ }
97
+ this.value.importBatch(filtered);
98
+ return this;
99
+ }
100
+ canRedo() {
101
+ if (!this.#_undoManager) return false;
102
+ return this.#_undoManager.canRedo();
103
+ }
104
+ canUndo() {
105
+ if (!this.#_undoManager) return false;
106
+ return this.#_undoManager.canUndo();
107
+ }
108
+ destroy() {}
109
+ get(key) {
110
+ if (typeof key === "undefined") return this.#_storage;
111
+ return this.#_storage[key];
112
+ }
113
+ getEncodedState() {
114
+ return fromUint8Array(this.value.export({ mode: "snapshot" }));
115
+ }
116
+ toJson(type) {
117
+ if (typeof type === "string") {
118
+ const container = this.#_storage[type];
119
+ return container instanceof LoroText ? container.toString() : container instanceof LoroCounter ? container.value : container.toJSON();
120
+ }
121
+ return Object.entries(this.#_storage).reduce((acc, [key, value]) => ({
122
+ ...acc,
123
+ [key]: value instanceof LoroText ? value.toString() : value.toJSON()
124
+ }), {});
125
+ }
126
+ isEmpty() {
127
+ const serialized = this.value.toJSON();
128
+ return !serialized || !Object.keys(serialized).length;
129
+ }
130
+ rebuildStorage(reference) {
131
+ if (!!Object.keys(this.#_storage).length) {
132
+ console.warn("Attempted to rebuild storage multiple times");
133
+ return this;
134
+ }
135
+ this.#_storage = Object.entries(reference).reduce((acc, [key, node]) => {
136
+ if (node instanceof LoroCounter) return {
137
+ ...acc,
138
+ [key]: this.value.getCounter(key)
139
+ };
140
+ if (node instanceof LoroList) return {
141
+ ...acc,
142
+ [key]: this.value.getList(key)
143
+ };
144
+ if (node instanceof LoroMap) return {
145
+ ...acc,
146
+ [key]: this.value.getMap(key)
147
+ };
148
+ if (node instanceof LoroMovableList) return {
149
+ ...acc,
150
+ [key]: this.value.getMovableList(key)
151
+ };
152
+ if (node instanceof LoroText) return {
153
+ ...acc,
154
+ [key]: this.value.getText(key)
155
+ };
156
+ if (node instanceof LoroTree) return {
157
+ ...acc,
158
+ [key]: this.value.getTree(key)
159
+ };
160
+ return acc;
161
+ }, {});
162
+ return this.track();
163
+ }
164
+ redo() {
165
+ this.#_undoManager?.redo();
166
+ return this;
167
+ }
168
+ subscribe(listener) {
169
+ const fn = (event) => {
170
+ const update = fromUint8Array(this.value.export({ mode: "update" }));
171
+ listener({
172
+ doc: this,
173
+ local: event.by === "local",
174
+ origin: event.origin ? String(event.origin) : null,
175
+ update
176
+ });
177
+ };
178
+ return Object.values(this.#_storage).reduce((acc, crdtType) => {
179
+ const unsubscribe = crdtType.subscribe(fn);
180
+ return () => {
181
+ acc();
182
+ unsubscribe();
183
+ };
184
+ }, () => void 0);
185
+ }
186
+ track() {
187
+ if (this.#_undoManager) {
188
+ this.#_undoManager.clear();
189
+ this.#_undoManager.free();
190
+ this.#_undoManager = null;
191
+ }
192
+ this.#_undoManager = new UndoManager(this.value, {
193
+ maxUndoSteps: MAX_UNDO_STEPS,
194
+ mergeInterval: MERGE_INTERVAL_MS
195
+ });
196
+ return this;
197
+ }
198
+ /**
199
+ * @description Unlike Yjs, this method is required to be called after each loro operation.
200
+ * @date January 12, 2025
201
+ */
202
+ transact(fn) {
203
+ fn();
204
+ this.value.commit();
205
+ return this;
206
+ }
207
+ undo() {
208
+ this.#_undoManager?.undo();
209
+ return this;
210
+ }
211
+ #_setPluvId() {
212
+ const text$1 = this.value.getText(PLUV_ID_FIELD);
213
+ const id = typeof crypto !== "undefined" ? crypto.randomUUID() : Math.random().toString();
214
+ text$1.insert(0, id);
215
+ }
278
216
  };
279
217
 
280
- // src/doc/CrdtLoroDocFactory.ts
281
- import { AbstractCrdtDocFactory } from "@pluv/crdt";
282
- var CrdtLoroDocFactory = class _CrdtLoroDocFactory extends AbstractCrdtDocFactory {
283
- constructor(initialStorage = () => ({})) {
284
- super(initialStorage);
285
- this._initialStorage = initialStorage;
286
- }
287
- getEmpty() {
288
- return new CrdtLoroDoc();
289
- }
290
- getFactory(initialStorage) {
291
- return new _CrdtLoroDocFactory(initialStorage != null ? initialStorage : this._initialStorage);
292
- }
293
- getInitialized(initialStorage) {
294
- return new CrdtLoroDoc(initialStorage != null ? initialStorage : this._initialStorage);
295
- }
218
+ //#endregion
219
+ //#region src/doc/CrdtLoroDocFactory.ts
220
+ var CrdtLoroDocFactory = class CrdtLoroDocFactory extends AbstractCrdtDocFactory {
221
+ _initialStorage;
222
+ constructor(initialStorage = () => ({})) {
223
+ super(initialStorage);
224
+ this._initialStorage = initialStorage;
225
+ }
226
+ getEmpty() {
227
+ return new CrdtLoroDoc();
228
+ }
229
+ getFactory(initialStorage) {
230
+ return new CrdtLoroDocFactory(initialStorage ?? this._initialStorage);
231
+ }
232
+ getInitialized(initialStorage) {
233
+ return new CrdtLoroDoc(initialStorage ?? this._initialStorage);
234
+ }
296
235
  };
297
236
 
298
- // src/doc/doc.ts
299
- var doc = (value = () => ({})) => {
300
- return new CrdtLoroDocFactory(value);
237
+ //#endregion
238
+ //#region src/doc/doc.ts
239
+ const doc = (value = () => ({})) => {
240
+ return new CrdtLoroDocFactory(value);
301
241
  };
302
242
 
303
- // src/list.ts
304
- import { LoroList as LoroList2, isContainer as isContainer2 } from "loro-crdt";
305
- var list = (value = []) => {
306
- const container = new LoroList2();
307
- value.forEach((item, i) => {
308
- if (isContainer2(item)) container.insertContainer(i, item);
309
- else container.insert(i, item);
310
- });
311
- return container;
243
+ //#endregion
244
+ //#region src/list.ts
245
+ const list = (value = []) => {
246
+ const container = new LoroList();
247
+ value.forEach((item, i) => {
248
+ if (isContainer(item)) container.insertContainer(i, item);
249
+ else container.insert(i, item);
250
+ });
251
+ return container;
312
252
  };
313
253
 
314
- // src/map.ts
315
- import { LoroMap as LoroMap2, isContainer as isContainer3 } from "loro-crdt";
316
- var map = (value = []) => {
317
- const container = new LoroMap2();
318
- value.forEach(([key, item]) => {
319
- if (isContainer3(item)) container.setContainer(key, item);
320
- else container.set(key, item);
321
- });
322
- return container;
254
+ //#endregion
255
+ //#region src/map.ts
256
+ const map = (value = []) => {
257
+ const container = new LoroMap();
258
+ value.forEach(([key, item]) => {
259
+ if (isContainer(item)) container.setContainer(key, item);
260
+ else container.set(key, item);
261
+ });
262
+ return container;
323
263
  };
324
264
 
325
- // src/movableList.ts
326
- import { isContainer as isContainer4, LoroMovableList as LoroMovableList2 } from "loro-crdt";
327
- var movableList = (value = []) => {
328
- const container = new LoroMovableList2();
329
- value.forEach((item, i) => {
330
- if (isContainer4(item)) container.insertContainer(i, item);
331
- else container.insert(i, item);
332
- });
333
- return container;
265
+ //#endregion
266
+ //#region src/movableList.ts
267
+ const movableList = (value = []) => {
268
+ const container = new LoroMovableList();
269
+ value.forEach((item, i) => {
270
+ if (isContainer(item)) container.insertContainer(i, item);
271
+ else container.insert(i, item);
272
+ });
273
+ return container;
334
274
  };
335
275
 
336
- // src/object.ts
337
- import { LoroMap as LoroMap3, isContainer as isContainer5 } from "loro-crdt";
338
- var object = (value) => {
339
- const container = new LoroMap3();
340
- Object.entries(value).forEach(([key, item]) => {
341
- if (isContainer5(item)) container.setContainer(key, item);
342
- else container.set(key, item);
343
- });
344
- return container;
276
+ //#endregion
277
+ //#region src/object.ts
278
+ const object = (value) => {
279
+ const container = new LoroMap();
280
+ Object.entries(value).forEach(([key, item]) => {
281
+ if (isContainer(item)) container.setContainer(key, item);
282
+ else container.set(key, item);
283
+ });
284
+ return container;
345
285
  };
346
286
 
347
- // src/text.ts
348
- import { LoroText as LoroText2 } from "loro-crdt";
349
- var text = (value = "") => {
350
- const container = new LoroText2();
351
- container.insert(0, value);
352
- return container;
287
+ //#endregion
288
+ //#region src/text.ts
289
+ const text = (value = "") => {
290
+ const container = new LoroText();
291
+ container.insert(0, value);
292
+ return container;
353
293
  };
354
294
 
355
- // src/tree.ts
356
- import { LoroTree as LoroTree2 } from "loro-crdt";
357
- var tree = () => {
358
- const container = new LoroTree2();
359
- return container;
295
+ //#endregion
296
+ //#region src/tree.ts
297
+ const tree = () => {
298
+ return new LoroTree();
360
299
  };
361
300
 
362
- // src/loro.ts
363
- var kind = "loro";
364
- export {
365
- loro_exports as loro
366
- };
301
+ //#endregion
302
+ //#region src/loro.ts
303
+ var loro_exports = /* @__PURE__ */ __exportAll({
304
+ CrdtLoroDoc: () => CrdtLoroDoc,
305
+ counter: () => counter,
306
+ doc: () => doc,
307
+ kind: () => kind,
308
+ list: () => list,
309
+ map: () => map,
310
+ movableList: () => movableList,
311
+ object: () => object,
312
+ text: () => text,
313
+ tree: () => tree
314
+ });
315
+ const kind = "loro";
316
+
317
+ //#endregion
318
+ export { loro_exports as loro };
319
+ //# sourceMappingURL=index.mjs.map