1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-01-17 21:49:20 +01:00

3970 Commits

Author SHA1 Message Date
github-actions[bot]
be564cef2b
Version Packages (#5299)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate@0.91.1 slate-react@0.91.1
2023-02-18 18:47:29 -07:00
kailunyao
6fa4b954a5
Fix the cursor jump to an unexpected position after deleting in android (#5251)
* Fix the cursor jump to an unexpected position after deleting in android

* Create unlucky-chairs-promise.md

* Update unlucky-chairs-promise.md
2023-02-18 18:41:03 -07:00
hujiulong
f2607c2a52
Remove unused weak maps (#5296) 2023-02-17 11:47:28 -07:00
github-actions[bot]
8bbda102d6
Version Packages (#5290)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate-react@0.91.0
2023-02-13 23:44:30 -07:00
Sergei Dedkov
9635b992a0
Compare only decorations offsets in MemoizedText. Code highlighting example improvements. (#5271)
* add basePath prop to Range inside slate-react custom types, calculate absolute ranges on passing them into TextComponent

* code highlighting example improvements, minor markdown preview refactoring

* changeset added

* Revert "add basePath prop to Range inside slate-react custom types, calculate absolute ranges on passing them into TextComponent"

This reverts commit afa085c289bc67ce3d27dd33b1f074ab8153efe8.

* add basePath prop to Point inside slate-react custom types, resolve relative ranges on passing them to TextComponent

* Update changeset

* linter fixes

* remove redundant checks inside renderElement function

* custom types fixes for Range and Point in examples

* wrap intervals and ranges extractors in useMemo hook for running them only if editor.children is changed

* revert basePath changes, compare only offsets for MemoizedText decorations

* use an element as a key in decorations ranges map instead of id

* simplify code highlighting implementation, make code block nested

* fix code-highlighting example, add toolbar code block button

* remove redundant code

* fix code highlighting playwright integration test
2023-02-09 11:53:21 -07:00
Daniel Lautzenheiser
7d1e60b88f
doc: add static cms (#5286) 2023-02-09 11:51:03 -07:00
ilya2204
463edbd27e
feat: allow to change clipboard fragment format name (#5267)
* feat: allow to change clipboard fragment format name

* chore: add changeset
2023-02-09 11:50:42 -07:00
Sergei Dedkov
fc84fdbd99
fix hovering-toolbar playwright integration test (#5284) 2023-02-07 22:13:09 -07:00
github-actions[bot]
9de2e2c316
Version Packages (#5279)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate@0.90.0 slate-react@0.90.0
2023-02-01 04:44:35 -07:00
Kyle McLean
9c4097a26f
Simplify implementation of custom editor styling (#5278)
* Switch back to using inline styles for default editor styles

* Add example page and test for editor styling

* Add section in docs for editor styling

* Add test for editor height being set to placeholder height

* Add changeset
2023-01-31 19:17:27 -07:00
github-actions[bot]
0f83810704
Version Packages (#5277)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate-react@0.89.0
2023-01-30 22:21:39 -07:00
Dylan Schiemann
c33f8ad92c
Changeset was too aggressive in version 2023-01-30 22:00:36 -07:00
Kyle McLean
3cf51f4d88
Improve compatibility for browsers that do not support ResizeObserver or :where selector (#5265)
* Add fallback for default styles when `:where` selector is not supported

* Add polyfill for ResizeObserver

* Add changeset
2023-01-30 16:37:03 -07:00
PangYiMing
2ab56c32af
add tripdocs link to resources (#5276) 2023-01-30 16:33:29 -07:00
Joe Anderson
5bc69d8d65
Firefox: fix wrong text highlighting with double-click (revived PR) (#5275)
* fix node edges selection on firefox

* add changeset

* Fix type signatures

---------

Co-authored-by: Jawell <skytor08@gmail.com>
2023-01-29 22:11:19 -07:00
Shakirul Hasan Khan
a1b558ac72
doc: syntax highlighting fix on concepts/04-transforms page (#5266)
* doc: syntax highlighting fix on concepts/04-transforms page

* fix: changes made by code formatter
2023-01-26 05:11:26 -07:00
boweiliu
b56acceb23
Update contributing.md (#5268) 2023-01-26 05:05:24 -07:00
Ravi Lamkoti
c691bb3aae
fix: isVoid, isBlock, isInline types (#5254)
* fix: isVoid, isBlock, isInline types

* fix: remove isElement check with isEditor
2023-01-25 15:35:46 -08:00
eagowang
e9c9d9f4db
Fix forced-layout example trigger insert untitle node (#5263)
Co-authored-by: 锐雯 <wangyichen@xiaohongshu.com>
2023-01-20 05:54:43 -07:00
Corey Speisman
773abc01ee
bugfix: moves EDITOR_TO_ON_CHANGE into useEffect for double useEffect call in react 18 (#5261) 2023-01-19 22:29:36 -07:00
github-actions[bot]
aa4e0327ee
Version Packages (#5260)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate-react@0.88.2
2023-01-14 21:22:46 -07:00
Jaclyn Feminella
d7de564d62
Fix selection getting incorrectly set in readonly shadow dom case (#5259)
* Fix selection getting incorrectly set in readonly shadow dom case

* Add changeset for slate react
2023-01-14 06:00:38 -07:00
Toby
0df29a9dd7
fix slack links in readme and contributing (#5256) 2023-01-13 20:42:22 -07:00
刘小懒
179d5c926e
remove qq browser from beforeinput compat list (#5252) 2023-01-13 20:39:34 -07:00
Gary Borton
5dc4396f6b
Switch from cypress to playwright. (#5248)
* empty

* empty

* empty

* Begin move from cypress to playwright.

* Switch remaining tests to playwright, remove old cypress suppport files.

* Clean up playwright config

* Enable ff, and safari when on mac.

* Fix safari/ff mentions test

* Fix code-highlighting test on ff/safari

* Add a local retry as a few tests are flaky.

* Replace cypress w/ playwright in gitignore.

* Update to latest yarn to fix ci install?

* Update yarn.lock w/ yarn command.

* Fix mocha tests.

* Fix prettier
2023-01-13 20:36:04 -07:00
Michael
cb133a785f
upgrade yarn (#5242)
Signed-off-by: Michael Darr <michael.e.darr@gmail.com>

Signed-off-by: Michael Darr <michael.e.darr@gmail.com>
slate@0.88.1
2023-01-07 05:58:12 -07:00
Sim Ho
55effa953c
Update Operation API documentation (#5239)
* fix typo in implementation

* doc based on implementation

* fix doc typo
2022-12-29 16:38:03 -07:00
Yoel
d7353677e3
Add Eraser (#5240) 2022-12-29 16:37:21 -07:00
github-actions[bot]
f2fb5aac5d
Version Packages (#5238)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-12-22 04:37:32 -07:00
Dylan Schiemann
43a5f6f224
Update ci to Node 18 (#5237)
* Update ci to Node 18

* updates for Node.js, license year
2022-12-21 22:52:41 -07:00
Pawel Piotrowicz
36203b3f10
Fix editor above with point (#5235)
* Fix Editor.above with point

Editor.above should ignore checking text nodes (they're never above
anything) and continue looking for ancestors.
Otherwise it won't be able to find any above nodes when starting to look
from a text node.

* Add changeset
2022-12-21 22:44:41 -07:00
Spencer Zeng
766e0b6d9a
Fix broken selection transforms link in editor docs (#5234) 2022-12-21 22:44:22 -07:00
dependabot[bot]
56c4875a4b
Bump terser from 5.7.1 to 5.15.1 (#5185)
Bumps [terser](https://github.com/terser/terser) from 5.7.1 to 5.15.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.7.1...v5.15.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-21 22:23:49 -07:00
dependabot[bot]
db30bbf4bb
Bump decode-uri-component from 0.2.0 to 0.2.2 (#5209)
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-21 22:23:38 -07:00
dependabot[bot]
30c1155e51
Bump qs from 6.5.2 to 6.5.3 (#5214)
Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-21 22:23:21 -07:00
github-actions[bot]
be21439c42
Version Packages (#5232)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate-react@0.88.0
2022-12-20 07:59:35 -07:00
Sim Ho
d96887f909
Note that leaves must be inline elements (#5225)
* Note that leaves must be inline elements

* remove extra space
2022-12-19 10:54:54 -07:00
Laufey Rut Guðmundsdóttir
0141f68365
Check if getBoundingClientRect exist before trying to call bind (#5226)
* Stop trying to call bind on undifined when getBoundingClientRect is not defined. This is happening when testing slate with react testing library

* Add changeset
2022-12-19 10:51:13 -07:00
github-actions[bot]
224b7ebba3
Version Packages (#5224)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate-react@0.87.1
2022-12-14 09:44:32 -07:00
alex-vladut
120437d612
fix: allow input into editable voids (#5223) 2022-12-14 09:36:32 -07:00
github-actions[bot]
a4cc213087
Version Packages (#5210)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate@0.87.0 slate-react@0.87.0
2022-12-04 15:52:04 -07:00
Kyle McLean
96b7fcdbf9
Use stylesheets to give Editable components default styles (#5206)
* Use stylesheet to give Editable components a default style

* Give Editors a unique id

* Use per-editor stylesheets to give editors a min-height

* Make editor min-height respond to changes in placeholder height

* Add changeset for stylesheet changes

* Prevent unnecessary creations of ResizeObservers

* Update yarn.lock
2022-12-03 21:26:17 -07:00
Ravi Lamkoti
d1f90ebd12
Docs: fix Ctrl-` backticks issue on 03-defining-custom-elements page (#5203) 2022-11-29 14:49:08 -07:00
Emmanuel Meric de Bellefon
66fbc0a5b9
Update range-ref.md (#5200) 2022-11-21 09:44:24 +00:00
github-actions[bot]
a24ddd12cd
Version Packages (#5198)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
slate@0.86.0 slate-react@0.86.0 slate-history@0.86.0
2022-11-17 10:59:49 -07:00
Brian Bucknam
e416d00b6c
Fix reporting of marks on a markableVoid (#5186)
Add a few unit tests for Editor.marks(), including one for markable void
that fails
2022-11-17 10:19:46 -07:00
Brian Bucknam
fbc9838fd7
Add hanging option to unsetNodes (#5189)
Since this really just calls setNodes, it seems like it should offer the same options.
Without this change, doing something like applying a mark to the contents of a selected block with `hanging` works one way, while trying to do the reverse (remove the mark) cannot include the "hang".
2022-11-17 10:19:01 -07:00
Brian Bucknam
6909a8f7da
Fix overly-aggressive unhangRange (#5193)
`Editor.unhangRange()` could decide to proceed with an adjustment in cases where the range was not hanging.
Because the algorithm it uses *always* skips over the first node it encounters, this meant the selection was adjusted in non-hanging cases.
This change reduces the chances of an incorrect decision to adjust.
Transforms now pass the `voids` flag to `unhangRange()` as it seems logical that the adjusted range should reflect the intention of the operation.
This fixes a unit test I added for markable voids that had to be skipped because of the `unhangRange()` error, and fixes a couple other long-skipped tests.
2022-11-17 10:18:11 -07:00
Lagu Longa
c8c75e9e2d
remove duplicate useState import (#5194) 2022-11-17 09:21:51 -07:00
Jacob Carpenter
70b64dc8f1
Update isHistory to match new interface. (#5197)
* Update `isHistory` to match new interface.

This change merely preserves the original functionality and does not add verification of Batch's new `selectionBefore` property.

* Add changeset.
2022-11-17 09:21:37 -07:00