1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-21 15:44:19 +01:00

1110 Commits

Author SHA1 Message Date
Samy Pessé
094cdf8a51 Use getFirstText in getLeafText 2016-11-10 11:04:01 +01:00
Samy Pessé
1cc9b7329d Remove test file 2016-11-10 11:01:15 +01:00
Soreine
6342c59936 Style pass on ternary indentation 2016-11-10 10:45:04 +01:00
Soreine
201123a63a Style pass on docstrings 2016-11-10 10:45:04 +01:00
Soreine
ddf730356b more readable code 2016-11-10 10:45:04 +01:00
Samy Pessé
9609865f0a Expose Range when requiring slate 2016-11-09 16:55:32 +01:00
Soreine
8ed065e0b5 Use key instead of node arguments in some places 2016-11-09 16:28:05 +01:00
Soreine
1ec6ebacc8 Fix writing in marks at beginning of text 2016-11-09 16:27:51 +01:00
Soreine
9cc1140009 Test undo setSelection 2016-11-09 15:10:50 +01:00
Soreine
c8b61bafee Test undo for insertNode, moveNode, removeNode 2016-11-09 14:54:23 +01:00
Soreine
78a9eb24f0 Fix undoing setMark 2016-11-09 14:37:42 +01:00
Soreine
0cb7ee794b Test undo setMark 2016-11-09 14:36:47 +01:00
Soreine
c7294be7d5 Test undo add/remove mark 2016-11-09 13:17:35 +01:00
Soreine
6bfaf0872c Add deep option to joinNode to allow correctly undoing splitNode 2016-11-09 12:55:56 +01:00
Soreine
3b5cc17bfa Test splitNode undo 2016-11-09 12:48:09 +01:00
Soreine
583b560ec3 Add Node.splitNodeAfter, to allow for exact undo of joinNode 2016-11-09 12:16:13 +01:00
Soreine
6b38caf72d Fix splitNode offset when undoing joinNode 2016-11-09 11:21:24 +01:00
Samy Pessé
4d33991358 Add method createFromRanges to Text 2016-11-09 10:26:33 +01:00
Soreine
49f6331075 Add marks option to Text.createFromString 2016-11-08 15:13:38 +01:00
Soreine
e28b76b709 Improve performance for Selection.hasEdgeIn methods 2016-11-07 18:41:51 +01:00
Soreine
44180c020e Remove memoization on Selection
All Selection methods use almost directly some Node methods which are
already memoized. This removes the needless overhead of memoization for
Selection, which changes often
2016-11-07 18:40:12 +01:00
Soreine
83fa16d451 Greatly improve performance of normalizeChildrenWith 2016-11-07 18:18:46 +01:00
Soreine
b54ddf10ce Add benchmark for Node.getTexts 2016-11-07 17:26:51 +01:00
Soreine
95cfc2f972 Optimize Node.getTexts to work on arrays 2016-11-07 17:23:08 +01:00
Soreine
4792a5e508 Cleaner default benchmark teardown 2016-11-07 17:14:28 +01:00
Soreine
c644e8d220 Fix forEachDescendant early exit 2016-11-07 16:56:52 +01:00
Soreine
1112066b17 Fix syntax 2016-11-07 16:15:23 +01:00
Samy Pessé
c94923d397 Merge pull request #5 from GitbookIO/memoization-global-disabler
Global memoization control, faster benchmark script
2016-11-07 15:51:18 +01:00
Soreine
f51189ce9a Fix teardown 2016-11-07 15:40:06 +01:00
Soreine
1424103975 Do not use window for globals. Expose clear/disable functions in utils/memoize 2016-11-07 15:40:06 +01:00
Soreine
bada4fa3f1 Add teardown for benchmarks, and adapt memoize-utils benchmark 2016-11-07 15:39:27 +01:00
Soreine
e505b7a159 Remove ludicrous amount of setup work that was needed to prevent memoization 2016-11-07 15:39:27 +01:00
Soreine
3d8000a53f Add global variable to disable memoization at any time 2016-11-07 15:39:27 +01:00
Soreine
d58d7a0e10 More efficient update of Selection.isBackward 2016-11-07 14:51:39 +01:00
Samy Pessé
550a17cf26 Add failing test for undo of joinNode 2016-11-03 18:46:00 +01:00
Samy Pessé
fed0a6dd3d Mark ES6 Map as global 2016-11-03 17:23:06 +01:00
Samy Pessé
4084cdf8c0 Merge pull request #3 from GitbookIO/schema-normalize-optims-node
Quick improvements for filterDescendants
2016-11-03 17:05:11 +01:00
Samy Pessé
af911fd0ff Use Node.forEachDescendant in Node.findDescendantDeep 2016-11-03 17:03:46 +01:00
Samy Pessé
738383cb3b Memoize getText on nodes 2016-11-03 13:06:07 +01:00
Samy Pessé
bf66749c4d Rollback getTexts to use a recursive method 2016-11-03 12:15:33 +01:00
Samy Pessé
663522139c Allow Node.forEachDescendant to exit early 2016-11-03 12:05:16 +01:00
Samy Pessé
6f90515c96 Use Node.forEachDescendant in Node.getKeys 2016-11-03 12:04:22 +01:00
Samy Pessé
1e7ff03897 Add method forEachDescendant and use it for filterDescendants and getTexts 2016-11-03 11:41:02 +01:00
Soreine
ce44724944 Implement memoize using native Maps
It should offer better performances, by avoiding comparing values using Immutable.is, and removing the small immutable object creation overhead.
2016-11-03 11:40:48 +01:00
Samy Pessé
4cc4535074 Always return early when schema has no decorators in getDescendantDecorators 2016-11-03 11:26:00 +01:00
Samy Pessé
d6beed6744 Improve rendering performance when schema has no decorators 2016-11-03 11:22:47 +01:00
Samy Pessé
a3b7b0789f Normalize the whole document in benchmarks 2016-11-03 11:02:57 +01:00
Samy Pessé
8bc8e45087 Add example for a large document 2016-11-03 10:39:40 +01:00
Soreine
580cb24623 Remove lint from npm run perf 2016-11-03 10:34:52 +01:00
Samy Pessé
ca14f242c2 Fix error in insertFragmentAtRange 2016-11-03 09:57:41 +01:00