1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-03-06 05:49:47 +01:00

142 Commits

Author SHA1 Message Date
Ian Storm Taylor
caedc1f108 Publish
- slate-base64-serializer@0.2.78
 - slate-html-serializer@0.7.17
 - slate-hyperscript@0.11.8
 - slate-plain-serializer@0.6.17
 - slate-prop-types@0.5.8
 - slate-react@0.20.3
 - slate@0.43.1
2018-10-31 10:11:00 -07:00
Ian Storm Taylor
8271cecc1e Publish
- slate-base64-serializer@0.2.77
 - slate-html-serializer@0.7.16
 - slate-hyperscript@0.11.7
 - slate-plain-serializer@0.6.16
 - slate-prop-types@0.5.7
 - slate-react@0.20.0
 - slate@0.43.0
2018-10-27 12:26:11 -07:00
Ian Storm Taylor
633fc9eebc Publish
- slate-base64-serializer@0.2.76
 - slate-html-serializer@0.7.15
 - slate-hyperscript@0.11.6
 - slate-plain-serializer@0.6.15
 - slate-prop-types@0.5.6
 - slate-react@0.19.8
 - slate@0.42.6
2018-10-25 18:49:32 -07:00
Ian Storm Taylor
a59e34cbfe allow setting selection properties on cursor in hyperscript, fixes #2326 2018-10-25 18:47:11 -07:00
Ian Storm Taylor
7f65eda65a Publish
- slate-base64-serializer@0.2.75
 - slate-html-serializer@0.7.14
 - slate-hyperscript@0.11.5
 - slate-plain-serializer@0.6.14
 - slate-prop-types@0.5.5
 - slate-react@0.19.7
 - slate@0.42.5
2018-10-25 12:40:50 -07:00
Ian Storm Taylor
29b762e9c2 Publish
- slate-base64-serializer@0.2.74
 - slate-html-serializer@0.7.13
 - slate-hyperscript@0.11.4
 - slate-plain-serializer@0.6.13
 - slate-prop-types@0.5.4
 - slate-react@0.19.6
 - slate@0.42.4
2018-10-24 16:09:16 -07:00
Ian Storm Taylor
ea6c4dcb08 Publish
- slate-base64-serializer@0.2.73
 - slate-hotkeys@0.2.6
 - slate-html-serializer@0.7.12
 - slate-hyperscript@0.11.3
 - slate-plain-serializer@0.6.12
 - slate-prop-types@0.5.3
 - slate-react@0.19.4
 - slate@0.42.3
2018-10-22 15:24:10 -07:00
Ian Storm Taylor
f939d168af Publish
- slate-base64-serializer@0.2.72
 - slate-html-serializer@0.7.11
 - slate-hyperscript@0.11.2
 - slate-plain-serializer@0.6.11
 - slate-prop-types@0.5.2
 - slate-react@0.19.2
 - slate@0.42.2
2018-10-09 18:46:54 -07:00
Ian Storm Taylor
7304c9b343 Publish
- slate-base64-serializer@0.2.71
 - slate-html-serializer@0.7.10
 - slate-hyperscript@0.11.1
 - slate-plain-serializer@0.6.10
 - slate-prop-types@0.5.1
 - slate-react@0.19.1
 - slate@0.42.1
2018-10-09 15:11:57 -07:00
Ian Storm Taylor
02c0f8e763 Publish
- slate-base64-serializer@0.2.70
 - slate-html-serializer@0.7.9
 - slate-hyperscript@0.11.0
 - slate-plain-serializer@0.6.9
 - slate-prop-types@0.5.0
 - slate-react@0.19.0
 - slate@0.42.0
