1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-20 14:11:35 +02:00
Commit Graph

4279 Commits

Author SHA1 Message Date
github-actions[bot]
b18dd40026 Version Packages (#4592)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate-react@0.66.7
2021-10-11 17:29:35 -07:00
Jim Fisher
c76f370826 Link to latest changelogs on main branch, not arbitrary snapshot from the past (#4593)
To see the problem, visit https://docs.slatejs.org/general/changelog and follow the links after "...each package will maintain its own individual changelog, which you can find here:"
2021-10-11 06:50:05 -07:00
Jake Donham
ae65ae5f71 revert #4455 / #4512; fix triple-click by unhanging range with void (#4588)
* revert #4455 / #4512; fix triple-click by unhanging range with void

* added changeset
2021-10-11 05:15:04 -07:00
Sunny Hirai
8e02c65184 docs: Fix lint maybe. 2021-10-10 21:22:32 -07:00
Sunny Hirai
8a81b0ea3d docs: updated concepts so Editor Interface matches API reference 2021-10-10 15:27:36 -07:00
Slapbox
528d92553b Fixes broken changelog link (#4587)
Fixes #4586
2021-10-09 16:50:49 -07:00
Jas
a2558b37b0 Fix boolean not assignable to string typescript error (#4568) 2021-10-07 06:10:50 -07:00
github-actions[bot]
1ce3f4cf62 Version Packages (#4557)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate-react@0.66.6
2021-10-06 16:26:31 -04:00
Hadrien
81cb2ae659 Fix code sample (#4558)
It's an array of CutsomElement, TS complains about it
2021-09-29 06:08:09 -07:00
Jake Donham
b108491820 fix forced update in TextString in case of double render (#4556)
* fix forced update in TextString in case of double render

* added changeset
2021-09-28 10:19:47 -07:00
github-actions[bot]
f04cc58270 Version Packages (#4553)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate@0.66.5
2021-09-28 12:58:28 -04:00
Claudéric Demers
37d60c58b8 only apply Firefox toSlatePoint offset fix if ending in \n\n (#4552) 2021-09-27 10:14:07 -07:00
github-actions[bot]
ffac781086 Version Packages (#4551)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate-react@0.66.4
2021-09-27 09:20:26 -07:00
David Ruisinger
7ba486aa39 Do NOT use exact match when updating dom selection (#4304)
* Do NOT use exact match when updating dom selection

* Added changeset
2021-09-27 09:05:39 -07:00
github-actions[bot]
997fee8b5c Version Packages (#4544)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate-react@0.66.3
2021-09-27 06:54:30 -07:00
Claudéric Demers
677da0ca87 Fix toSlatePoint when text node ends in \n in Firefox (#4547)
In Firefox, `range.cloneContents()` returns an extra trailing '\n', when the document ends with a new-line character. This results in the offset length being off by one, so we need to subtract one to account for this.
2021-09-26 08:07:14 -07:00
Nemanja Tosic
f9c41a569c Fix deletion of expanded range (#4549) 2021-09-26 08:05:52 -07:00
Doug Reeder
95e13b0be1 Updates "Saving to a Database" example to distinguish content changes (#4497)
* Updates "Saving to a Database" example to distinguish actual content changes.

* Update docs/walkthroughs/06-saving-to-a-database.md

* Update docs/walkthroughs/06-saving-to-a-database.md

* Update docs/walkthroughs/06-saving-to-a-database.md

* Runs prettier

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2021-09-26 07:59:32 -07:00
Victor Baron
bc85497d58 Fix - delete selected inline void in chrome (#4526)
* Fix - delete selected inline void in chrome

* Add changeset

* Fix prettier on changeset

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2021-09-24 04:12:29 -07:00
github-actions[bot]
38717ad455 Version Packages (#4539)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate@0.66.2 slate-react@0.66.2
2021-09-23 12:28:47 -07:00
Steve Marquis
0da12c17dc Fix setNodes when called with 'split' and a collapsed range (#4523)
* Fix setNodes when called with 'split' and a collapsed range

* Only bail if it's a non-empty text node

* Fix comment
2021-09-23 06:45:03 -07:00
Guilherme Samuel
15f8f866dd docs: fix typo (#4538) 2021-09-19 13:44:28 -07:00
Nemanja Tosic
bd80a0b8dc Fix erroneous text after native insert (#4529) 2021-09-19 13:43:29 -07:00
github-actions[bot]
35b722cadd Version Packages (#4520)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate@0.66.1 slate-react@0.66.1
2021-09-14 01:20:36 -07:00
Dylan Schiemann
03226cea3e fix release.yml (#4519) 2021-09-14 00:36:06 -07:00
Andrew Herron
6ec399d4db Fixed nested object comparison when the second value doesn't have that key (#4518) 2021-09-14 00:32:47 -07:00
Dylan Schiemann
d528ad4008 Fix release versioning 3 (#4517)
* another attempt to fix the version packages release

* more work to fix automated changeset workflow
2021-09-13 15:09:59 -07:00
Dylan Schiemann
59ca7a8f51 Fix release versioning (#4516)
* correct immutability lockfile flag for yarn 3

* More experiments to re-enable the Version Packages action

* add changeset

* more work to fix automated changeset workflow
2021-09-13 14:09:00 -07:00
Dylan Schiemann
cd39284838 correct immutability lockfile flag for yarn 3 (#4515) 2021-09-13 13:27:39 -07:00
Dylan Schiemann
8b5dbc3dc7 add missing changeset (#4514)
* add missing changeset

* prettier
2021-09-13 11:12:33 -07:00
Trang Le
cc7cb623cf fix(react-editor): reset focus offset when triple clicking (#4512)
* fix(react-editor): reset focus offset when triple clicking

* fix(react editor): remove commented-out code
2021-09-13 09:59:42 -07:00
Dylan Schiemann
2af6868d41 trigger changeset for 0.66 release (#4511) 2021-09-13 05:13:41 -07:00
Dylan Schiemann
91ca440723 Attempt fix the release process (#4510)
* Attempt fix the release process

* unbreak the release process
slate@0.66.0 slate-react@0.66.0 slate-hyperscript@0.66.0 slate-history@0.66.0
2021-09-13 04:48:09 -07:00
github-actions[bot]
2a346ded9d Version Packages (#4436)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-09-10 17:54:01 -07:00
Doug Reeder
8b85aeb205 Adds an example to the docs for Transforms.select (#4507) 2021-09-10 17:49:13 -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
Trang Le
2065c5bdfd Add changeset for triple click fix (#4503)
* Remove changeset for the fix for regression caused by triple click fix

* fix: incorrect Slate range when triple clicking a block (#4455)
2021-09-09 09:46:45 -07:00
Trang Le
f5c0cbd7ec Fix: regression caused by triple click fix (#4498)
* fix: check if data-slate-tring node is not null

Only reset the focus node of a selection when the node with attribute `data-slate-string` is defined

* fix: rewrite logic for checking triple click

* Add changeset

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2021-09-08 17:34:57 +01:00
Dylan Schiemann
3dd74dd58d Update error message for useSlate (#4493)
* Update error message for useSlate

fixes #4479

* Add changeset
2021-09-07 05:00:48 -07:00
JokcyLou
dd752df11d fix cursor not correct when insert multiple nodes using insertNodes (#4482)
* fix cursor not correct when insert multiple nodes using insertNodes

* fix lint

* add changeset
2021-09-07 04:39:47 -07:00
Nemanja Tosic
1b560de3e1 Fix paste to empty node losing structure of first block (#4489) 2021-09-06 12:00:54 -07:00
Kristoffer K
29473b0290 chore: follow-up to Yarn update (#4478)
* fix(site): `require.resolve` webpack loader

* chore: add pnp sdk

* ci: cache dependencies

* ci: add release `version` command
2021-09-02 04:42:45 -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
I Made Budi Surya Darma
e51566ada8 Add key for Children SelectedContext.Provider (#4480)
* Add key for Children context

* add changeset
2021-08-31 05:22:56 -07:00
Trang Le
2d1aaafa0b Fix(editable component): reselect the range created by triple click (#4455)
* fix(editable component): reselect the range created by triple click

* Revert "fix(editable component): reselect the range created by triple click"

Reason: attaching a handler for `onClick` event is no longer needed.

* fix(react-editor): reselect DOMSelection when triple clicked

Reason: Triple clicking an element in Chrome will falsely set the focus node as the next sibling node with focusOffset 0

* test: add e2e test for triple click
2021-08-28 05:02:30 -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
Per-Kristian Nordnes
c1433f56cf [slate-react]: fix selection bugs when multiple editors share value (#4475)
* [slate-react]: fix selection bugs when multiple editors share value

The KEY_TO_ELEMENT weakmap must be scoped to the instance to avoid collisions between multiple editors.

This is solved by wrapping it in another WeakMap keyed on the editor object, that returns the KEY_TO_ELEMENT Weakmap for that editor.

* Add changeset

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2021-08-25 15:59:23 +02:00
Bryan Haakman
781b7f795c Increase timeout for markdown-shortcuts test for now (#4474) 2021-08-25 06:36:25 -07:00
Bryan Haakman
8a5a50d904 Upgrade cypress to 8.x and next to 10.x (#4469) 2021-08-24 21:41:15 -07:00