@manuscripts/transform 3.0.3 → 3.0.4-LEAN-4041.0
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/exporter/jats-exporter.js +14 -38
- package/dist/cjs/schema/nodes/bibliography_element.js +0 -1
- package/dist/cjs/schema/nodes/bibliography_item.js +0 -1
- package/dist/cjs/schema/nodes/blockquote_element.js +0 -3
- package/dist/cjs/schema/nodes/citation.js +0 -2
- package/dist/cjs/schema/nodes/cross_reference.js +1 -13
- package/dist/cjs/schema/nodes/equation_element.js +0 -1
- package/dist/cjs/schema/nodes/figure.js +0 -1
- package/dist/cjs/schema/nodes/figure_element.js +1 -28
- package/dist/cjs/schema/nodes/footnote.js +1 -5
- package/dist/cjs/schema/nodes/footnotes_element.js +1 -5
- package/dist/cjs/schema/nodes/graphical_abstract_section.js +0 -1
- package/dist/cjs/schema/nodes/keywords_element.js +0 -2
- package/dist/cjs/schema/nodes/list.js +0 -3
- package/dist/cjs/schema/nodes/listing_element.js +0 -2
- package/dist/cjs/schema/nodes/missing_figure.js +0 -1
- package/dist/cjs/schema/nodes/paragraph.js +0 -3
- package/dist/cjs/schema/nodes/pullquote_element.js +1 -6
- package/dist/cjs/schema/nodes/section.js +2 -44
- package/dist/cjs/schema/nodes/table_element.js +0 -11
- package/dist/cjs/schema/nodes/toc_element.js +0 -1
- package/dist/cjs/version.js +1 -1
- package/dist/es/jats/exporter/jats-exporter.js +14 -38
- package/dist/es/schema/nodes/bibliography_element.js +0 -1
- package/dist/es/schema/nodes/bibliography_item.js +0 -1
- package/dist/es/schema/nodes/blockquote_element.js +0 -3
- package/dist/es/schema/nodes/citation.js +0 -2
- package/dist/es/schema/nodes/cross_reference.js +1 -13
- package/dist/es/schema/nodes/equation_element.js +0 -1
- package/dist/es/schema/nodes/figure.js +0 -1
- package/dist/es/schema/nodes/figure_element.js +1 -28
- package/dist/es/schema/nodes/footnote.js +1 -5
- package/dist/es/schema/nodes/footnotes_element.js +1 -5
- package/dist/es/schema/nodes/graphical_abstract_section.js +0 -1
- package/dist/es/schema/nodes/keywords_element.js +0 -2
- package/dist/es/schema/nodes/list.js +0 -3
- package/dist/es/schema/nodes/listing_element.js +0 -2
- package/dist/es/schema/nodes/missing_figure.js +0 -1
- package/dist/es/schema/nodes/paragraph.js +0 -3
- package/dist/es/schema/nodes/pullquote_element.js +1 -6
- package/dist/es/schema/nodes/section.js +1 -43
- package/dist/es/schema/nodes/table_element.js +0 -11
- package/dist/es/schema/nodes/toc_element.js +0 -1
- package/dist/es/version.js +1 -1
- package/dist/types/jats/exporter/jats-exporter.d.ts +1 -1
- package/dist/types/schema/nodes/bibliography_element.d.ts +0 -1
- package/dist/types/schema/nodes/bibliography_item.d.ts +0 -1
- package/dist/types/schema/nodes/blockquote_element.d.ts +0 -1
- package/dist/types/schema/nodes/citation.d.ts +0 -1
- package/dist/types/schema/nodes/cross_reference.d.ts +0 -1
- package/dist/types/schema/nodes/equation_element.d.ts +0 -1
- package/dist/types/schema/nodes/figure_element.d.ts +0 -14
- package/dist/types/schema/nodes/footnote.d.ts +0 -1
- package/dist/types/schema/nodes/footnotes_element.d.ts +0 -1
- package/dist/types/schema/nodes/keywords_element.d.ts +1 -2
- package/dist/types/schema/nodes/list.d.ts +0 -1
- package/dist/types/schema/nodes/listing_element.d.ts +0 -2
- package/dist/types/schema/nodes/paragraph.d.ts +0 -1
- package/dist/types/schema/nodes/pullquote_element.d.ts +0 -1
- package/dist/types/schema/nodes/section.d.ts +1 -8
- package/dist/types/schema/nodes/table_element.d.ts +0 -8
- package/dist/types/schema/nodes/toc_element.d.ts +0 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/lib/attributes.js +0 -26
- package/dist/es/lib/attributes.js +0 -22
- package/dist/types/lib/attributes.d.ts +0 -20
|
@@ -14,12 +14,10 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { ObjectTypes } from '@manuscripts/json-schema';
|
|
17
|
-
import { buildElementClass } from '../../lib/attributes';
|
|
18
17
|
export const blockquoteElement = {
|
|
19
18
|
content: 'paragraph+ attribution',
|
|
20
19
|
attrs: {
|
|
21
20
|
id: { default: '' },
|
|
22
|
-
paragraphStyle: { default: '' },
|
|
23
21
|
placeholder: { default: '' },
|
|
24
22
|
dataTracked: { default: null },
|
|
25
23
|
},
|
|
@@ -47,7 +45,6 @@ export const blockquoteElement = {
|
|
|
47
45
|
if (blockquoteElementNode.attrs.id) {
|
|
48
46
|
attrs.id = blockquoteElementNode.attrs.id;
|
|
49
47
|
}
|
|
50
|
-
attrs.class = buildElementClass(blockquoteElementNode.attrs);
|
|
51
48
|
attrs['data-object-type'] = ObjectTypes.QuoteElement;
|
|
52
49
|
if (blockquoteElementNode.attrs.placeholder) {
|
|
53
50
|
attrs['data-placeholder-text'] = blockquoteElementNode.attrs.placeholder;
|
|
@@ -21,7 +21,6 @@ export const citation = {
|
|
|
21
21
|
attrs: {
|
|
22
22
|
id: { default: '' },
|
|
23
23
|
rids: { default: [] },
|
|
24
|
-
contents: { default: '' },
|
|
25
24
|
selectedText: { default: '' },
|
|
26
25
|
dataTracked: { default: null },
|
|
27
26
|
},
|
|
@@ -34,7 +33,6 @@ export const citation = {
|
|
|
34
33
|
return {
|
|
35
34
|
id: dom.getAttribute('data-id'),
|
|
36
35
|
rids: ((_a = dom.getAttribute('data-reference-id')) === null || _a === void 0 ? void 0 : _a.split(/\s+/)) || [],
|
|
37
|
-
contents: dom.innerHTML,
|
|
38
36
|
};
|
|
39
37
|
},
|
|
40
38
|
},
|
|
@@ -21,7 +21,6 @@ export const crossReference = {
|
|
|
21
21
|
attrs: {
|
|
22
22
|
rids: { default: [] },
|
|
23
23
|
label: { default: '' },
|
|
24
|
-
customLabel: { default: '' },
|
|
25
24
|
dataTracked: { default: null },
|
|
26
25
|
},
|
|
27
26
|
parseDOM: [
|
|
@@ -32,7 +31,6 @@ export const crossReference = {
|
|
|
32
31
|
const dom = p;
|
|
33
32
|
return {
|
|
34
33
|
rids: ((_a = dom.getAttribute('data-reference-id')) === null || _a === void 0 ? void 0 : _a.split(/\s+/)) || [],
|
|
35
|
-
label: dom.textContent,
|
|
36
34
|
};
|
|
37
35
|
},
|
|
38
36
|
},
|
|
@@ -45,17 +43,7 @@ export const crossReference = {
|
|
|
45
43
|
class: 'cross-reference',
|
|
46
44
|
'data-reference-id': crossReferenceNode.attrs.rids.join(' '),
|
|
47
45
|
},
|
|
48
|
-
|
|
49
|
-
'span',
|
|
50
|
-
{
|
|
51
|
-
class: 'kind elementIndex',
|
|
52
|
-
},
|
|
53
|
-
[
|
|
54
|
-
'b',
|
|
55
|
-
crossReferenceNode.attrs.customLabel ||
|
|
56
|
-
crossReferenceNode.attrs.label,
|
|
57
|
-
],
|
|
58
|
-
],
|
|
46
|
+
crossReferenceNode.attrs.label,
|
|
59
47
|
];
|
|
60
48
|
},
|
|
61
49
|
};
|
|
@@ -16,16 +16,8 @@
|
|
|
16
16
|
export const figureElement = {
|
|
17
17
|
content: '(paragraph | figure | missing_figure | placeholder)+ attribution* figcaption (listing | placeholder)',
|
|
18
18
|
attrs: {
|
|
19
|
-
figureLayout: { default: '' },
|
|
20
|
-
figureStyle: { default: '' },
|
|
21
19
|
id: { default: '' },
|
|
22
|
-
label: { default: '' },
|
|
23
|
-
sizeFraction: { default: 0 },
|
|
24
|
-
alignment: { default: undefined },
|
|
25
|
-
suppressCaption: { default: false },
|
|
26
|
-
suppressTitle: { default: undefined },
|
|
27
20
|
attribution: { default: undefined },
|
|
28
|
-
alternatives: { default: undefined },
|
|
29
21
|
dataTracked: { default: null },
|
|
30
22
|
},
|
|
31
23
|
selectable: false,
|
|
@@ -37,36 +29,17 @@ export const figureElement = {
|
|
|
37
29
|
const dom = p;
|
|
38
30
|
return {
|
|
39
31
|
id: dom.getAttribute('id'),
|
|
40
|
-
figureStyle: dom.getAttribute('data-figure-style'),
|
|
41
|
-
figureLayout: dom.getAttribute('data-figure-layout'),
|
|
42
|
-
sizeFraction: Number(dom.getAttribute('data-size-fraction')) || 0,
|
|
43
|
-
alignment: dom.getAttribute('data-alignment') || undefined,
|
|
44
32
|
};
|
|
45
33
|
},
|
|
46
34
|
},
|
|
47
35
|
],
|
|
48
36
|
toDOM: (node) => {
|
|
49
37
|
const figureElementNode = node;
|
|
50
|
-
const { id
|
|
38
|
+
const { id } = figureElementNode.attrs;
|
|
51
39
|
const attrs = {};
|
|
52
40
|
const classes = ['figure-group'];
|
|
53
|
-
if (sizeFraction === 2) {
|
|
54
|
-
classes.push('figure-group--static');
|
|
55
|
-
}
|
|
56
41
|
attrs.class = classes.join(' ');
|
|
57
42
|
attrs.id = id;
|
|
58
|
-
if (figureStyle) {
|
|
59
|
-
attrs['data-figure-style'] = figureStyle;
|
|
60
|
-
}
|
|
61
|
-
if (figureLayout) {
|
|
62
|
-
attrs['data-figure-layout'] = figureLayout;
|
|
63
|
-
}
|
|
64
|
-
if (sizeFraction) {
|
|
65
|
-
attrs['data-size-fraction'] = String(sizeFraction);
|
|
66
|
-
}
|
|
67
|
-
if (alignment) {
|
|
68
|
-
attrs['data-alignment'] = alignment;
|
|
69
|
-
}
|
|
70
43
|
return ['figure', attrs, 0];
|
|
71
44
|
},
|
|
72
45
|
};
|
|
@@ -19,7 +19,6 @@ export const footnote = {
|
|
|
19
19
|
attrs: {
|
|
20
20
|
id: { default: '' },
|
|
21
21
|
kind: { default: 'footnote' },
|
|
22
|
-
paragraphStyle: { default: '' },
|
|
23
22
|
placeholder: { default: '' },
|
|
24
23
|
dataTracked: { default: null },
|
|
25
24
|
},
|
|
@@ -42,7 +41,7 @@ export const footnote = {
|
|
|
42
41
|
],
|
|
43
42
|
toDOM: (node) => {
|
|
44
43
|
const footnoteNode = node;
|
|
45
|
-
const { kind,
|
|
44
|
+
const { kind, placeholder, id } = footnoteNode.attrs;
|
|
46
45
|
const attrs = { class: 'footnote-text', id: '' };
|
|
47
46
|
if (kind) {
|
|
48
47
|
attrs['data-kind'] = kind;
|
|
@@ -50,9 +49,6 @@ export const footnote = {
|
|
|
50
49
|
if (id) {
|
|
51
50
|
attrs.id = id;
|
|
52
51
|
}
|
|
53
|
-
if (paragraphStyle) {
|
|
54
|
-
attrs.paragraphStyle = paragraphStyle;
|
|
55
|
-
}
|
|
56
52
|
if (placeholder) {
|
|
57
53
|
attrs['data-placeholder-text'] = placeholder;
|
|
58
54
|
}
|
|
@@ -17,7 +17,6 @@ export const footnotesElement = {
|
|
|
17
17
|
attrs: {
|
|
18
18
|
id: { default: '' },
|
|
19
19
|
kind: { default: 'footnote' },
|
|
20
|
-
paragraphStyle: { default: '' },
|
|
21
20
|
dataTracked: { default: null },
|
|
22
21
|
},
|
|
23
22
|
content: 'footnote*',
|
|
@@ -36,14 +35,11 @@ export const footnotesElement = {
|
|
|
36
35
|
],
|
|
37
36
|
toDOM: (node) => {
|
|
38
37
|
const footnotesElementNode = node;
|
|
39
|
-
const { id, kind
|
|
38
|
+
const { id, kind } = footnotesElementNode.attrs;
|
|
40
39
|
const attrs = { class: 'footnotes', id };
|
|
41
40
|
if (kind) {
|
|
42
41
|
attrs['data-kind'] = kind;
|
|
43
42
|
}
|
|
44
|
-
if (paragraphStyle) {
|
|
45
|
-
attrs['paragraphStyle'] = paragraphStyle;
|
|
46
|
-
}
|
|
47
43
|
return ['div', attrs, 0];
|
|
48
44
|
},
|
|
49
45
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ObjectTypes } from '@manuscripts/json-schema';
|
|
2
|
-
import { buildElementClass } from '../../lib/attributes';
|
|
3
2
|
export const getListType = (style) => {
|
|
4
3
|
switch (style) {
|
|
5
4
|
case 'simple':
|
|
@@ -25,7 +24,6 @@ export const list = {
|
|
|
25
24
|
group: 'block list element',
|
|
26
25
|
attrs: {
|
|
27
26
|
id: { default: '' },
|
|
28
|
-
paragraphStyle: { default: '' },
|
|
29
27
|
dataTracked: { default: null },
|
|
30
28
|
listStyleType: { default: null },
|
|
31
29
|
},
|
|
@@ -59,7 +57,6 @@ export const list = {
|
|
|
59
57
|
{
|
|
60
58
|
id: list.attrs.id,
|
|
61
59
|
'list-type': list.attrs.listStyleType,
|
|
62
|
-
class: buildElementClass(list.attrs),
|
|
63
60
|
'data-object-type': ObjectTypes.ListElement,
|
|
64
61
|
},
|
|
65
62
|
0,
|
|
@@ -17,8 +17,6 @@ export const listingElement = {
|
|
|
17
17
|
content: '(listing | placeholder) figcaption',
|
|
18
18
|
attrs: {
|
|
19
19
|
id: { default: '' },
|
|
20
|
-
suppressCaption: { default: true },
|
|
21
|
-
suppressTitle: { default: undefined },
|
|
22
20
|
dataTracked: { default: null },
|
|
23
21
|
},
|
|
24
22
|
group: 'block element',
|
|
@@ -14,12 +14,10 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { ObjectTypes } from '@manuscripts/json-schema';
|
|
17
|
-
import { buildElementClass } from '../../lib/attributes';
|
|
18
17
|
export const paragraph = {
|
|
19
18
|
content: 'inline*',
|
|
20
19
|
attrs: {
|
|
21
20
|
id: { default: '' },
|
|
22
|
-
paragraphStyle: { default: '' },
|
|
23
21
|
placeholder: { default: '' },
|
|
24
22
|
dataTracked: { default: null },
|
|
25
23
|
},
|
|
@@ -47,7 +45,6 @@ export const paragraph = {
|
|
|
47
45
|
if (paragraphNode.attrs.id) {
|
|
48
46
|
attrs.id = paragraphNode.attrs.id;
|
|
49
47
|
}
|
|
50
|
-
attrs.class = buildElementClass(paragraphNode.attrs);
|
|
51
48
|
attrs['data-object-type'] = ObjectTypes.ParagraphElement;
|
|
52
49
|
if (paragraphNode.attrs.placeholder) {
|
|
53
50
|
attrs['data-placeholder-text'] = paragraphNode.attrs.placeholder;
|
|
@@ -14,12 +14,10 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { ObjectTypes } from '@manuscripts/json-schema';
|
|
17
|
-
import { buildElementClass } from '../../lib/attributes';
|
|
18
17
|
export const pullquoteElement = {
|
|
19
18
|
content: 'paragraph+ attribution',
|
|
20
19
|
attrs: {
|
|
21
20
|
id: { default: '' },
|
|
22
|
-
paragraphStyle: { default: '' },
|
|
23
21
|
placeholder: { default: '' },
|
|
24
22
|
dataTracked: { default: null },
|
|
25
23
|
},
|
|
@@ -47,10 +45,7 @@ export const pullquoteElement = {
|
|
|
47
45
|
if (pullquoteElementNode.attrs.id) {
|
|
48
46
|
attrs.id = pullquoteElementNode.attrs.id;
|
|
49
47
|
}
|
|
50
|
-
attrs.class =
|
|
51
|
-
'pullquote',
|
|
52
|
-
buildElementClass(pullquoteElementNode.attrs),
|
|
53
|
-
].join(' ');
|
|
48
|
+
attrs.class = 'pullquote';
|
|
54
49
|
attrs['data-object-type'] = ObjectTypes.QuoteElement;
|
|
55
50
|
if (pullquoteElementNode.attrs.placeholder) {
|
|
56
51
|
attrs['data-placeholder-text'] = pullquoteElementNode.attrs.placeholder;
|
|
@@ -13,32 +13,11 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export const PAGE_BREAK_NONE = 0;
|
|
17
|
-
export const PAGE_BREAK_BEFORE = 1;
|
|
18
|
-
export const PAGE_BREAK_AFTER = 2;
|
|
19
|
-
export const PAGE_BREAK_BEFORE_AND_AFTER = 4;
|
|
20
|
-
const choosePageBreakStyle = (element) => {
|
|
21
|
-
const pageBreakAfter = element.classList.contains('page-break-after');
|
|
22
|
-
const pageBreakBefore = element.classList.contains('page-break-before');
|
|
23
|
-
if (pageBreakBefore && pageBreakAfter) {
|
|
24
|
-
return PAGE_BREAK_BEFORE_AND_AFTER;
|
|
25
|
-
}
|
|
26
|
-
if (pageBreakBefore) {
|
|
27
|
-
return PAGE_BREAK_BEFORE;
|
|
28
|
-
}
|
|
29
|
-
if (pageBreakAfter) {
|
|
30
|
-
return PAGE_BREAK_AFTER;
|
|
31
|
-
}
|
|
32
|
-
return PAGE_BREAK_NONE;
|
|
33
|
-
};
|
|
34
16
|
export const section = {
|
|
35
17
|
content: 'section_label? section_title (paragraph | element)* sections*',
|
|
36
18
|
attrs: {
|
|
37
19
|
id: { default: '' },
|
|
38
20
|
category: { default: '' },
|
|
39
|
-
titleSuppressed: { default: false },
|
|
40
|
-
generatedLabel: { default: undefined },
|
|
41
|
-
pageBreakStyle: { default: undefined },
|
|
42
21
|
dataTracked: { default: null },
|
|
43
22
|
},
|
|
44
23
|
group: 'block sections',
|
|
@@ -51,35 +30,14 @@ export const section = {
|
|
|
51
30
|
return {
|
|
52
31
|
id: element.getAttribute('id') || '',
|
|
53
32
|
category: element.getAttribute('data-category') || '',
|
|
54
|
-
titleSuppressed: element.classList.contains('title-suppressed'),
|
|
55
|
-
generatedLabel: element.classList.contains('generated-label'),
|
|
56
|
-
pageBreakStyle: choosePageBreakStyle(element) || undefined,
|
|
57
33
|
};
|
|
58
34
|
},
|
|
59
35
|
},
|
|
60
36
|
],
|
|
61
37
|
toDOM: (node) => {
|
|
62
38
|
const sectionNode = node;
|
|
63
|
-
const { id, category
|
|
64
|
-
const classnames = [];
|
|
65
|
-
if (titleSuppressed) {
|
|
66
|
-
classnames.push('title-suppressed');
|
|
67
|
-
}
|
|
68
|
-
if (typeof generatedLabel === 'undefined' || generatedLabel) {
|
|
69
|
-
classnames.push('generated-label');
|
|
70
|
-
}
|
|
71
|
-
if (pageBreakStyle === PAGE_BREAK_BEFORE ||
|
|
72
|
-
pageBreakStyle === PAGE_BREAK_BEFORE_AND_AFTER) {
|
|
73
|
-
classnames.push('page-break-before');
|
|
74
|
-
}
|
|
75
|
-
if (pageBreakStyle === PAGE_BREAK_AFTER ||
|
|
76
|
-
pageBreakStyle === PAGE_BREAK_BEFORE_AND_AFTER) {
|
|
77
|
-
classnames.push('page-break-after');
|
|
78
|
-
}
|
|
39
|
+
const { id, category } = sectionNode.attrs;
|
|
79
40
|
const attrs = { id };
|
|
80
|
-
if (classnames.length) {
|
|
81
|
-
attrs['class'] = classnames.join(' ');
|
|
82
|
-
}
|
|
83
41
|
if (category) {
|
|
84
42
|
attrs['data-category'] = node.attrs.category;
|
|
85
43
|
}
|
|
@@ -17,14 +17,7 @@ export const tableElement = {
|
|
|
17
17
|
content: ' figcaption? (table | placeholder) table_colgroup? table_element_footer? (listing | placeholder)',
|
|
18
18
|
attrs: {
|
|
19
19
|
id: { default: '' },
|
|
20
|
-
paragraphStyle: { default: '' },
|
|
21
|
-
tableStyle: { default: '' },
|
|
22
20
|
label: { default: '' },
|
|
23
|
-
suppressCaption: { default: false },
|
|
24
|
-
suppressTitle: { default: undefined },
|
|
25
|
-
suppressFooter: { default: false },
|
|
26
|
-
suppressHeader: { default: false },
|
|
27
|
-
expandListing: { default: false },
|
|
28
21
|
dataTracked: { default: null },
|
|
29
22
|
},
|
|
30
23
|
selectable: false,
|
|
@@ -36,8 +29,6 @@ export const tableElement = {
|
|
|
36
29
|
const element = dom;
|
|
37
30
|
return {
|
|
38
31
|
id: element.getAttribute('id'),
|
|
39
|
-
paragraphStyle: element.getAttribute('data-paragraph-style') || '',
|
|
40
|
-
tableStyle: element.getAttribute('data-table-style') || '',
|
|
41
32
|
};
|
|
42
33
|
},
|
|
43
34
|
},
|
|
@@ -49,8 +40,6 @@ export const tableElement = {
|
|
|
49
40
|
{
|
|
50
41
|
class: 'table',
|
|
51
42
|
id: tableElementNode.attrs.id,
|
|
52
|
-
'data-paragraph-style': tableElementNode.attrs.paragraphStyle,
|
|
53
|
-
'data-table-style': tableElementNode.attrs.tableStyle,
|
|
54
43
|
},
|
|
55
44
|
0,
|
|
56
45
|
];
|
package/dist/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "3.0.
|
|
1
|
+
export const VERSION = "3.0.4-LEAN-4041.0";
|
|
@@ -44,7 +44,7 @@ export declare const buildCitations: (citations: CitationNode[]) => {
|
|
|
44
44
|
export declare class JATSExporter {
|
|
45
45
|
protected document: Document;
|
|
46
46
|
protected serializer: DOMSerializer;
|
|
47
|
-
protected labelTargets
|
|
47
|
+
protected labelTargets: Map<string, Target>;
|
|
48
48
|
protected citationTexts: Map<string, string>;
|
|
49
49
|
protected citationProvider: CitationProvider;
|
|
50
50
|
protected manuscriptNode: ManuscriptNode;
|
|
@@ -17,22 +17,8 @@ import { NodeSpec } from 'prosemirror-model';
|
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
18
|
import { AttributionNode } from './attribution';
|
|
19
19
|
interface Attrs {
|
|
20
|
-
columns: number;
|
|
21
|
-
figureLayout: string;
|
|
22
|
-
figureStyle: string;
|
|
23
20
|
id: string;
|
|
24
|
-
label: string;
|
|
25
|
-
rows: number;
|
|
26
|
-
alignment?: string;
|
|
27
|
-
sizeFraction: number;
|
|
28
|
-
suppressCaption: boolean;
|
|
29
|
-
suppressTitle?: boolean;
|
|
30
|
-
expandListing: boolean;
|
|
31
21
|
attribution?: AttributionNode;
|
|
32
|
-
alternatives?: {
|
|
33
|
-
src: string;
|
|
34
|
-
type?: string;
|
|
35
|
-
}[];
|
|
36
22
|
}
|
|
37
23
|
export interface FigureElementNode extends ManuscriptNode {
|
|
38
24
|
attrs: Attrs;
|
|
@@ -16,9 +16,8 @@
|
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
18
|
interface Attrs {
|
|
19
|
-
contents: string;
|
|
20
19
|
id: string;
|
|
21
|
-
|
|
20
|
+
contents: string;
|
|
22
21
|
}
|
|
23
22
|
export interface KeywordsElementNode extends ManuscriptNode {
|
|
24
23
|
attrs: Attrs;
|
|
@@ -17,8 +17,6 @@ import { NodeSpec } from 'prosemirror-model';
|
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
18
|
interface Attrs {
|
|
19
19
|
id: string;
|
|
20
|
-
suppressCaption: boolean;
|
|
21
|
-
suppressTitle?: boolean;
|
|
22
20
|
}
|
|
23
21
|
export interface ListingElementNode extends ManuscriptNode {
|
|
24
22
|
attrs: Attrs;
|
|
@@ -17,18 +17,11 @@ import { NodeSpec } from 'prosemirror-model';
|
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
18
|
interface Attrs {
|
|
19
19
|
id: string;
|
|
20
|
-
category
|
|
21
|
-
titleSuppressed: boolean;
|
|
22
|
-
generatedLabel: boolean;
|
|
23
|
-
pageBreakStyle?: number;
|
|
20
|
+
category: string;
|
|
24
21
|
}
|
|
25
22
|
export interface SectionNode extends ManuscriptNode {
|
|
26
23
|
attrs: Attrs;
|
|
27
24
|
}
|
|
28
|
-
export declare const PAGE_BREAK_NONE = 0;
|
|
29
|
-
export declare const PAGE_BREAK_BEFORE = 1;
|
|
30
|
-
export declare const PAGE_BREAK_AFTER = 2;
|
|
31
|
-
export declare const PAGE_BREAK_BEFORE_AND_AFTER = 4;
|
|
32
25
|
export declare const section: NodeSpec;
|
|
33
26
|
export declare const isSectionNode: (node: ManuscriptNode) => node is SectionNode;
|
|
34
27
|
export {};
|
|
@@ -17,14 +17,6 @@ import { NodeSpec } from 'prosemirror-model';
|
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
18
|
interface Attrs {
|
|
19
19
|
id: string;
|
|
20
|
-
paragraphStyle: string;
|
|
21
|
-
tableStyle: string;
|
|
22
|
-
label: string;
|
|
23
|
-
suppressCaption: boolean;
|
|
24
|
-
suppressTitle?: boolean;
|
|
25
|
-
suppressFooter: boolean;
|
|
26
|
-
suppressHeader: boolean;
|
|
27
|
-
expandListing: boolean;
|
|
28
20
|
}
|
|
29
21
|
export interface TableElementNode extends ManuscriptNode {
|
|
30
22
|
attrs: Attrs;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.0.
|
|
1
|
+
export declare const VERSION = "3.0.4-LEAN-4041.0";
|
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": "3.0.
|
|
4
|
+
"version": "3.0.4-LEAN-4041.0",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|