38 Commits

Author SHA1 Message Date
85b38d60b9 initEditor invariant when no ParagraphNode (#667) 2022-04-09 00:42:56 -07:00
5b748c6020 Add root.append invariant on non-block insertion (#668)
* Add root.append invariant on non-block insertion

* Fix unit test
2022-04-09 00:42:56 -07:00
3a5cc00ff0 Adds OutlineOffsetHelpers (#664)
* Adds OutlineOffsetHelpers
2022-04-09 00:42:56 -07:00
87ff13ed47 Common ancestor for nodesInRange (#657) 2022-04-09 00:42:56 -07:00
c68399c3ef Refresh codes 2022-04-09 00:42:55 -07:00
19d0e3a5ed Improve root methods (#627)
* Improve RootNode methods

* Fix more issues
2022-04-09 00:42:54 -07:00
215a43c6b8 Guard against root destructive methods (#616)
* Prevent root nodes from being selected

* Null out selection

* Different approach

* Fix flow type
2022-04-09 00:42:53 -07:00
0a55cd61a8 Remove many empty node use-cases (#607)
* Remove many empty node use-cases
2022-04-09 00:42:53 -07:00
f41bc6fcb1 Support block types in more SelectionHelpers (#580) 2022-04-09 00:42:52 -07:00
012ad88118 Add TextNode style property (#578)
* Add TextNode style property

* Update unit tests
2022-04-09 00:42:51 -07:00
84cc531282 Fix text formatting bug (#547) 2022-04-09 00:42:50 -07:00
631ffe000d Fix codes 2022-04-09 00:42:50 -07:00
019ab6c434 Refactor text formatting (#545)
* Refactor text formatting

* Fix unit tests

* Fix tree view
2022-04-09 00:42:50 -07:00
e7b98f0850 Revise more architecture around selection (#541)
* Revise more architecture around selection

* Fix tests

* Fix bug

* Fix bug

* Fix codes
2022-04-09 00:42:50 -07:00
7dd75ea0fa Prepare for selection block nodes (#539)
* Prepare Outline for Selection Block Nodes

* Fix codes
2022-04-09 00:42:50 -07:00
e6e10962f2 Improve selection Flow types (#528)
* Improve Flow types of selection API

* Further tweaks

* Further tweaks
2022-04-09 00:42:50 -07:00
9976deb763 Refactor Selection API into anchor and focus points (#526)
* Refactor Selection API into anchor and focus points

WIP

More fixes

More fixes

More fixes

* Fix tests
2022-04-09 00:42:50 -07:00
0cf9ac6b49 Fix undo selection bug (#517) 2022-04-09 00:42:49 -07:00
82a03d0bf1 add deserialize to playground custom nodes 2022-04-09 00:42:48 -07:00
4722c79425 Add serialize and deserialize methods (#459) 2022-04-09 00:42:46 -07:00
37093220e8 Add decorator node (#464)
* Add decorator

* Update test

* Fix test

* Update test
2022-04-09 00:42:24 -07:00
fb3ce90eb0 Fix plain text (#463) 2022-04-09 00:42:24 -07:00
ecbdb1d3e4 Switch viewModel nodeMap to be a Map rather than object literal (#449)
* Switch viewModel nodeMap to be a Map rather than object literal

* Revert accidental changes

* Fix tests

* Update codes
2022-04-09 00:42:23 -07:00
9a10f8eda6 Add invariant when a selection is invalid after an update (#404)
* Add invariant when a selection is invalid after an update

* Revise
2022-04-09 00:42:22 -07:00
286d21a6bc Update codes.json again 2022-04-09 00:42:20 -07:00
a7ccb8ea9c Fix some issues with Safari and onNativeInput (#370) 2022-04-09 00:42:20 -07:00
ccf822bf70 Fix package-lock and codes.json 2022-04-09 00:42:20 -07:00
a1671d44ef codes.json again 2022-04-09 00:42:20 -07:00
9424c510a4 Guard against no range count (#364) 2022-04-09 00:42:19 -07:00
8efba1cbf8 Fix codes 2022-04-09 00:42:19 -07:00
39247e4787 Fix codes 2022-04-09 00:42:19 -07:00
0b31af709c Refactor large parts of the selection system (#359)
* More fixes

* more fixes

* More fixes

* Fix more issues

* More fixes

* More fixes

* fix unit

* Fix a bunch of bugs

* More fixes

* More fixes

* More fixes

* More fixes

* More fixes

* More nav fixes
2022-04-09 00:42:19 -07:00
669e6ca9c6 Refactor immutable and segmented nodes so they are selectable (#357)
* Refactor immutable/segmented nodes to be selectable

* Fix tests

* Fix tests

* Fix copy and paste
2022-04-09 00:42:19 -07:00
7f772157ec Improve bad text insertion heuristic (#356) 2022-04-09 00:42:19 -07:00
c18b1b5106 Revise text insertion logic and rely on using the DOM to update value (#354)
* Read DOM text value for input events

* Clean up a ton of issues and revise logic

* Fix tests

* Fix bugs

* Extend functionality
2022-04-09 00:42:19 -07:00
c689fe4f52 Fix bug where normalizeTextNodes would break during hashtags (#341) 2022-04-09 00:42:18 -07:00
146103ec02 Remove new keyword from error throwing 2022-04-09 00:42:18 -07:00
a457a3850d Introduce invariant error code system (#339) 2022-04-09 00:42:18 -07:00