1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-04 22:37:26 +02:00
Commit Graph

4195 Commits

Author SHA1 Message Date
Mahmoud Elsayad
0bb7be5496 Add Safari workaround inside shadow DOM. (#5648)
* Add Safari workaround inside shadow DOM.

* Add E2E test.

* Move browser checks to environment.ts

* Remove leftover @ts-ignore.
Fix linting change.

* Update `getActiveElement`

* Create red-poems-wave.md

* Fix prettier.

* Update E2E test.
2024-05-15 08:17:18 -07:00
dependabot[bot]
d0d4c63649 chore(deps): bump ejs from 3.1.9 to 3.1.10 (#5646)
Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](https://github.com/mde/ejs/compare/v3.1.9...v3.1.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-09 09:14:47 -07:00
Ryan
c6b4669d15 Add EasyEmailPro to resources.md (#5641) 2024-04-29 20:35:35 -07:00
github-actions[bot]
b48f1d64d6 Version Packages (#5626)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate@0.103.0
2024-04-21 13:19:27 -07:00
Joe Anderson
eb76a3d463 Fix linting error in changeset (#5637) 2024-04-21 13:04:52 -07:00
felixfeng
d271c4be54 chore: add shouldMergeNodesRemovePrevNode (#5621)
* chore: add shouldMergeNodesRemovePrevNode

* fix: typo
2024-04-01 16:22:12 -07:00
John Costa
4470f37057 feat(normalize-node): Adding children field to prevent erronous nodes from breaking notebooks. (#5620)
* FEAT: Adding children array to erronous node to prevent various `children undefined` errors

* CHORE: Adding changeset
2024-04-01 16:19:54 -07:00
Ravi Lamkoti
e71e6ce247 Update 07-enabling-collaborative-editing.md (#5618)
Fix color code for user. It doesn't work with today's color code
2024-03-16 16:57:03 -07:00
dependabot[bot]
a22a395663 chore(deps): bump follow-redirects from 1.15.4 to 1.15.6 (#5619)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-16 16:56:34 -07:00
Julian Lu
2fba2d93a1 chore: add mocha tests launch configuration (#5609)
* chore: add mocha tests launch configuration

* fix: Use Prettier code style
2024-02-26 09:40:07 -07:00
dependabot[bot]
528e164b55 Bump ip from 1.1.5 to 1.1.9 (#5607)
Bumps [ip](https://github.com/indutny/node-ip) from 1.1.5 to 1.1.9.
- [Commits](https://github.com/indutny/node-ip/compare/v1.1.5...v1.1.9)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-24 23:47:44 -07:00
Silas Rhyneer
f0f4772264 fix: automatically inserts an empty text node after inserting an image (#5598)
* fix: automatically inserts an empty text node after inserting an image

Fixes #5597

* Update site/examples/images.tsx

* Update site/examples/images.tsx

* Update site/examples/images.tsx

---------

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2024-02-09 05:54:51 -07:00
github-actions[bot]
b04b7e0e98 Version Packages (#5602)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate@0.102.0 slate-react@0.102.0
2024-02-07 05:06:40 -07:00
mainhanu
3aaf3b517c Transform.insertNodes & Transform.insertFragment performance optimize (#5543)
* feat: insertNodes & insertFragment performance optimize

* chore: change set

* feat: add unit test

---------

Co-authored-by: mainhanu@outlook.com <xingchi.mxc@alibaba-inc.com>
2024-02-07 05:01:16 -07:00
Joe Anderson
c2ae1eda91 Do not move selection outside inline node when composition starts (#5541) 2024-02-07 04:50:25 -07:00
Abner Yang
cd93871ae6 Fix relative url to normalizing-11.md (#5596) 2024-01-27 23:05:04 -07:00
github-actions[bot]
f5253cdd4a Version Packages (#5595)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate-react@0.101.6
2024-01-24 07:09:44 -07:00
Joe Anderson
54594d0f81 Fix useFocused not updated when calling ReactEditor.focus (#5593) 2024-01-24 07:05:16 -07:00
dependabot[bot]
8f2ad02db3 Bump follow-redirects from 1.15.3 to 1.15.4 (#5589)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-11 11:14:00 -07:00
github-actions[bot]
cee8e7e421 Version Packages (#5583)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate@0.101.5 slate-react@0.101.5
2023-12-21 17:01:53 -07:00
Elvin
884ab42494 Fix onCompositionEnd not updating isComposing (#5584)
* fix: onCompositionEnd not updating isComposing

* Add changeset
2023-12-21 15:46:14 -07:00
Abhinab Pratap Singh Chauhan
8ba3a9c034 Punctuation Mark "+" Support Added (#5316)
* Punctuation Mark "+" Support Added

* Create fair-bugs-pretend.md

Add changeset

---------

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2023-12-16 04:41:09 -07:00
github-actions[bot]
92a0cb3c7c Version Packages (#5581)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate@0.101.4
2023-12-12 17:51:09 -07:00
Théo Daron
a374895b32 marks on double click selection using firefox fix (#5580)
* fixed: marks on double click selection using firefox

* adding changeset

* minor -> patch

* removing useless platform check

* yarn fix

* Add test

---------

Co-authored-by: Joe Anderson <joe@mousetrapped.co.uk>
2023-12-12 17:44:44 -07:00
github-actions[bot]
bf5a4abbe9 Version Packages (#5579)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate-react@0.101.3
2023-12-06 09:05:41 -07:00
qirong77
8ce52fd494 fix: fix onCompositionEnd update error (#5576)
* fix: fix onCompositionEnd update error

* Update packages/slate-react/src/components/editable.tsx

* add changeset

* Update .changeset/lazy-trainers-learn.md

---------

Co-authored-by: linqirong <609413692@qq.com>
Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2023-12-06 08:59:21 -07:00
github-actions[bot]
26351b900f Version Packages (#5573)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate-react@0.101.2
2023-12-04 12:25:10 -07:00
Bryan Haakman
54d78c100d Upgrade yarn to 4.0.2 (#5578)
* Upgrade yarn to 4.0.2

* Correct react versions for yarn.lock
2023-12-04 12:17:05 -07:00
Tima Gixe
07f59e3607 Adjust cursor position when on selection collapse for RTL direction (#5567)
* fix: adjust edge on collapse RTL selection

* style: fix linting issue

* chore: add changeset
2023-11-30 09:11:49 -07:00
github-actions[bot]
03125312fb Version Packages (#5565)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate@0.101.1 slate-react@0.101.1
2023-11-22 06:26:57 -07:00
yaokailun
91400a8e34 fix: the 'select' parameter of the insertNodes function has been overridden (#5562) 2023-11-22 06:23:31 -07:00
Joe Anderson
9aa573e9b8 Apply placeholder delay only on Android devices (#5564) 2023-11-22 06:22:40 -07:00
dependabot[bot]
9db2bd2c9b Bump axios from 1.5.1 to 1.6.1 (#5555)
Bumps [axios](https://github.com/axios/axios) from 1.5.1 to 1.6.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.5.1...v1.6.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-11 03:23:45 -07:00
github-actions[bot]
6be95f8885 Version Packages (#5552)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate-react@0.101.0
2023-11-10 09:53:24 -07:00
Dylan Schiemann
22495e143d Revert #5542 (#5556)
* Revert #5542

Revert due to issues introduced.

* Add changeset
2023-11-10 09:25:29 -07:00
Per-Kristian Nordnes
fc081816e0 Fix issue with ReactEditor.focus + tests (#5527)
* Fix issue with slate-react static ReactEditor.focus method

This will make sure we don't try to focus the editor while it's in the midst of applying operations.
If this is the case, retry setting focus in the next tick.

* Replace react-test-renderer with @testing-library/react

We need to be able to test against window features, like the DOM selection.
@testing-library/react has a very similar API, but have also these features,
which react-test-renderer is missing.

* Rewrite tests for @testing-library/react

This will rewrite the existing tests for Editable and move them into a own file.

* Add tests for ReactEditor.focus

* Add changeset
2023-11-10 09:19:10 -07:00
Joe Anderson
f9cca97f00 Fix firefox newline crash (#5549) 2023-11-09 06:02:46 -07:00
github-actions[bot]
47498cf8ea Version Packages (#5546)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-01 08:32:40 -07:00
github-actions[bot]
32def91713 Version Packages (#5545)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate-react@0.100.1
2023-10-31 11:09:45 -07:00
dependabot[bot]
100697aa09 Bump browserify-sign from 4.2.1 to 4.2.2 (#5539)
Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.2.
- [Changelog](https://github.com/browserify/browserify-sign/blob/main/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/browserify-sign/compare/v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: browserify-sign
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-31 11:08:47 -07:00
Mathew Kleppin
8688ed5c68 [editable] Fix Memory Leak when switching between focused editables (#5542)
* [editable] Fix Memory Leak when switching between focused editable containers

I've found a memory leak in Slate React where-in when you'd switch between two pages, each with their own editor instance, auto-focusing on these elements causes a memory leak, where there would be a lot of Detached HTML Element's just floating around.

At first I thought it a bunch of different bugs with chromium, but noticed that when I force removed the input elements from the dom before the component would unmount, we would still see small leak referencing "latestElement" (while simultaniously, I would still the element & children references in the `IN_FOCUSE` WeakMap) Looking at editable's code, I realized that we're storing state in a weird way, directly mutating it using `useMemo`, and React isn't removing all references (probably because its still stored in the WeakMap.

The simple fix for this is what I've commited; using `useLayoutEffect`, we forcably remove the `latestElement` and references to it.

* Update editable.tsx

* Add changeset

---------

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2023-10-31 10:51:42 -07:00
dependabot[bot]
3b41384685 Bump @babel/traverse from 7.15.0 to 7.23.2 (#5522)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.15.0 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 05:31:13 -07:00
dependabot[bot]
32fa9f7880 Bump node-fetch from 2.6.1 to 2.6.7 (#5535)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 05:30:39 -07:00
dependabot[bot]
0579e44aaa Bump tar from 6.1.8 to 6.1.11 (#5536)
Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.8 to 6.1.11.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.1.8...v6.1.11)

---
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>
2023-10-24 05:30:21 -07:00
Dylan Schiemann
1d817bca0f Updates docs and @types/node (#5534)
* remove @types/node resolution

* fix playwright config import error

* fix react batching workaround

* update docs for running integration tests

* Revert "fix react batching workaround"

This reverts commit c0ea6a62bc.

---------

Co-authored-by: Dalibor Tosic <dalibortosic00@gmail.com>
Co-authored-by: Nikola <nikolabijelic14@gmail.com>
2023-10-24 05:29:35 -07:00
dependabot[bot]
7c4c60e2c5 Bump minimatch from 3.0.4 to 3.0.5 (#5531)
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.0.5.
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.0.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 09:56:26 -07:00
dependabot[bot]
3eee17e9cd Bump http-cache-semantics from 4.1.0 to 4.1.1 (#5530)
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 09:55:51 -07:00
github-actions[bot]
a5f03871fe Version Packages (#5529)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate@0.100.0 slate-react@0.100.0 slate-hyperscript@0.100.0 slate-history@0.100.0
2023-10-20 09:00:54 -07:00
Dylan Schiemann
c4c14882ed Update dependencies to React 18, Node 20, TS 5.2, etc. (#5528)
* incremental upgrade to React 18, TS 4.9, etc.

* update yarn config

* fix build

* minor cleanup in type definitions

* incremental updates for TS 5.0

* fix build

* upgrade to typescript 5.2

* update dependencies

* fix lint issues

* update to latest Playwright version

* update changesets dep

* update emotion/css

* incremental dependency updates

* more small dependency updates

* upgrade prettier and eslint

* fix lint issues

* update dependencies rollup

* fix @types/node resolution to restore linting

* update tiny-invariant dependency

* update dependencies

* update dependencies lerna

* upgrade react-router-dom

* update @types/react and @types/node

* update babel dependencies

* udpate simple-git-hooks

* update @types/node resolution

* update lint-staged

* remove cypress from dependency list

* update @types/node to support Node 20

* update workflows to Node 20

* set resolutions for @types/react

* downgrade @types/react to 18.2.28

* update mocha

* update rimraf

* update @types/js-dom

* remove .lintstagedrc.js

* upgrade next to latest

* v0.61.4

* update lerna

* update faker and rollup

* update immer

* fix yarn clean command

* attempt to fix integration tests

* attempt to stabilize integration tests

* wip fix integration tests

* skip unstable integration test

* Add changeset

---------

Co-authored-by: Dalibor Tosic <dalibortosic00@gmail.com>
Co-authored-by: Nikola <nikolabijelic14@gmail.com>
2023-10-20 08:34:24 -07:00
LW
623f44521e Add onSelectionChange and onValueChange in Slate React component (#5526)
* Add `onSelectorChange` and `onValueChange` in Slate React component

* docs: add changeset

* fix: fixed lint error

* Rename Slate React component `onSelectorChange` to `onSelectionChange`.
Add more unit tests.

* docs: update changeset

---------

Co-authored-by: willliu <willliu@distinctclinic.com>
2023-10-20 05:00:48 -07:00