Commit graph

766 commits

Author SHA1 Message Date
github-actions[bot] 4118dc3aea
Bump version (#2693)
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
github-actions[bot] 54c4c234a5
Bump version (#2659)
Co-authored-by: github-actions <action@github.com>
2024-04-13 23:07:20 +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 ecdd73347c
fix(dx): dev example page fixed (#2682)
* fix dev example

* embed goes to master
2024-04-11 17:00:48 +03:00
Peter Savchenko 1320b047a2
feat(merge): blocks of different types can be merged (#2671)
* 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
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)
* 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)
* 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
Peter Savchenko b619946e8f
fix(slash): do not handle / + shift/alt, support for ascii keyboard (#2599)
* fix(slash): do not handle / + shift/alt, support for ascii keyboard

* support keyboards without physical '/'
2024-01-28 13:45:01 +03:00
Peter Savchenko 9542551d84
chore(release): increment package version to 2.29 (#2593) 2024-01-24 18:01:49 +03:00
Betty Steger 4bdf7a12b7
chore(on-change): check data-mutation-free of parent nodes (#2548)
* add data-mutation-free=deep

* just use closest and reduce waiting time in test

* Update src/components/block/index.ts

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>

* Update test/cypress/tests/onchange.cy.ts

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>

* add data-mutation-free=deep

* just use closest and reduce waiting time in test

* Update src/components/block/index.ts

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>

* Update test/cypress/tests/onchange.cy.ts

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>

* add line in Changelog

* Update docs/CHANGELOG.md

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>

* add support for characterData mutations

* Update onchange.cy.ts

---------

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2024-01-10 22:27:19 +03:00
github-actions[bot] c5ddf91189
Bump version (#2557)
Co-authored-by: github-actions <action@github.com>
2023-12-22 23:49:00 +03:00
Peter Savchenko 11925ca980
fix(caret): caret loosing on mobile devices (#2570)
* fix(caret): caret loosing on mobile devices

* rm unused import
2023-12-22 23:31:46 +03:00
Peter Savchenko cd29c52e51
feat(ui): native-like tab behaviour, slash for toolbox (#2569)
* slash to open toolbox, tab for navigation

* tab, focus improvements

- remove "focused" block state
- tab navigation respects inputs
- allow to focus contentless blocks

* fix tests

* tests for Slash

* tab tests

* test for tabbing out of editor

* tests fixed

* review fixes
2023-12-22 23:15:35 +03:00
Gusev Yaroslav ea2be754e7
Make a request to github api instead of using composite action (#2558) 2023-12-11 11:24:26 +03:00
Gusev Yaroslav 5515c3b534
feat: Skip workflow and do not bump version if it was changed already (#2555)
* Skip workflow and do not bump version if it was changed already

* Change comment

* Change action name
2023-12-09 19:57:03 +07:00
github-actions[bot] 6385ab2a39
Bump version (#2554)
Co-authored-by: github-actions <action@github.com>
2023-12-09 02:18:53 +03:00
Peter Savchenko c5854eea14
fix(inline-toolbar): appearance logic improved (#2550)
* fix(inline-toolbar): appearing logic improved

* tests added

* fix tests

* debounce added

* fix test build in github action

* increase closeTo delta for ff
2023-12-09 02:05:27 +03:00
Gusev Yaroslav 348c1c7752
Give a bump-version action a pull-request:write permission (#2553) 2023-12-09 01:34:11 +03:00
Gusev Yaroslav 8726f8bdfa
Give contents:write permission to jobs (#2549) 2023-12-06 12:54:54 +03:00
ferntheplant 494d6e4b9b
fix: use type imports for block events (#2491)
* fix: use type imports for block events

* add changelog entry

---------

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2023-12-05 19:26:10 +03:00
Gusev Yaroslav 531ab06f63
Set workflow status to skipped if same version published (#2539)
* Made a step that cancels a workflow, settings it's status to 'skipped'

* Fixed accidentally removed files

* Fix: returned deleted submodules
2023-11-16 20:34:02 +03:00
Peter Savchenko 5e8fe06dd6
fix: errors caused by events fired while editor is not initialized yet (#2532)
* fix(init): errors cause by events fired while editor is not initialized yet

* Update package.json
2023-11-08 22:35:52 +03:00
Gusev Yaroslav af6b64a3e6
Added a github link to codex bot release notification (#2527)
* Added a github link to codex bot release notification

* Url now depends on type of release

* Removed unnecessary condition

* fixed indentation
2023-11-06 19:00:19 +03:00
Al-Amin Firdows 92ccfc5317
docs: replace holderId config by holder (#2525)
* docs: replace holderId by holder

* docs: replace holderId by holder
2023-11-02 19:46:09 +03:00
Peter Savchenko ee188bfe5d
feat(config): new style.nonce option for CSP (#2519) 2023-10-23 01:08:26 +03:00
Peter Savchenko 35337747c5
fix(inline-toolbar): editor element grow on inline toolbar close (#2516) 2023-10-19 00:44:06 +03:00
github-actions[bot] d936bf08b7
Bump version (#2515)
Co-authored-by: github-actions <action@github.com>
2023-10-17 19:15:43 +03:00
Peter Savchenko e8acc59487
fix(onchange): blocks.render would not call onChange in safari (#2514) 2023-10-17 18:26:23 +03:00
Peter Savchenko bdb6eed9d1
Merge branch '2.28' into next 2023-10-17 15:43:50 +03:00
Peter Savchenko b8cfcaec26
fix(build): 2.28.1 package rebuilt 2023-10-17 15:19:57 +03:00
Peter Savchenko 7d0db9b622
chore(patch): pull 2.28.1 patch to the next (#2507)
* fix(paste): delay onPaste call to be sure that block is ready (#2506)

* chore(package.json): increment patch version

* Update CHANGELOG.md
2023-10-11 20:28:16 +03:00
Peter Savchenko ca2bc803a1
fix(paste): delay onPaste call to be sure that block is ready (#2506) 2023-10-11 19:43:18 +03:00
github-actions[bot] c9014e670d
Bump version (#2485)
Co-authored-by: github-actions <action@github.com>
2023-09-20 11:19:42 +03:00
Peter Savchenko ec569f9981
fix(toolbar): layout shrink after blocks removing (#2484) 2023-09-20 11:07:25 +03:00
github-actions[bot] 77eb320203
Bump version up to 2.28.1-rc.0 (#2468)
* Bump version

* use 2.29.0-rc.0

---------

Co-authored-by: github-actions <action@github.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
2023-09-05 11:33:27 +03:00
Peter Savchenko 0369ff5827
fix(renderer): handle empty array as data.blocks (#2454) 2023-09-05 11:24:47 +03:00
Peter Savchenko 59c8d28da5
chore(release): bump version to 2.28.0 (#2455) 2023-08-25 00:23:57 +03:00
github-actions[bot] f8e9414217
Bump version (#2450)
Co-authored-by: github-actions <action@github.com>
2023-08-21 12:29:45 +03:00
Peter Savchenko 42612a0fd9
chore(blocks.render): mutex for onchange added to the blocks.render() (#2449) 2023-08-21 12:28:31 +03:00
github-actions[bot] be0d33ce0f
Bump version (#2447)
Co-authored-by: github-actions <action@github.com>
2023-08-20 17:29:21 +03:00
Peter Savchenko 922dfd8741
chore(api): blocks.update(id, data) method improved (#2443)
* add custom Chai assertion "be.calledWithBatchedEvents" for testing onchange

* chore(api): blocks.update(id, data) method improved

- `blocks.update(id, data)` now can accept partial data object — it will update only passed properties, others will remain the same.
- `blocks.update(id, data)` now will trigger onChange with only `block-change` event.
- `blocks.update(id, data)` will return a promise with BlockAPI object of changed block.

* fix tests

* Update blocks.cy.ts
2023-08-19 07:53:42 +03:00
Peter Savchenko b39996616c
chore(perf): initialisation and rendering performance optimisations (#2430)
* renderer batching

* initialization and rendering performance optimized

* insertMany api method added

* Update index.html

* rm old method

* upd changelog

* upd paragraph

* paste tests fixed

* api blocks tests fixed

* backspace event tests fixed

* async issues in tests fixed

* eslint

* stub block added, tests added

* eslint

* eslint

* add test for insertMany()

* Update package.json
2023-08-08 22:17:09 +03:00
github-actions[bot] 0e64665b0f
Bump version (#2424)
Co-authored-by: github-actions <action@github.com>
2023-07-20 23:34:45 +03:00