1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-06 07:17:27 +02:00
Commit Graph

295 Commits

Author SHA1 Message Date
Sunny Hirai
df06528b18 v0.60.4 2021-02-16 19:49:37 -08:00
Sunny Hirai
291aac9c5b v0.60.3 2021-02-08 13:01:11 -08:00
Sunny Hirai
424a6cbde9 v0.60.2 2021-01-19 00:10:44 -08:00
Sunny Hirai
1f067b8d33 v0.60.1 2020-12-11 13:06:26 -08:00
Sunny Hirai
db3f52517f Merge TypeScript types from master into main 2020-11-27 16:31:16 -08:00
Sunny Hirai
db118ee8d8 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 329e44e43d.

* 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
CameronAckermanSEL
60b56651b2 v0.59.0 2020-09-24 20:46:51 -07:00
Maria Jaramillo
93fe251517 Convert Slate tests to TypeScript (#3784)
* changed to tsx

* slate tests

* finished making typescript tests

* linting

* linting

* reverted slate-hyperscript files to jsx and changed edlint config

* removed extra file

* Update package.json

* Update package.json

* deleted { file

* changed to tsx

* slate tests

* finished making typescript tests

* linting

* linting

* reverted slate-hyperscript files to jsx and changed edlint config

* removed extra file

* Update package.json

* Update package.json

* deleted { file

* rebase

* removed ~ files

* changed yarn
2020-07-14 13:47:47 -04:00
CameronAckermanSEL
958189bc4a v0.58.4 2020-07-07 18:17:33 -07:00
CameronAckermanSEL
ca126fbb39 v0.58.3 2020-06-03 18:24:33 -07:00
CameronAckermanSEL
aabb9b50bd v0.58.1 2020-05-11 16:31:12 -07:00
CameronAckermanSEL
8737f0411a v0.58.0 2020-05-05 18:50:22 -07:00
CameronAckermanSEL
036ee664af v0.57.3 2020-05-04 17:36:43 -07:00
CameronAckermanSEL
4f6ca7bc62 v0.57.2 2020-04-24 16:26:26 -07:00
CameronAckermanSEL
23141c046b Revert "v0.57.2"
This reverts commit f9ec4cfaa8.
2020-04-08 10:35:45 -07:00
CameronAckermanSEL
f9ec4cfaa8 v0.57.2 2020-04-07 13:19:28 -07:00
Andreas Geffen Lundahl
eb181f3279 Allow zero as offset on <anchor> and <focus> inside <selection> (#3491)
* Allow zero as offset on <anchor> and <focus> inside <selection>

When creating a selection using the <selection> hyperscript tag, you couldn't
set zero as offset on <anchor> and <focus>, because of a faulty falsiness
check. This is fixed by checking if the offset is falsy and explicitly not zero.

* Make sure offset can't be null or undefined on <anchor> and <focus>

Throw exception when offset is strictly null or undefined, on <anchor> and
<focus> when creating a <selection>.
2020-02-20 16:00:59 -05:00
Ian Storm Taylor
22d9095c39 v0.57.1 2019-12-20 12:39:32 -05:00
Ian Storm Taylor
922d03e006 v0.57.0 2019-12-18 16:04:05 -05:00
Ian Storm Taylor
c2d7905e19 v0.56.1 2019-12-18 14:59:46 -05:00
Ian Storm Taylor
d765cbc3a8 v0.56.0 2019-12-17 23:03:12 -05:00
Ian Storm Taylor
6f98363566 v0.55.3 2019-12-16 16:36:55 -05:00
Ian Storm Taylor
c77e1233d4 remove unused deps, fix peerDependencies 2019-12-16 16:32:44 -05:00
Ian Storm Taylor
72b4bf11db v0.55.2 2019-12-16 16:20:19 -05:00
Ian Storm Taylor
1f367a25fa v0.55.1 2019-12-16 16:05:01 -05:00
Ian Storm Taylor
40856cfa95 v0.55.0 2019-12-15 21:03:17 -05:00
Ian Storm Taylor
b927fa3a11 Publish
- slate-history@0.54.6
 - slate-hyperscript@0.54.6
 - slate-react@0.54.6
 - slate@0.54.6
2019-12-13 19:15:11 -05:00
Ian Storm Taylor
00c5954f41 Publish
- slate-history@0.54.5
 - slate-hyperscript@0.54.5
 - slate-react@0.54.5
 - slate@0.54.5
2019-12-13 17:00:38 -05:00
Ian Storm Taylor
f05cefa7a8 Publish
- slate-history@0.54.4
 - slate-hyperscript@0.54.4
 - slate-react@0.54.4
 - slate@0.54.4
2019-12-13 16:08:08 -05:00
Ian Storm Taylor
54d8be1172 Publish
- slate-history@0.54.3
 - slate-hyperscript@0.54.3
 - slate-react@0.54.3
 - slate@0.54.3
2019-12-13 12:55:48 -05:00
Ian Storm Taylor
c20f771b0a Publish
- slate-history@0.54.2
 - slate-hyperscript@0.54.2
 - slate-react@0.54.2
 - slate@0.54.2
2019-12-12 20:23:18 -05:00
Ian Storm Taylor
262abdc687 Publish
- slate-history@0.54.1
 - slate-hyperscript@0.54.1
 - slate-react@0.54.1
 - slate@0.54.1
2019-12-12 17:13:18 -05:00
Ian Storm Taylor
c9ee503828 Publish
- slate-history@0.54.0
 - slate-hyperscript@0.54.0
 - slate-react@0.54.0
 - slate@0.54.0
2019-12-12 16:00:14 -05:00
Ian Storm Taylor
26b67578d4 Publish
- slate-history@0.53.0
 - slate-hyperscript@0.53.0
 - slate-react@0.53.0
 - slate@0.53.0
2019-12-10 19:02:04 -05:00
Ian Storm Taylor
e68a5cd305 remove the slate-schema package (#3291) 2019-12-10 17:53:27 -05:00
Ian Storm Taylor
9d4a9d7a65 Publish
- slate-history@0.52.6
 - slate-hyperscript@0.52.6
 - slate-react@0.52.7
 - slate-schema@0.52.6
 - slate@0.52.6
2019-12-10 16:18:34 -05:00
Ian Storm Taylor
bf5cd700ca Publish
- slate-history@0.52.5
 - slate-hyperscript@0.52.5
 - slate-react@0.52.5
 - slate-schema@0.52.5
 - slate@0.52.5
2019-12-07 22:57:26 -05:00
Ian Storm Taylor
cfd4c3dd17 Publish
- slate-history@0.52.4
 - slate-hyperscript@0.52.4
 - slate-react@0.52.4
 - slate-schema@0.52.4
 - slate@0.52.4
2019-12-07 18:14:07 -05:00
Ian Storm Taylor
0856dd7115 Publish
- slate-history@0.52.3
 - slate-hyperscript@0.52.3
 - slate-react@0.52.3
 - slate-schema@0.52.3
 - slate@0.52.3
2019-12-07 11:47:18 -05:00
Ian Storm Taylor
e1918a7cf4 try to fix rollup ts declarations 2019-12-07 11:40:48 -05:00
Ian Storm Taylor
7fee65b87c Publish
- slate-history@0.52.2
 - slate-hyperscript@0.52.2
 - slate-react@0.52.2
 - slate-schema@0.52.2
 - slate@0.52.2
2019-12-06 17:57:37 -05:00
Ian Storm Taylor
1389093f06 Publish
- slate-history@0.52.1
 - slate-hyperscript@0.52.1
 - slate-react@0.52.1
 - slate-schema@0.52.1
 - slate@0.52.1
2019-12-06 12:39:26 -05:00
Ian Storm Taylor
8653e74f6c Publish
- slate-history@0.52.0
 - slate-hyperscript@0.52.0
 - slate-react@0.52.0
 - slate-schema@0.52.0
 - slate@0.52.0
2019-12-05 15:39:58 -05:00
Ian Storm Taylor
c2f962da58 update keywords 2019-12-05 15:38:14 -05:00
Ian Storm Taylor
c34b4b7462 Publish
- slate-history@0.51.0
 - slate-hyperscript@0.51.0
 - slate-react@0.51.0
 - slate-schema@0.51.0
 - slate@0.51.0
2019-12-05 12:52:03 -05:00
Ian Storm Taylor
7e6f680a1f update changelogs 2019-12-05 11:44:07 -05:00
Ian Storm Taylor
4c03b497d9 remove marks, in favor of text properties (#3235)
* remove marks, in favor of text properties

* fix lint

* fix more examples

* update docs
2019-12-05 11:21:15 -05:00
Ian Storm Taylor
20cb063a90 Publish
- slate-history@0.50.10
 - slate-hyperscript@0.50.8
 - slate-react@0.50.10
 - slate-schema@0.50.10
 - slate@0.50.8
2019-12-02 18:56:42 -05:00
Ian Storm Taylor
fccd0a7502 Publish
- slate-history@0.50.9
 - slate-hyperscript@0.50.7
 - slate-react@0.50.9
 - slate-schema@0.50.8
 - slate@0.50.7
2019-12-01 23:05:56 -05:00