1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-20 23:22:56 +01:00

40 Commits

Author SHA1 Message Date
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
Renaud Chaput
3339d088e1 Add Prettier with ESLint integration (#1589)
* 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
2018-02-06 15:12:00 -08:00
Ian Storm Taylor
5444a300b8
rename kind to object for clarity (#1501)
* rename `kind` to `object` for clarity

* add deprecation warning for direct access

* add deprecation warning for node creation
2018-01-04 15:26:53 -08:00
Ian Storm Taylor
3b497bc342 remove hard to maintain examples readmes 2017-10-28 16:24:03 -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
509d3d50fc remove rendering from schema & make it expressive (#1262)
* split rendering out of schema

* remove default components

* first stab at new schema

* make default normalizations smarter

* revert to forcing defaults to be verbose?

* refactor reason constants

* split nodes into blocks/inlines

* get tests passing

* restructure schema tests

* add parent test

* cleanup

* remove defaults from schema

* refactor schema rule.nodes validation, update example

* embed schema in state objects

* fixes

* update examples, and fixes

* update walkthroughs

* update docs

* remove old schemas doc page

* add more tests

* update benchmarks
2017-10-25 17:32:29 -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
11b2003f53 Remove data (#1244)
* remove data from event handler signatures

* standardize known transfer types

* add setEventTransfer to docs

* update examples, fix drag/drop

* fix tests and draggable attribute setting
2017-10-16 21:04:16 -07:00
Ian Storm Taylor
b462c2ce19 deprecate data, add getEventRange and getEventTransfer helpers (#1243) 2017-10-16 18:50:29 -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
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
9fca2d3b9b start removing raw serializer (#1098)
* start removing raw serializer

* convert first tests to use jsx

* simplify jsx tests for raw serializer

* allow for options in raw serializer tests

* add more preserve option tests

* convert plain serializer tests

* convert html serialize

* start converting html deserialize

* add hyperscript util

* remove slate-sugar copy-pasted

* finish converting html deserialize

* convert plugins tests

* update rendering tests

* convert schemas tests

* convert core plugin tests

* update hyperscript utl

* refactor changes test directory structure

* fix changes before migration

* add migrated changes test files

* remove <x- prefixes from migration

* get addMark at-current-range tests passing

* get delete at-current-range tests passing

* remove old tests

* convert deleteForward and deleteBackward

* convert insertBlock, insertInline, insertFragment, insertText

* convert removeMark, setBlock, setInline, splitBlock, splitInline

* add unstaged tests

* convert toggleMark, unwrapBlock, unwrapInline, wrapBlock, wrapInline, wrapText

* convert call, setData

* convert on-selection tests

* remove old on-selection tests

* convert history tests

* convert insertFragmentByKey, insertNodeByKey, insertTextByKey, mergeNodeByKey, moveNodeByKey

* convert removeNodeByKey, removeTextByKey, setMarkByKey, setNodeByKey

* convert splitDescendantsByKey, splitNodeByKey, unwrapBlockByKey, unwrapInlineByKey, unwrapNodeByKey, wrapBlockByKey

* fix tests

* port missing at-range tests to at-current-range

* remove at-range tests

* fix raw serializer tests

* fix linter

* fix to prefer toJSON as the canonical method name

* fix todos

* remove internal references to Raw

* add deprecation helper to Text.fromJSON

* convert examples to not use Raw, and not rely on terse

* remove focus-blur example, rename large document example

* refactor Raw serialize to deprecate, not remove, terse

* deprecate defaultBlockType, toRaw, cleanup serializers
2017-09-10 14:56:03 -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
Hans-Wilhelm Warlo
469d8b394c Refactor render arrow functions (#969) 2017-08-02 09:36:33 -07:00
Dae-Ho Kim
873f1b1124 Fix json (#798)
Remove comma
2017-05-06 09:19:27 -07:00
Ian Storm Taylor
64b1e542b8 refactor the Selection model, deprecating old methods (#631)
* refactor Selection, deprecating old methods

* fix a few more things

* introduce an alternative for moveToOffsets

* add edge methods for move{start/end}OffsetTo

* fix selection return value

* fix deprecation warnings

* refactor transforms to make auto-generating easier

* refactor and deprecate selection transforms

* remove deprecation warnings from tests

* fix deprecation warnings in examples
2017-02-27 12:55:13 -08:00
Ian Storm Taylor
c3578d12ad tighten linting rules 2017-02-25 10:13:21 -08:00
Soreine
944adc27fe Remove needless transform = transform.method() 2016-11-10 15:18:52 +01:00
Soreine
ce0a5579e7 Remove a most of unused vars 2016-10-25 13:12:10 +02:00
Ian Storm Taylor
ccac6102a5 fixes 2016-08-14 13:21:46 -07:00
Ian Storm Taylor
0eea98d4a9 fix link example 2016-08-02 10:33:02 -07:00
Ian Storm Taylor
5e6f5b9cd1 add event handlers to reference 2016-07-27 22:45:25 -07:00
Ian Storm Taylor
1a6c3c153e fix selection settings in links example 2016-07-27 22:31:39 -07:00
Ian Storm Taylor
1c86b2fcf7 fix deleting sibling inline node 2016-07-27 22:30:37 -07:00
Ian Storm Taylor
d20b8511bb refactor onKeyDown to use data object 2016-07-27 16:22:11 -07:00
Ian Storm Taylor
d78ddeabad update examples for terse raw 2016-07-25 14:45:37 -07:00
Ian Storm Taylor
6993b0c666 change a few examples to omit ranges for cleanliness 2016-07-21 16:41:35 -07:00
Ian Storm Taylor
c717f8429f add paste linkifying to link example 2016-07-18 13:06:10 -07:00
Ian Storm Taylor
d8783d618a add more example readmes 2016-07-14 16:31:55 -07:00
Ian Storm Taylor
ab12518a4b clean up examples 2016-07-13 16:19:49 -07:00
Ian Storm Taylor
3d33ab3da2 add plain text serializer 2016-07-13 14:55:41 -07:00
Ian Storm Taylor
510eb63d8d fixes 2016-07-12 21:14:21 -07:00
Ian Storm Taylor
2f4c8726e0 add attributes props in examples 2016-07-11 18:39:45 -07:00
Ian Storm Taylor
db1151bd15 add linting to examples 2016-07-07 08:35:13 -07:00
Ian Storm Taylor
de4afd38b1 cleanup renderers in examples, fixes #43 2016-07-06 14:42:59 -07:00
Ian Storm Taylor
e9ed40dd7f remove default export, fixes #42 2016-07-06 14:21:11 -07:00
Ian Storm Taylor
85361bf749 add hovering menu example 2016-06-28 15:47:29 -07:00
Ian Storm Taylor
2743c3741d refactor examples 2016-06-24 10:22:48 -07:00
Ian Storm Taylor
9d62948b1a update link example 2016-06-23 23:39:08 -07:00
Ian Storm Taylor
74cab690e3 broke lots of stuff, but added tests 2016-06-22 18:42:49 -07:00