diff --git a/.pnp.cjs b/.pnp.cjs index e3b18fc..7853c19 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -1348,14 +1348,18 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@react-editor-js/client", "virtual:4a6625c4b2e390f05712a53905d07a9bb31b321796835eac85dafc36cc372e8609559744fc2166d75ef6a59670220f76b4fc0dcb1521667fcb6f6758e80f8494#workspace:packages/@react-editor-js/client"], ["@editorjs/editorjs", "npm:2.22.3"], + ["@editorjs/paragraph", "npm:2.8.0"], ["@react-editor-js/core", "virtual:eeb0d27880fc71d7dbdd75f46f96f2cd8c3469844f42ed8de1a5901da8507ca8a61db6d3a214e4f8ab09bd225e7e7aafc68ad2322d87d5811b50bdc2842d9768#workspace:packages/@react-editor-js/core"], ["@types/editorjs__editorjs", null], + ["@types/editorjs__paragraph", null], ["@types/react", "npm:17.0.33"], ["react", "npm:17.0.2"], + ["tslib", "npm:2.3.1"], ["typescript", "patch:typescript@npm%3A4.3.5#~builtin::version=4.3.5&hash=ddd1e8"] ], "packagePeers": [ - "@types/editorjs__editorjs" + "@types/editorjs__editorjs", + "@types/editorjs__paragraph" ], "linkType": "SOFT", }], @@ -1364,9 +1368,11 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@react-editor-js/client", "workspace:packages/@react-editor-js/client"], ["@editorjs/editorjs", "npm:2.22.3"], + ["@editorjs/paragraph", "npm:2.8.0"], ["@react-editor-js/core", "virtual:eeb0d27880fc71d7dbdd75f46f96f2cd8c3469844f42ed8de1a5901da8507ca8a61db6d3a214e4f8ab09bd225e7e7aafc68ad2322d87d5811b50bdc2842d9768#workspace:packages/@react-editor-js/core"], ["@types/react", "npm:17.0.33"], ["react", "npm:17.0.2"], + ["tslib", "npm:2.3.1"], ["typescript", "patch:typescript@npm%3A4.3.5#~builtin::version=4.3.5&hash=ddd1e8"] ], "linkType": "SOFT", @@ -1378,10 +1384,8 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@react-editor-js/core", "virtual:eeb0d27880fc71d7dbdd75f46f96f2cd8c3469844f42ed8de1a5901da8507ca8a61db6d3a214e4f8ab09bd225e7e7aafc68ad2322d87d5811b50bdc2842d9768#workspace:packages/@react-editor-js/core"], ["@editorjs/editorjs", "npm:2.22.3"], - ["@editorjs/paragraph", "npm:2.8.0"], ["@testing-library/react", "virtual:f4fa7b01f8307256471e3ea46c905b7e2879690c09b6c3dc21123d062d3519198db8c0d46eaa5935bd9796b4d28156b5a5dfac2a7163427ceefd5ac3002ed51c#npm:12.1.2"], ["@types/editorjs__editorjs", null], - ["@types/editorjs__paragraph", null], ["@types/jest", "npm:27.0.3"], ["@types/react", "npm:17.0.33"], ["react", "npm:17.0.2"], @@ -1392,7 +1396,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packagePeers": [ "@editorjs/editorjs", "@types/editorjs__editorjs", - "@types/editorjs__paragraph", "@types/react", "react" ], @@ -1403,7 +1406,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@react-editor-js/core", "workspace:packages/@react-editor-js/core"], ["@editorjs/editorjs", "npm:2.22.3"], - ["@editorjs/paragraph", "npm:2.8.0"], ["@testing-library/react", "virtual:f4fa7b01f8307256471e3ea46c905b7e2879690c09b6c3dc21123d062d3519198db8c0d46eaa5935bd9796b4d28156b5a5dfac2a7163427ceefd5ac3002ed51c#npm:12.1.2"], ["@types/jest", "npm:27.0.3"], ["@types/react", "npm:17.0.33"], @@ -1420,7 +1422,11 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@react-editor-js-server-virtual-2f3748be85/1/packages/@react-editor-js/server/", "packageDependencies": [ ["@react-editor-js/server", "virtual:4a6625c4b2e390f05712a53905d07a9bb31b321796835eac85dafc36cc372e8609559744fc2166d75ef6a59670220f76b4fc0dcb1521667fcb6f6758e80f8494#workspace:packages/@react-editor-js/server"], + ["@editorjs/editorjs", "npm:2.22.3"], + ["@editorjs/paragraph", "npm:2.8.0"], ["@react-editor-js/core", "virtual:eeb0d27880fc71d7dbdd75f46f96f2cd8c3469844f42ed8de1a5901da8507ca8a61db6d3a214e4f8ab09bd225e7e7aafc68ad2322d87d5811b50bdc2842d9768#workspace:packages/@react-editor-js/core"], + ["@types/editorjs__editorjs", null], + ["@types/editorjs__paragraph", null], ["@types/react", "npm:17.0.33"], ["@types/react-editor-js__core", null], ["react", "npm:17.0.2"], @@ -1428,6 +1434,8 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["typescript", "patch:typescript@npm%3A4.3.5#~builtin::version=4.3.5&hash=ddd1e8"] ], "packagePeers": [ + "@types/editorjs__editorjs", + "@types/editorjs__paragraph", "@types/react-editor-js__core" ], "linkType": "SOFT", @@ -1436,6 +1444,8 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./packages/@react-editor-js/server/", "packageDependencies": [ ["@react-editor-js/server", "workspace:packages/@react-editor-js/server"], + ["@editorjs/editorjs", "npm:2.22.3"], + ["@editorjs/paragraph", "npm:2.8.0"], ["@react-editor-js/core", "virtual:eeb0d27880fc71d7dbdd75f46f96f2cd8c3469844f42ed8de1a5901da8507ca8a61db6d3a214e4f8ab09bd225e7e7aafc68ad2322d87d5811b50bdc2842d9768#workspace:packages/@react-editor-js/core"], ["@types/react", "npm:17.0.33"], ["react", "npm:17.0.2"], diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz index a43793b..707aef4 100644 Binary files a/.yarn/install-state.gz and b/.yarn/install-state.gz differ diff --git a/README.md b/README.md index 857b08d..dc24cf0 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Allow all options of [editor-js](https://github.com/codex-team/editor.js/blob/ma | ------------------ | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | defaulltValue | OutputData | Initial data when using editor js as [uncontrolled component](https://ko.reactjs.org/docs/uncontrolled-components.html). highly recommend it | | value | OutputData | data when using editor js as [controlled component](https://ko.reactjs.org/docs/forms.html#controlled-components).
⚠️ Don't use it with onChange prop. Infinite loops can occur. | -| onInitialize | (editorJS?: EditorJS) => void | Call after editor-js is initialized | +| onInitialize | (editorCore?: EditorCore) => void | Call after editor-js is initialized | ## 🧐 FAQ @@ -148,17 +148,30 @@ It's simpleeeee ### How to access editor-js instance? -You can access using instanceRef +The editor-js instance is inaccessible. However, you can access the abstracted editor-js for isomorphic react-editor-js. + +```ts +// abstracted editor-js interface +interface EditorCore { + destroy(): Promise + + clear(): Promise + + save(): Promise + + render(data: OutputData): Promise +} +``` ```tsx -const editorJS = React.useRef(null) +const editorCore = React.useRef(null) const handleInitialize = React.useCallback((instance) => { - editorJS.current = instance + editorCore.current = instance }, []) const handleSave = React.useCallback(() => { - const savedData = await editorJS.current.save(); + const savedData = await editorCore.current.save(); }, []) diff --git a/packages/@react-editor-js/client/package.json b/packages/@react-editor-js/client/package.json index 6808a57..2929a2a 100644 --- a/packages/@react-editor-js/client/package.json +++ b/packages/@react-editor-js/client/package.json @@ -14,6 +14,7 @@ }, "peerDependencies": { "@editorjs/editorjs": "*", + "@editorjs/paragraph": "*", "react": "*" }, "dependencies": { @@ -21,8 +22,10 @@ }, "devDependencies": { "@editorjs/editorjs": "*", + "@editorjs/paragraph": "*", "@types/react": "*", "react": "*", + "tslib": "^2.3.1", "typescript": "^4.3.5" } } diff --git a/packages/@react-editor-js/client/src/ClientEditorJSFactory.ts b/packages/@react-editor-js/client/src/ClientEditorJSFactory.ts deleted file mode 100644 index e36077a..0000000 --- a/packages/@react-editor-js/client/src/ClientEditorJSFactory.ts +++ /dev/null @@ -1,8 +0,0 @@ -import EditorJS, { EditorConfig } from '@editorjs/editorjs' -import { EditorJSFactory } from '@react-editor-js/core' - -export class ClientEditorJSFactory implements EditorJSFactory { - create(config?: EditorConfig | string) { - return new EditorJS(config) - } -} diff --git a/packages/@react-editor-js/client/src/ReactEditorJSClient.tsx b/packages/@react-editor-js/client/src/ReactEditorJSClient.tsx index 7f5ca72..70da3c3 100644 --- a/packages/@react-editor-js/client/src/ReactEditorJSClient.tsx +++ b/packages/@react-editor-js/client/src/ReactEditorJSClient.tsx @@ -4,12 +4,16 @@ import { ReactEditorJS, } from '@react-editor-js/core' -import { ClientEditorJSFactory } from './ClientEditorJSFactory' +import { ClientEditorCore } from './client-editor-core' +import { EditorConfig } from '@editorjs/editorjs' export type Props = Omit function ReactEditorJSClient(props: Props) { - const factory = React.useMemo(() => new ClientEditorJSFactory(), []) + const factory = React.useCallback( + (config: EditorConfig) => new ClientEditorCore(config), + [] + ) return } diff --git a/packages/@react-editor-js/client/src/client-editor-core.ts b/packages/@react-editor-js/client/src/client-editor-core.ts new file mode 100644 index 0000000..a3c4a0b --- /dev/null +++ b/packages/@react-editor-js/client/src/client-editor-core.ts @@ -0,0 +1,39 @@ +import EditorJS, { EditorConfig, OutputData } from '@editorjs/editorjs' +import Paragraph from '@editorjs/paragraph' +import { EditorCore } from '@react-editor-js/core' + +export class ClientEditorCore implements EditorCore { + private _editorJS: EditorJS + + constructor({ tools, ...config }: EditorConfig) { + const extendTools = { + // default tools + paragraph: { + class: Paragraph, + inlineToolbar: true, + }, + ...tools, + } + + this._editorJS = new EditorJS({ + tools: extendTools, + ...config, + }) + } + + public async clear() { + await this._editorJS.clear() + } + + public async save() { + return this._editorJS.save() + } + + public async destroy() { + await this._editorJS.destroy() + } + + public async render(data: OutputData) { + await this._editorJS.render(data) + } +} diff --git a/packages/@react-editor-js/core/package.json b/packages/@react-editor-js/core/package.json index 60f3b5f..ca3c668 100644 --- a/packages/@react-editor-js/core/package.json +++ b/packages/@react-editor-js/core/package.json @@ -14,12 +14,10 @@ }, "peerDependencies": { "@editorjs/editorjs": "*", - "@editorjs/paragraph": "*", "react": "*" }, "devDependencies": { "@editorjs/editorjs": "*", - "@editorjs/paragraph": "*", "@testing-library/react": "^12.1.2", "@types/jest": "^27.0.3", "@types/react": "*", diff --git a/packages/@react-editor-js/core/src/ReactEditorJS.tsx b/packages/@react-editor-js/core/src/ReactEditorJS.tsx index ac3492b..6430742 100644 --- a/packages/@react-editor-js/core/src/ReactEditorJS.tsx +++ b/packages/@react-editor-js/core/src/ReactEditorJS.tsx @@ -1,12 +1,11 @@ import React from 'react' -import { Props } from '@react-editor-js/core' -import EditorJS from '@editorjs/editorjs' -import Paragraph from '@editorjs/paragraph' + +import { Props } from './component-types' +import { EditorCore } from './editor-core' function ReactEditorJS({ factory, holder, - tools, defaultValue, children, value, @@ -18,20 +17,10 @@ function ReactEditorJS({ holder ?? `react-editor-js-${Date.now().toString(16)}` ) - const editorJS = React.useRef(null) + const editorJS = React.useRef(null) React.useEffect(() => { - const extendTools = { - // default tools - paragraph: { - class: Paragraph, - inlineToolbar: true, - }, - ...tools, - } - - editorJS.current = factory.create({ - tools: extendTools, + editorJS.current = factory({ holder: memoizedHolder.current, ...(defaultValue && { data: defaultValue }), ...restProps, @@ -46,7 +35,7 @@ function ReactEditorJS({ React.useEffect(() => { if (value) { - editorJS.current?.blocks.render(value) + editorJS.current?.render(value) } }, [value]) diff --git a/packages/@react-editor-js/core/src/component-types.ts b/packages/@react-editor-js/core/src/component-types.ts index bcb34bf..495352d 100644 --- a/packages/@react-editor-js/core/src/component-types.ts +++ b/packages/@react-editor-js/core/src/component-types.ts @@ -1,15 +1,16 @@ import React from 'react' -import EditorJS, { EditorConfig } from '@editorjs/editorjs' +import { EditorConfig } from '@editorjs/editorjs' -import { EditorJSFactory } from './factory' +import { EditorCoreFactory } from './factory' +import { EditorCore } from './editor-core' export interface Props extends Omit { - factory: EditorJSFactory + factory: EditorCoreFactory holder?: string children?: React.ReactElement value?: EditorConfig['data'] defaultValue?: EditorConfig['data'] - onInitialize?: (editorJS: EditorJS) => void + onInitialize?: (core: EditorCore) => void } diff --git a/packages/@react-editor-js/core/src/editor-core.ts b/packages/@react-editor-js/core/src/editor-core.ts new file mode 100644 index 0000000..82d69e6 --- /dev/null +++ b/packages/@react-editor-js/core/src/editor-core.ts @@ -0,0 +1,11 @@ +import { OutputData } from '@editorjs/editorjs' + +export interface EditorCore { + destroy(): Promise + + clear(): Promise + + save(): Promise + + render(data: OutputData): Promise +} diff --git a/packages/@react-editor-js/core/src/factory.ts b/packages/@react-editor-js/core/src/factory.ts index 49bec42..31e1c6c 100644 --- a/packages/@react-editor-js/core/src/factory.ts +++ b/packages/@react-editor-js/core/src/factory.ts @@ -1,5 +1,5 @@ -import EditorJS, { EditorConfig } from '@editorjs/editorjs' +import { EditorConfig } from '@editorjs/editorjs' -export interface EditorJSFactory { - create(config?: EditorConfig | string): EditorJS -} +import { EditorCore } from './editor-core' + +export type EditorCoreFactory = (config: EditorConfig) => EditorCore diff --git a/packages/@react-editor-js/core/src/index.ts b/packages/@react-editor-js/core/src/index.ts index 7cebd54..8eb4ab7 100644 --- a/packages/@react-editor-js/core/src/index.ts +++ b/packages/@react-editor-js/core/src/index.ts @@ -1,4 +1,5 @@ export * from './component-types' export * from './factory' +export * from './editor-core' export { default as ReactEditorJS } from './ReactEditorJS' diff --git a/packages/@react-editor-js/core/tests/EditorJSStub.ts b/packages/@react-editor-js/core/tests/EditorJSStub.ts deleted file mode 100644 index 822547b..0000000 --- a/packages/@react-editor-js/core/tests/EditorJSStub.ts +++ /dev/null @@ -1,15 +0,0 @@ -export class EditorJSStub { - private _value: any | null = null - - public get value() { - return this._value - } - - public blocks = { - render: (value) => { - this._value = value - }, - } - - public destroy() {} -} diff --git a/packages/@react-editor-js/core/tests/EditorJSStubFactory.ts b/packages/@react-editor-js/core/tests/EditorJSStubFactory.ts deleted file mode 100644 index a655685..0000000 --- a/packages/@react-editor-js/core/tests/EditorJSStubFactory.ts +++ /dev/null @@ -1,18 +0,0 @@ -import EditorJS from '@editorjs/editorjs' - -import { EditorJSFactory } from '../src/factory' -import { EditorJSStub } from './EditorJSStub' - -export class EditorJSStubFactory implements EditorJSFactory { - private _instance: EditorJSStub | null = null - - public get instance(): EditorJSStub { - return this._instance - } - - public create() { - this._instance = new EditorJSStub() - - return this._instance as any - } -} diff --git a/packages/@react-editor-js/core/tests/ReactEditorJS.spec.tsx b/packages/@react-editor-js/core/tests/ReactEditorJS.spec.tsx index 4679d25..ae8e61d 100644 --- a/packages/@react-editor-js/core/tests/ReactEditorJS.spec.tsx +++ b/packages/@react-editor-js/core/tests/ReactEditorJS.spec.tsx @@ -2,16 +2,17 @@ import React from 'react' import { render, waitFor } from '@testing-library/react' import ReactEditorJS from '../src/ReactEditorJS' -import { EditorJSStubFactory } from './EditorJSStubFactory' + +import { TestEditorCore } from './TestEditorCore' import { Task } from './Task' describe('ReactEditorJS', () => { it('should be able to set the holder', () => { const HOLDER = 'TEST_HOLDER' - render( - - ) + const factory = () => new TestEditorCore() + + render() expect(document.querySelector(`#${HOLDER}`)).toBeTruthy() }) @@ -21,8 +22,10 @@ describe('ReactEditorJS', () => { const TEST_ID = 'TEST_ID' const ELEMENT =
+ const factory = () => new TestEditorCore() + const { getByTestId } = render( - + {ELEMENT} ) @@ -33,7 +36,9 @@ describe('ReactEditorJS', () => { }) it('should pass editor-js instance as parameter on onInitialize', async () => { - const factory = new EditorJSStubFactory() + const editorCore = new TestEditorCore() + const factory = () => editorCore + const task = new Task() const handleInitialize = jest.fn(() => { task.done() @@ -43,7 +48,7 @@ describe('ReactEditorJS', () => { await task.wait() - expect(handleInitialize).toHaveBeenCalledWith(factory.instance) + expect(handleInitialize).toHaveBeenCalledWith(editorCore) }) it('should update data when value changed', async () => { @@ -55,7 +60,8 @@ describe('ReactEditorJS', () => { blocks: ['NEW_VALUE'], } - const factory = new EditorJSStubFactory() + const editorCore = new TestEditorCore() + const factory = () => editorCore async function renderEditor(value) { const task = new Task() @@ -77,9 +83,9 @@ describe('ReactEditorJS', () => { } await renderEditor(OLD_VALUE) - expect(factory.instance.value).toBe(OLD_VALUE) + expect(editorCore.data).toBe(OLD_VALUE) await renderEditor(NEW_VALUE) - expect(factory.instance.value).toBe(NEW_VALUE) + expect(editorCore.data).toBe(NEW_VALUE) }) }) diff --git a/packages/@react-editor-js/core/tests/TestEditorCore.ts b/packages/@react-editor-js/core/tests/TestEditorCore.ts new file mode 100644 index 0000000..50b0fde --- /dev/null +++ b/packages/@react-editor-js/core/tests/TestEditorCore.ts @@ -0,0 +1,27 @@ +import { OutputData } from '@editorjs/editorjs' + +import { EditorCore } from '../src' + +export class TestEditorCore implements EditorCore { + private _data: OutputData | null = null + + constructor() {} + + public get data() { + return this._data + } + + public async clear() {} + + public async save() { + return { + blocks: [], + } + } + + public async destroy() {} + + public async render(data: OutputData) { + this._data = data + } +} diff --git a/packages/@react-editor-js/server/package.json b/packages/@react-editor-js/server/package.json index 0aceb86..5bf2ddd 100644 --- a/packages/@react-editor-js/server/package.json +++ b/packages/@react-editor-js/server/package.json @@ -13,6 +13,8 @@ "url": "https://github.com/Jungwoo-An/react-editor-js/issues" }, "peerDependencies": { + "@editorjs/editorjs": "*", + "@editorjs/paragraph": "*", "@react-editor-js/core": "2.0.5", "react": "*" }, @@ -20,6 +22,8 @@ "@react-editor-js/core": "2.0.5" }, "devDependencies": { + "@editorjs/editorjs": "*", + "@editorjs/paragraph": "*", "@types/react": "*", "react": "*", "tslib": "^2.3.1", diff --git a/packages/@react-editor-js/server/src/ReactEditorJSServer.tsx b/packages/@react-editor-js/server/src/ReactEditorJSServer.tsx index a8c77f9..3078f51 100644 --- a/packages/@react-editor-js/server/src/ReactEditorJSServer.tsx +++ b/packages/@react-editor-js/server/src/ReactEditorJSServer.tsx @@ -3,13 +3,17 @@ import { Props as ReactEditorJSProps, ReactEditorJS, } from '@react-editor-js/core' +import { EditorConfig } from '@editorjs/editorjs' -import { ServerEditorJSFactory } from './ServerEditorJSFactory' +import { ServerEditorCore } from './server-editor-core' export type Props = Omit function ReactEditorJSServer(props: Props) { - const factory = React.useMemo(() => new ServerEditorJSFactory(), []) + const factory = React.useCallback( + (config: EditorConfig) => new ServerEditorCore(config), + [] + ) return } diff --git a/packages/@react-editor-js/server/src/ServerEditorJSFactory.ts b/packages/@react-editor-js/server/src/ServerEditorJSFactory.ts deleted file mode 100644 index 1bf7e0f..0000000 --- a/packages/@react-editor-js/server/src/ServerEditorJSFactory.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { EditorJSFactory } from '@react-editor-js/core' - -import { TinyServerEditorJS } from './TinyServerEditorJS' - -export class ServerEditorJSFactory implements EditorJSFactory { - create() { - return new TinyServerEditorJS() as any - } -} diff --git a/packages/@react-editor-js/server/src/TinyServerEditorJS.ts b/packages/@react-editor-js/server/src/TinyServerEditorJS.ts deleted file mode 100644 index c04916d..0000000 --- a/packages/@react-editor-js/server/src/TinyServerEditorJS.ts +++ /dev/null @@ -1,7 +0,0 @@ -export class TinyServerEditorJS { - public blocks = { - render: () => {}, - } - - public destroy() {} -} diff --git a/packages/@react-editor-js/server/src/server-editor-core.ts b/packages/@react-editor-js/server/src/server-editor-core.ts new file mode 100644 index 0000000..c21413b --- /dev/null +++ b/packages/@react-editor-js/server/src/server-editor-core.ts @@ -0,0 +1,22 @@ +import { EditorConfig, OutputData } from '@editorjs/editorjs' +import { EditorCore } from '@react-editor-js/core' + +export class ServerEditorCore implements EditorCore { + private _memoizedData: OutputData + + constructor({ data }: EditorConfig) { + if (data) { + this._memoizedData = data + } + } + + public async clear() {} + + public async save() { + return this._memoizedData + } + + public async destroy() {} + + public async render() {} +} diff --git a/yarn.lock b/yarn.lock index f5b25e0..2923143 100644 --- a/yarn.lock +++ b/yarn.lock @@ -821,27 +821,29 @@ __metadata: languageName: node linkType: hard -"@react-editor-js/client@2.0.4, @react-editor-js/client@workspace:packages/@react-editor-js/client": +"@react-editor-js/client@2.0.5, @react-editor-js/client@workspace:packages/@react-editor-js/client": version: 0.0.0-use.local resolution: "@react-editor-js/client@workspace:packages/@react-editor-js/client" dependencies: "@editorjs/editorjs": "*" - "@react-editor-js/core": 2.0.4 + "@editorjs/paragraph": "*" + "@react-editor-js/core": 2.0.5 "@types/react": "*" react: "*" + tslib: ^2.3.1 typescript: ^4.3.5 peerDependencies: "@editorjs/editorjs": "*" + "@editorjs/paragraph": "*" react: "*" languageName: unknown linkType: soft -"@react-editor-js/core@2.0.4, @react-editor-js/core@workspace:packages/@react-editor-js/core": +"@react-editor-js/core@2.0.5, @react-editor-js/core@workspace:packages/@react-editor-js/core": version: 0.0.0-use.local resolution: "@react-editor-js/core@workspace:packages/@react-editor-js/core" dependencies: "@editorjs/editorjs": "*" - "@editorjs/paragraph": "*" "@testing-library/react": ^12.1.2 "@types/jest": ^27.0.3 "@types/react": "*" @@ -851,22 +853,25 @@ __metadata: typescript: ^4.3.5 peerDependencies: "@editorjs/editorjs": "*" - "@editorjs/paragraph": "*" react: "*" languageName: unknown linkType: soft -"@react-editor-js/server@2.0.4, @react-editor-js/server@workspace:packages/@react-editor-js/server": +"@react-editor-js/server@2.0.5, @react-editor-js/server@workspace:packages/@react-editor-js/server": version: 0.0.0-use.local resolution: "@react-editor-js/server@workspace:packages/@react-editor-js/server" dependencies: - "@react-editor-js/core": 2.0.4 + "@editorjs/editorjs": "*" + "@editorjs/paragraph": "*" + "@react-editor-js/core": 2.0.5 "@types/react": "*" react: "*" tslib: ^2.3.1 typescript: ^4.3.5 peerDependencies: - "@react-editor-js/core": 2.0.4 + "@editorjs/editorjs": "*" + "@editorjs/paragraph": "*" + "@react-editor-js/core": 2.0.5 react: "*" languageName: unknown linkType: soft @@ -5798,14 +5803,14 @@ __metadata: version: 0.0.0-use.local resolution: "react-editor-js@workspace:packages/react-editor-js" dependencies: - "@react-editor-js/client": 2.0.4 - "@react-editor-js/server": 2.0.4 + "@react-editor-js/client": 2.0.5 + "@react-editor-js/server": 2.0.5 "@types/node": ^16.11.6 tslib: ^2.3.1 typescript: ^4.3.5 peerDependencies: - "@react-editor-js/client": 2.0.4 - "@react-editor-js/server": 2.0.4 + "@react-editor-js/client": 2.0.5 + "@react-editor-js/server": 2.0.5 languageName: unknown linkType: soft