@manuscripts/transform 1.0.1 → 1.1.0-LEAN-2070
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/jats/jats-exporter.js +3 -0
- package/dist/cjs/schema/index.js +7 -0
- package/dist/cjs/schema/nodes/comment_list.js +24 -0
- package/dist/cjs/schema/nodes/keyword.js +53 -0
- package/dist/cjs/schema/nodes/keywords_element.js +9 -9
- package/dist/cjs/schema/nodes/keywords_section.js +3 -3
- package/dist/cjs/schema/nodes/manuscript.js +1 -1
- package/dist/cjs/transformer/decode.js +91 -20
- package/dist/cjs/transformer/encode.js +20 -11
- package/dist/cjs/transformer/node-names.js +1 -0
- package/dist/cjs/transformer/node-types.js +2 -0
- package/dist/es/jats/jats-exporter.js +3 -0
- package/dist/es/schema/index.js +7 -0
- package/dist/es/schema/nodes/comment_list.js +21 -0
- package/dist/es/schema/nodes/keyword.js +50 -0
- package/dist/es/schema/nodes/keywords_element.js +9 -9
- package/dist/es/schema/nodes/keywords_section.js +3 -3
- package/dist/es/schema/nodes/manuscript.js +1 -1
- package/dist/es/transformer/decode.js +91 -20
- package/dist/es/transformer/encode.js +21 -12
- package/dist/es/transformer/node-names.js +1 -0
- package/dist/es/transformer/node-types.js +2 -0
- package/dist/types/schema/index.d.ts +2 -0
- package/dist/types/schema/nodes/comment_list.d.ts +25 -0
- package/dist/types/schema/nodes/keyword.d.ts +28 -0
- package/dist/types/schema/nodes/keywords_element.d.ts +2 -2
- package/dist/types/schema/types.d.ts +1 -1
- package/dist/types/transformer/decode.d.ts +2 -0
- package/package.json +2 -2
|
@@ -17,7 +17,7 @@ import { Fragment, Mark as ProsemirrorMark, MarkType, Node as ProsemirrorNode, N
|
|
|
17
17
|
import { EditorState, NodeSelection, Plugin, TextSelection, Transaction } from 'prosemirror-state';
|
|
18
18
|
import { EditorView, NodeView } from 'prosemirror-view';
|
|
19
19
|
export type Marks = 'bold' | 'code' | 'italic' | 'smallcaps' | 'strikethrough' | 'styled' | 'subscript' | 'superscript' | 'underline' | 'tracked_insert' | 'tracked_delete';
|
|
20
|
-
export type Nodes = 'attribution' | 'bibliography_item' | 'bibliography_element' | 'bibliography_section' | 'blockquote_element' | 'bullet_list' | 'caption' | 'caption_title' | 'comment' | 'citation' | 'cross_reference' | 'doc' | 'equation' | 'equation_element' | 'figcaption' | 'figure' | 'graphical_abstract_section' | 'figure_element' | 'footnote' | 'footnotes_element' | 'footnotes_section' | 'hard_break' | 'highlight_marker' | 'inline_equation' | 'inline_footnote' | 'keywords_element' | 'keywords_section' | 'link' | 'list_item' | 'listing' | 'listing_element' | 'manuscript' | 'missing_figure' | 'ordered_list' | 'paragraph' | 'placeholder' | 'placeholder_element' | 'pullquote_element' | 'section' | 'section_label' | 'section_title' | 'table' | 'table_body' | 'table_cell' | 'table_element' | 'table_row' | 'table_colgroup' | 'table_col' | 'text' | 'toc_element' | 'toc_section';
|
|
20
|
+
export type Nodes = 'attribution' | 'bibliography_item' | 'bibliography_element' | 'bibliography_section' | 'blockquote_element' | 'bullet_list' | 'caption' | 'caption_title' | 'comment' | 'comment_list' | 'citation' | 'cross_reference' | 'doc' | 'equation' | 'equation_element' | 'figcaption' | 'figure' | 'graphical_abstract_section' | 'figure_element' | 'footnote' | 'footnotes_element' | 'footnotes_section' | 'hard_break' | 'highlight_marker' | 'inline_equation' | 'inline_footnote' | 'keyword' | 'keywords_element' | 'keywords_section' | 'link' | 'list_item' | 'listing' | 'listing_element' | 'manuscript' | 'missing_figure' | 'ordered_list' | 'paragraph' | 'placeholder' | 'placeholder_element' | 'pullquote_element' | 'section' | 'section_label' | 'section_title' | 'section_title_plain' | 'table' | 'table_body' | 'table_cell' | 'table_element' | 'table_row' | 'table_colgroup' | 'table_col' | 'text' | 'toc_element' | 'toc_section';
|
|
21
21
|
export type ManuscriptSchema = Schema<Nodes, Marks>;
|
|
22
22
|
export type ManuscriptEditorState = EditorState;
|
|
23
23
|
export type ManuscriptEditorView = EditorView;
|
|
@@ -23,6 +23,7 @@ export declare const isManuscriptNode: (model: ManuscriptNode | null) => model i
|
|
|
23
23
|
export declare class Decoder {
|
|
24
24
|
private readonly modelMap;
|
|
25
25
|
private readonly allowMissingElements;
|
|
26
|
+
private comments;
|
|
26
27
|
private creators;
|
|
27
28
|
private createCommentsNode;
|
|
28
29
|
private getComments;
|
|
@@ -33,6 +34,7 @@ export declare class Decoder {
|
|
|
33
34
|
createArticleNode: (manuscriptID?: string) => ManuscriptNode;
|
|
34
35
|
addGeneratedLabels: (sections: Section[]) => Section[];
|
|
35
36
|
parseContents: (contents: string, wrapper?: string, commentAnnotations?: CommentAnnotation[], options?: ParseOptions) => ManuscriptNode;
|
|
37
|
+
private getKeywords;
|
|
36
38
|
private getManuscriptID;
|
|
37
39
|
private getFigcaption;
|
|
38
40
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/transform",
|
|
3
3
|
"description": "ProseMirror transformer for Manuscripts applications",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.1.0-LEAN-2070",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@manuscripts/data": "^0.1.12",
|
|
44
44
|
"@manuscripts/eslint-config": "^0.5.1",
|
|
45
45
|
"@manuscripts/examples": "^0.1.0",
|
|
46
|
-
"@manuscripts/json-schema": "^1.
|
|
46
|
+
"@manuscripts/json-schema": "^1.1.0",
|
|
47
47
|
"@types/debug": "^4.1.7",
|
|
48
48
|
"@types/jest": "^29.2.4",
|
|
49
49
|
"@types/lodash.pickby": "^4.6.7",
|