Andrew Jeffery
fc1b8f87fb
Use SmolStr in place of String ( #182 )
...
Most of the strings are small and so fit nicely in a SmolStr. When they
don't it just reverts to using a normal String.
2021-06-19 16:28:51 +01:00
Andrew Jeffery
ff8b8613d5
Flatten objtype ( #175 )
...
* Flatten object type
* Use separate construct functions
* Use separate gen_*_diff functions
* Remove maptype and seqtype from Diffs
* Preallocate ops in new_map_or_table
* More preallocations
2021-06-17 20:06:10 +01:00
Andrew Jeffery
a6e955abfd
Rework statetree to be a tree ( #156 )
2021-06-14 11:08:14 +01:00
Andrew Jeffery
28459f868f
Remove value_at_path ( #159 )
...
This has the same functionality as get_value and we only need one.
2021-06-07 10:18:00 +01:00
Alex Good
9bbaf7cbd5
Merge branch 'main' into implement-new-sequence-patch-format
2021-05-17 13:03:57 +01:00
Andrew Jeffery
5637956895
Add custom RootDiff type
...
This ensures that the patch starts with the right diff type statically
and will give an error to js during deserialization.
2021-05-16 14:02:57 +01:00
Andrew Jeffery
2e07e93e72
Change patches diffs to be non-optional
2021-05-16 13:01:37 +01:00
Andrew Jeffery
641fd11703
Change init to new and add defaults ( #130 )
...
Structs should use `new` for the constructor name and implement
`Default` where they can.
2021-05-14 21:35:09 +01:00
Andrew Jeffery
6050f39d46
Change patch diffs to start with mapdiff
2021-05-11 09:26:19 +01:00
Andrew Jeffery
59a24081d2
Switch to expanded_op more
2021-05-10 19:25:43 +01:00
Alex Good
e86aabb6a3
Implement new sequence patch format
2021-05-05 21:52:57 +01:00
Andrew Jeffery
d1934f2286
Add formatting config
2021-04-26 09:42:36 -07:00
Andrew Jeffery
aebfdc6572
Update patches with pending_changes
2021-04-24 14:25:31 -07:00
Andrew Jeffery
fc45ff09a3
Allow change to return value from users closure ( #84 )
...
* Allow change to return value from users closure
* Add closure_result field to OptimisticChangeResult
2021-04-15 10:49:04 +01:00
Andrew Jeffery
239fe59090
Use grapheme clusters in Text instead of char ( #72 )
...
* Use grapheme clusters in Text instead of char
char is not what users typically expect as a 'letter' so we should use
grapheme clusters instead. These can't always be represented as single
rust char types so the Text now stores a Vec of single grapheme Strings.
* Add test for grapheme clusters in text
* Use debug_assert_eq instead of debug_assert
2021-03-28 21:32:03 +01:00
Alex Good
c103b0638e
Ritual abasement at the altar of clippy
2021-03-02 19:35:00 +00:00
Alex Good
4f4674a4a1
Implement cursors in frontend
2021-03-02 16:07:52 +00:00