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

3195 Commits

Author SHA1 Message Date
Sunny Hirai
df06528b18 v0.60.4 v0.60.4 2021-02-16 19:49:37 -08:00
Sunny Hirai
513771c82a
slate-react: MVP for working with non-global window objects (fix for #3819) (#4079)
* mvp implementation for working with non-global window instances

* remove unused element renderer

* fix typo in comment

* fix wrong example reference

* Add @babel/helper-call-delegate to fix build error

Co-authored-by: Lukas Buenger <lukasbuenger@gmail.com>
2021-02-16 19:40:15 -08:00
Sunny Hirai
6d66d87f67 Exclude checking source maps for next and @next 2021-02-16 18:03:24 -08:00
Steve Marquis
5201a1856f
Handle sibling moves in moveNodes transform (#3978)
* Handle sibling moves better in move nodes.
2021-02-16 12:27:58 -05:00
Steve Marquis
e4936c3f32
Fix broken attribute references (#4011) 2021-02-11 18:29:03 -05:00
David Amrani
3f086a8f62
updated file extensions for example links (#4024) 2021-02-11 18:26:52 -05:00
Sunny Hirai
291aac9c5b v0.60.3 v0.60.3 2021-02-08 13:01:11 -08:00
George
fa1ac3a2de
fix intersected Text decorations && add tests for that case (#3735) 2021-02-06 09:06:14 -05:00
Rein Van Imschoot
2bba0e68c6
Adds path parameter to NodeMatch (#4054)
* Add path to NodeMatch function.
2021-02-02 11:18:27 -05:00
Jacob
0513539ed7
fix: Operation.isOperationList just check value[0] (#4061)
* Fix list queries.
2021-01-31 10:21:04 -05:00
Steve Marquis
295be40039
Mark transform type explicitly (#4022) 2021-01-30 20:21:30 -05:00
Andrew Herron
4e667b9109
Don't clone nodes when applying a split_node operation (#4004) 2021-01-30 20:13:59 -05:00
Sunny Hirai
dd351c9d0a Improve documentation for publishing to NPM 2021-01-19 00:33:23 -08:00
Sunny Hirai
424a6cbde9 v0.60.2 v0.60.2 2021-01-19 00:10:44 -08:00
inokawa
a1be70204e
Fix typo (#3976) 2021-01-15 20:12:08 -08:00
Krzysztof Mędrzycki
79e02e881f
Upgrade immer to 7.0.0 (#3850) 2021-01-15 12:07:42 -05:00
Kiko Estrada
d22c76ae13
Docs: Fix example code links (#4044)
Replaced old .js links with current .tsx format
2021-01-14 17:42:10 -05:00
Ulion
b5859b7e2e
Fix useEditor not inside Slate error caused by introduce useSlateStatic (#4027) 2021-01-14 09:20:44 -05:00
Sunny Hirai
228f4fa94f Add documentation for @next releases to Contributing.md 2020-12-11 13:35:56 -08:00
Sunny Hirai
1d3b3b1dad Clean up publish scripts 2020-12-11 13:26:31 -08:00
Sunny Hirai
1f067b8d33 v0.60.1 v0.60.1 2020-12-11 13:06:26 -08:00
Sunny Hirai
e70b488253 Improve release scripts in package.json 2020-12-11 13:06:00 -08:00
Brent Farese
a4cbc7ed2d
Fix TS type errors. (#4014)
Fix for https://github.com/ianstormtaylor/slate/issues/4003
2020-12-11 12:59:54 -08:00
Sunny Hirai
db3f52517f Merge TypeScript types from master into main 2020-11-27 16:31:16 -08:00
Sunny Hirai
12ea586d82 Add release:next script 2020-11-24 12:56:55 -08:00
Sunny Hirai
db118ee8d8 v0.60.0 v0.60.0 2020-11-24 12:39:01 -08:00
Sunny Hirai
08275f68f3
Custom TypeScript Types (#3835)
This PR adds better TypeScript types into Slate and is based on the proposal here: https://github.com/ianstormtaylor/slate/issues/3725

* Extend Slate's types like Element and Text

* Supports type discrimination (ie. if an element has type === "table" then we get a reduced set of properties)

* added custom types

* files

* more extensions

* files

* changed fixtures

* changes eslint file

* changed element.children to descendant

* updated types

* more type changes

* changed a lot of typing, still getting building errors

* extended text type in slate-react

* removed type assertions

* Clean up of custom types and a couple uneeded comments.

* Rename headingElement-true.tsx.tsx to headingElement-true.tsx

* moved basetext and baselement

* Update packages/slate/src/interfaces/text.ts

Co-authored-by: Brent Farese <25846953+BrentFarese@users.noreply.github.com>

* Fix some type issues with core functions.

* Clean up text and element files.

* Convert other types to extended types.

* Change the type of editor.marks to the appropriate type.

* Add version 100.0.0 to package.json

* Revert "Add version 100.0.0 to package.json"

This reverts commit 329e44e43d968700655b1c46f968bfd3147e7339.

* added custom types

* files

* more extensions

* files

* changed fixtures

* changes eslint file

* changed element.children to descendant

* updated types

* more type changes

* changed a lot of typing, still getting building errors

* extended text type in slate-react

* removed type assertions

* Clean up of custom types and a couple uneeded comments.

* Rename headingElement-true.tsx.tsx to headingElement-true.tsx

* moved basetext and baselement

* Update packages/slate/src/interfaces/text.ts

Co-authored-by: Brent Farese <25846953+BrentFarese@users.noreply.github.com>

* Fix some type issues with core functions.

* Clean up text and element files.

* Convert other types to extended types.

* Change the type of editor.marks to the appropriate type.

* Run linter.

* Remove key:string uknown from the base types.

* Clean up types after removing key:string unknown.

* Lint and prettier fixes.

* Implement custom-types

Co-authored-by: mdmjg <mdj308@nyu.edu>

* added custom types to examples

* reset yarn lock

* added ts to fixtures

* examples custom types

* Working fix

* ts-thesunny-try

* Extract interface types.

* Fix minor return type in create-editor.

* Fix the typing issue with Location having compile time CustomTypes

* Extract types for Transforms.

* Update README.

* Fix dependency on slate-history in slate-react

Co-authored-by: mdmjg <mdj308@nyu.edu>
Co-authored-by: Brent Farese <brentfarese@gmail.com>
Co-authored-by: Brent Farese <25846953+BrentFarese@users.noreply.github.com>
Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
2020-11-24 12:30:06 -08:00
Tommy Dong
a5f4170162
Editor.next and Editor.previous now return the first match (#3957)
* Fixes to Editor.next and Editor.previous along with methods used therein (Editor.before, Editor.after, Editor.positions).
2020-11-10 21:56:25 -05:00
Udayan Shevade
6602681565
docs: update help label and link (#3860) 2020-11-03 12:38:52 -05:00
Wendell Hu
59ee7f8488
doc: change example readme doc link (#3853) 2020-11-03 12:38:08 -05:00
Marcus Wood
42748e64e1
remove package-lock.json (#3959) 2020-11-02 20:20:54 -05:00
Marcus Wood
bf2fe9ffe5
export useEditor back out of package (#3961) 2020-11-02 17:04:36 -05:00
Mitchell Donaldson
bf428df4e2
Add hasPrevious method to Path (#3963)
* Add hasPrevious method to Path API.

Co-authored-by: Mitchell Donaldson <mitch@nod.money>
2020-11-02 16:28:43 -05:00
Isaac Schultz
d3f88fb922
Check if a node exists before normalization in Editor.normalize (#3907)
* Check if a node exists before normalization
2020-10-29 20:56:14 -04:00
Song You
4ae58e5c95
Differentiate between useSlate and useEditor hooks (#3941)
* Rename useEditor function to useSlateStatic

* Expose useEditor hook with deprecated flag

* Clarify useEditor deprecation in file and in docs
2020-10-29 15:39:21 -04:00
CameronAckermanSEL
60b56651b2 v0.59.0 v0.59.0 2020-09-24 20:46:51 -07:00
Wayne Leroux
4c3e737dda
Fixed issue where virtual keyboard closes when resynchronizing selection in Chrome on Android (#3866)
* Fixed issue where virtual keyboard closes when resynchronizing selection

* Fixed lint issue

* Added inversion of start-end to end-start when range is backwards
2020-09-16 20:48:12 -07:00
Jason Tamulonis
b616e75d63
Upgrade rollup packages to remove security vulnerability (#3844) 2020-08-27 14:18:39 -04:00
Jason Tamulonis
b27c3fde3b
Remove unused dependency (#3843) 2020-08-27 12:32:47 -04:00
Githoniel
79eee6b378
fix inconsistent render reversed selection (#3804)
* fix inconsistent render reversed selection

* fix type error

* add comment for setReverseDomSelection

* add comment for setReverseDomSelection

* add comment for toDOMRange
2020-08-20 08:43:16 -07:00
dependabot[bot]
91564f8812
Bump prismjs from 1.17.1 to 1.21.0 (#3817)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.17.1 to 1.21.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.17.1...v1.21.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-19 10:35:32 -07:00
Vincent
94158838f0
delete legacy rollup config (#3833) 2020-08-19 10:33:49 -07:00
CameronAckermanSEL
e40fd0534d fix #3830 2020-08-19 09:41:28 -07:00
CameronAckermanSEL
e7b5f75989 fixed path to examples 2020-08-19 09:23:39 -07:00
Wendell Hu
912d4b79da
docs: convert examples to typescript (#3766)
* docs: convert examples to typescript

* docs: convert remaining examples

* docs: update next.js

* ci: fix lint

* docs: fix next.js path

* docs: cleanup

* update

Co-authored-by: wendellhu <wendellhu@tencent.com>
2020-08-19 09:14:51 -07:00
Jason Tamulonis
7b2b6df215
Remove duplicate transform code (#3793) 2020-08-18 16:33:22 -07:00
Marcus Wood
9f3bc0a4da
Fix typo (#3827) 2020-08-18 15:21:41 -07:00
Diana Lease
63f099952e
fix(slate-react): update onDOMBeforeInput when onDOMBeforeInput prop changes (#3617) (#3829)
Signed-off-by: Diana Lease <dianarlease@gmail.com>
2020-08-18 15:21:14 -07:00
Brent Farese
0468290eee
Replace Iterable with Generator. (#3726)
* Replace Iterable with Generator for correct types.
2020-08-06 20:17:50 -04:00
Maria Jaramillo
d5eaa1164d
Fixed html (#3809)
* Add version 100.0.0 to package.json

* Revert "Add version 100.0.0 to package.json"

This reverts commit 329e44e43d968700655b1c46f968bfd3147e7339.

* fixed typo in html file

Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
2020-08-05 15:57:48 -07:00