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
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
AlbertHilb
5c840c78e1
Reshape void component structure. ( #1104 )
...
* Reshape void component structure.
Get rid of offscreen spacer.
* Polish Embeds example `Video` component.
* Fix oversight.
* Force spacer width to be 0.
* Update tests
2017-09-12 08:51:26 -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
16d29db8cb
add isSelected prop, cleanup sCU, add custom component reference ( #1084 )
...
* add isSelected prop, cleanup sCU, add custom component reference, fixes #1080
* fix custom node reference
* update custom node reference
* remove sCU check for text-only children
2017-09-07 14:33:34 -07:00
Ian Storm Taylor
01bc6944bd
fix change logic in embeds example, fixes #1074 ( #1078 )
2017-09-07 09:04:17 -07:00
Tobias Andersen
7eed37164b
Make sure nodes always know if they're selected ( #1029 )
...
* Make sure nodes update when their selection change
(cherry picked from commit 3e8744409ea94554faafa1e72415cdfb54b4bc78)
* Update examples of showing selected blocks nodes
2017-09-06 09:07:46 -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
Ian Storm Taylor
0c12e95b21
fix dom selection normalizing for void nodes
2016-12-02 17:01:08 -08:00
Soreine
ce0a5579e7
Remove a most of unused vars
2016-10-25 13:12:10 +02:00
Ian Storm Taylor
cc11861627
fix embed example to not clobber edits, closes #301
2016-09-10 17:59:01 -07:00
Ian Storm Taylor
ccac6102a5
fixes
2016-08-14 13:21:46 -07:00
Ian Storm Taylor
9a70188f34
loosen default shouldComponentUpdate for nodes, and make Void implicit
2016-08-04 14:12:27 -07:00
Ian Storm Taylor
c248b3de22
add embeds example, fix to not let events propagate out of voids
2016-07-28 15:38:17 -07:00