Commit graph

310 commits

Author SHA1 Message Date
Zixuan Chen
53a7196c52
fix: [LORO-337] Marking should have no effect when the target key value pair exists #204 (#209) 2023-12-05 11:57:58 +08:00
Leon zhao
47fea50dda
Refactor: use ValueOrContainer for diff event (#202)
* feat: use resolved diff as event

* feat: wasm ValueOrContainer event

* fix: cargo fix

* fix: avoid state clone

* chore: add resolve event bench

* test: add handler in event test

* refactor: use resolved as external diff

* chore: cargo fix

* fix: typescript loro value type

* fix: use Arc::new_cyclic

* refactor: bring back sub container
2023-12-05 11:57:41 +08:00
Zixuan Chen
bf1a792933
refactor: only need shared ref on loro doc now (#203) 2023-12-03 14:54:45 +08:00
Zixuan Chen
cccb4f3957
perf(wasm): reduce wasm size (#198) 2023-11-29 13:59:39 +08:00
Zixuan Chen
208c673b2d
refactor: list now use the same tracker as text (#197)
Resolve #122
2023-11-29 10:45:00 +08:00
Zixuan Chen
fddcf7a321
chore: publish v0.2.2 with refined doc 2023-11-28 23:23:07 +08:00
Zixuan Chen
cd8be80a6f
docs: refine rust api doc 2023-11-28 23:20:57 +08:00
Zixuan Chen
1eae5ea495
chore: bump loro rust to v0.2.1 2023-11-28 22:22:09 +08:00
Leon zhao
afc4bfaf62
feat: tree rust api (#194) 2023-11-28 21:32:04 +08:00
Zixuan Chen
564dde7703
chore: publish mvp rust api 2023-11-28 21:29:11 +08:00
Zixuan Chen
6ef1e12d71
chore: rm zerovec 2023-11-28 21:01:01 +08:00
Zixuan Chen
2ad7202e05
Feat-rust-api (#193) 2023-11-28 16:22:43 +08:00
Zixuan Chen
88218c10bd
(WASM )Refactor wasm interfaces on List and Map (#192)
* refactor: refine wasm interfaces

* docs: update wasm doc
2023-11-27 17:53:02 +08:00
Leon zhao
899270c6de
fix: remove compress feature (#184)
BREAKING CHANGE: encoding schema is changed
2023-11-21 21:48:25 +08:00
Zixuan Chen
8e901cf00c
fix: #181 importing should use inherent arena
otherwise, txn, oplog and app state may use different
arena.
2023-11-21 20:29:01 +08:00
Zixuan Chen
1ff1505933
feat: get sub container directly when getting value (#175) 2023-11-16 21:46:57 +08:00
leeeon233
c4b753dfd8 chore: add license 2023-11-12 23:23:12 +08:00
Zixuan Chen
505ad4275b
Fix encoding of oplog snapshot (#168) 2023-11-12 20:39:00 +08:00
Zixuan Chen
08e4ed9d40
feat: add from_checkout mark to event (#164) 2023-11-08 16:15:11 +08:00
Zixuan Chen
116190c817
chore: refine err msg 2023-11-08 14:18:01 +08:00
Zixuan Chen
9b18ff9847
fix: make encoding enhanced simpler 2023-11-08 14:17:43 +08:00
Zixuan Chen
93a52ba55e
fix: commit txn when dropping
it's less confusing
2023-11-08 14:16:10 +08:00
Zixuan Chen
7b855c88da
test: add out of bound test 2023-11-07 23:32:07 +08:00
Zixuan Chen
532eee09a4
fix: return Err when index out of bound 2023-11-07 22:48:53 +08:00
Zixuan Chen
83ae5930bc
Fix list get method (#158) 2023-11-07 19:48:16 +08:00
Zixuan Chen
cb8bbefb08
Fix incorrect deletion of emoji in wasm (#154)
This pull request fixes an issue where the emitted utf16 events were wrong when deleting an emoji in wasm. The problem was caused by incorrect calculation of the event range. This PR updates the code to use the correct range and adds a new test case to ensure the issue is fixed.
2023-11-05 16:13:40 +08:00
Zixuan Chen
7ccfd1e91d
feat: expose version and change inspect api to wasm (#156) 2023-11-05 16:06:34 +08:00
Leon zhao
acafc76aff
Feat: diff calc bring back & tree new event and value (#149)
* feat: new tree state

* fix: emit meta event

* fix: semantic tree event

* fix: diff calc bring_back

* chore: clear comments

* fix: merge

* fix: tree snapshot

* fix: filter empty bring back

* feat: tree add external diff

* fix: imported changes were not mergeable (#147)

* fix: imported changes were not mergeable
now the small encoding size is supported in example

* fix: stupid err in richtext checkout

* fix: rle oplog encode err
- support pending changes
- start counters were wrong

* fix: utf16 query err (#151)

* fix: tree movable node lamport

* fix: merge

* perf: bring back

* doc: add deep value meta doc

* refactor: bring back only when record diff

---------

Co-authored-by: Zixuan Chen <remch183@outlook.com>
2023-11-05 15:53:33 +08:00
Zixuan Chen
8bd953e396
refactor: extract text chunk (#153) 2023-11-04 20:03:43 +08:00
Zixuan Chen
b1895bba26
Update Quill editor to fix consistency issues (#152)
* chore: rm logs

* fix: richtext delta event

* fix(quill): move apply delta to editor part

* fix: consistency issue with Quill
- Quill assumes there is always a \n at the end of the line
- Quill assumes \n does not merge with other delta item
- Quill assumes there is no inline format inside {insert: '\n'} delta
  item
2023-11-04 20:03:15 +08:00
Zixuan Chen
5a9baebba0
fix: utf16 query err (#151) 2023-11-04 12:24:05 +08:00
Zixuan Chen
5b65963104
fix: imported changes were not mergeable (#147)
* fix: imported changes were not mergeable
now the small encoding size is supported in example

* fix: stupid err in richtext checkout

* fix: rle oplog encode err
- support pending changes
- start counters were wrong
2023-11-04 12:23:28 +08:00
Zixuan Chen
200a6dd39a
fix: warnings 2023-11-03 22:26:49 +08:00
Zixuan Chen
5cac1ed092
Refactor: make changes mergeable (#146)
- Allow changes to be merged when possible. This makes realtime collaboration more efficient with Loro.
- Refactor the code to make modifications of changes in oplog in one place
- Optimize the diff calculation so that it doesn't have to go back to the beginning of the change.

Note: we still keep the invariants that dependency pointers in Loro always point to the last op in a change
2023-11-03 21:40:34 +08:00
Zixuan Chen
7a19b49acb
Add richtext example using Quill (#145)
* feat: richtext example init

* fix: pass richtext event delta consistency check

* chore: debug history
2023-11-03 16:59:27 +08:00
Zixuan Chen
da16b8a99d
refactor: use better repr for container id (#144) 2023-11-02 17:13:08 +08:00
Zixuan Chen
a40b5c6e4a
feat: support richtext in wasm & mark text with arbitrary value (#142)
- Support mark text with custom value [LORO-299] Allow users to mark text with custom value #139
- Expose richtext in wasm
2023-11-02 14:20:34 +08:00
Zixuan Chen
95e6130d93
Fix: richtext event (#138)
Support rich text event. Now it will emit the delta event correctly in the Quill Delta format.
2023-11-01 20:02:05 +08:00
Zixuan Chen
a52549ea30
fix: g-btree bug, fixed by upgrade dep 2023-10-31 22:04:43 +08:00
Zixuan Chen
bcf81a45eb
fix: g-btree delete leaf err
upgrade generic-btree
2023-10-31 21:08:07 +08:00
Zixuan Chen
e1ab03f30f
feat: create doc from snapshot (#136) 2023-10-31 19:02:52 +08:00
Zixuan Chen
c9cf106338
fix: impl Fugue correctly (#133)
The original content has a reversed comparison for right parents, which causes the interleaving anomalies when inserting text in a backward order.
2023-10-31 17:59:24 +08:00
Zixuan Chen
8235eaaa9b
fix: snapshot encode err (#135)
- allow import snapshot when user has created empty handlers
- fix state snapshot encode err
2023-10-31 17:58:50 +08:00
Zixuan Chen
f72f812086
Refactor: replace collection with single op content in remote op (#132)
* refactor: remove rlevec inside remoteop

* refactor: remove the use of RleVec<[T; 0]> (#131)
2023-10-31 17:58:27 +08:00
Zixuan Chen
74138231aa
refactor: remove the use of RleVec<[T; 0]> (#131) 2023-10-31 17:54:37 +08:00
Zixuan Chen
bf2385efe0
Refactor: remove old encode method (#130)
* refactor: remove old encode method

* chore: rm file

* refactor: mv snapshot encode file
2023-10-31 10:36:21 +08:00
Zixuan Chen
2abc302344
chore: add pending test and new_auto_commit 2023-10-31 10:14:09 +08:00
Zixuan Chen
c1d732b57c
Fix event hint error (#129)
* fix: event hint err

* fix: delete event hint
2023-10-31 10:00:54 +08:00
Zixuan Chen
45490f3370
Perf: reduce mem usage when transaction is large (#128)
* perf: reduce mem usage when txn is large

* test: add diagnose info for id_to_cursor

* perf: make id span easier to merge
2023-10-30 21:56:33 +08:00
Zixuan Chen
8293347334
Feat: autocommit transaction (#127)
* feat: auto commit

* fix: make recursive single thread event work again
2023-10-30 18:32:36 +08:00