@manuscripts/body-editor 2.0.45-LEAN-3931.0 → 2.0.45
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.
- package/dist/cjs/configs/editor-views.js +1 -1
- package/dist/cjs/lib/math.js +2 -29
- package/dist/cjs/versions.js +1 -1
- package/dist/cjs/views/ReactSubView.js +3 -2
- package/dist/cjs/views/bibliography_element.js +1 -0
- package/dist/cjs/views/cross_reference.js +1 -2
- package/dist/cjs/views/cross_reference_editable.js +1 -2
- package/dist/cjs/views/figure_element.js +1 -1
- package/dist/cjs/views/inline_footnote.js +3 -1
- package/dist/es/configs/editor-views.js +1 -1
- package/dist/es/lib/math.js +2 -29
- package/dist/es/versions.js +1 -1
- package/dist/es/views/ReactSubView.js +3 -2
- package/dist/es/views/bibliography_element.js +2 -1
- package/dist/es/views/cross_reference.js +1 -2
- package/dist/es/views/cross_reference_editable.js +1 -2
- package/dist/es/views/editable_block.js +1 -1
- package/dist/es/views/figure_element.js +1 -1
- package/dist/es/views/inline_footnote.js +3 -1
- package/dist/types/configs/ManuscriptsEditor.d.ts +2 -1
- package/dist/types/configs/editor-views.d.ts +45 -50
- package/dist/types/lib/context-menu.d.ts +2 -2
- package/dist/types/types.d.ts +3 -0
- package/dist/types/versions.d.ts +1 -1
- package/dist/types/views/ReactSubView.d.ts +5 -4
- package/dist/types/views/affiliations.d.ts +3 -2
- package/dist/types/views/author_notes.d.ts +3 -3
- package/dist/types/views/base_node_view.d.ts +5 -5
- package/dist/types/views/bibliography_element.d.ts +4 -3
- package/dist/types/views/bibliography_element_editable.d.ts +3 -3
- package/dist/types/views/block_view.d.ts +3 -3
- package/dist/types/views/blockquote_element.d.ts +3 -3
- package/dist/types/views/blockquote_element_editable.d.ts +3 -3
- package/dist/types/views/bullet_list.d.ts +4 -4
- package/dist/types/views/bullet_list_editable.d.ts +3 -3
- package/dist/types/views/citation.d.ts +5 -4
- package/dist/types/views/citation_editable.d.ts +2 -3
- package/dist/types/views/contributors.d.ts +3 -2
- package/dist/types/views/creators.d.ts +4 -4
- package/dist/types/views/cross_reference.d.ts +4 -3
- package/dist/types/views/cross_reference_editable.d.ts +3 -4
- package/dist/types/views/editable_block.d.ts +2 -11
- package/dist/types/views/equation.d.ts +4 -4
- package/dist/types/views/equation_editable.d.ts +2 -3
- package/dist/types/views/equation_element.d.ts +4 -3
- package/dist/types/views/equation_element_editable.d.ts +3 -3
- package/dist/types/views/figure.d.ts +5 -4
- package/dist/types/views/figure_editable.d.ts +2 -11
- package/dist/types/views/figure_element.d.ts +3 -7
- package/dist/types/views/figure_element_editable.d.ts +2 -2
- package/dist/types/views/footnote.d.ts +3 -4
- package/dist/types/views/footnote_editable.d.ts +3 -3
- package/dist/types/views/footnotes_element.d.ts +3 -3
- package/dist/types/views/footnotes_element_editable.d.ts +3 -3
- package/dist/types/views/inline_equation.d.ts +4 -4
- package/dist/types/views/inline_equation_editable.d.ts +2 -3
- package/dist/types/views/inline_footnote.d.ts +4 -4
- package/dist/types/views/inline_footnote_editable.d.ts +1 -1
- package/dist/types/views/keyword.d.ts +3 -3
- package/dist/types/views/keyword_group.d.ts +2 -2
- package/dist/types/views/link.d.ts +5 -4
- package/dist/types/views/link_editable.d.ts +2 -3
- package/dist/types/views/list.d.ts +6 -6
- package/dist/types/views/list_item.d.ts +3 -4
- package/dist/types/views/ordered_list.d.ts +4 -4
- package/dist/types/views/ordered_list_editable.d.ts +3 -3
- package/dist/types/views/paragraph.d.ts +3 -3
- package/dist/types/views/paragraph_editable.d.ts +3 -3
- package/dist/types/views/placeholder.d.ts +4 -4
- package/dist/types/views/placeholder_element.d.ts +3 -3
- package/dist/types/views/placeholder_element_editable.d.ts +3 -3
- package/dist/types/views/pullquote_element.d.ts +3 -3
- package/dist/types/views/pullquote_element_editable.d.ts +3 -3
- package/dist/types/views/section.d.ts +3 -3
- package/dist/types/views/section_title.d.ts +3 -3
- package/dist/types/views/section_title_editable.d.ts +3 -3
- package/dist/types/views/table_cell.d.ts +2 -2
- package/dist/types/views/table_element.d.ts +2 -3
- package/dist/types/views/table_element_editable.d.ts +2 -2
- package/dist/types/views/table_element_footer.d.ts +4 -4
- package/dist/types/views/table_element_footer_editable.d.ts +1 -1
- package/dist/types/views/title.d.ts +4 -4
- package/dist/types/views/title_editable.d.ts +1 -1
- package/dist/types/views/toc_element.d.ts +3 -3
- package/dist/types/views/toc_element_editable.d.ts +3 -3
- package/package.json +3 -3
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ManuscriptNode } from '@manuscripts/transform';
|
|
16
|
+
import { AuthorNotesNode, ManuscriptNode } from '@manuscripts/transform';
|
|
17
17
|
import BlockView from './block_view';
|
|
18
|
-
import {
|
|
19
|
-
export declare class AuthorNotesView extends BlockView<
|
|
18
|
+
import { Trackable } from '../types';
|
|
19
|
+
export declare class AuthorNotesView extends BlockView<Trackable<AuthorNotesNode>> {
|
|
20
20
|
container: HTMLElement;
|
|
21
21
|
allowedTypes: string[];
|
|
22
22
|
correspondenceHeader: string;
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { ManuscriptEditorView, ManuscriptNode } from '@manuscripts/transform';
|
|
17
17
|
import { Decoration, NodeView } from 'prosemirror-view';
|
|
18
|
-
import { CSLProps } from '../configs/ManuscriptsEditor';
|
|
18
|
+
import { CSLProps, EditorProps } from '../configs/ManuscriptsEditor';
|
|
19
19
|
import { PopperManager } from '../lib/popper';
|
|
20
20
|
import { SyncError } from '../types';
|
|
21
21
|
export interface BaseNodeProps {
|
|
22
22
|
popper: PopperManager;
|
|
23
23
|
cslProps: CSLProps;
|
|
24
24
|
}
|
|
25
|
-
export declare class BaseNodeView<
|
|
26
|
-
readonly props:
|
|
27
|
-
node:
|
|
25
|
+
export declare class BaseNodeView<Node extends ManuscriptNode> implements NodeView {
|
|
26
|
+
readonly props: EditorProps;
|
|
27
|
+
node: Node;
|
|
28
28
|
readonly view: ManuscriptEditorView;
|
|
29
29
|
readonly getPos: () => number;
|
|
30
30
|
decorations: readonly Decoration[];
|
|
@@ -32,7 +32,7 @@ export declare class BaseNodeView<PropsType extends BaseNodeProps> implements No
|
|
|
32
32
|
contentDOM?: HTMLElement;
|
|
33
33
|
syncErrors: SyncError[];
|
|
34
34
|
elementType: string;
|
|
35
|
-
constructor(props:
|
|
35
|
+
constructor(props: EditorProps, node: Node, view: ManuscriptEditorView, getPos: () => number, decorations: readonly Decoration[]);
|
|
36
36
|
update: (newNode: ManuscriptNode, decorations: readonly Decoration[]) => boolean;
|
|
37
37
|
initialise: () => void;
|
|
38
38
|
updateContents: () => void;
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { BibliographyElementNode } from '@manuscripts/transform';
|
|
16
17
|
import BlockView from './block_view';
|
|
17
|
-
import {
|
|
18
|
-
export declare class BibliographyElementBlockView
|
|
18
|
+
import { Trackable } from '../types';
|
|
19
|
+
export declare class BibliographyElementBlockView extends BlockView<Trackable<BibliographyElementNode>> {
|
|
19
20
|
private container;
|
|
20
21
|
private editor;
|
|
21
22
|
private contextMenu;
|
|
@@ -33,5 +34,5 @@ export declare class BibliographyElementBlockView<PropsType extends EditableBloc
|
|
|
33
34
|
private handleDelete;
|
|
34
35
|
private updateSelections;
|
|
35
36
|
}
|
|
36
|
-
declare const _default: (props: import("./base_node_view").BaseNodeProps, dispatch?: import("../commands").Dispatch | undefined) => import("../types").NodeViewCreator<BibliographyElementBlockView
|
|
37
|
+
declare const _default: (props: import("./base_node_view").BaseNodeProps, dispatch?: import("../commands").Dispatch | undefined) => import("../types").NodeViewCreator<BibliographyElementBlockView>;
|
|
37
38
|
export default _default;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { BibliographyElementBlockView } from './bibliography_element';
|
|
17
|
-
declare const _default: (props: import("
|
|
17
|
+
declare const _default: (props: import("../configs/ManuscriptsEditor").EditorProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
20
|
createAddButton: () => HTMLElement | null;
|
|
@@ -37,7 +37,7 @@ declare const _default: (props: import("./editable_block").EditableBlockProps, d
|
|
|
37
37
|
contentDOM?: HTMLElement | undefined;
|
|
38
38
|
syncErrors: import("../types").SyncError[];
|
|
39
39
|
elementType: string;
|
|
40
|
-
readonly props: import("
|
|
40
|
+
readonly props: import("../configs/ManuscriptsEditor").EditorProps;
|
|
41
41
|
node: import("prosemirror-model").Node;
|
|
42
42
|
readonly view: import("prosemirror-view").EditorView;
|
|
43
43
|
readonly getPos: () => number;
|
|
@@ -48,5 +48,5 @@ declare const _default: (props: import("./editable_block").EditableBlockProps, d
|
|
|
48
48
|
deselectNode: () => void;
|
|
49
49
|
destroy: () => void;
|
|
50
50
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
51
|
-
} & BibliographyElementBlockView
|
|
51
|
+
} & BibliographyElementBlockView>;
|
|
52
52
|
export default _default;
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ManuscriptNodeView } from '@manuscripts/transform';
|
|
17
|
-
import {
|
|
18
|
-
export default class BlockView<
|
|
16
|
+
import { ManuscriptNode, ManuscriptNodeView } from '@manuscripts/transform';
|
|
17
|
+
import { BaseNodeView } from './base_node_view';
|
|
18
|
+
export default class BlockView<BlockNode extends ManuscriptNode> extends BaseNodeView<BlockNode> implements ManuscriptNodeView {
|
|
19
19
|
viewAttributes: {
|
|
20
20
|
id: string;
|
|
21
21
|
placeholder: string;
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
16
|
+
import { BlockquoteElementNode } from '@manuscripts/transform';
|
|
17
17
|
import BlockView from './block_view';
|
|
18
|
-
export declare class BlockquoteElementView
|
|
18
|
+
export declare class BlockquoteElementView extends BlockView<BlockquoteElementNode> {
|
|
19
19
|
elementType: string;
|
|
20
20
|
}
|
|
21
|
-
declare const _default: (props:
|
|
21
|
+
declare const _default: (props: import("../configs/ManuscriptsEditor").EditorProps) => import("../types").NodeViewCreator<BlockquoteElementView>;
|
|
22
22
|
export default _default;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { BlockquoteElementView } from './blockquote_element';
|
|
17
|
-
declare const _default: (props: import("
|
|
17
|
+
declare const _default: (props: import("../configs/ManuscriptsEditor").EditorProps) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
20
|
createAddButton: () => HTMLElement | null;
|
|
@@ -37,7 +37,7 @@ declare const _default: (props: import("./base_node_view").BaseNodeProps) => imp
|
|
|
37
37
|
contentDOM?: HTMLElement | undefined;
|
|
38
38
|
syncErrors: import("../types").SyncError[];
|
|
39
39
|
elementType: string;
|
|
40
|
-
readonly props: import("
|
|
40
|
+
readonly props: import("../configs/ManuscriptsEditor").EditorProps;
|
|
41
41
|
node: import("prosemirror-model").Node;
|
|
42
42
|
readonly view: import("prosemirror-view").EditorView;
|
|
43
43
|
readonly getPos: () => number;
|
|
@@ -48,5 +48,5 @@ declare const _default: (props: import("./base_node_view").BaseNodeProps) => imp
|
|
|
48
48
|
deselectNode: () => void;
|
|
49
49
|
destroy: () => void;
|
|
50
50
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
51
|
-
} & BlockquoteElementView
|
|
51
|
+
} & BlockquoteElementView>;
|
|
52
52
|
export default _default;
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ManuscriptNode } from '@manuscripts/transform';
|
|
17
|
-
import { BaseNodeProps } from './base_node_view';
|
|
16
|
+
import { ListNode, ManuscriptNode } from '@manuscripts/transform';
|
|
18
17
|
import BlockView from './block_view';
|
|
19
|
-
|
|
18
|
+
import { Trackable } from '../types';
|
|
19
|
+
export declare class BulletListView extends BlockView<Trackable<ListNode>> {
|
|
20
20
|
elementType: string;
|
|
21
21
|
updateContents: () => void;
|
|
22
22
|
}
|
|
23
23
|
export declare const bulletListCallback: (node: ManuscriptNode, dom: HTMLElement) => void;
|
|
24
|
-
declare const _default: (props:
|
|
24
|
+
declare const _default: (props: import("../configs/ManuscriptsEditor").EditorProps) => import("../types").NodeViewCreator<BulletListView>;
|
|
25
25
|
export default _default;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { BulletListView } from './bullet_list';
|
|
17
|
-
declare const _default: (props: import("
|
|
17
|
+
declare const _default: (props: import("../configs/ManuscriptsEditor").EditorProps) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
20
|
createAddButton: () => HTMLElement | null;
|
|
@@ -37,7 +37,7 @@ declare const _default: (props: import("./base_node_view").BaseNodeProps) => imp
|
|
|
37
37
|
contentDOM?: HTMLElement | undefined;
|
|
38
38
|
syncErrors: import("../types").SyncError[];
|
|
39
39
|
elementType: string;
|
|
40
|
-
readonly props: import("
|
|
40
|
+
readonly props: import("../configs/ManuscriptsEditor").EditorProps;
|
|
41
41
|
node: import("prosemirror-model").Node;
|
|
42
42
|
readonly view: import("prosemirror-view").EditorView;
|
|
43
43
|
readonly getPos: () => number;
|
|
@@ -48,5 +48,5 @@ declare const _default: (props: import("./base_node_view").BaseNodeProps) => imp
|
|
|
48
48
|
deselectNode: () => void;
|
|
49
49
|
destroy: () => void;
|
|
50
50
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
51
|
-
} & BulletListView
|
|
51
|
+
} & BulletListView>;
|
|
52
52
|
export default _default;
|
|
@@ -13,13 +13,14 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ManuscriptNodeView } from '@manuscripts/transform';
|
|
17
|
-
import {
|
|
18
|
-
|
|
16
|
+
import { CitationNode, ManuscriptNodeView } from '@manuscripts/transform';
|
|
17
|
+
import { BaseNodeView } from './base_node_view';
|
|
18
|
+
import { Trackable } from '../types';
|
|
19
|
+
export declare class CitationView extends BaseNodeView<Trackable<CitationNode>> implements ManuscriptNodeView {
|
|
19
20
|
ignoreMutation: () => boolean;
|
|
20
21
|
initialise: () => this;
|
|
21
22
|
updateContents: () => void;
|
|
22
23
|
eventHandlers: () => void;
|
|
23
24
|
}
|
|
24
|
-
declare const _default: (props: BaseNodeProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<CitationView
|
|
25
|
+
declare const _default: (props: import("./base_node_view").BaseNodeProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<CitationView>;
|
|
25
26
|
export default _default;
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { CitationView } from './citation';
|
|
17
|
-
|
|
18
|
-
export declare class CitationEditableView extends CitationView<EditableBlockProps> {
|
|
17
|
+
export declare class CitationEditableView extends CitationView {
|
|
19
18
|
private editor;
|
|
20
19
|
private contextMenu;
|
|
21
20
|
private can;
|
|
@@ -35,5 +34,5 @@ export declare class CitationEditableView extends CitationView<EditableBlockProp
|
|
|
35
34
|
private handleComment;
|
|
36
35
|
private insertBibliographyNode;
|
|
37
36
|
}
|
|
38
|
-
declare const _default: (props:
|
|
37
|
+
declare const _default: (props: import("../configs/ManuscriptsEditor").EditorProps, dispatch?: import("../commands").Dispatch | undefined) => import("../types").NodeViewCreator<CitationEditableView>;
|
|
39
38
|
export default _default;
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { ContributorsNode } from '@manuscripts/transform';
|
|
16
17
|
import { AffiliationAttrs, ContributorAttrs } from '../lib/authors';
|
|
17
18
|
import { PluginState } from '../plugins/affiliations';
|
|
18
19
|
import BlockView from './block_view';
|
|
19
|
-
import {
|
|
20
|
-
export declare class ContributorsView extends BlockView<
|
|
20
|
+
import { Trackable } from '../types';
|
|
21
|
+
export declare class ContributorsView extends BlockView<Trackable<ContributorsNode>> {
|
|
21
22
|
contextMenu: HTMLElement;
|
|
22
23
|
container: HTMLElement;
|
|
23
24
|
inner: HTMLElement;
|
|
@@ -17,7 +17,7 @@ import { ManuscriptNode } from '@manuscripts/transform';
|
|
|
17
17
|
import { Dispatch } from '../commands';
|
|
18
18
|
import { NodeViewCreator } from '../types';
|
|
19
19
|
import { BaseNodeProps, BaseNodeView } from './base_node_view';
|
|
20
|
-
import {
|
|
21
|
-
export declare const createNodeView: <T extends BaseNodeView<
|
|
22
|
-
export declare const createEditableNodeView: <T extends BaseNodeView<
|
|
23
|
-
export declare const createNodeOrElementView: <T extends BaseNodeView<
|
|
20
|
+
import { EditorProps } from '../configs/ManuscriptsEditor';
|
|
21
|
+
export declare const createNodeView: <T extends BaseNodeView<import("prosemirror-model").Node>, PropsT extends BaseNodeProps>(type: new (...args: any[]) => T) => (props: PropsT, dispatch?: Dispatch) => NodeViewCreator<T>;
|
|
22
|
+
export declare const createEditableNodeView: <T extends BaseNodeView<import("prosemirror-model").Node>>(type: new (...args: any[]) => T) => (props: EditorProps, dispatch?: Dispatch) => NodeViewCreator<T>;
|
|
23
|
+
export declare const createNodeOrElementView: <T extends BaseNodeView<import("prosemirror-model").Node>>(type: new (...args: any[]) => T, tagName: string, callback?: ((node: ManuscriptNode, dom: HTMLElement) => void) | undefined) => (props: EditorProps) => NodeViewCreator<T>;
|
|
@@ -13,14 +13,15 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ManuscriptNodeView } from '@manuscripts/transform';
|
|
16
|
+
import { CrossReferenceNode, ManuscriptNodeView } from '@manuscripts/transform';
|
|
17
17
|
import { Location, NavigateFunction } from 'react-router-dom';
|
|
18
18
|
import { BaseNodeProps, BaseNodeView } from './base_node_view';
|
|
19
|
+
import { Trackable } from '../types';
|
|
19
20
|
export interface CrossReferenceViewProps extends BaseNodeProps {
|
|
20
21
|
navigate: NavigateFunction;
|
|
21
22
|
location: Location;
|
|
22
23
|
}
|
|
23
|
-
export declare class CrossReferenceView
|
|
24
|
+
export declare class CrossReferenceView extends BaseNodeView<Trackable<CrossReferenceNode>> implements ManuscriptNodeView {
|
|
24
25
|
selectNode: () => void;
|
|
25
26
|
handleClick: () => void;
|
|
26
27
|
updateContents: () => void;
|
|
@@ -28,5 +29,5 @@ export declare class CrossReferenceView<PropsType extends CrossReferenceViewProp
|
|
|
28
29
|
ignoreMutation: () => boolean;
|
|
29
30
|
createDOM: () => void;
|
|
30
31
|
}
|
|
31
|
-
declare const _default: (props: BaseNodeProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<CrossReferenceView
|
|
32
|
+
declare const _default: (props: BaseNodeProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<CrossReferenceView>;
|
|
32
33
|
export default _default;
|
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { Target } from '@manuscripts/transform';
|
|
17
|
-
import { CrossReferenceView
|
|
18
|
-
|
|
19
|
-
export declare class CrossReferenceEditableView extends CrossReferenceView<CrossReferenceViewProps & EditableBlockProps> {
|
|
17
|
+
import { CrossReferenceView } from './cross_reference';
|
|
18
|
+
export declare class CrossReferenceEditableView extends CrossReferenceView {
|
|
20
19
|
protected popperContainer: HTMLDivElement;
|
|
21
20
|
selectNode: () => void;
|
|
22
21
|
destroy: () => void;
|
|
@@ -25,5 +24,5 @@ export declare class CrossReferenceEditableView extends CrossReferenceView<Cross
|
|
|
25
24
|
handleCancel: () => void;
|
|
26
25
|
handleSelect: (rid: string, customLabel?: string) => Promise<void>;
|
|
27
26
|
}
|
|
28
|
-
declare const _default: (props:
|
|
27
|
+
declare const _default: (props: import("../configs/ManuscriptsEditor").EditorProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<CrossReferenceEditableView>;
|
|
29
28
|
export default _default;
|
|
@@ -13,19 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Capabilities } from '@manuscripts/style-guide';
|
|
17
|
-
import { DefaultTheme } from 'styled-components';
|
|
18
|
-
import { Dispatch } from '../commands';
|
|
19
16
|
import { ContextMenu } from '../lib/context-menu';
|
|
20
|
-
import { BaseNodeProps } from './base_node_view';
|
|
21
17
|
import BlockView from './block_view';
|
|
22
18
|
type Constructor<T> = new (...args: any[]) => T;
|
|
23
|
-
export
|
|
24
|
-
getCapabilities: () => Capabilities;
|
|
25
|
-
dispatch?: Dispatch;
|
|
26
|
-
theme: DefaultTheme;
|
|
27
|
-
}
|
|
28
|
-
export declare const EditableBlock: <T extends Constructor<BlockView<EditableBlockProps>>>(Base: T) => {
|
|
19
|
+
export declare const EditableBlock: <T extends Constructor<BlockView<import("prosemirror-model").Node>>>(Base: T) => {
|
|
29
20
|
new (...args: any[]): {
|
|
30
21
|
gutterButtons: () => HTMLElement[];
|
|
31
22
|
actionGutterButtons: () => HTMLElement[];
|
|
@@ -49,7 +40,7 @@ export declare const EditableBlock: <T extends Constructor<BlockView<EditableBlo
|
|
|
49
40
|
contentDOM?: HTMLElement | undefined;
|
|
50
41
|
syncErrors: import("../types").SyncError[];
|
|
51
42
|
elementType: string;
|
|
52
|
-
readonly props:
|
|
43
|
+
readonly props: import("../configs/ManuscriptsEditor").EditorProps;
|
|
53
44
|
node: import("prosemirror-model").Node;
|
|
54
45
|
readonly view: import("prosemirror-view").EditorView;
|
|
55
46
|
readonly getPos: () => number;
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ManuscriptNodeView } from '@manuscripts/transform';
|
|
17
|
-
import {
|
|
18
|
-
export declare class EquationView
|
|
16
|
+
import { EquationNode, ManuscriptNodeView } from '@manuscripts/transform';
|
|
17
|
+
import { BaseNodeView } from './base_node_view';
|
|
18
|
+
export declare class EquationView extends BaseNodeView<EquationNode> implements ManuscriptNodeView {
|
|
19
19
|
initialise: () => void;
|
|
20
20
|
createDOM: () => void;
|
|
21
21
|
updateContents: () => void;
|
|
22
22
|
ignoreMutation: () => boolean;
|
|
23
23
|
}
|
|
24
|
-
declare const _default: (props: BaseNodeProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<EquationView
|
|
24
|
+
declare const _default: (props: import("./base_node_view").BaseNodeProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<EquationView>;
|
|
25
25
|
export default _default;
|
|
@@ -13,10 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { EditableBlockProps } from './editable_block';
|
|
17
16
|
import { EquationView } from './equation';
|
|
18
|
-
export declare class EquationEditableView extends EquationView
|
|
17
|
+
export declare class EquationEditableView extends EquationView {
|
|
19
18
|
selectNode: () => Promise<void>;
|
|
20
19
|
}
|
|
21
|
-
declare const _default: (props:
|
|
20
|
+
declare const _default: (props: import("../configs/ManuscriptsEditor").EditorProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<EquationEditableView>;
|
|
22
21
|
export default _default;
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
16
|
+
import { EquationElementNode } from '@manuscripts/transform';
|
|
17
17
|
import BlockView from './block_view';
|
|
18
|
-
|
|
18
|
+
import { Trackable } from '../types';
|
|
19
|
+
export declare class EquationElementView extends BlockView<Trackable<EquationElementNode>> {
|
|
19
20
|
elementType: string;
|
|
20
21
|
updateContents: () => void;
|
|
21
22
|
}
|
|
22
|
-
declare const _default: (props: BaseNodeProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<EquationElementView
|
|
23
|
+
declare const _default: (props: import("./base_node_view").BaseNodeProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<EquationElementView>;
|
|
23
24
|
export default _default;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { EquationElementView } from './equation_element';
|
|
17
|
-
declare const _default: (props: import("
|
|
17
|
+
declare const _default: (props: import("../configs/ManuscriptsEditor").EditorProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
20
|
createAddButton: () => HTMLElement | null;
|
|
@@ -37,7 +37,7 @@ declare const _default: (props: import("./editable_block").EditableBlockProps, d
|
|
|
37
37
|
contentDOM?: HTMLElement | undefined;
|
|
38
38
|
syncErrors: import("../types").SyncError[];
|
|
39
39
|
elementType: string;
|
|
40
|
-
readonly props: import("
|
|
40
|
+
readonly props: import("../configs/ManuscriptsEditor").EditorProps;
|
|
41
41
|
node: import("prosemirror-model").Node;
|
|
42
42
|
readonly view: import("prosemirror-view").EditorView;
|
|
43
43
|
readonly getPos: () => number;
|
|
@@ -48,5 +48,5 @@ declare const _default: (props: import("./editable_block").EditableBlockProps, d
|
|
|
48
48
|
deselectNode: () => void;
|
|
49
49
|
destroy: () => void;
|
|
50
50
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
51
|
-
} & EquationElementView
|
|
51
|
+
} & EquationElementView>;
|
|
52
52
|
export default _default;
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ManuscriptNodeView } from '@manuscripts/transform';
|
|
17
|
-
import {
|
|
18
|
-
|
|
16
|
+
import { FigureNode, ManuscriptNodeView } from '@manuscripts/transform';
|
|
17
|
+
import { BaseNodeView } from './base_node_view';
|
|
18
|
+
import { Trackable } from '../types';
|
|
19
|
+
export declare class FigureView extends BaseNodeView<Trackable<FigureNode>> implements ManuscriptNodeView {
|
|
19
20
|
protected container: HTMLElement;
|
|
20
21
|
initialise: () => void;
|
|
21
22
|
ignoreMutation: () => boolean;
|
|
@@ -24,5 +25,5 @@ export declare class FigureView<PropsType extends BaseNodeProps> extends BaseNod
|
|
|
24
25
|
createFigurePlaceholder: () => HTMLDivElement;
|
|
25
26
|
protected createDOM: () => void;
|
|
26
27
|
}
|
|
27
|
-
declare const _default: (props: BaseNodeProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<FigureView
|
|
28
|
+
declare const _default: (props: import("./base_node_view").BaseNodeProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<FigureView>;
|
|
28
29
|
export default _default;
|
|
@@ -13,18 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Capabilities } from '@manuscripts/style-guide';
|
|
17
16
|
import { ManuscriptEditorView, ManuscriptNode } from '@manuscripts/transform';
|
|
18
|
-
import { FileAttachment, FileManagement } from '../lib/files';
|
|
19
|
-
import { EditableBlockProps } from './editable_block';
|
|
20
17
|
import { FigureView } from './figure';
|
|
21
|
-
export
|
|
22
|
-
fileManagement: FileManagement;
|
|
23
|
-
getFiles: () => FileAttachment[];
|
|
24
|
-
getCapabilities: () => Capabilities;
|
|
25
|
-
isInGraphicalAbstract?: boolean;
|
|
26
|
-
}
|
|
27
|
-
export declare class FigureEditableView extends FigureView<EditableBlockProps & FigureProps> {
|
|
18
|
+
export declare class FigureEditableView extends FigureView {
|
|
28
19
|
reactTools: HTMLDivElement;
|
|
29
20
|
viewProps: {
|
|
30
21
|
node: ManuscriptNode;
|
|
@@ -38,5 +29,5 @@ export declare class FigureEditableView extends FigureView<EditableBlockProps &
|
|
|
38
29
|
private createImg;
|
|
39
30
|
private createPlaceholder;
|
|
40
31
|
}
|
|
41
|
-
declare const _default: (props:
|
|
32
|
+
declare const _default: (props: import("../configs/ManuscriptsEditor").EditorProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<FigureEditableView>;
|
|
42
33
|
export default _default;
|
|
@@ -13,14 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
16
|
+
import { FigureElementNode } from '@manuscripts/transform';
|
|
17
17
|
import BlockView from './block_view';
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
fileManagement: FileManagement;
|
|
21
|
-
getFiles: () => FileAttachment[];
|
|
22
|
-
}
|
|
23
|
-
export declare class FigureElementView extends BlockView<EditableBlockProps & FigureElementProps> {
|
|
18
|
+
import { Trackable } from '../types';
|
|
19
|
+
export declare class FigureElementView extends BlockView<Trackable<FigureElementNode>> {
|
|
24
20
|
private container;
|
|
25
21
|
private reactTools;
|
|
26
22
|
ignoreMutation: () => boolean;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { FigureElementView } from './figure_element';
|
|
17
|
-
declare const _default: (props: import("
|
|
17
|
+
declare const _default: (props: import("../configs/ManuscriptsEditor").EditorProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
20
|
createAddButton: () => HTMLElement | null;
|
|
@@ -37,7 +37,7 @@ declare const _default: (props: import("./editable_block").EditableBlockProps, d
|
|
|
37
37
|
contentDOM?: HTMLElement | undefined;
|
|
38
38
|
syncErrors: import("../types").SyncError[];
|
|
39
39
|
elementType: string;
|
|
40
|
-
readonly props: import("
|
|
40
|
+
readonly props: import("../configs/ManuscriptsEditor").EditorProps;
|
|
41
41
|
node: import("prosemirror-model").Node;
|
|
42
42
|
readonly view: import("prosemirror-view").EditorView;
|
|
43
43
|
readonly getPos: () => number;
|
|
@@ -13,12 +13,11 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ManuscriptNode } from '@manuscripts/transform';
|
|
17
|
-
import { BaseNodeProps } from './base_node_view';
|
|
16
|
+
import { FootnoteNode, ManuscriptNode } from '@manuscripts/transform';
|
|
18
17
|
import BlockView from './block_view';
|
|
19
|
-
export declare class FootnoteView
|
|
18
|
+
export declare class FootnoteView extends BlockView<FootnoteNode> {
|
|
20
19
|
elementType: string;
|
|
21
20
|
}
|
|
22
21
|
export declare const setTCClasses: (node: ManuscriptNode, dom: HTMLElement) => void;
|
|
23
|
-
declare const _default: (props:
|
|
22
|
+
declare const _default: (props: import("../configs/ManuscriptsEditor").EditorProps) => import("../types").NodeViewCreator<FootnoteView>;
|
|
24
23
|
export default _default;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { FootnoteView } from './footnote';
|
|
17
|
-
declare const _default: (props: import("
|
|
17
|
+
declare const _default: (props: import("../configs/ManuscriptsEditor").EditorProps) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
20
|
createAddButton: () => HTMLElement | null;
|
|
@@ -37,7 +37,7 @@ declare const _default: (props: import("./base_node_view").BaseNodeProps) => imp
|
|
|
37
37
|
contentDOM?: HTMLElement | undefined;
|
|
38
38
|
syncErrors: import("../types").SyncError[];
|
|
39
39
|
elementType: string;
|
|
40
|
-
readonly props: import("
|
|
40
|
+
readonly props: import("../configs/ManuscriptsEditor").EditorProps;
|
|
41
41
|
node: import("prosemirror-model").Node;
|
|
42
42
|
readonly view: import("prosemirror-view").EditorView;
|
|
43
43
|
readonly getPos: () => number;
|
|
@@ -48,5 +48,5 @@ declare const _default: (props: import("./base_node_view").BaseNodeProps) => imp
|
|
|
48
48
|
deselectNode: () => void;
|
|
49
49
|
destroy: () => void;
|
|
50
50
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
51
|
-
} & FootnoteView
|
|
51
|
+
} & FootnoteView>;
|
|
52
52
|
export default _default;
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { FootnotesElementNode } from '@manuscripts/transform';
|
|
16
17
|
import BlockView from './block_view';
|
|
17
|
-
|
|
18
|
-
export declare class FootnotesElementView<Props extends EditableBlockProps> extends BlockView<Props> {
|
|
18
|
+
export declare class FootnotesElementView extends BlockView<FootnotesElementNode> {
|
|
19
19
|
elementType: string;
|
|
20
20
|
onUpdateContent(): void;
|
|
21
21
|
checkEditability: () => void;
|
|
22
22
|
}
|
|
23
|
-
declare const _default: (props: import("
|
|
23
|
+
declare const _default: (props: import("../configs/ManuscriptsEditor").EditorProps) => import("../types").NodeViewCreator<FootnotesElementView>;
|
|
24
24
|
export default _default;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { FootnotesElementView } from './footnotes_element';
|
|
17
|
-
declare const _default: (props: import("
|
|
17
|
+
declare const _default: (props: import("../configs/ManuscriptsEditor").EditorProps) => import("../types").NodeViewCreator<{
|
|
18
18
|
gutterButtons: () => HTMLElement[];
|
|
19
19
|
actionGutterButtons: () => HTMLElement[];
|
|
20
20
|
createAddButton: () => HTMLElement | null;
|
|
@@ -37,7 +37,7 @@ declare const _default: (props: import("./base_node_view").BaseNodeProps) => imp
|
|
|
37
37
|
contentDOM?: HTMLElement | undefined;
|
|
38
38
|
syncErrors: import("../types").SyncError[];
|
|
39
39
|
elementType: string;
|
|
40
|
-
readonly props: import("
|
|
40
|
+
readonly props: import("../configs/ManuscriptsEditor").EditorProps;
|
|
41
41
|
node: import("prosemirror-model").Node;
|
|
42
42
|
readonly view: import("prosemirror-view").EditorView;
|
|
43
43
|
readonly getPos: () => number;
|
|
@@ -48,5 +48,5 @@ declare const _default: (props: import("./base_node_view").BaseNodeProps) => imp
|
|
|
48
48
|
deselectNode: () => void;
|
|
49
49
|
destroy: () => void;
|
|
50
50
|
handleDecorations: (decorations: readonly import("prosemirror-view").Decoration[]) => void;
|
|
51
|
-
} & FootnotesElementView
|
|
51
|
+
} & FootnotesElementView>;
|
|
52
52
|
export default _default;
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ManuscriptNodeView } from '@manuscripts/transform';
|
|
17
|
-
import {
|
|
18
|
-
export declare class InlineEquationView
|
|
16
|
+
import { InlineEquationNode, ManuscriptNodeView } from '@manuscripts/transform';
|
|
17
|
+
import { BaseNodeView } from './base_node_view';
|
|
18
|
+
export declare class InlineEquationView extends BaseNodeView<InlineEquationNode> implements ManuscriptNodeView {
|
|
19
19
|
initialise: () => void;
|
|
20
20
|
updateContents: () => void;
|
|
21
21
|
ignoreMutation: () => boolean;
|
|
22
22
|
protected createDOM: () => void;
|
|
23
23
|
}
|
|
24
|
-
declare const _default: (props: BaseNodeProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<InlineEquationView
|
|
24
|
+
declare const _default: (props: import("./base_node_view").BaseNodeProps, dispatch?: import("..").Dispatch | undefined) => import("../types").NodeViewCreator<InlineEquationView>;
|
|
25
25
|
export default _default;
|