2018-10-09 14:17:15 -07:00
Ian Storm Taylor
7a71de387c
Add controller (#2221)
* fold Stack into Editor

* switch Change objects to be tied to editors, not values

* introduce controller

* add the "commands" concept

* convert history into commands on `value.data`

* add the ability to not normalize on editor creation/setting

* convert schema to a mutable constructor

* add editor.command method

* convert plugin handlers to receive `next`

* switch commands to use the onCommand middleware

* add queries support, convert schema to queries

* split out browser plugin

* remove noop util

* fixes

* fixes

* start fixing tests, refactor hyperscript to be more literal

* fix slate-html-serializer tests

* fix schema tests with hyperscript

* fix text model tests with hyperscript

* fix more tests

* get all tests passing

* fix lint

* undo decorations example update

* update examples

* small changes to the api to make it nicer

* update docs

* update commands/queries plugin logic

* change normalizeNode and validateNode to be middleware

* fix decoration removal

* rename commands tests

* add useful errors to existing APIs

* update changelogs

* cleanup

* fixes

* update docs

* add editor docs
2018-10-09 14:03:27 -07:00
Ian Storm Taylor
e6372d829a Publish
- slate-base64-serializer@0.2.69
 - slate-html-serializer@0.7.8
 - slate-hyperscript@0.10.8
 - slate-plain-serializer@0.6.8
 - slate-prop-types@0.4.67
 - slate-react@0.18.11
 - slate-simulator@0.4.67
 - slate@0.41.3
2018-10-09 12:49:32 -07:00
Ian Storm Taylor
d84f5072c1
Fix normalizing dirty paths (#2222)
#### Is this adding or improving a _feature_ or fixing a _bug_?

Fix.

#### What's the new behavior?

The dirty paths in a change are now transformed against incoming operations, such that they don't get out of sync as normalizations occur. This is a rough pass to get correctness and the bug fixed, and we can later optimize lots of the little details for performance.

#### 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: #2211
Fixes: #2215
Fixes: #2194
2018-10-02 15:57:48 -07:00
Ian Storm Taylor
aba8f19d0e Publish
- slate-base64-serializer@0.2.68
 - slate-html-serializer@0.7.7
 - slate-hyperscript@0.10.7
 - slate-plain-serializer@0.6.7
 - slate-prop-types@0.4.66
 - slate-react@0.18.10
 - slate-simulator@0.4.66
 - slate@0.41.2
2018-09-26 13:20:34 -07:00
Ian Storm Taylor
bf9b03e634 Publish
- slate-base64-serializer@0.2.67
 - slate-html-serializer@0.7.6
 - slate-hyperscript@0.10.6
 - slate-plain-serializer@0.6.6
 - slate-prop-types@0.4.65
 - slate-react@0.18.9
 - slate-simulator@0.4.65
 - slate@0.41.1
2018-09-21 15:09:49 -07:00
Ian Storm Taylor
ca6920a88f Publish
- slate-base64-serializer@0.2.66
 - slate-html-serializer@0.7.5
 - slate-hyperscript@0.10.5
 - slate-plain-serializer@0.6.5
 - slate-prop-types@0.4.64
 - slate-react@0.18.8
 - slate-simulator@0.4.64
 - slate@0.41.0
2018-09-21 11:19:48 -07:00
Ian Storm Taylor
fd1832c73f Publish
- slate-base64-serializer@0.2.65
 - slate-hotkeys@0.2.5
 - slate-html-serializer@0.7.4
 - slate-hyperscript@0.10.4
 - slate-plain-serializer@0.6.4
 - slate-prop-types@0.4.63
 - slate-react@0.18.7
 - slate-simulator@0.4.63
 - slate@0.40.4
2018-09-21 09:43:39 -07:00
Ian Storm Taylor
fd87c746f8 fix versions... 2018-09-21 09:42:05 -07:00
Ian Storm Taylor
ba9b79112e Publish
- slate-base64-serializer@0.2.63
 - slate-html-serializer@0.7.2
 - slate-hyperscript@0.10.2
 - slate-plain-serializer@0.6.2
 - slate-prop-types@0.4.61
 - slate-react@0.18.3
 - slate-simulator@0.4.61
 - slate@0.40.2
2018-08-24 09:01:31 -07:00
Ian Storm Taylor
584ffec626 Publish
- slate-base64-serializer@0.2.62
 - slate-html-serializer@0.7.1
 - slate-hyperscript@0.10.1
 - slate-plain-serializer@0.6.1
 - slate-prop-types@0.4.60
 - slate-react@0.18.2
 - slate-simulator@0.4.60
 - slate@0.40.1
2018-08-23 13:54:58 -07:00
Ian Storm Taylor
729727d91e Publish
- slate-base64-serializer@0.2.61
 - slate-dev-warning@0.0.1
 - slate-html-serializer@0.7.0
 - slate-hyperscript@0.10.0
 - slate-plain-serializer@0.6.0
 - slate-prop-types@0.4.59
 - slate-react@0.18.0
 - slate-simulator@0.4.59
 - slate@0.40.0
2018-08-22 18:31:50 -07:00
Ian Storm Taylor
36ed4397d8
Remove deprecations (#2113)
#### Is this adding or improving a _feature_ or fixing a _bug_?

Debt.

#### What's the new behavior?

This removes almost all existing deprecations from previous API changes, to save on filesize and reduce complexity in the codebase going forward.

It also changes from using the `slate-dev-logger` to using the Facebook-inspired `slate-dev-warning` which can be compiled out of production builds with [`babel-plugin-dev-expression`](https://github.com/4Catalyzer/babel-plugin-dev-expression) to save even further on file size.

The only deprecations it keeps are in the `fromJSON` methods for data model changes like `.kind` and `.leaves` which may still may not have been migrated in databases, since this is a bigger pain point.

#### Have you checked that...?

* [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: #1922 
Fixes: #2105
Fixes: #646 
Fixes: #2109
Fixes: #2107 
Fixes: #2018
2018-08-22 18:22:40 -07:00
Ian Storm Taylor
3d48f7a3e0 Publish
- slate-base64-serializer@0.2.60
 - slate-html-serializer@0.6.32
 - slate-hyperscript@0.9.3
 - slate-plain-serializer@0.5.41
 - slate-prop-types@0.4.58
 - slate-react@0.17.3
 - slate-schema-violations@0.1.39
 - slate-simulator@0.4.58
 - slate@0.39.3
2018-08-22 15:43:19 -07:00
Ian Storm Taylor
ec678540cf Publish
- slate-base64-serializer@0.2.59
 - slate-html-serializer@0.6.31
 - slate-hyperscript@0.9.2
 - slate-plain-serializer@0.5.40
 - slate-prop-types@0.4.57
 - slate-react@0.17.2
 - slate-schema-violations@0.1.38
 - slate-simulator@0.4.57
 - slate@0.39.2
2018-08-22 14:34:06 -07:00
Ian Storm Taylor
a07f526192 Publish
- slate-base64-serializer@0.2.58
 - slate-html-serializer@0.6.30
 - slate-hyperscript@0.9.1
 - slate-plain-serializer@0.5.39
 - slate-prop-types@0.4.56
 - slate-react@0.17.1
 - slate-schema-violations@0.1.37
 - slate-simulator@0.4.56
 - slate@0.39.1
2018-08-22 14:14:48 -07:00
Ian Storm Taylor
357239dbec Publish
- slate-base64-serializer@0.2.57
 - slate-html-serializer@0.6.29
 - slate-hyperscript@0.9.0
 - slate-plain-serializer@0.5.38
 - slate-prop-types@0.4.55
 - slate-react@0.17.0
 - slate-schema-violations@0.1.36
 - slate-simulator@0.4.55
 - slate@0.39.0
2018-08-22 12:27:46 -07:00
Ian Storm Taylor
ecf48926cc
add Decoration and Selection models (#2112)
#### Is this adding or improving a _feature_ or fixing a _bug_?

Improvement.

#### What's the new behavior?

This introduces two new models: `Decoration` and `Selection`, which both implement the simpler `Range` interface. This way we can introduce properties to these concepts without having to have them live on all ranges, and we can start to introduce more helpful methods specific to each one's needs.

It also means we don't need to move `isFocused` to value, which saves some complexity on the operations side, retaining `set_selection` as the only way selections are modified.

In the process, it also cleans up a lot of the existing model logic for implementing the `Node` interface, and introduces another `Common` interface for shared properties of all Slate models.

#### How does this change work?

It introduces a new `interfaces/` directory where common sets of properties can be declared, and mixed in to the models with the new (simple) `mixin` utility.

#### Have you checked that...?

* [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: #1952 
Fixes: #1807 
Fixes: https://github.com/ianstormtaylor/slate/issues/2110
2018-08-22 12:25:22 -07:00
Ian Storm Taylor
1f317cd9b4 Publish
- slate-base64-serializer@0.2.56
 - slate-html-serializer@0.6.28
 - slate-hyperscript@0.8.5
 - slate-plain-serializer@0.5.37
 - slate-prop-types@0.4.54
 - slate-react@0.16.2
 - slate-schema-violations@0.1.35
 - slate-simulator@0.4.54
 - slate@0.38.2
2018-08-22 12:22:03 -07:00
Ian Storm Taylor
c7521225cf Publish
- slate-base64-serializer@0.2.55
 - slate-html-serializer@0.6.27
 - slate-hyperscript@0.8.4
 - slate-plain-serializer@0.5.36
 - slate-prop-types@0.4.53
 - slate-react@0.16.1
 - slate-schema-violations@0.1.34
 - slate-simulator@0.4.53
 - slate@0.38.1
2018-08-21 20:38:40 -07:00
Ian Storm Taylor
46898fe7f7 Publish
- slate-base64-serializer@0.2.54
 - slate-html-serializer@0.6.26
 - slate-hyperscript@0.8.3
 - slate-plain-serializer@0.5.35
 - slate-prop-types@0.4.52
 - slate-react@0.16.0
 - slate-schema-violations@0.1.33
 - slate-simulator@0.4.52
 - slate@0.38.0
2018-08-21 15:59:17 -07:00
Ian Storm Taylor
0b74a37928 Publish
- slate-base64-serializer@0.2.53
 - slate-dev-environment@0.1.6
 - slate-hotkeys@0.2.2
 - slate-html-serializer@0.6.25
 - slate-hyperscript@0.8.2
 - slate-plain-serializer@0.5.34
 - slate-prop-types@0.4.51
 - slate-react@0.15.8
 - slate-schema-violations@0.1.32
 - slate-simulator@0.4.51
 - slate@0.37.7
2018-08-16 15:19:34 -07:00
Ian Storm Taylor
d05e90e546 Publish
- slate-base64-serializer@0.2.52
 - slate-html-serializer@0.6.24
 - slate-hyperscript@0.8.1
 - slate-plain-serializer@0.5.33
 - slate-prop-types@0.4.50
 - slate-react@0.15.7
 - slate-schema-violations@0.1.31
 - slate-simulator@0.4.50
 - slate@0.37.6
2018-08-15 18:03:10 -07:00
Ian Storm Taylor
55f09995a3 Publish
- slate-base64-serializer@0.2.51
 - slate-html-serializer@0.6.23
 - slate-hyperscript@0.8.0
 - slate-plain-serializer@0.5.32
 - slate-prop-types@0.4.49
 - slate-react@0.15.6
 - slate-schema-violations@0.1.30
 - slate-simulator@0.4.49
 - slate@0.37.5
2018-08-15 12:44:46 -07:00
Ian Storm Taylor
1a0979b849 update changelog 2018-08-15 12:42:45 -07:00
David Chang
f37dd21137 [hyperscript] rename decorators option in params to decorations (#2074)
#### Is this adding or improving a _feature_ or fixing a _bug_?

Debt.

#### What's the new behavior?

`createHyperscript` takes an options object that now looks for the `decorations` property instead of the `decorators` property

#### How does this change work?

Pretty straightforward rename of an option, then all of its uses and wherever the term decorators showed up in docs

#### Have you checked that...?

* [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: #1996
Reviewers: @ianstormtaylor
2018-08-15 12:41:39 -07:00
Ian Storm Taylor
acfffe0c2a Publish
- slate-base64-serializer@0.2.50
 - slate-dev-environment@0.1.5
 - slate-dev-logger@0.1.43
 - slate-hotkeys@0.2.1
 - slate-html-serializer@0.6.22
 - slate-hyperscript@0.7.4
 - slate-plain-serializer@0.5.31
 - slate-prop-types@0.4.48
 - slate-react@0.15.5
 - slate-schema-violations@0.1.29
 - slate-simulator@0.4.48
 - slate@0.37.4
2018-08-15 12:40:25 -07:00
Ian Storm Taylor
a396d013ef Publish
- slate-base64-serializer@0.2.49
 - slate-html-serializer@0.6.21
 - slate-hyperscript@0.7.3
 - slate-plain-serializer@0.5.30
 - slate-prop-types@0.4.47
 - slate-react@0.15.4
 - slate-schema-violations@0.1.28
 - slate-simulator@0.4.47
 - slate@0.37.3
2018-08-08 16:31:10 -07:00
Ian Storm Taylor
d4b52e3eb5 Publish
- slate-base64-serializer@0.2.48
 - slate-html-serializer@0.6.20
 - slate-hyperscript@0.7.2
 - slate-plain-serializer@0.5.29
 - slate-prop-types@0.4.46
 - slate-react@0.15.3
 - slate-schema-violations@0.1.27
 - slate-simulator@0.4.46
 - slate@0.37.2
2018-08-07 19:31:35 -07:00
Ian Storm Taylor
7e0929bd22 Publish
- slate-base64-serializer@0.2.47
 - slate-html-serializer@0.6.19
 - slate-hyperscript@0.7.1
 - slate-plain-serializer@0.5.28
 - slate-prop-types@0.4.45
 - slate-react@0.15.1
 - slate-schema-violations@0.1.26
 - slate-simulator@0.4.45
 - slate@0.37.1
2018-08-06 13:16:46 -07:00
Jinxuan Zhu
58c644323f Add coverage test with mocha and codecov (#2037)
* 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
2018-08-06 10:31:42 -07:00
Ian Storm Taylor
07d7f51bbc Publish
- slate-base64-serializer@0.2.46
 - slate-html-serializer@0.6.18
 - slate-hyperscript@0.7.0
 - slate-plain-serializer@0.5.27
 - slate-prop-types@0.4.44
 - slate-react@0.15.0
 - slate-schema-violations@0.1.25
 - slate-simulator@0.4.44
 - slate@0.37.0
2018-08-03 15:41:27 -07:00
Ian Storm Taylor
ea6c4d9da2 update peerDependencies 2018-08-03 15:11:28 -07:00
Ian Storm Taylor
f6065e9eb8 update changelog 2018-08-03 15:05:43 -07:00
Ian Storm Taylor
08f270dc1b
Add a Point model, and standardize Range/Point logic (#2035)
* add `Node.createRange` for range resolution

* fix lint

* fix range offset defaults to be `null`

* change `isBackward` to be computed from paths

* remove debuggers

* add point model, update range with deprecations, update hyperscript

* got all tests passing

* get tests passing, convert changes

* fix lint

* fix examples

* update deprecations

* update docs

* update slate-react point utils

* fix document.normalizeRange

* fix lint
2018-08-03 14:45:40 -07:00
Ian Storm Taylor
b3535e11df
change isBackward to be computed from paths (#2027)
* change `isBackward` to be computed from paths

* remove debuggers

* fix lint
2018-08-03 14:31:55 -07:00
Ian Storm Taylor
6fd185e172 Publish
- slate-base64-serializer@0.2.45
 - slate-dev-benchmark@0.0.4
 - slate-dev-environment@0.1.4
 - slate-dev-logger@0.1.42
 - slate-dev-test-utils@0.0.1
 - slate-hotkeys@0.1.4
 - slate-html-serializer@0.6.17
 - slate-hyperscript@0.6.3
 - slate-plain-serializer@0.5.26
 - slate-prop-types@0.4.43
 - slate-react@0.14.3
 - slate-schema-violations@0.1.24
 - slate-simulator@0.4.43
 - slate@0.36.2
2018-08-01 12:07:02 -07:00
Ian Storm Taylor
1748a4b0c1
Refactor tests (#2021)
* add slate-dev-test-utils, refactor tests to use fixtures util

* cleanup top-level test files

* tweaks
2018-08-01 09:16:02 -07:00
Ian Storm Taylor
64000a97aa Publish
- slate-base64-serializer@0.2.44
 - slate-html-serializer@0.6.16
 - slate-hyperscript@0.6.2
 - slate-plain-serializer@0.5.25
 - slate-prop-types@0.4.42
 - slate-react@0.14.2
 - slate-schema-violations@0.1.23
 - slate-simulator@0.4.42
 - slate@0.36.1
2018-07-31 16:31:54 -07:00
Ian Storm Taylor
638d3e8e61 Publish
- slate-base64-serializer@0.2.43
 - slate-dev-logger@0.1.41
 - slate-html-serializer@0.6.15
 - slate-hyperscript@0.6.1
 - slate-plain-serializer@0.5.24
 - slate-prop-types@0.4.41
 - slate-react@0.14.1
 - slate-schema-violations@0.1.22
 - slate-simulator@0.4.41
 - slate@0.36.0
2018-07-27 15:50:29 -07:00
Ian Storm Taylor
8deecc4461 Publish
- slate-base64-serializer@0.2.42
 - slate-dev-benchmark@0.0.3
 - slate-dev-environment@0.1.3
 - slate-dev-logger@0.1.40
 - slate-hotkeys@0.1.3
 - slate-html-serializer@0.6.14
 - slate-hyperscript@0.6.0
 - slate-plain-serializer@0.5.23
 - slate-prop-types@0.4.40
 - slate-react@0.14.0
 - slate-schema-violations@0.1.21
 - slate-simulator@0.4.40
 - slate@0.35.0
2018-07-27 12:42:43 -07:00