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.
* feat: tree state
* feat: tree value
* feat: tree handler
* fix: tree diff
* test: fuzz tree
* feat: tree snapshot
* fix: tree default value
* fix: test new node
* fix: tree diff
* fix: tree unresolved value
* fix: tree fuzz
* fix: tree fuzz move
* fix: sort by tree id
* fix: tree diff sorted by lamport
* fix: sort roots before tree converted to string
* fix: rebase main
* fix: tree fuzz
* fix: delete undo
* fix: tree to json children sorted
* fix: diff calculate
* fix: diff cycle move
* fix: tree old parent cache
* feat: cache
* fix: local op add tree cache
* fix: don't add same tree move to cache
* fix: need update cache
* feat: new cache
* bench: add checkout bench
* chore: clean
* fix: apply node uncheck
* perf: lamport bound
* fix: calc old parent
* feat: tree wasm
* fix: change tree diff
* fix: tree diff retreat
* fix: tree diff should not apply when add node
* feat: new tree loro value
* chore: typo
* fix: tree deep value
* fix: snapshot tree index -1
* fix: decode tree snapshot use state
* fix: release state lock when emit event
* fix: tree node meta container
* fix: need set map container when covert to local tree op
* fix: tree value add deleted
* fix: more then one op in a change
* fix: tree fuzz deleted equal
* fix: tree calc min lamport
* feat: tree encoding v2
* doc: movable tree
* fix: test tree meta
* test: remove import bytes check
* refactor: diff of text and map
* refactor: del span
* perf: tree state use deleted cache
* fix: some details
* fix: loro js tree create
* feat: add un exist tree node
* bench: tree depth
* fix: check out should emit event
* 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
* fix: fix merge
* fix: return err apply op
* fix: fix merge
* fix: get map container as tree meta
* feat: checkout to frontiers
* feat: record timestamp
* fix: use unicode len by default for text
now "你好" has length of 2 instead of 6
* chore: rm dbg!
* feat: add typed versions of getMap and getList to Loro class
This commit adds `getTypedMap` and `getTypedList` methods to the `Loro` class, which allow for accessing maps and lists with type information. It also adds corresponding `getTyped`, `insertTyped`, and `setTyped` methods to `LoroMap` and `LoroList`. This makes it easier and safer to work with Loro's data structures.
* chore: bump version
* chore: alpha 1
* feat: add size and length to list and map
* chore: update deno test script
* 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