130 Commits

Author SHA1 Message Date
96e9e310be Attached/detached nodes listener (#1292) 2022-04-09 00:43:24 -07:00
1c856e80ec Add sort keys and sort imports lint rules, and enable fix+format on save (#1209)
* Add sort keys rule and update configs so it works

Bump version of flowtype eslint plugin to fix bugs with autofixing

* Add sort imports fixable lint rule

* Run lint fix and prettier on whole repo 

* Fix unit tests broken by key sorting
2022-04-09 00:43:22 -07:00
055e6410be Move node registration to editor creation phase (#1252)
* Move node registration to editor creation phase

* Fix OverflowedNode

* Fix unit test

* Fix bugs
2022-04-09 00:43:21 -07:00
aa2d0777e2 Fix indenting on backspace for lists and paragraphs (#1225)
* fix indenting on backspace for lists and paragraphs

* switch to overriding getIndent
2022-04-09 00:43:20 -07:00
b2f73f34e8 Fix insertText bug (#1197)
* Fix insertText bug

* Update codes
2022-04-09 00:43:18 -07:00
09b887e61a Meta copyright (#1060) 2022-04-09 00:43:14 -07:00
3549331226 List theme levels (#1039)
* add list theme classes by level.

* refactor and add tests

* fix tests

* fix e2e tests

* fix lint error
2022-04-09 00:43:13 -07:00
9501cbadef Rename project to Lexical (#1037)
* Rename project to Lexical
2022-04-09 00:43:13 -07:00
76ba850726 Update codes.json 2022-04-09 00:43:09 -07:00
6e08e02ff5 Invariant when node.__parent !== parent.__children (#963) 2022-04-09 00:43:08 -07:00
da917f474f Rename BlockNode to ElementNode (#931)
* Rename BlockNode to ElementNode

* Rename OutlineBlockNode.test

Co-authored-by: Gerard Rovira <gerardrovira@fb.com>
2022-04-09 00:43:07 -07:00
f7230c3dd0 More collaboration fixes and tweaks (#911)
* More collaboration fixes and tweaks

* Fix codes

* Add extract codes
2022-04-09 00:43:06 -07:00
1950b4d4ff Rewrite invariant message for transforms infinite loop 2022-04-09 00:43:06 -07:00
b5b46d72f1 Precise (typed) Node transforms (#906) 2022-04-09 00:43:06 -07:00
47cbf19d08 Node.getType()/registerNode (#902) 2022-04-09 00:43:06 -07:00
44b3eb3405 Fix codes.json 2022-04-09 00:43:06 -07:00
b606f6cedb Update codes.json 2022-04-09 00:43:06 -07:00
107457a840 Rename OutlineController -> OutlineEditorContext (#871) 2022-04-09 00:43:05 -07:00
70e13adbd4 Captions work (#857)
* Captions WIP

WIP

WIP

WIP

* Fix unit tests

* Fix unit tests again

* Fix e2e test
2022-04-09 00:43:05 -07:00
ca7cb2b4d7 Add controller shared context (#852) 2022-04-09 00:43:04 -07:00
c3115fc213 Add cloneNotNeeded Set, remove depth from dirtySubTrees (#844)
* Add cloneNotNeeded Set, remove depth from dirtySubTrees

* Fix codes

* Fix codes
2022-04-09 00:43:04 -07:00
031981a282 Fix controller bug (#843) 2022-04-09 00:43:04 -07:00
1d05afcd39 Add OutlineController + refactor playground (#835) 2022-04-09 00:43:04 -07:00
65fbcc4b7d Add block indent/alignment (#817)
* Add block format flag

WIP

WIP

Fix codes

Fix logic

Fix logic

Fix e2e test

* Fix e2e test

* Fix e2e test

* Fix e2e test
2022-04-09 00:43:03 -07:00
692fb30e90 Fix pacakge dependencies for collab (#812) 2022-04-09 00:43:03 -07:00
e3fd8e1bde Fix build 2022-04-09 00:43:03 -07:00
eaa6a6cdfe Rename View to State (#786) 2022-04-09 00:43:01 -07:00
b9e74f3250 Add update queue to ensure consistent update sequences (#783)
Add update queue to ensure consistent update sequences
2022-04-09 00:43:01 -07:00
3b128e8e27 Fix indented list behavior when pressing Return (#779)
* Fix indented list behavior when pressing Return.

* Fix test.

Co-authored-by: Acy Watson <acy@fb.com>
2022-04-09 00:43:01 -07:00
9b32337045 Rename ViewModel -> EditorState (#768)
* Rename ViewModel -> EditorState

* Prettier
2022-04-09 00:43:01 -07:00
4d31f5ac08 insertNodes: fix invariant cases + add more test coverage (#760)
* Add unit tests are insertNodes logic

* Revise tests
2022-04-09 00:43:01 -07:00
fcb9142a78 Clean up old experiments + update codes (#743)
Random clean up stuff
2022-04-09 00:43:00 -07:00
3ebcd7c461 More insertNode fixes (#715)
* More insertNode fixes
2022-04-09 00:42:58 -07:00
d6ce7469b2 Extensive ListNode insertNode fixes (#714) 2022-04-09 00:42:58 -07:00
9183371879 Fix list insertion issue (#703)
* Fix list insertion issue

* Add more comments

* Fix codes
2022-04-09 00:42:58 -07:00
62d9a63071 Clean up codes.json 2022-04-09 00:42:58 -07:00
f12c62409c Remove scroll logic (#706) 2022-04-09 00:42:58 -07:00
db4fd08796 Revert "Fix focus regression (#704)" (#705)
This reverts commit a0831dad50fd435a7fe4d6b13ad6258121ac8992.
2022-04-09 00:42:58 -07:00
ed4168c0a4 Fix focus regression (#704) 2022-04-09 00:42:58 -07:00
17eab656c8 Add get{Current/Latest}EditorContent() (#682) 2022-04-09 00:42:57 -07:00
ead9835994 Check for ParagraphNode on clearEditor (#671) 2022-04-09 00:42:57 -07:00
fa4533a37c Add further invariants (#669)
* Add further invariants

* Fix codes
2022-04-09 00:42:56 -07:00
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