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

33 Commits

Author SHA1 Message Date
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
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
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
37418643e2
add start of glossary (#1946)
This is the start of a glossary in the docs for terms that folks might not know when first learning Slate. Hopefully it makes it easier to learn. If anyone wants to help fill it out, that would be amazing. Thanks!
2018-07-02 10:27:35 -06:00
Renaud Chaput
de4c9e478a Lint JSON, CSS and Markdown files with Prettier (#1612)
* Process and Lint CSS, Markdown and JSON files with Prettier

* Run `yarn prettier` to re-format Markdown, CSS and JSON files
2018-02-07 07:58:41 -08:00
Ian Storm Taylor
b8ca5d04df update docs 2018-01-26 12:31:15 -08:00
Ian Storm Taylor
10eea06a8a refactor schema violations to be a separate package 2018-01-26 12:28:40 -08:00
Zach Schneider
856d033c5f Link to changelog in docs to generate links correctly. (#1540) 2018-01-25 13:31:21 -08:00
Ian Storm Taylor
a51180cfb7 add plugins doc 2018-01-10 22:10:55 -08:00
Justin Weiss
082fb53633 Add a copyFragment helper for plugin onCut/onCopy functions (#1429)
* Add a `copyFragment` helper for plugin onCut/onCopy functions

* Rename `copyFragment` to `cloneFragment`

* Fix a missing clone-fragment reference
2017-12-11 06:56:38 -08:00
Ian Storm Taylor
c9f1168cd7 add rendering and schema guides 2017-10-27 18:59:20 -07:00
Ian Storm Taylor
adb2678732
Rename "state" to "value" everywhere (#1313)
* rename state to value in slate core, as deprecation

* rename all references to state to value in slate core

* migrate slate-base64-serializer

* migrate slate-html-serializer

* migrate slate-hyperscript

* migrate slate-plain-serializer

* migrate slate-prop-types

* migrate slate-simulator

* fix change.setState compat

* deprecate references to state in slate-react

* remove all references to state in slate-react

* remove `value` and `schema` from props to all components

* fix default renderPlaceholder

* fix tests

* update examples

* update walkthroughs

* update guides

* update reference
2017-10-27 13:39:06 -07:00
Ian Storm Taylor
c22839c6eb add data model guide, update docs 2017-10-25 20:13:52 -07:00
Ian Storm Taylor
0694daf26a add plugins guide 2017-10-25 11:04:37 -07:00
Ian Storm Taylor
f42a64ac8f refactor placeholder to use schema (#1253)
* refactor placeholder to use schema

* update placeholder, remove old export

* add maxWidth to prevent overflow

* update docs
2017-10-18 00:23:39 -07:00
Ian Storm Taylor
117d8c55cc update docs 2017-10-17 20:53:38 -07:00
Ian Storm Taylor
2038d58c3a update docs 2017-10-17 20:30:29 -07:00
Ian Storm Taylor
68e4e090f0 update docs 2017-10-17 20:30:11 -07:00
Ian Storm Taylor
a28bd4100b update docs 2017-10-17 18:49:02 -07:00
Ian Storm Taylor
b8693eb9ba add other react utils to reference sidebar 2017-10-17 09:35:24 -07:00
Ian Storm Taylor
a341f4d4eb fix docs pages and plugins example 2017-10-17 09:22:08 -07:00
Yifeng Wang
58648bc23f fix minor doc typos (#1233) 2017-10-15 14:22:00 -07:00
Ian Storm Taylor
6c42f6c9c3 Rename Range to Leaf, and Selection to Range (#1231)
* rename Range to Leaf

* rename Selection to Range

* add findDOMRange, findNode, findRange helpers

* refactor to remove findDropPoint util

* revert findDOMNode to throwing errors

* export new helpers, fix linter

* update docs

* update examples
2017-10-14 15:36:27 -07:00
Ian Storm Taylor
0f530796f5 update docs 2017-09-11 19:36:46 -07:00
Ian Storm Taylor
ace9f47930 change slate to be a monorepo using lerna (#1106)
* init lerna, move files into ./packages

* move test files into ./packages

* more moving around

* fill out package.json files

* fixing imports

* more fixing of imports, and horribleness

* convert examples, fix linting errors

* add documentation

* update docs

* get tests passing

* update travis.yml

* update travis.yml

* update travis.yml

* update test script

* update travis.yml

* update scripts

* try simplifying travis.yml

* ocd stuff

* remove slate-core-test-helpers package

* add package readmes

* update reference docs structure

* refactor slate-simulator into its own package

* add docs for new packages

* update docs

* separate benchmarks into packages, and refactor them
2017-09-11 18:11:45 -07:00
Ian Storm Taylor
7470a6dd53 Expose transforms (#836)
* refactor to extract applyOperation util

* change handlers to receive transform instead of state

* change onChange to receive a transform, update rich-text example

* fix stack iterationg, convert check-list example

* convert code-highlighting, embeds, emojis examples

* change operations to use full paths, not indexes

* switch split and join to be recursive

* fix linter

* fix onChange calls

* make all operations invertable, add src/operations/* logic

* rename "join" to "merge"

* remove .length property of nodes

* fix node.getFragmentAtRange logic

* convert remaining examples, fix existing changes

* fix .apply() calls and tests

* change setSave and setIsNative transforms

* fix insert_text operations to include marks always

* cleanup and fixes

* fix node inheritance

* fix core onCut handler

* skip constructor in node inheritance

* cleanup

* change updateDescendant to updateNode

* add and update docs

* eliminate need for .apply(), change history to mutable

* add missing file

* add deprecation support to Transform objects

* rename "transform" to "change"

* update benchmark

* add deprecation util to logger

* update transform isNative attr

* fix remaining warn use

* simplify history checkpointing logic

* fix tests

* revert history to being immutable

* fix history

* fix normalize

* fix syntax error from merge
2017-09-05 18:03:41 -07:00
Michael McCombie
91619616ac Fix "Auto-Markdown" Doc Link (#906)
Fixes the auto markdown preview link in the list of examples
2017-07-11 13:01:38 -07:00
Joshua Li
17b1a455cc Update README.md (#905)
Fixed some doc links.
2017-07-11 12:49:26 -07:00
jatins
310b281469 fix example links in Readme (#745) 2017-04-23 12:02:57 -07:00
Ian Storm Taylor
6f9e8bc5ec update gitbook intro 2017-04-16 16:22:03 -07:00
Ian Storm Taylor
5ce7f3d496 fix examples links 2017-04-16 16:13:48 -07:00
Ian Storm Taylor
8687fac1a2 add more to docs intro 2017-03-31 17:18:13 -07:00
Ian Storm Taylor
e71c78247a update gitbook 2016-08-25 22:32:17 -04:00