Commit graph

1104 commits

Author SHA1 Message Date
Zixuan Chen
1015ee33a7
chore: bump loro-crdt 2024-03-31 02:12:06 +08:00
Zixuan Chen
c3d5e92407
refactor: rm isAttached type on containers (#303) 2024-03-31 02:06:57 +08:00
Zixuan Chen
a8c059d96b
fix: type mismatch and add type info for whether a container is attached (#302) 2024-03-31 01:12:08 +08:00
Zixuan Chen
3fe9cc1969
fix: avoid bundler change the classname (#301) 2024-03-31 01:11:55 +08:00
Zixuan Chen
422e442012
chore: bump loro-crdt to 0.13.0 2024-03-30 11:44:18 +08:00
Zixuan Chen
9ecc0a90b1
refactor!: Add prelim support, making creating sub container easier (#300)
This PR includes a BREAKING CHANGE.

It enables you to create containers before attaching them to the document, making the API more intuitive and straightforward.

A container can be either attached to a document or detached. When it's detached, its history/state does not persist. You can attach a container to a document by inserting it into an attached container. Once a container is attached, its state, along with all of its descendants's states, will be recreated in the document. After attaching, the container and its descendants, will each have their corresponding "attached" version of themselves?

When a detached container x is attached to a document, you can use x.getAttached() to obtain the corresponding attached container.
2024-03-30 11:38:24 +08:00
Zixuan Chen
e58e4e3fdd
chore: bump loro-crdt to v0.12.0 2024-03-27 23:53:34 +08:00
Zixuan Chen
673e36a7ba
feat: add getParent for each handler (#297)
* feat: add getParent for each handler

* fix: type err
2024-03-27 18:43:48 +08:00
Zixuan Chen
9a673acfde
feat: add getOrCreate on map (#296) 2024-03-27 17:52:53 +08:00
Zixuan Chen
c8b8694908
refactor: extract common methods on handlers (#295)
Co-authored-by: Leon <leeeon233@gmail.com>
2024-03-25 11:58:51 +08:00
Leon Zhao
83d4950a4e
fix: empty diff emits event (#292) 2024-03-14 20:46:18 +08:00
Zixuan Chen
f7fe0d4b26
test: reduce overall test time by splitting the fuzz 10s (#291) 2024-03-12 21:10:30 +08:00
Leon Zhao
a47cf06712
Refactor fuzzing test (#271)
* feat: new fuzz test

* test: add arbtest

* fix: remove PROPTEST_FACTOR
2024-03-08 16:40:06 +08:00
Zixuan Chen
1233b8df82
refactor: replace debug-log with tracing (#285)
* refactor: replace debug-log with tracing

* chore: fix setDebug in wasm

* chore: rm useless comments
2024-03-04 20:06:24 +08:00
Zixuan Chen
7e07e4dad4
perf: reduce mem usage in fugue span (#283) 2024-03-04 12:02:49 +08:00
Zixuan Chen
08847d6639
refactor: rename client_id in idspan to peer (#287)
* refactor: rename client_id in idspan to peer

* fix: type err
2024-03-02 19:10:33 +08:00
Zixuan Chen
a5fce60883
perf: avoid a few clones in wasm (#288) 2024-03-02 16:26:34 +08:00
Leon Zhao
1db510104e
fix: delete list event hint assert (#289) 2024-03-02 16:25:57 +08:00
Leon Zhao
da782c7659
fix: tree child container index (#284) 2024-03-02 16:21:31 +08:00
Zixuan Chen
71addcb6de
fix: fix a few legacy bugs (#286) 2024-03-02 13:42:50 +08:00
Zixuan Chen
07c11f68b6
Perf make revert faster (#279)
* refactor: include start_id in seq delete span

* Add size benchmark example  (#276)

* test: add size bench example

* chore: update lock file

* refactor: optimize encoding

* perf: make revert ops with the size of m O(m)

* fix: delete span with id merge rule

* fix: fix several bugs related to delete span id
2024-02-29 23:00:02 +08:00
Zixuan Chen
06e3a5420d
refactor: reduce tracker mem usage by using nonmax id (#282) 2024-02-29 22:55:57 +08:00
Zixuan Chen
cadde3cb55
Refactor: include target id for delete seq (#278)
* refactor: include start_id in seq delete span

* Add size benchmark example  (#276)

* test: add size bench example

* chore: update lock file

* refactor: optimize encoding
2024-02-29 20:37:06 +08:00
Zixuan Chen
e9bac5ccab
fix: tracker insert err (#281) 2024-02-29 20:36:45 +08:00
Leon Zhao
80bd6936d2
fix: use TreeID as external event item (#280) 2024-02-29 20:33:06 +08:00
Leon Zhao
d3844ce04c
fix: missing event when checkout (#275)
* fix: refresh depth in diff_calc when checkout

* refactor: replace u16 with Option<NonZero>

---------

Co-authored-by: Zixuan Chen <remch183@outlook.com>
2024-02-29 11:05:25 +08:00
Zixuan Chen
dbf128959d
Add compression cmp in size bench (#277) 2024-02-28 22:03:43 +08:00
Zixuan Chen
17571ab6e0
Add size benchmark example (#276)
* test: add size bench example

* chore: update lock file
2024-02-28 21:59:20 +08:00
Zixuan Chen
b8eb57f4a5
Refactor ID (#274)
* refactor: add idlp and add lamport info to snapshot enc

* fix: fix warnings

* fix: idlp err due to incorrect merge

* fix: comments

* test: fix fuzz
2024-02-27 23:36:17 +08:00
Leon Zhao
1f4a59e85c
fix: state lock when emit events (#272)
* fix: state lock when emit events

* test: add deadlock test
2024-02-25 12:57:19 +08:00
Zixuan Chen
403eb18fa5
feat: expose timestamp related configures (#270)
* feat: expose timestamp related configures

* fix(wasm): set change merge interval api
2024-02-22 20:22:04 +08:00
Zixuan Chen
bd57eb52b1
refactor: replace i32 with i64 (#269) 2024-02-18 17:27:33 +08:00
Zixuan Chen
751082f307
chore: bump 2024-02-17 14:42:37 +08:00
Leon Zhao
73d5ec5cad
fix: import batch snapshot (#268) 2024-02-17 10:50:00 +08:00
Zixuan Chen
f648b353ad
chore: upgrade rust crates 2024-02-16 11:30:56 +08:00
Zixuan Chen
57287fa6d8
chore: add pkg info 2024-02-16 11:25:12 +08:00
Gentle
68117070dd
add pub LoroDoc::peer_id (#267)
Co-authored-by: Gentle <ramon.klass@gmail.com>
2024-02-16 01:45:16 +08:00
Zixuan Chen
7a75673fb8
chore: bump version of loro-crdt 2024-02-10 22:25:05 +08:00
Zixuan Chen
9c25e6d273
fix: should not reset the state when calling checkout to latest (#265) 2024-02-10 22:19:52 +08:00
Leon Zhao
3a4ed97e0b
fix: only send a event for one import/transaction/checkout (#263)
---------

Co-authored-by: Zixuan Chen <remch183@outlook.com>
2024-02-08 14:03:15 +08:00
Zixuan Chen
6950e42cae
perf: optimize snapshot encoding (#264)
* perf: optimize snapshot encoding

* perf: rm id_int_map and boost speed 1.4x

Co-authored-by: Leon Zhao <leeeon233@gmail.com>

---------

Co-authored-by: Leon Zhao <leeeon233@gmail.com>
2024-02-04 15:28:08 +08:00
Leon Zhao
dcbdd55195
feat: remove deleted set in tree state and optimize api (#259)
Co-authored-by: Zixuan Chen <me@zxch3n.com>
2024-01-30 09:54:54 +08:00
Zixuan Chen
0bcc3bd56d
chore: upgrade wasm-bindgen to 0.2.90 (#262) 2024-01-29 22:40:33 +08:00
Zixuan Chen
e1f3e7aa9a
docs: add config comment 2024-01-24 23:15:00 +08:00
Zixuan Chen
fd7c37c94e
chore: bump version to 0.10.1 2024-01-24 10:01:30 +08:00
Zixuan Chen
d01c03eb77
fix: rm checking after checkout 2024-01-24 10:00:00 +08:00
Zixuan Chen
af893d2431
docs: refine apply delta doc 2024-01-22 16:00:32 +08:00
Zixuan Chen
e304af05f4
chore: bump loro-crdt 2024-01-22 13:00:42 +08:00
Leon Zhao
f6cc5da0f1
refactor: Optimizing Encoding Representation for Child Container Creation to Reduce Document Size (#247)
* refactor: encoding container id

* fix: container indexing when merged ops in encoding

* chore: add compress encode size for draw example

* fix: do not need cids in encoding

* chore: change name containerIdx to containerType in encoding
2024-01-22 12:19:09 +08:00
Zixuan Chen
680041f3a9
feat: compare frontiers causal order (#257) 2024-01-22 12:03:50 +08:00