1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 02:49:56 +02:00
Commit Graph

419 Commits

Author SHA1 Message Date
github-actions[bot]
f2e2117bdb Version Packages (#5719)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-16 22:10:39 -07:00
Czy
cd21bb1f80 fix: sync state on undo when editor is unfocused (#5737)
* fix: undo event when not focused

* chore: add changeset

* Add `HistoryEditor.withMerging` to docs (#5738)

* chore: just trigger test:integration

* chore: trigger test:integration

* fix: firefox test integration environment (#5742)

* fix: fix firefox test integration env

* chore: test ubuntu apt source

* chore: IMMUTABLE_INSTALLS ?

* fix: ubuntu version

* fix: undo event when not focused

* chore: add changeset

* chore: just trigger test:integration

* chore: trigger test:integration

---------

Co-authored-by: Ty Mick <5317080+TyMick@users.noreply.github.com>
2024-10-16 10:15:21 -07:00
Electrolux
b1a1021612 feat: add prop surrounds with range (#5729)
* feat: add prop surrounds with range

* Create small-carrots-jam.md

* fix: docx about range.included

---------

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2024-09-26 06:18:05 -07:00
Hernán Sartorio
335c54188f Call unref on pathRefs created for move_node (#5727)
* Call unref on pathRefs created for move_node

* Create old-frogs-run.md

---------

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2024-09-26 00:24:33 -07:00
Ravi Lamkoti
ee2c45408c feat: add Node.getIf method (#5723)
* feat: add Node.getIf support

* chore: restructure get to use getIf
2024-09-26 00:23:48 -07:00
Czy
f31167cf5f fix: marks at the start of the selection (#5725)
* fix: marks at the start of the selection

* chore: modify unit test description
2024-09-26 00:21:49 -07:00
github-actions[bot]
85a1e1d3f3 Version Packages (#5717)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-12 14:37:18 -07:00
Ty Mick
10abeff84f Fix selections with non-void non-editable focus (#5716)
* Fix selections with non-void non-editable focus

"Non-void non-editable" refers to `contentEditable={false}` DOM nodes
that are rendered by a Slate element render but which are not void
elements. For instance, [the checkboxes in the checklists example][1].

[1]: 7e77a932f0/site/examples/check-lists.tsx (L153-L170)

* fixup! Fix selections with non-void non-editable focus

Optimize leaf node search

* fixup! Fix selections with non-void non-editable focus

Rename `focusNodeSelectable` to `focusNodeIsSelectable`

A more accurate name given this PR's changes.

* fixup! Fix selections with non-void non-editable focus

Remove inapplicable `if` branch

* fixup! Fix selections with non-void non-editable focus

Improve comment
2024-09-12 10:53:44 -07:00
github-actions[bot]
7e77a932f0 Version Packages (#5705)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-02 19:52:33 -07:00
yf-yang
f9e83b807f fix: expose use-composing (#5706)
* fix: expose use-composing

* chore: add changeset
2024-08-28 12:18:38 -07:00
github-actions[bot]
e09ed7bf3e Version Packages (#5699)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-22 22:43:00 -07:00
yf-yang
6cb38e37a4 feat: add useComposing hook (#5695) 2024-08-20 16:03:03 -07:00
Felix Feng
e5fed793e7 Add withMerging (#5696) 2024-08-20 16:01:23 -07:00
github-actions[bot]
c3a4e1e3f9 Version Packages (#5693)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-12 04:52:27 -07:00
yf-yang
b8bf92dc7e feat: Forward ref from <Editable /> (#5681)
* feat: Forward ref from <Editable />

* docs: add changeset

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

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

---------

Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
2024-08-07 12:29:40 -07:00
github-actions[bot]
6548197540 Version Packages (#5682)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-16 02:26:21 -07:00
Czy
a9a7040583 fix: unexpected event triggered when using ReactEditor.focus (#5677)
* chore: reproduce the problem env

* fix: unexpected event triggered

* feat: onValueChange unit test
2024-07-15 12:25:06 -07:00
github-actions[bot]
5838e36229 Version Packages (#5678)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-08 10:49:56 -07:00
Ivan Sysoi
ec9e5f0a36 fix: focus loss inside Shadow DOM in Firefox. (#5676) 2024-07-08 07:13:29 -07:00
github-actions[bot]
97c88dbc25 Version Packages (#5662)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-25 04:09:04 -07:00
Joe Anderson
0016f9843f Make drop and dragend event handlers global (#5664) 2024-06-23 14:13:40 -07:00
Mahmoud Elsayad
e6254f706a Enable Shadow DOM fix for Safari 17. (#5659)
* Enable Safari Shadow DOM fix for Safari 17.

* Create weak-files-jam.md

* Update changeset.
2024-06-20 16:20:53 -07:00
github-actions[bot]
f3be9f1292 Version Packages (#5656)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-04 08:47:44 -07:00
Alexey Starostin
2a8b4e958b Make capitalizing work for iOS (#5654)
* Make capitalizing work for iOS

* Add changeset

---------

Co-authored-by: Alexey Starostin <astarostin@astarostin-pc.local>
2024-06-03 20:22:33 -07:00
github-actions[bot]
9ee604e17a Version Packages (#5651)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-15 15:47:43 -07:00
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
github-actions[bot]
b48f1d64d6 Version Packages (#5626)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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
github-actions[bot]
b04b7e0e98 Version Packages (#5602)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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
github-actions[bot]
f5253cdd4a Version Packages (#5595)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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
github-actions[bot]
cee8e7e421 Version Packages (#5583)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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>
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>
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>
2023-12-04 12:25:10 -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>
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
github-actions[bot]
6be95f8885 Version Packages (#5552)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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