Commit graph

1662 commits

Author SHA1 Message Date
Zixuan Chen
06ea79b900
refactor: add diff mode 2024-08-06 17:10:51 +08:00
Zixuan Chen
7e7fe782b4
refactor: refine movable list internal event 2024-08-06 15:34:55 +08:00
Zixuan Chen
86d3e65159
docs: fix typo 2024-07-31 23:01:35 +08:00
东灯
251c9c7787
feat: check invalid root container name (#411) 2024-07-29 15:06:31 +08:00
Zixuan Chen
59c89ad8e7
fix: workaround lldb bug make loro crate debuggable (#414) 2024-07-29 12:06:07 +08:00
东灯
8f3234a7fe
chore: add test tools (#410) 2024-07-25 19:14:02 +08:00
东灯
9d7b5b8474
feat & perf: add map.contains_key and perf map.len (#409)
* feat & perf: add map.contains_key and perf map.len

* chore: remove unused import
2024-07-25 16:40:08 +08:00
东灯
7e4500620d
style: use clippy to perf code (#407) 2024-07-24 17:39:29 +08:00
Zixuan Chen
e13c7ff174
chore: add method to ensure cids in block header are decoded 2024-07-24 16:06:33 +08:00
Zixuan Chen
618c38c7b9
fix: resolve LORO-766 2024-07-24 15:44:48 +08:00
东灯
e01505e013
feat: add text update API (#404)
* feat: add diff algorithm

* feat: implement DiffHook

* feat: add rust/typescript API

* feat: use u8 to enable SIMD

* feat: add SIMD support

* test: add a failed test case

* revert: change to unicode index

* fix: text event index correctness when using utf8 or unicode

* fix: use unicode index

* fix: apply delta

* fix: remove splice_unicode

---------

Co-authored-by: Zixuan Chen <remch183@outlook.com>
2024-07-23 21:22:47 +08:00
Patrick Arminio
b8f9fafed0
Add code to the default rich text configuration (#406) 2024-07-21 19:14:22 +08:00
Zixuan Chen
3d516a3e18
refactor: op group -> history cache 2024-07-18 15:44:50 +08:00
Zixuan Chen
06cd6b577d
refactor: rename "OpGroup" to "ContainerHistoryCache" 2024-07-17 12:32:03 +08:00
Zixuan Chen
59f09e7162
Merge branch 'main' into zxch3n/kv-store-trait 2024-07-17 12:16:53 +08:00
Zixuan Chen
ca6a7c897e
fix: warnings 2024-07-17 12:15:16 +08:00
Zixuan Chen
b39c45fa2e
chore: rm export blocks and import blocks 2024-07-17 12:10:58 +08:00
github-actions[bot]
d2b0520f86
chore: version packages (#403)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-14 17:03:19 +08:00
Zixuan Chen
45c98d5751
chore: release 2024-07-14 16:43:34 +08:00
Yang Si
ce88b326dd
fix: when computing the len of the map, do not count elements that are None (#402) 2024-07-14 16:40:46 +08:00
Zixuan Chen
cc5ca7d296
docs: rm experimental warning 2024-07-14 14:00:00 +08:00
Zixuan Chen
bc63d250e2
Merge branch 'main' into zxch3n/kv-store-trait 2024-07-14 13:59:14 +08:00
东灯
c710ec3dd3
feat: add more text api (#398)
* feat: add char_at

* feat: add slice

* feat: add splice

* feat: add rust/typescript API

* fix: ci test

* fix: patch

* fix: patch

* Update crates/loro-wasm/src/lib.rs

Co-authored-by: Zixuan Chen <remch183@outlook.com>

* Update crates/loro-wasm/src/lib.rs

Co-authored-by: Zixuan Chen <remch183@outlook.com>

* Update crates/loro/src/lib.rs

Co-authored-by: Zixuan Chen <remch183@outlook.com>

* perf: use entity index

* fix: patch

* fix: error brackets

---------

Co-authored-by: Zixuan Chen <remch183@outlook.com>
2024-07-14 13:06:04 +08:00
东灯
2f95480e96
feat: add text iter (#400)
* feat: add text iter

* doc: fix return error

* doc: add callback explain

* perf: change to iterate spans
2024-07-13 23:34:37 +08:00
Leon Zhao
00e9c8d031
fix: tree diff calc children should be sorted by idlp (#401) 2024-07-13 23:26:38 +08:00
Zixuan Chen
9f7783516d
refactor: use BTree in dag 2024-07-12 22:51:13 +08:00
Zixuan Chen
2a4e089208
chore: rm logs 2024-07-12 18:12:21 +08:00
Zixuan Chen
46000420e8
Merge main 2024-07-12 16:15:54 +08:00
Zixuan Chen
23fbae1f80
refactor: make vv in dag optional 2024-07-12 15:19:40 +08:00
Leon Zhao
71e5afa6cc
fix: tree undo when processing deleted node (#399) 2024-07-12 10:53:48 +08:00
Zixuan Chen
a924b3e55b
fix: change block encode & decode 2024-07-11 23:54:09 +08:00
Leon Zhao
00e7bf2911
chore: rename position to fractional_index (#381)
Breaking Change:
- rename `position` to `fractional_index`
2024-07-11 22:03:48 +08:00
东灯
86c760abd0
feat: add insert_utf8 and delete_utf8 for Rust Text API (#396)
* feat: add insert_utf8

* chore: merge insert functions

* fix: use utf8_to_unicode_index to reslove index

* fix: add bound-check and use unicode PosType

* feat: add delete_utf8

* perf: O(LogN) insert_utf8

* feat: add utf-16 cross unicode check

* perf: O(LogN) delete_utf8

* chore: add api

* chore: remove unused function

* fix: api name and bindgen name

* test: add utf8 js test

---------

Co-authored-by: Zixuan Chen <remch183@outlook.com>
2024-07-10 10:20:08 +08:00
Zixuan Chen
354f429381
feat: impl import_all export_all apis 2024-07-09 23:07:57 +08:00
Zixuan Chen
27daa08b77
pr: impl kv store 2024-07-09 00:32:16 +08:00
Zixuan Chen
f802ede4b9
refactor: impl HasCounter explicitly to speedup 2024-07-09 00:02:41 +08:00
Zixuan Chen
d69e4c9c30
Refactor ChangeStore to use external KV store and improve block management
- Add ID serialization methods in loro-common
- Update KvStore trait with binary search and double-ended iterator
- Modify export/import blocks to use bytes::Bytes
- Refactor ChangeStore to use external KV store for persistence
- Implement flush, encode_all, and decode_all methods for ChangeStore
- Update change retrieval and iteration methods to work with new block management
- Improve block parsing and caching mechanisms
2024-07-08 17:33:57 +08:00
Zixuan Chen
391bd5ad0a
bk: kv store init; refine block encode format 2024-07-04 23:41:53 +08:00
Zixuan Chen
9eaaaeada9
ci: pnpm 2024-07-04 20:17:06 +08:00
Zixuan Chen
ec905635fd
chore: update fuzz config 2024-07-04 20:06:18 +08:00
Zixuan Chen
9047065843
Fix undo with checkout (#375)
* fix: should transform checkout event

* chore: update fuzz dep

* chore: add pos to error info

* fix: clear undo/redo stack when checkingout

* test: update fuzz dep

* test: a new failed test case

* fix: tree transform

* chore: fuzz

* chore: add log

* chore: add more logs

* fix: compose err

* chore: fuzz test dep

* test: a failed tree case

* fix: undo tree event

* fix: do not compare tree position in fuzz

* fix: fuzz rev

* test: a failed tree case

* fix: add tree compose

* chore: add comment

* chore: fuzz

* fix: test

* fix: tree transform

* fix: tree transform index

* fix: sort tree index

* chore: fuzz

* fix: undo/redo remote change effect compose

* bk

* fix: tree undo redo (#385)

* fix: event hint none

* chore: fuzz version

* ci: fuzz

* bk: weird err

* fix: type err

* fix: fractional index between

* fix: wasm counter feature

* test: a new failed case

* fix: recursively create child nodes

* fix: filter empty event

* bk

* bk

* fix: tree undo redo remap

* chore: clean

* bk

* fix: tree need remap first

* fix: tree undo effect

* fix: tree diff calc

* fix: tree fuzz check eq func

* fix: remove EventHint None

* chore: cargo fix

* fix: tree uncreate

* fix: fuzz tree assert only structure

* refactor: rename methods

* fix: movable tree apply delta

* fix: another movable list issue

* chore: fuzz only check 1 actor's history

---------

Co-authored-by: Leon Zhao <leeeon233@gmail.com>
2024-07-04 18:15:44 +08:00
Zixuan Chen
fc46f429f1 docs: update wasm docs 2024-06-29 13:45:47 +08:00
github-actions[bot]
c3a763e07d chore: version packages 2024-06-28 00:04:09 +08:00
Zixuan Chen
1e94248128
Feat fork (#393)
* feat: fork

* chore: add changeset
2024-06-26 21:05:04 +08:00
github-actions[bot]
b30bb18f77 chore: version packages 2024-06-21 12:11:28 +08:00
Zixuan Chen
439e4e9829
Add packages' repo and basic doc (#390)
* docs: update the pkg desc

* chore: changeset
2024-06-21 12:08:13 +08:00
Leon Zhao
fb028f861d
fix: export CommitOptions & JsonSchema (#389) 2024-06-20 16:52:36 +08:00
Zixuan Chen
3848db5a9e
fix: warnings 2024-06-20 16:30:03 +08:00
Zixuan Chen
6cb5aad4c7
chore: fuzz 2024-06-20 16:21:57 +08:00
Zixuan Chen
a276010128
feat: replace states with container store 2024-06-20 13:17:32 +08:00