1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-03-19 20:59:41 +01:00

123 Commits

Author SHA1 Message Date
github-actions[bot]
d467e33c33
Version Packages (#4610)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-10-24 08:11:55 -07:00
github-actions[bot]
3678590ccf
Version Packages (#4594)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-10-18 14:05:11 -07:00
github-actions[bot]
38717ad455
Version Packages (#4539)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-09-23 12:28:47 -07:00
github-actions[bot]
35b722cadd
Version Packages (#4520)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-09-14 01:20:36 -07:00
Dylan Schiemann
91ca440723
Attempt fix the release process (#4510)
* Attempt fix the release process

* unbreak the release process
2021-09-13 04:48:09 -07:00
Dylan Schiemann
269e59c93a
Immer 9 security update (#4505)
* add yarn upgrade-interactive plugin

* chore(immer): update immer to address security issue

* Add changeset
2021-09-09 14:16:50 -07:00
Tom Scott
50bb3d7e32
Upgrade is-plain-object to v5.0.0 (#4500)
* Upgrade `is-plain-object` to v5.0.0

The `is-plain-object` package recently had a major version upgrade that
broke libraries which import its default export, such as this one. This
causes issues when other packages in the same application require a
higher version of `is-plain-object`, resulting in an error originating
in Slate's codebase. To remedy this, Slate is now depending on
`is-plain-object@^5.0.0` and its import references across the codebase
have been updated.

Fixes #4499

* Add changeset

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2021-09-09 12:55:13 -07:00
Eric Charles
d338dcc7ce
Jest testing for slate-react (#4459)
* initial skeleton for jest testing

* run in serial mocha, then jest on slate-react only

* run-s without glob patterns https://github.com/yarnpkg/berry/issues/22

* don't run mocha on slate-react package

* use yarn run instead of run-s
2021-09-01 14:25:11 -07:00
Bryan Haakman
8eb1abac87
Migrate yarn to berry v3 (#4417)
* Migrate to yarn berry v3

* Fix yarn dependencies for linting

* Specifically invoke bash in yarn clean to make brace expansion work

* Upgrade cypress to 8.x to support yarn berry

* Try out yarn berry workaround for netlify

From https://answers.netlify.com/t/using-the-new-yarn-release-2-0-0-berry/8270

* Update .yarnrc.yml for syntax consistency

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>

* use rimraf for clean command with escaped glob pattern

* Use workspace:* resolution for workspace packages and rewrite yarn.lock

* set workspace package versions explicit again

* update peer dependencies

* disable import/named for ts and tsx files

* Replace 'key' with 'key=true' wherever babel complains

* replace all instances of key to someKey in tests to satisfy eslint and babel

* remove unnecessary yarn packageExtension and remove cross-env dependency

* upgrade yarn to latest

* Upgrade next.js to 10.x to support yarn berry

* update .yarnrc to satisfy netlify

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2021-08-28 04:59:10 -07:00
Bryan Haakman
8a5a50d904
Upgrade cypress to 8.x and next to 10.x (#4469) 2021-08-24 21:41:15 -07:00
Jimmy Oliger
0025900349
Add unicode sequences support (#4326)
* Add failing test

* Handle sequences

* Uncomment test cases

* Handle RTL unicode sequences

* Remove esrever

* Add tests

* Use iterator instead of Array.from

* Add changeset

* Rename split to splitByCharacterDistance

* Make reverse optional

* Fix casing

* Fix yarn.lock

* Fix tests

* Remove fast-deep-equal after bad merge
2021-08-13 03:50:52 -07:00
Andrew Herron
6f47cbbe0d
Remove fast-deep-equal (#4276)
* Remove fast-deep-equal in favour of a custom slate-specific equality check that only supports nested objects

* Add array comparison to deep equal. Fix bug with multiple nested objects.
2021-08-11 12:58:25 -07:00
dependabot[bot]
4dea740862
build(deps): bump path-parse from 1.0.6 to 1.0.7 (#4435)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-11 10:01:30 +10:00
dependabot[bot]
4f0ba30f0a
build(deps-dev): bump prismjs from 1.23.0 to 1.24.0 (#4355)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.23.0 to 1.24.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.23.0...v1.24.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: direct:development
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-10 11:26:20 +10:00
dependabot[bot]
247372d5e1
build(deps): bump tar from 4.4.13 to 4.4.15 (#4410)
Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.15.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.13...v4.4.15)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-10 11:25:09 +10:00
Jake Donham
0188980796
fix bug: decorate is not called for immediate children of editor (#4394)
* fix bug: decorate is not called for immediate children of editor

* short-circuit return instead of else in Child

Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>

* oops missing brace

* changeset

Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
2021-08-05 13:22:48 -04:00
Sunny Hirai
506d9bce53 Add syntax highlighting example to menu 2021-07-01 17:10:35 -07:00
Claudéric Demers
4f50211984
Temporarily revert Android commits in order to create a release of Slate focused solely on Android (#4256)
* Revert "Add DefaultEditable and AndroidEditable to exports (#4255)"

This reverts commit 5298e51f6e8a7d62acb71092f7afd6565cbdc65e.

* Revert "Feature/android keyboard support (#4200)"

This reverts commit e03ce7c5614a1a69d039bfbeea94696376585fd0.
2021-05-12 21:24:57 -04:00
Wayne Leroux
e03ce7c561
Feature/android keyboard support (#4200)
* Added Android Keyboard Support

* Added changeset for android keyboard support

* Removed dead code in android editable that supported non-android environments

* Removed unnecessary attributes observation for android-editable

* Removed dead code

* Added no-error boundary

* Fixed issues with linters
2021-05-12 16:30:39 -07:00
dependabot[bot]
d2e011d8fc
build(deps): bump lodash from 4.17.19 to 4.17.21 (#4251)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.19...4.17.21)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 06:51:54 +10:00
dependabot[bot]
2b7af0541b
build(deps): bump hosted-git-info from 2.8.8 to 2.8.9 (#4254)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 06:48:37 +10:00
Jonas Kruckenberg
b33a531bd0
replace lodash depency in slate (#4245)
* replace lodash/omit with custom fn

* replace lodash/isEqual with fast-deep-equal
2021-05-13 06:45:45 +10:00
dependabot[bot]
41af0584d2
build(deps): bump handlebars from 4.7.6 to 4.7.7 (#4249)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.7.6 to 4.7.7.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.7.6...v4.7.7)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-07 09:54:30 -04:00
dependabot[bot]
3b3c94a72c
Bump immer from 7.0.7 to 8.0.1 (#4050)
Bumps [immer](https://github.com/immerjs/immer) from 7.0.7 to 8.0.1.
- [Release notes](https://github.com/immerjs/immer/releases)
- [Commits](https://github.com/immerjs/immer/compare/v7.0.7...v8.0.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-05 19:52:00 -04:00
Julian Krispel-Samsel
4181107e56
4196 integration tests with cypress (#4206)
* - update gitignore
- add cypress configuration and example test

* add integration tests to ci workflow

* add note about running integration tests

* Update docs/general/contributing.md

Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>

* Update .gitignore

Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>

* Update cypress.json

Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>

* add baseUrl, remove goTo command

Co-authored-by: Tim Buckley <timothypbuckley@gmail.com>
2021-04-16 11:17:24 +01:00
Ian Storm Taylor
c5d412f5c6 add lint-staged for auto-formatting commits 2021-04-01 01:41:07 -04:00
dependabot[bot]
eb10ddf10b
Bump prismjs from 1.21.0 to 1.23.0 (#4106)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.21.0 to 1.23.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.21.0...v1.23.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-31 14:41:58 -04:00
dependabot[bot]
f49d6a3c7f
Bump y18n from 4.0.0 to 4.0.1 (#4147)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-31 14:41:51 -04:00
dependabot[bot]
0c7fcc3fc6
Bump elliptic from 6.5.3 to 6.5.4 (#4116)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-31 13:59:29 -04:00
dependabot[bot]
fd12f0aea2
Bump ini from 1.3.5 to 1.3.8 (#4155)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-31 13:59:17 -04:00
dependabot[bot]
195a878592
Bump next from 9.5.2 to 9.5.4 (#4002)
Bumps [next](https://github.com/vercel/next.js) from 9.5.2 to 9.5.4.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v9.5.2...v9.5.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-31 13:59:08 -04:00
Ian Storm Taylor
914e085be2 add github changelog to changesets 2021-03-31 13:56:28 -04:00
Ian Storm Taylor
7283c51feb
Add changesets (#4154)
* add first changesets integration

* remove readme

* readd readme

* update auto-release workflow logic

* update auto-release script order, fix prettier

* change access to public

* update release script

* try to fix changesets

* add experimental snapshot version config

* try fixing

* remove excess

* switch auto-release branch to master

* add release pull request workflow

* add changeset todo to pr template

* update changeset
2021-03-31 13:14:40 -04: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
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
Krzysztof Mędrzycki
79e02e881f
Upgrade immer to 7.0.0 (#3850) 2021-01-15 12:07:42 -05: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
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
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
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
dependabot[bot]
983961dfcd
Bump elliptic from 6.5.1 to 6.5.3 (#3806)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.1 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.1...v6.5.3)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-31 10:32:33 -04:00
dependabot[bot]
7b1768aba3
Bump lodash from 4.17.15 to 4.17.19 (#3790)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-31 10:29:29 -04:00
Cameron Ackerman
07c375f82e
Bugfix/fix bundles (#3673)
* fix index.js main bundles to be commonjs instead of modules

* Change rm -rf to rimraf to be cross os compatible

* add rimraf as  dependency

Co-authored-by: damareyoh <chackerman@wsu.edu>
2020-05-11 10:18:00 -07:00
Cameron Ackerman
7369bb9e97
upgrade next to 9.3.5 to fix security finding (#3640) 2020-04-26 16:58:34 -07:00
dependabot[bot]
b3f688f151
Bump acorn from 5.7.3 to 5.7.4 (#3548)
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-04-26 12:23:38 -07:00
Cameron Ackerman
4f1cbf9418
[WIP] add cross-env to enable inline ENV set on multiple environments (#3595)
* add cross-env to enable inline ENV set on multiple environments
2020-04-08 10:58:50 -07:00
CameronAckermanSEL
41aacc009d Revert "add crossenv to allow ENV dependent scripts to work on windows"
This reverts commit b91a0cdd49c2e3a8304460f811e091a920a160ab.
2020-04-08 10:36:10 -07:00
CameronAckermanSEL
b91a0cdd49 add crossenv to allow ENV dependent scripts to work on windows 2020-04-07 13:17:16 -07:00
Ryan Mitts
d17a1e86e3
Added source-map-loader to the Next Webpack config to pass through the source maps from the compiles Slate libraries. (#3445) 2020-02-26 08:02:47 -08:00