Commit graph

20 commits

Author SHA1 Message Date
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
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
546cadf26c
refactor(wasm): invoke setPanicHook when starting 2023-12-08 16:58:41 +08:00
Zixuan Chen
14c66edcd4
fix: use Object.getPrototypeOf instead of __proto__ 2023-12-05 14:51:31 +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
8957b98236
refactor: emit event after a micro task 2023-11-16 21:04:31 +08:00
Zixuan Chen
e54d2ac21b
feat(wasm): add event id 2023-11-13 13:06:37 +08:00
Zixuan Chen
a68482a495
test(js): update signature for map set container 2023-11-08 12:12:04 +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
Zixuan Chen
d942e3d7a2
Feat: Peritext-like rich text support (#123)
* feat: richtext wip

* feat: add insert to style range map wip

* feat: richtext state

* fix: fix style state inserting and style map

* fix: tiny vec merge err

* fix: comment err

* refactor: use new generic-btree & refine impl

* feat: fugue tracker

* feat: tracker

* feat: tracker

* fix: fix a few err in impl

* feat: init richtext content state

* feat: refactor arena

* feat: extract anchor_type info out of style flag

* refactor: state apply op more efficiently
we can now reuse the repr in state and op

* fix: new clippy errors

* refactor: use state chunk as delta item

* refactor: use two op to insert style start and style end

* feat: diff calc

* feat: handler

* fix: tracker checkout err

* fix: pass basic richtext handler tests

* fix: pass handler basic marking tests

* fix: pass all peritext criteria

* feat: snapshot encoding for richtext init

* refactor: replace Text with Richtext

* refacotr: rm text code

* fix: richtext checkout err

* refactor: diff of text and map

* refactor: del span

* refactor: event

* fix: fuzz err

* fix: pass all tests

* fix: fuzz err

* fix: list child cache err

* chore: rm debug code

* fix: encode enhanced err

* fix: encode enchanced

* fix: fix several richtext issue

* fix: richtext anchor err

* chore: rm debug code

* fix: richtext fuzz err

* feat: speedup text snapshot decode

* perf: optimize snapshot encoding

* perf: speed up decode & insert

* fix: fugue span merge err

* perf: speedup delete & id cursor map

* fix: fugue merge err

* chore: update utils

* perf: speedup text insert / del

* fix: cursor cache

* perf: reduce conversion by introducing InsertText

* perf: speed up by refined cursor cache

* chore: update gbtree dep

* refactor(wasm): use quill delta format

* chore: fix warnings
2023-10-29 14:02:13 +08:00
Zixuan Chen
6860132ada refactor: call events subs without await now 2023-07-30 17:08:49 +08:00
Zixuan Chen
c461edd828 refactor: remove utf16 meta in text event
we will use utf16 index by default when feature=wasm
2023-07-29 22:24:09 +08:00
Zixuan Chen
15be521777 feat: event & wasm 2023-07-29 02:03:51 +08:00
Zixuan Chen
0a31b67dd4
Feat: expose frontier & make it comparable (#95)
* refactor: make frontiers a new type

* feat: compare frontiers
2023-04-05 20:31:58 +08:00
Leon zhao
e51d6f8760
Fix: use Transaction to decode/import (#92) 2023-04-04 21:44:41 +08:00
Zixuan Chen
3e64116621
fix: make text event in wasm use utf16 as index and len (#88)
* feat: utf16 event for wasm (draft, buggy)

* fix: work around the issue of unknown text content

* fix: utf16 err

* fix: compose utf16 meta

* docs: add comments
2023-04-03 20:03:07 +08:00
Zixuan Chen
6df69bd2be feat: add subscribe to containers in wasm 2023-03-25 20:11:45 +08:00
Zixuan Chen
0a421d3931 fix: add event diff test & fix related bugs 2023-03-25 20:11:45 +08:00
Zixuan Chen
49f664dd8f feat: convert event to js & add vitest 2023-03-25 20:11:45 +08:00