@manuscripts/body-editor 1.7.19-LEAN-3340 → 1.7.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,11 +31,9 @@ const prosemirror_state_1 = require("prosemirror-state");
31
31
  const react_1 = require("react");
32
32
  const react_router_dom_1 = require("react-router-dom");
33
33
  const ManuscriptsEditor_1 = require("./configs/ManuscriptsEditor");
34
- const popper_1 = require("./lib/popper");
35
34
  const use_do_with_debounce_1 = require("./lib/use-do-with-debounce");
36
- const useEditor = (externalProps) => {
35
+ const useEditor = (props) => {
37
36
  const view = (0, react_1.useRef)();
38
- const props = Object.assign(Object.assign({}, externalProps), { popper: new popper_1.PopperManager() });
39
37
  const [state, setState] = (0, react_1.useState)(() => (0, ManuscriptsEditor_1.createEditorState)(props));
40
38
  const history = (0, react_router_dom_1.useHistory)();
41
39
  const { collabProvider } = props;
@@ -28,11 +28,9 @@ import { NodeSelection, } from 'prosemirror-state';
28
28
  import { useCallback, useEffect, useRef, useState } from 'react';
29
29
  import { useHistory } from 'react-router-dom';
30
30
  import { createEditorState, createEditorView, } from './configs/ManuscriptsEditor';
31
- import { PopperManager } from './lib/popper';
32
31
  import { useDoWithDebounce } from './lib/use-do-with-debounce';
33
- export const useEditor = (externalProps) => {
32
+ export const useEditor = (props) => {
34
33
  const view = useRef();
35
- const props = Object.assign(Object.assign({}, externalProps), { popper: new PopperManager() });
36
34
  const [state, setState] = useState(() => createEditorState(props));
37
35
  const history = useHistory();
38
36
  const { collabProvider } = props;
@@ -54,6 +54,5 @@ export interface EditorProps {
54
54
  openAuthorEditing: () => void;
55
55
  selectAuthorForEditing: (authorId: string) => void;
56
56
  }
57
- export type ExternalProps = Omit<EditorProps, 'popper'>;
58
57
  export declare const createEditorState: (props: EditorProps) => EditorState;
59
58
  export declare const createEditorView: (props: EditorProps, root: HTMLElement, state: EditorState, dispatch: Dispatch) => EditorView;
@@ -15,8 +15,8 @@
15
15
  */
16
16
  import { Command, EditorState, Transaction } from 'prosemirror-state';
17
17
  import { EditorView } from 'prosemirror-view';
18
- import { ExternalProps } from './configs/ManuscriptsEditor';
19
- export declare const useEditor: (externalProps: ExternalProps) => {
18
+ import { EditorProps } from './configs/ManuscriptsEditor';
19
+ export declare const useEditor: (props: EditorProps) => {
20
20
  state: EditorState;
21
21
  onRender: (el: HTMLDivElement | null) => void;
22
22
  isCommandValid: (command: Command) => boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@manuscripts/body-editor",
3
3
  "description": "Prosemirror components for editing and viewing manuscripts",
4
- "version": "1.7.19-LEAN-3340",
4
+ "version": "1.7.19",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-body-editor",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",