Skip to content

Commit 46163c1

Browse files
authored
Merge branch 'next' into wrap-content
2 parents d672c8e + eb7ffcb commit 46163c1

File tree

142 files changed

+1253
-616
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+1253
-616
lines changed

.eslintrc

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,23 @@
3636
"navigator": true
3737
},
3838
"rules": {
39-
"jsdoc/require-returns-type": "off"
40-
}
39+
"jsdoc/require-returns-type": "off",
40+
"@typescript-eslint/strict-boolean-expressions": "warn",
41+
"@typescript-eslint/consistent-type-imports": "error",
42+
"@typescript-eslint/consistent-type-exports": "error"
43+
},
44+
"overrides": [
45+
{
46+
"files": [
47+
"tsconfig.json",
48+
"package.json",
49+
"tsconfig.*.json",
50+
"tslint.json"
51+
],
52+
"rules": {
53+
"quotes": [1, "double"],
54+
"semi": [1, "never"],
55+
}
56+
}
57+
]
4158
}

cypress.config.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { defineConfig } from 'cypress';
2+
import path from 'node:path';
3+
import vitePreprocessor from 'cypress-vite';
24

35
export default defineConfig({
46
env: {
@@ -12,7 +14,9 @@ export default defineConfig({
1214
// We've imported your old cypress plugins here.
1315
// You may want to clean this up later by importing these.
1416
setupNodeEvents(on, config) {
15-
on('file:preprocessor', require('cypress-vite')(config));
17+
on('file:preprocessor', vitePreprocessor({
18+
configFile: path.resolve(__dirname, './vite.config.test.js'),
19+
}));
1620

1721
/**
1822
* Plugin for cypress that adds better terminal output for easier debugging.
@@ -21,7 +25,7 @@ export default defineConfig({
2125
*/
2226
require('cypress-terminal-report/src/installLogsPrinter')(on);
2327

24-
require('./test/cypress/plugins/index.ts')(on, config);
28+
require('@cypress/code-coverage/task')(on, config);
2529
},
2630
specPattern: 'test/cypress/tests/**/*.cy.{js,jsx,ts,tsx}',
2731
supportFile: 'test/cypress/support/index.ts',

docs/CHANGELOG.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

3+
### 2.31.0
4+
5+
- `New` - Inline tools (those with `isReadOnlySupported` specified) can now be used in read-only mode
6+
- `Fix` - Fix selection of first block in read-only initialization with "autofocus=true"
7+
- `Fix` - Incorrect caret position after blocks merging in Safari
8+
9+
### 2.30.6
10+
11+
- `Fix` – Fix the display of ‘Convert To’ near blocks that do not have the ‘conversionConfig.export’ rule specified
12+
- `Fix` – The Plus button does not appear when the editor is loaded in an iframe in Chrome
13+
- `Fix` - Prevent inline toolbar from closing in nested instance of editor
14+
15+
### 2.30.5
16+
17+
`Fix` – Fix exported types
18+
19+
### 2.30.4
20+
21+
- `Fix` - Tool's exporting types added
22+
323
### 2.30.3
424

525
- `Fix` – I18n in nested popover
@@ -19,7 +39,7 @@
1939
- `New` – Block Tunes now supports nesting items
2040
- `New` – Block Tunes now supports separator items
2141
- `New`*Menu Config* – New item type – HTML
22-
`New`*Menu Config* – Default and HTML items now support hints
42+
- `New`*Menu Config* – Default and HTML items now support hints
2343
- `New` – Inline Toolbar has new look 💅
2444
- `New` – Inline Tool's `render()` now supports [Menu Config](https://editorjs.io/menu-config/) format
2545
- `New`*ToolsAPI* – All installed block tools now accessible via ToolsAPI `getBlockTools()` method

example/tools/nested-list

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@editorjs/editorjs",
3-
"version": "2.30.3",
3+
"version": "2.31.0-rc.1",
44
"description": "Editor.js — open source block-style WYSIWYG editor with JSON output",
55
"main": "dist/editorjs.umd.js",
66
"module": "dist/editorjs.mjs",
@@ -40,20 +40,20 @@
4040
},
4141
"devDependencies": {
4242
"@babel/register": "^7.21.0",
43-
"@codexteam/icons": "^0.3.0",
43+
"@codexteam/icons": "0.3.2",
4444
"@codexteam/shortcuts": "^1.1.1",
4545
"@cypress/code-coverage": "^3.10.3",
4646
"@editorjs/code": "^2.7.0",
4747
"@editorjs/delimiter": "^1.2.0",
48-
"@editorjs/header": "^2.7.0",
48+
"@editorjs/header": "^2.8.8",
4949
"@editorjs/paragraph": "^2.11.6",
5050
"@editorjs/simple-image": "^1.4.1",
5151
"@types/node": "^18.15.11",
5252
"chai-subset": "^1.6.0",
5353
"codex-notifier": "^1.1.2",
5454
"codex-tooltip": "^1.0.5",
5555
"core-js": "3.30.0",
56-
"cypress": "^13.7.1",
56+
"cypress": "^13.13.3",
5757
"cypress-intellij-reporter": "^0.0.7",
5858
"cypress-plugin-tab": "^1.0.5",
5959
"cypress-terminal-report": "^5.3.2",
@@ -77,5 +77,8 @@
7777
"collective": {
7878
"type": "opencollective",
7979
"url": "https://opencollective.com/editorjs"
80+
},
81+
"dependencies": {
82+
"@editorjs/caret": "^1.0.1"
8083
}
8184
}

src/codex.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
import { EditorConfig } from '../types';
3+
import type { EditorConfig } from '../types';
44

55
/**
66
* Apply polyfills

src/components/__module.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { EditorModules } from '../types-internal/editor-modules';
2-
import { EditorConfig } from '../../types';
3-
import { ModuleConfig } from '../types-internal/module-config';
1+
import type { EditorModules } from '../types-internal/editor-modules';
2+
import type { EditorConfig } from '../../types';
3+
import type { ModuleConfig } from '../types-internal/module-config';
44
import Listeners from './utils/listeners';
5-
import EventsDispatcher from './utils/events';
6-
import { EditorEventMap } from './events';
5+
import type EventsDispatcher from './utils/events';
6+
import type { EditorEventMap } from './events';
77

88
/**
99
* The type <T> of the Module generic.

src/components/block-tunes/block-tune-delete.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* @classdesc Editor's default tune that moves up selected block
44
* @copyright <CodeX Team> 2018
55
*/
6-
import { API, BlockTune } from '../../../types';
6+
import type { API, BlockTune } from '../../../types';
77
import { IconCross } from '@codexteam/icons';
8-
import { MenuConfig } from '../../../types/tools/menu-config';
8+
import type { MenuConfig } from '../../../types/tools/menu-config';
99

1010
/**
1111
*

src/components/block-tunes/block-tune-move-down.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
* @copyright <CodeX Team> 2018
55
*/
66

7-
import { API, BlockTune } from '../../../types';
7+
import type { API, BlockTune } from '../../../types';
88
import { IconChevronDown } from '@codexteam/icons';
9-
import { TunesMenuConfig } from '../../../types/tools';
9+
import type { TunesMenuConfig } from '../../../types/tools';
1010

1111

1212
/**

0 commit comments

Comments
 (0)