1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-23 08:50:59 +01:00

3211 Commits

Author SHA1 Message Date
Sunny Hirai
ec0d2d8e16 Improve documentation for TypeScript 2021-03-13 11:17:17 -08:00
Sunny Hirai
fc5d0e3a89 Fix TS documentation 2021-03-13 11:12:57 -08:00
Sunny Hirai
a72958e6c3
Improved Types (#4119)
* Experimental release to see if CustomTypes holds up through a publish

* Add experimental release script

* Fix lint

* v0.60.5-alpha.0

* Allow null properties in setNodes

* v0.60.6-alpha.0

* Revert null properties on Transforms.setNodes

* v0.60.7-alpha.0

* Update examples to use custom Element and Text with discriminated unions

* Add documentation for using TypeScript improvements

* Be explicit about typescript version in package.json

* Force lerna bootstrap to fix build issues on CI and fix a few type examples

* Add slate devDependencies with * back

* v0.60.7

* Switch to a non prerelease version to fix lerna not linking in root

* Add documentation for not using prerelease versions and on how to create experimental releases

* Try removing lerna bootstrap and see if it works
2021-03-11 11:48:31 -08:00
Jacob
5267f07175
fix: fix 404 status of iframe example page (#4092) 2021-02-28 23:00:33 -05:00
Jack
f697b074fc
Add discord to the list of products that use slate (#4101)
Discord uses slate
2021-02-27 17:51:15 -05:00
Ian Storm Taylor
41cd18b568
Update PULL_REQUEST_TEMPLATE.md 2021-02-18 14:32:32 -05:00
Ian Storm Taylor
1c35626600
Create config.yml 2021-02-18 14:23:29 -05:00
Ian Storm Taylor
8d3828113c
Delete ISSUE_TEMPLATE.md 2021-02-18 14:22:12 -05:00
Ian Storm Taylor
c464c475d6
Update and rename ---feature-request.md to request-feature.md 2021-02-18 14:17:22 -05:00
Ian Storm Taylor
2b1bb9b3c6
Update and rename ---improvement.md to request-improvement.md 2021-02-18 14:17:05 -05:00
Ian Storm Taylor
d6e7f634f2
Update and rename ---platform-bug.md to bug-platform.md 2021-02-18 14:16:50 -05:00
Ian Storm Taylor
62169bd54c
Update and rename ---core-bug.md to bug-core.md 2021-02-18 14:16:30 -05:00
Ian Storm Taylor
3cc2e332b3
Delete platform-bug.md 2021-02-18 14:15:14 -05:00
Ian Storm Taylor
ccb436d7c5
Delete platform-bug-report.md 2021-02-18 14:15:10 -05:00
Ian Storm Taylor
a2fcc18df2
Delete core-bug.md 2021-02-18 14:15:05 -05:00
Ian Storm Taylor
a640eea09d Update issue templates 2021-02-18 14:14:20 -05:00
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