1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-01 05:16:10 +01:00

14 Commits

Author SHA1 Message Date
Ian Storm Taylor
fa343c07f4 Publish
- slate-dev-environment@0.2.0
 - slate-hotkeys@0.2.3
 - slate-react@0.15.9
2018-08-16 15:26:05 -07:00
Ian Storm Taylor
d94326512c remove old SUPPORTED_EVENTS logic 2018-08-16 15:24:19 -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
3bfec770e0 fix slate-dev-environment SUPPORTED_EVENTS export 2018-08-16 15:09:40 -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
f812816b7d
refactor native beforeinput handling (#2063)
* refactor native beforeinput handling

* fix lint
2018-08-09 01:06:31 -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
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
Ian Storm Taylor
01405be31b
add paths to ranges (#1997)
#### 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
2018-07-27 12:40:04 -07:00
Ian Storm Taylor
c1bad2b84c Publish
- slate-base64-serializer@0.2.31
 - slate-dev-environment@0.1.2
 - slate-hotkeys@0.1.2
 - slate-html-serializer@0.6.3
 - slate-hyperscript@0.5.12
 - slate-plain-serializer@0.5.12
 - slate-prop-types@0.4.29
 - slate-react@0.12.6
 - slate-schema-violations@0.1.10
 - slate-simulator@0.4.29
 - slate@0.33.6
2018-05-10 19:50:06 -07:00
Jérémie van der Sande
3f2e924f69 [Fix] Copy with empty Block as first-child (#1748)
* [Fix] Copy with empty Block as first-child
+ Added Opera support for only-Mark copy

* [Fix] Fixed one missing remove from merge
2018-05-01 17:44:49 -07:00
Ian Storm Taylor
c15f200d10 Publish
- slate-base64-serializer@0.2.30
 - slate-dev-environment@0.1.1
 - slate-hotkeys@0.1.1
 - slate-html-serializer@0.6.2
 - slate-hyperscript@0.5.11
 - slate-plain-serializer@0.5.11
 - slate-prop-types@0.4.28
 - slate-react@0.12.5
 - slate-schema-violations@0.1.9
 - slate-simulator@0.4.28
 - slate@0.33.5
2018-04-27 16:49:53 -07:00
Justin Weiss
d4c630c05a Extract hotkey and environment detection into separate packages (#1760)
* Extract hotkey and environment detection into separate packages

Overriding default behavior in plugins can be hard, because you have
to match all of the keybindings that Slate uses. By exporting hotkeys
as its own package, both core Slate plugins and custom plugins can use
the same key detection logic.

* Rename Hotkeys.* to Hotkeys.is*
2018-04-27 13:19:39 -07:00