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

2393 Commits

Author SHA1 Message Date
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
slate@0.37.5 slate-simulator@0.4.49 slate-schema-violations@0.1.30 slate-react@0.15.6 slate-prop-types@0.4.49 slate-plain-serializer@0.5.32 slate-hyperscript@0.8.0 slate-html-serializer@0.6.23 slate-base64-serializer@0.2.51
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
slate@0.37.4 slate-simulator@0.4.48 slate-schema-violations@0.1.29 slate-react@0.15.5 slate-prop-types@0.4.48 slate-plain-serializer@0.5.31 slate-hyperscript@0.7.4 slate-html-serializer@0.6.22 slate-hotkeys@0.2.1 slate-dev-logger@0.1.43 slate-dev-environment@0.1.5 slate-base64-serializer@0.2.50
2018-08-15 12:40:25 -07:00
Ian Storm Taylor
aa0ef4d24f
fix schema defaultNormalize to use normalize:false (#2083)
#### Is this adding or improving a _feature_ or fixing a _bug_?

Bug.

#### What's the new behavior?

All normalizing change methods should use `normalize: false` otherwise the normalization can recurse and cause strange errors.

#### 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`.)
2018-08-15 12:34:50 -07:00
Jinxuan Zhu
5c7211e0fe Warn about duplicate keys (#2081)
* Fix duplicate key in insert node

* Add warning on duplicate keys

* A lot of keys are duplicated

* Ensure error logging

* Finally Fixed

* Change PR

* bug fix

* comment fix

* Add getKeysToPathsTable into text

* refactor forbidden interface

* Refactor forbidden function

* Linting

* Change warn message

* Fix doc
2018-08-15 12:27:47 -07:00
Jinxuan Zhu
48e5c6e04b Refactor code with immutable-js in Model (#2077)
* Ugly Commit

* Small Styling issues about immutable-js

* Remove an unnecessary List
2018-08-14 10:19:56 -07:00
Jinxuan Zhu
dc95ad66a5 Do not use requestAnimation if DataTransfer is available (#2052)
*  not to requestAnimationFrame in modern browser

* Fix bugs

* Fix bugs

* Fix bugs

* Use callback
2018-08-10 10:40:14 -07:00
Ian Storm Taylor
1d53c5b1ef
Add input tester example (#2068)
#### Is this adding or improving a _feature_ or fixing a _bug_?

Example.

#### What's the new behavior?

Adds a new example that is an input event logger, for more easily seeing which input/keyboard/selection events are firing when editing in a Slate editor.

![image](https://user-images.githubusercontent.com/311752/43937175-ea9231e2-9c10-11e8-8e29-2cd9a24ca78d.png)

#### 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`.)
2018-08-09 20:30:23 -07:00
Ian Storm Taylor
f812816b7d
refactor native beforeinput handling (#2063)
* refactor native beforeinput handling

* fix lint
2018-08-09 01:06:31 -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
slate@0.37.3 slate-simulator@0.4.47 slate-schema-violations@0.1.28 slate-react@0.15.4 slate-prop-types@0.4.47 slate-plain-serializer@0.5.30 slate-hyperscript@0.7.3 slate-html-serializer@0.6.21 slate-base64-serializer@0.2.49
2018-08-08 16:31:10 -07:00
Bryan Haakman
7ff7a89ea7 fix pointForward and pointBackward (#2053)
* fix next being undefined in pointForward. Adds a check that next exists

* fix both pointForward and pointBackward

* fix for lint tests
2018-08-08 15:59: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
slate@0.37.2 slate-simulator@0.4.46 slate-schema-violations@0.1.27 slate-react@0.15.3 slate-prop-types@0.4.46 slate-plain-serializer@0.5.29 slate-hyperscript@0.7.2 slate-html-serializer@0.6.20 slate-base64-serializer@0.2.48
2018-08-07 19:31:35 -07:00
Slapbox
4d97496299 Fixes inability to deleteWordBackward at line start (#2046)
* Adds Unicode LF character to line endings for clipboard plaintext

This addresses https://github.com/ianstormtaylor/slate/issues/1932

* Fixes plaintext/unicode pastes not having line breaks

* Removes stray spaces for Prettier

* Refactors Value creation to save 4 lines

* Allows for Ctrl+Backspace on line start

Previously Ctrl+Backspace would do nothing instead of continuing on to the above block.

* Tests that deleteWordBackwards joins lines properly
2018-08-07 16:21:30 -07:00
Ian Storm Taylor
1efe55602f Publish
- slate-hotkeys@0.2.0
 - slate-react@0.15.2
slate-react@0.15.2 slate-hotkeys@0.2.0
2018-08-07 16:03:20 -07:00
Ian Storm Taylor
fd9243b8f5
refactor slate-hotkeys, fix deleting at start of block (#2048) 2018-08-07 15:58:33 -07:00
Slapbox
3eabdea8d6 Adds Unicode LF character to line endings for clipboard plaintext (#2040)
* Adds Unicode LF character to line endings for clipboard plaintext

This addresses https://github.com/ianstormtaylor/slate/issues/1932

* Fixes plaintext/unicode pastes not having line breaks

* Removes stray spaces for Prettier

* Refactors Value creation to save 4 lines
2018-08-07 08:43:17 -07:00
Jinxuan Zhu
2e9b94b481 [Docs] Fix Packages/Readme.md (#1859)
* Fix document

* Fix lint
2018-08-06 13:22:31 -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
slate@0.37.1 slate-simulator@0.4.45 slate-schema-violations@0.1.26 slate-react@0.15.1 slate-prop-types@0.4.45 slate-plain-serializer@0.5.28 slate-hyperscript@0.7.1 slate-html-serializer@0.6.19 slate-base64-serializer@0.2.47
2018-08-06 13:16:46 -07:00
Ian Storm Taylor
092193a15e fix lint command 2018-08-06 13:13:40 -07:00
Ian Storm Taylor
52fc5611fc fix moveToEndOfPreviousBlock selection methods 2018-08-06 13:10:26 -07:00
Ian Storm Taylor
ffd9ead175 update changes docs, add missing selection changes 2018-08-06 11:46:42 -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
slate@0.37.0 slate-simulator@0.4.44 slate-schema-violations@0.1.25 slate-react@0.15.0 slate-prop-types@0.4.44 slate-plain-serializer@0.5.27 slate-hyperscript@0.7.0 slate-html-serializer@0.6.18 slate-base64-serializer@0.2.46
2018-08-03 15:41:27 -07:00
Ian Storm Taylor
adfc093e4e add more selection tests 2018-08-03 15:36:43 -07:00
Ian Storm Taylor
ff598bc5a1 update changelog 2018-08-03 15:28:02 -07:00
Ian Storm Taylor
e317892f44 update changelog 2018-08-03 15:27:20 -07:00
Zach Schneider
70d9e7951b Remove the deprecated Character model, and methods that reference it (#2016)
Closes #1999
2018-08-03 15:24:05 -07:00
Ian Storm Taylor
1695f5a20c update changelog 2018-08-03 15:19:18 -07:00
Ian Storm Taylor
38918c5e1c update changelog 2018-08-03 15:18:02 -07:00
Ian Storm Taylor
ea6c4d9da2 update peerDependencies 2018-08-03 15:11:28 -07:00
Ian Storm Taylor
152a4aeb54 update changelog 2018-08-03 15:10:58 -07:00
Ian Storm Taylor
d2f6e06a66 update setters and docs 2018-08-03 15:08:20 -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
5a539df0f9
fix range offset defaults to be null (#2026) 2018-08-03 14:19:00 -07:00
Ian Storm Taylor
de3420b0f1
add Node.createRange for range resolution (#2025)
#### Is this adding or improving a _feature_ or fixing a _bug_?

Improvement.

#### What's the new behavior?

Adds a `Node.createRange` method for more easily creating ranges that are normalized to the current document. As well as a `Node.resolveRange` lower-level method for just doing the normalization on an existing range.

Later we can deprecate `Range.normalize` since it should be on the node instead.

#### 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: #2011
2018-08-03 14:16:47 -07:00
Florian
8a1d75025a Fix typo: "the your" -> "your" (#2032) 2018-08-03 11:39:38 -07:00
Ian Storm Taylor
9b0e061bcf fix normalize docs 2018-08-01 15:53:17 -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
slate@0.36.2 slate-simulator@0.4.43 slate-schema-violations@0.1.24 slate-react@0.14.3 slate-prop-types@0.4.43 slate-plain-serializer@0.5.26 slate-hyperscript@0.6.3 slate-html-serializer@0.6.17 slate-hotkeys@0.1.4 slate-dev-test-utils@0.0.1 slate-dev-logger@0.1.42 slate-dev-environment@0.1.4 slate-dev-benchmark@0.0.4 slate-base64-serializer@0.2.45
2018-08-01 12:07:02 -07:00
Ian Storm Taylor
5e6d376501
fix selection operations being duplicated (#2023)
#### Is this adding or improving a _feature_ or fixing a _bug_?

Bug.

#### What's the new behavior?

Fixes selection operations from being duplicated.

#### How does this change work?

Previously the selection properties were compared by reference, but paths are immutable `List` objects, which always show up as having changed, resulting in extra selection operations that without any real changes. We now use `Immutable.is` to remove those duplicates, fixing the undo history stack.

#### 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: #2006
2018-08-01 11:55:45 -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
Florian
f7fd0b7a4e Docs: Remove leading semicolon in code snippet (#2020)
* Remove leading semicolon in code snippet

* Update changes.md
2018-08-01 09:04:12 -07:00
Cheng Zheng
142d9a82f6 Add Products: Taskade (#2008)
* Add Products: Taskade

* Alphabet order

* remove empty line
2018-07-31 22:39:32 -07:00
Martti Laine
1ff1dfa4b8 Add slate-react to the bundled source guide (#2010) 2018-07-31 16:46:30 -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
slate@0.36.1 slate-simulator@0.4.42 slate-schema-violations@0.1.23 slate-react@0.14.2 slate-prop-types@0.4.42 slate-plain-serializer@0.5.25 slate-hyperscript@0.6.2 slate-html-serializer@0.6.16 slate-base64-serializer@0.2.44
2018-07-31 16:31:54 -07:00
Ian Storm Taylor
06bca539dc
fix getFragmentAtRange to use paths properly (#2012)
#### Is this adding or improving a _feature_ or fixing a _bug_?

Bug.

#### What's the new behavior?

Fixes `Node.getFragmentAtRange` to use the proper argument signature when calling `Node.splitNode`, and refactors it to use paths for all of its logic.

#### 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: #2009
2018-07-31 16:26:52 -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
slate@0.36.0 slate-simulator@0.4.41 slate-schema-violations@0.1.22 slate-react@0.14.1 slate-prop-types@0.4.41 slate-plain-serializer@0.5.24 slate-hyperscript@0.6.1 slate-html-serializer@0.6.15 slate-dev-logger@0.1.41 slate-base64-serializer@0.2.43
2018-07-27 15:50:29 -07:00
Ian Storm Taylor
46a6086968 fix lint 2018-07-27 15:46:35 -07:00