* Run mocha test with module alias
* Running test with babel module alias
* Fix model alias
* Fix model alias
* Resolve module alias
* Running test with babel module alias
* Connect to codecov
* add codecov to travis
* stop if yarn test has errors
* Still cannot collect data from slate modules
* Try to check whether it works with codecov
* Move config to nycrc
* Remove nyc require
* Update nyc to use src
* better before_script
#### Is this adding or improving a _feature_ or fixing a _bug_?
Feature.
#### What's the new behavior?
This pull request adds paths to `Range` objects, including the selection. The paths and keys are kept in sync automatically, so that you can use whichever is ideal for your use case.
This should allow us to use paths for lots of the internal logic, which are much quicker to work with than keys since they avoid having to lookup the key in the document and can just traverse right to the node in question.
#### How does this change work?
`Range` objects have two new properties:
```js
range.anchorPath
range.focusPath
```
(Eventually these will be `range.anchor.path` and `range.focus.path` when points are introduced.)
When operations occur and whenever ranges are created/normalized, the paths are updated and kept in sync with the keys.
#### Have you checked that...?
<!--
Please run through this checklist for your pull request:
-->
* [x] The new code matches the existing patterns and styles.
* [x] The tests pass with `yarn test`.
* [x] The linter passes with `yarn lint`. (Fix errors with `yarn prettier`.)
* [x] The relevant examples still work. (Run examples with `yarn watch`.)
#### Does this fix any issues or need any specific reviewers?
Fixes: https://github.com/ianstormtaylor/slate/issues/1408
Fixes: https://github.com/ianstormtaylor/slate/issues/1567
* Preparing tests
* splitNode replacement
* Remove slow splice; replace mergeNode
* normalize Leaves
* Partially remove characters
* Partially remove characters
* styling
* Fix bugs; almost all characters are replaced
* Fixes almost existing tests; preparing adding tests for text
* Remove un-necessary check
* Empty leaf
* fix characters in getMarks
* Faster fromJSON
* Some corner cases for empty text
* Fix naive bug
* Supporting empty text with marks
* Supporting empty text with marks in hyperscript
* changes tests for marks in empty text
* Support splitNode marks with empty text
* Add tests for splitNode->insert
* Faster removeText
* Add warning ; remove getMarksAtIndex cache
* Remove characters in getInsertMarkAtRange
* Adding tests
* Change names of tests
* Update marks test
* Add a test confirm for invalid offsets:
* Add test for get active marks between offsets
* Fix document
* Add testing for insert-text
* Better remove text
* More sensible marks in empty text
* Allow marks of empty text after deleting partially marked text
* Add test for removing on partially marked text
* chnage test structure
* Add test for removeText
* Add test for removeText
* Avoid conflict between empty marked text and cursor
* Simple style fixes
* Simple style fixes
* Line break fixes
* Line break fixes
* Annotate the createLeaves
* Line breaks in test
* Line breaks fix
* add add-marks test
* add merge test
* Fix version update
* Remove empty_leaf optimization; optimize of that will be other PRs
* Clean up getMarksAtPosition
* Fix get-insert-marks-at-range
* clean up get-marks-at-position
* Fix spaces
* initial simple decorations (mark-like), many tests added
* allow decorators to be set by focus, anchor tags - add tests
* handle one more edge case with decorations in hyperscript
* apply prettier cleanup
* apply linting rules
* update changelog
* ensure always normalize decoration ranges
* reapply prettier after latest adjustments
* all operations apply now update decorations with selection
* ranges can now be 'atomic', will invalidate if contents change
* lint, prettier cleanups
* add atomic invalidation tests, update hyperscript usage
* fix linter errors
* minor cleanup
* slight refactor for simplicity
* remove a couple superfluous lines
* update in response to review
* drop unnecessarily committed add'l file
* remove the need for explicit anchor, focus prop on decoration tags
* update hyperscript use to match latest syntax in #1777
* atomic -> isAtomic
* initial simple decorations (mark-like), many tests added
* allow decorators to be set by focus, anchor tags - add tests
* handle one more edge case with decorations in hyperscript
* apply prettier cleanup
* apply linting rules
* update changelog
* ensure always normalize decoration ranges
* reapply prettier after latest adjustments
* update in response to review
* drop unnecessarily committed add'l file
* remove the need for explicit anchor, focus prop on decoration tags
* Add failing test
* Don't push extra text node at the end of children
* Fix keys in tests
* Add option `normalize` to <value>
* Write Changelog
* Changelog on correct package
* Fix preserve keys test
* Fix tests (which make more sense now)
* Mark failing test as skipped
* Account for skip option
* Lint and fix changelog version
* Use Unreleased instead of version
* Lint markdown
* Add Prettier, with basic config and ESLint integration
* Apply Prettier to all files using `yarn lint --fix`
* Tell Prettier to ignore an empty text in a test output.
* Run Prettier on JS files not handled by ESLint, and lint them too
* Implement first working rollup config for main slate pkg
* Convert slate-base64-serializer to rollup
* Convert slate-dev-logger to rollup
* Convert slate-html-serializer to rollup
* Convert slate-hyperscript to rollup
* Convert slate-plain-serializer to rollup
* Convert slate-prop-types to rollup
* Convert (mostly) slate-react to rollup
* Convert slate-simulator to rollup
* Misc cleanup and configuration tweaks/fixes
* Convert slate-schema-violations to rollup
* Successful rollup build for top-level examples
* Add plugin to replace process.env.NODE_ENV
* Only rebuild modules and dev examples in watch mode
* Enable sourcemaps for development builds
* Force debug to use browser version, remove builtins plugin
* Remove is-image from example
It relies on node `path` and wouldn't work well in-browser anyway
* Use browser version of react-dom/server
* Move stray require to import
* Configure examples to watch child package output
* Fix tests
* Remove unneeded preferBuiltins from resolve config
* Use more precise files array to ensure sourcemaps aren't included
* Use lodash instead of lodash.throttle
It's pulled in anyway since slate-react needs slate, so using the
minipackage actually causes code duplication
* Improve naming/fix UMD builds, update UMD doc
* Add rollup configs to linting, add a missing dep to package.json
* Use longform rollup CLI flags
* Add rollup-plugin-auto-external to reduce external module configuration
* Combine rollup config into a unioned helper
* Centralize to a single rollup configuration
* Update dist structure and package field naming for PR feedback
* Add comments and address PR feedback on rollup config
* i.e. -> e.g.
* Add some spacing to the configuration to improve readability
* Add a bit more spacing
* Remove umd from example Slate unpkg link