Commit graph

803 commits

Author SHA1 Message Date
Peter Savchenko
0039a8413a optimize imports 2024-06-08 15:31:56 +03:00
Peter Savchenko
82f9142ce6 Merge branch 'next' into feat/cbs 2024-06-08 15:31:46 +03:00
Peter Savchenko
29d68ecb47
fix(block-events): caret losing after backspace after nested list (#2723) v2.30.0-rc.10
* feat: Fix caret loss after Backspace at the start of block when previous block is not convertible

* fix create shadow caret

* fix: remove unnecessary blank line in blockEvents.ts

* fix: pass event object to slashPressed method in blockEvents.ts

* fix eslint
2024-05-23 20:06:33 +03:00
Tatiana Fomina
d18eeb5dc8
feat(popover): Add hint support (#2711)
* Add custom item

* Remove customcontent parameter from popover

* Tests

* Cleanup

* Cleanup

* Lint

* Cleanup

* Rename custom to html, add enum with item types

* Fix tests

* Support hint

* Rename hint content to hint

* Align hint left

* Move types and exports

* Update changelog

* Cleanup

* Add todos

* Change the way hint is disabled for mobile

* Get rid of buildItems override

* Update comment
2024-05-16 15:26:25 +03:00
Tatiana Fomina
50f43bb35d
Change cypress preprocessor (#2712) 2024-05-04 21:23:36 +03:00
Tatiana Fomina
f78972ee09
feat(popover): custom content becomes a popover item (#2707)
* Add custom item

* Remove customcontent parameter from popover

* Tests

* Cleanup

* Cleanup

* Lint

* Cleanup

* Rename custom to html, add enum with item types

* Fix tests

* Add order test

* Update jsdoc

* Update changelog

* Fix issue with html item not hiding on search

* Fix flipper issue

* Update changelog
2024-05-04 15:35:36 +00:00
github-actions[bot]
bd1de56ef3
Bump version (#2705) v2.30.0-rc.9
Co-authored-by: github-actions <action@github.com>
2024-05-01 21:00:22 +03:00
Peter Savchenko
8276daa5ca
fix changelog (#2704) 2024-05-01 20:59:33 +03:00
github-actions[bot]
238c909016
Bump version (#2701) v2.30.0-rc.8
Co-authored-by: github-actions <action@github.com>
2024-04-29 22:28:45 +03:00
Peter Savchenko
23858e0025
fix(conversion): restore caret after conversion though the Inline Toolbar and API (#2699)
* fix caret loosing after caret

* Refactor convert method to return Promise in Blocks API

* changelog upd

* Fix missing semicolon in blocks.cy.ts and BlockTunes.cy.ts

* add test for inline toolbar conversion

* Fix missing semicolon in InlineToolbar.cy.ts

* add test for toolbox shortcut

* api caret.setToBlock now can accept block api or index or id

* eslint fix

* Refactor test descriptions in caret.cy.ts

* rm tsconfig change

* lint

* lint

* Update CHANGELOG.md
2024-04-29 22:24:31 +03:00
github-actions[bot]
5eafda5ec4
Bump version (#2698) v2.30.0-rc.7
Co-authored-by: github-actions <action@github.com>
2024-04-27 21:22:12 +03:00
Peter Savchenko
efa0a34f8e
fix caret loosing after caret (#2697) 2024-04-27 21:19:12 +03:00
Peter Savchenko
c48fca1be3
fix ios shift (#2696) 2024-04-27 21:09:16 +03:00
Peter Savchenko
1028577521
fix(scroll): acidental scroll to top on iOS devices (#2695)
* fix scroll on ios typing

* Update tsconfig.json

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update package.json

* Fix popover hide method to use isHidden flag
2024-04-27 21:04:26 +03:00
github-actions[bot]
844272656e
Bump version (#2694) v2.30.0-rc.5
Co-authored-by: github-actions <action@github.com>
2024-04-27 16:59:52 +03:00
Tatiana Fomina
7821e35302
feat(block tunes): Conversion Menu in Block Tunes (#2692)
* Support delimiter

* Rename types, move types to popover-item folder

* Fix ts errors

* Add tests

* Review fixes

* Review fixes 2

* Fix delimiter while search

* Fix flipper issue

* Fix block tunes types

* Fix types

* tmp

* Fixes

* Make search input emit event

* Fix types

* Rename delimiter to separator

* Update chengelog

* Add convert to to block tunes

* i18n

* Lint

* Fix tests

* Fix tests 2

* Tests

* Add caching

* Rename

* Fix for miltiple toolbox entries

* Update changelog

* Update changelog

* Fix popover test

* Fix flipper tests

* Fix popover tests

* Remove type: 'default'

* Create isSameBlockData util

* Add testcase
2024-04-27 16:57:52 +03:00
github-actions[bot]
4118dc3aea
Bump version (#2693) v2.30.0-rc.4
Co-authored-by: github-actions <action@github.com>
2024-04-23 22:52:31 +03:00
Tatiana Fomina
e1c70b4fb8
feat(popover): separator (#2690)
* Support delimiter

* Rename types, move types to popover-item folder

* Fix ts errors

* Add tests

* Review fixes

* Review fixes 2

* Fix delimiter while search

* Fix flipper issue

* Fix block tunes types

* Fix types

* Fixes

* Make search input emit event

* Fix types

* Rename delimiter to separator

* Update chengelog
2024-04-22 22:38:20 +03:00
Peter Savchenko
bb7e112a97 use atStartOfInput instead of atStartOfFirstInput 2024-04-21 12:57:09 +03:00
Peter Savchenko
bb7377c1e1 merging helper 2024-04-21 12:05:02 +03:00
Peter Savchenko
499e8e3f98 printable key uses composable 2024-04-21 01:32:07 +03:00
Peter Savchenko
e59d8d59f7 delete uses composable 2024-04-21 00:38:29 +03:00
Peter Savchenko
8f09692e07 nice composable for cis 2024-04-21 00:16:46 +03:00
Peter Savchenko
473301528b enter (wip) 2024-04-20 22:55:27 +03:00
Peter Savchenko
4763f3dbf9 backspace refact 2024-04-20 20:48:15 +03:00
Peter Savchenko
b51041e352 printable keys 2024-04-20 19:40:55 +03:00
github-actions[bot]
54c4c234a5
Bump version (#2659) v2.30.0-rc.3
Co-authored-by: github-actions <action@github.com>
2024-04-13 23:07:20 +03:00
Peter Savchenko
2d3780e81c find next/previous selectable block 2024-04-13 20:51:42 +03:00
Tatiana Fomina
5125f015dc
feat: nested popover (#2649)
* Move popover types to separate file

* tmp

* open top

* Fix bug with keyboard navigation

* Fix bug with scroll

* Fix mobile

* Add popover header class

* Display nested items on mobile

* Refactor history

* Fix positioning on desktop

* Fix tests

* Fix child popover indent left

* Fix ts errors in popover files

* Move files

* Rename cn to bem

* Clarify comments and rename method

* Refactor popover css classes

* Rename cls to css

* Split popover desktop and mobile classes

* Add ability to open popover to the left if not enough space to open to the right

* Add nested popover test

* Add popover test for mobile screens

* Fix tests

* Add union type for both popovers

* Add global window resize event

* Multiple fixes

* Move nodes initialization to constructor

* Rename handleShowingNestedItems to showNestedItems

* Replace WindowResize with EditorMobileLayoutToggled

* New doze of fixes

* Review fixes

* Fixes

* Fixes

* Make each nested popover decide itself if it should open top

* Update changelog

* Update changelog

* Update changelog
2024-04-13 17:34:26 +00:00
Peter Savchenko
92f2af5453 CrossInputSelection module 2024-04-13 19:06:33 +03:00
Peter Savchenko
3f54847726 Merge branch 'next' into feat/cbs 2024-04-13 16:02:23 +03:00
Peter Savchenko
b8b8469d22 rm selection on keydown 2024-04-13 15:56:47 +03:00
Peter Savchenko
ecdd73347c
fix(dx): dev example page fixed (#2682)
* fix dev example

* embed goes to master
2024-04-11 17:00:48 +03:00
Peter
606b6bd028 cbs utilities 2024-04-08 22:19:52 +03:00
Peter
a3509766c4 Merge remote-tracking branch 'origin/next' into feat/cbs 2024-04-06 23:24:59 +03:00
Peter
d242decc46 Merge remote-tracking branch 'origin/feat/cbs' into feat/cbs 2024-04-06 23:23:35 +03:00
Peter
3f69c3e647 disable selection of unselectable blocks 2024-04-06 23:16:24 +03:00
Peter Savchenko
4d5bb8ae9c
prevent text unselectable block selection 2024-04-02 22:34:54 +03:00
Peter Savchenko
1320b047a2
feat(merge): blocks of different types can be merged (#2671) v2.30.0-rc.2
* feature: possibilities to merge blocks of different types

* fix: remove scope change

* feat: use convert config instead of defined property

* chore:: use built-in function for type check

* fix: remove console.log

* chore: remove styling added by mistakes

* test: add testing for different blocks types merging

* fix: remove unused import

* fix: remove type argument

* fix: use existing functions for data export

* chore: update changelog

* fix: re put await

* fix: remove unnecessary check

* fix: typo in test name

* fix: re-add condition for merge

* test: add caret position test

* fix caret issues, add sanitize

* make if-else statement more clear

* upgrade cypress

* Update cypress.yml

* upd cypress to 13

* make sanitize test simpler

* patch rc version

---------

Co-authored-by: GuillaumeOnepilot <guillaume@onepilot.co>
Co-authored-by: Guillaume Leon <97881811+GuillaumeOnepilot@users.noreply.github.com>
2024-04-01 12:29:47 +03:00
Peter Savchenko
9751f5791a
manual cross-input deletion 2024-03-24 00:24:18 +03:00
Peter Savchenko
ce80d1b9a5
handle redactor keydowns instead of block events 2024-03-21 18:36:48 +03:00
Peter Savchenko
6d81159d31
Merge branch 'next' into feat/cbs 2024-03-13 20:01:13 +03:00
Alex Yang
b355f1673c
fix: strict css type (#2573)
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
Co-authored-by: Ilya Maroz <37909603+ilyamore88@users.noreply.github.com>
2024-03-13 17:57:52 +03:00
dependabot[bot]
bb2047c60f
build(deps): bump word-wrap from 1.2.3 to 1.2.5 (#2433)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.5.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.5)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2024-03-13 17:53:00 +03:00
dependabot[bot]
cc0d6de04b
build(deps): bump semver from 5.7.1 to 5.7.2 (#2411)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2024-03-13 17:47:18 +03:00
dependabot[bot]
9b3e9615b0
build(deps-dev): bump vite from 4.2.1 to 4.5.2 (#2651)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.2.1 to 4.5.2.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.5.2/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.2/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2024-03-13 17:36:26 +03:00
Peter Savchenko
ee6433201d
fix(block-tunes): enter keydown problems (#2650) v2.30.0-rc.1
* debug enter press

* fix sync set caret

* fix enter keydown problems + tests addedd

* Update search-input.ts

* add changelog

* add useful log to cypress custom comand

* Update commands.ts
2024-03-13 17:30:16 +03:00
github-actions[bot]
e9b4c30407
Bump version up to 2.30.0-rc.0 (#2640) v2.30.0-rc.0
* Bump version

* Update package.json

---------

Co-authored-by: github-actions <action@github.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2024-02-28 20:17:42 +03:00
VikhorKonstantin
8138ce95b2
fix issue #2523 (#2639)
* fix isMutationBelongsToElement function: make it return true if the whole text node is deleted inside of some descendant of the passed element

* isMutationBelongsToElement function shouldn't return true if some of the ancestors of the passed element were added or deleted, only if the element itself

* add test case verifying that 'onChange' is fired when the whole text inside some nested  descendant of the block is removed

* replace introduced dependency with ToolMock

* add comment explaining isMutationBelongsToElement behaviour in case of adding/removing the passed element itself

* fix formatting

* added some more explanation

* added record to the changelog

---------

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2024-02-28 20:08:08 +03:00
Yaroslav Gusev
7ff5faa46f
Change workflows trigger (#2595) 2024-02-28 15:33:50 +03:00