@manuscripts/transform 3.0.48 → 3.0.49
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 +33 -6
- package/dist/cjs/jats/importer/jats-dom-parser.js +23 -2
- package/dist/cjs/jats/importer/jats-transformations.js +9 -1
- package/dist/cjs/jats/importer/parse-jats-article.js +1 -0
- package/dist/cjs/schema/index.js +6 -0
- package/dist/cjs/schema/nodes/alt_text.js +26 -0
- package/dist/cjs/schema/nodes/embed.js +2 -1
- package/dist/cjs/schema/nodes/figure_element.js +1 -1
- package/dist/cjs/schema/nodes/image_element.js +1 -1
- package/dist/cjs/schema/nodes/long_desc.js +26 -0
- package/dist/cjs/schema/nodes/table_element.js +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/es/jats/exporter/jats-exporter.js +33 -6
- package/dist/es/jats/importer/jats-dom-parser.js +23 -2
- package/dist/es/jats/importer/jats-transformations.js +7 -0
- package/dist/es/jats/importer/parse-jats-article.js +2 -1
- package/dist/es/schema/index.js +6 -0
- package/dist/es/schema/nodes/alt_text.js +23 -0
- package/dist/es/schema/nodes/embed.js +2 -1
- package/dist/es/schema/nodes/figure_element.js +1 -1
- package/dist/es/schema/nodes/image_element.js +1 -1
- package/dist/es/schema/nodes/long_desc.js +23 -0
- package/dist/es/schema/nodes/table_element.js +1 -1
- package/dist/es/version.js +1 -1
- package/dist/types/jats/importer/jats-transformations.d.ts +1 -0
- package/dist/types/schema/index.d.ts +2 -0
- package/dist/types/schema/nodes/alt_text.d.ts +24 -0
- package/dist/types/schema/nodes/embed.d.ts +2 -4
- package/dist/types/schema/nodes/figure.d.ts +6 -5
- package/dist/types/schema/nodes/figure_element.d.ts +2 -3
- package/dist/types/schema/nodes/long_desc.d.ts +24 -0
- package/dist/types/schema/nodes/supplement.d.ts +2 -3
- package/dist/types/schema/nodes/table_element.d.ts +2 -3
- package/dist/types/schema/types.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +2 -2
|
@@ -559,11 +559,19 @@ class JATSExporter {
|
|
|
559
559
|
};
|
|
560
560
|
this.createSerializer = () => {
|
|
561
561
|
const nodes = {
|
|
562
|
+
alt_text: (node) => {
|
|
563
|
+
const altText = this.document.createElement('alt-text');
|
|
564
|
+
altText.textContent = node.textContent;
|
|
565
|
+
return altText;
|
|
566
|
+
},
|
|
567
|
+
long_desc: (node) => {
|
|
568
|
+
const longDesc = this.document.createElement('long-desc');
|
|
569
|
+
longDesc.textContent = node.textContent;
|
|
570
|
+
return longDesc;
|
|
571
|
+
},
|
|
562
572
|
attachment: () => '',
|
|
563
573
|
attachments: () => '',
|
|
564
|
-
image_element: (node) => node
|
|
565
|
-
? createGraphic(node.content.firstChild, false)
|
|
566
|
-
: '',
|
|
574
|
+
image_element: (node) => createImage(node),
|
|
567
575
|
embed: (node) => {
|
|
568
576
|
const mediaElement = this.document.createElement('media');
|
|
569
577
|
const { id, href, mimetype, mimeSubtype } = node.attrs;
|
|
@@ -579,7 +587,9 @@ class JATSExporter {
|
|
|
579
587
|
mediaElement.setAttribute('mime-subtype', node.attrs.mimeSubtype);
|
|
580
588
|
}
|
|
581
589
|
appendLabels(mediaElement, node);
|
|
582
|
-
appendChildNodeOfType(mediaElement, node,
|
|
590
|
+
appendChildNodeOfType(mediaElement, node, schema_1.schema.nodes.alt_text);
|
|
591
|
+
appendChildNodeOfType(mediaElement, node, schema_1.schema.nodes.long_desc);
|
|
592
|
+
appendChildNodeOfType(mediaElement, node, schema_1.schema.nodes.figcaption);
|
|
583
593
|
return mediaElement;
|
|
584
594
|
},
|
|
585
595
|
awards: () => ['funding-group', 0],
|
|
@@ -937,6 +947,16 @@ class JATSExporter {
|
|
|
937
947
|
processChildNodes(element, node, node.type.schema.nodes.section);
|
|
938
948
|
return element;
|
|
939
949
|
};
|
|
950
|
+
const createImage = (node) => {
|
|
951
|
+
const graphicNode = node.content.firstChild;
|
|
952
|
+
if (graphicNode) {
|
|
953
|
+
const graphicElement = createGraphic(graphicNode);
|
|
954
|
+
appendChildNodeOfType(graphicElement, node, schema_1.schema.nodes.alt_text);
|
|
955
|
+
appendChildNodeOfType(graphicElement, node, schema_1.schema.nodes.long_desc);
|
|
956
|
+
return graphicElement;
|
|
957
|
+
}
|
|
958
|
+
return '';
|
|
959
|
+
};
|
|
940
960
|
const createGraphic = (node, isChildOfFigure = true) => {
|
|
941
961
|
const graphic = this.document.createElement('graphic');
|
|
942
962
|
graphic.setAttributeNS(XLINK_NAMESPACE, 'xlink:href', node.attrs.src);
|
|
@@ -954,6 +974,8 @@ class JATSExporter {
|
|
|
954
974
|
}
|
|
955
975
|
appendLabels(element, node);
|
|
956
976
|
appendChildNodeOfType(element, node, node.type.schema.nodes.figcaption);
|
|
977
|
+
appendChildNodeOfType(element, node, schema_1.schema.nodes.alt_text);
|
|
978
|
+
appendChildNodeOfType(element, node, schema_1.schema.nodes.long_desc);
|
|
957
979
|
appendChildNodeOfType(element, node, node.type.schema.nodes.footnotes_element);
|
|
958
980
|
processChildNodes(element, node, contentNodeType);
|
|
959
981
|
appendAttributions(element, node);
|
|
@@ -966,7 +988,9 @@ class JATSExporter {
|
|
|
966
988
|
const nodeName = 'table-wrap';
|
|
967
989
|
const element = createElement(node, nodeName);
|
|
968
990
|
appendLabels(element, node);
|
|
969
|
-
appendChildNodeOfType(element, node,
|
|
991
|
+
appendChildNodeOfType(element, node, schema_1.schema.nodes.figcaption);
|
|
992
|
+
appendChildNodeOfType(element, node, schema_1.schema.nodes.alt_text);
|
|
993
|
+
appendChildNodeOfType(element, node, schema_1.schema.nodes.long_desc);
|
|
970
994
|
appendTable(element, node);
|
|
971
995
|
appendChildNodeOfType(element, node, node.type.schema.nodes.table_element_footer);
|
|
972
996
|
if ((0, transformer_1.isExecutableNodeType)(node.type)) {
|
|
@@ -1387,6 +1411,10 @@ class JATSExporter {
|
|
|
1387
1411
|
if (availabilitySection) {
|
|
1388
1412
|
back.insertBefore(availabilitySection, back.firstChild);
|
|
1389
1413
|
}
|
|
1414
|
+
const ethicsSection = body.querySelector('sec[sec-type="ethics-statement"]');
|
|
1415
|
+
if (ethicsSection) {
|
|
1416
|
+
back.appendChild(ethicsSection);
|
|
1417
|
+
}
|
|
1390
1418
|
const section = body.querySelector('sec[sec-type="acknowledgements"]');
|
|
1391
1419
|
if (section) {
|
|
1392
1420
|
const ack = this.document.createElement('ack');
|
|
@@ -1423,7 +1451,6 @@ class JATSExporter {
|
|
|
1423
1451
|
'supplementary-material',
|
|
1424
1452
|
'supported-by',
|
|
1425
1453
|
'financial-disclosure',
|
|
1426
|
-
'ethics-statement',
|
|
1427
1454
|
'coi-statement',
|
|
1428
1455
|
];
|
|
1429
1456
|
const sections = body.querySelectorAll('sec');
|
|
@@ -222,6 +222,14 @@ class JATSDOMParser {
|
|
|
222
222
|
return attrs;
|
|
223
223
|
};
|
|
224
224
|
this.nodes = [
|
|
225
|
+
{
|
|
226
|
+
tag: 'long-desc',
|
|
227
|
+
node: 'long_desc',
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
tag: 'alt-text',
|
|
231
|
+
node: 'alt_text',
|
|
232
|
+
},
|
|
225
233
|
{
|
|
226
234
|
tag: 'attachments > self-uri',
|
|
227
235
|
node: 'attachment',
|
|
@@ -618,8 +626,21 @@ class JATSDOMParser {
|
|
|
618
626
|
tag: 'graphic',
|
|
619
627
|
node: 'image_element',
|
|
620
628
|
getContent: (node) => {
|
|
621
|
-
const
|
|
622
|
-
|
|
629
|
+
const element = node;
|
|
630
|
+
const content = [
|
|
631
|
+
this.schema.nodes.figure.create(this.getFigureAttrs(element)),
|
|
632
|
+
];
|
|
633
|
+
const altText = element.querySelector('alt-text');
|
|
634
|
+
if (altText) {
|
|
635
|
+
const altTextNode = this.schema.nodes.alt_text.create();
|
|
636
|
+
content.push(this.parse(altText, { topNode: altTextNode }));
|
|
637
|
+
}
|
|
638
|
+
const longDesc = element.querySelector('long-desc');
|
|
639
|
+
if (longDesc) {
|
|
640
|
+
const longDescNode = this.schema.nodes.long_desc.create();
|
|
641
|
+
content.push(this.parse(longDesc, { topNode: longDescNode }));
|
|
642
|
+
}
|
|
643
|
+
return prosemirror_model_1.Fragment.from(content);
|
|
623
644
|
},
|
|
624
645
|
},
|
|
625
646
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.fixTables = exports.createAttachments = exports.orderTableFootnote = exports.moveReferencesToBackmatter = exports.createSupplementaryMaterialsSection = exports.createKeywordsSection = exports.moveCaptionsToEnd = exports.createBackmatter = exports.createAbstracts = exports.createBody = exports.createBoxedElementSection = exports.moveAbstracts = exports.moveAffiliations = exports.moveContributors = exports.moveAwards = exports.moveAuthorNotes = exports.createTitles = exports.addMissingCaptions = void 0;
|
|
18
|
+
exports.fixTables = exports.createAttachments = exports.orderTableFootnote = exports.moveReferencesToBackmatter = exports.moveAccessibilityItems = exports.createSupplementaryMaterialsSection = exports.createKeywordsSection = exports.moveCaptionsToEnd = exports.createBackmatter = exports.createAbstracts = exports.createBody = exports.createBoxedElementSection = exports.moveAbstracts = exports.moveAffiliations = exports.moveContributors = exports.moveAwards = exports.moveAuthorNotes = exports.createTitles = exports.addMissingCaptions = void 0;
|
|
19
19
|
const deafults_1 = require("../../lib/deafults");
|
|
20
20
|
const jats_parser_utils_1 = require("./jats-parser-utils");
|
|
21
21
|
const removeNodeFromParent = (node) => node.parentNode && node.parentNode.removeChild(node);
|
|
@@ -341,6 +341,14 @@ const createSupplementaryMaterialsSection = (document, body, createElement) => {
|
|
|
341
341
|
}
|
|
342
342
|
};
|
|
343
343
|
exports.createSupplementaryMaterialsSection = createSupplementaryMaterialsSection;
|
|
344
|
+
const moveAccessibilityItems = (doc) => {
|
|
345
|
+
const items = doc.querySelectorAll('alt-text, long-desc');
|
|
346
|
+
items.forEach((item) => {
|
|
347
|
+
var _a;
|
|
348
|
+
(_a = item.parentNode) === null || _a === void 0 ? void 0 : _a.appendChild(item);
|
|
349
|
+
});
|
|
350
|
+
};
|
|
351
|
+
exports.moveAccessibilityItems = moveAccessibilityItems;
|
|
344
352
|
const moveReferencesToBackmatter = (body, back, createElement) => {
|
|
345
353
|
const backmatter = body.querySelector('sec[sec-type="backmatter"]');
|
|
346
354
|
const refList = back.querySelector('ref-list');
|
|
@@ -54,6 +54,7 @@ const processJATS = (doc, sectionCategories) => {
|
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
(0, jats_transformations_1.moveReferencesToBackmatter)(body, back, createElement);
|
|
57
|
+
(0, jats_transformations_1.moveAccessibilityItems)(doc);
|
|
57
58
|
};
|
|
58
59
|
const createElementFn = (doc) => (tagName) => doc.createElement(tagName);
|
|
59
60
|
const parseJATSArticle = (doc, sectionCategories, template) => {
|
package/dist/cjs/schema/index.js
CHANGED
|
@@ -35,6 +35,7 @@ const marks_1 = require("./marks");
|
|
|
35
35
|
const abstracts_1 = require("./nodes/abstracts");
|
|
36
36
|
const affiliation_1 = require("./nodes/affiliation");
|
|
37
37
|
const affiliations_1 = require("./nodes/affiliations");
|
|
38
|
+
const alt_text_1 = require("./nodes/alt_text");
|
|
38
39
|
const alt_title_1 = require("./nodes/alt_title");
|
|
39
40
|
const attachment_1 = require("./nodes/attachment");
|
|
40
41
|
const attachments_1 = require("./nodes/attachments");
|
|
@@ -83,6 +84,7 @@ const link_1 = require("./nodes/link");
|
|
|
83
84
|
const list_1 = require("./nodes/list");
|
|
84
85
|
const listing_1 = require("./nodes/listing");
|
|
85
86
|
const listing_element_1 = require("./nodes/listing_element");
|
|
87
|
+
const long_desc_1 = require("./nodes/long_desc");
|
|
86
88
|
const manuscript_1 = require("./nodes/manuscript");
|
|
87
89
|
const missing_figure_1 = require("./nodes/missing_figure");
|
|
88
90
|
const paragraph_1 = require("./nodes/paragraph");
|
|
@@ -166,6 +168,8 @@ __exportStar(require("./types"), exports);
|
|
|
166
168
|
__exportStar(require("./nodes/attachment"), exports);
|
|
167
169
|
__exportStar(require("./nodes/attachments"), exports);
|
|
168
170
|
__exportStar(require("./nodes/alt_title"), exports);
|
|
171
|
+
__exportStar(require("./nodes/alt_text"), exports);
|
|
172
|
+
__exportStar(require("./nodes/long_desc"), exports);
|
|
169
173
|
exports.schema = new prosemirror_model_1.Schema({
|
|
170
174
|
marks: {
|
|
171
175
|
bold: marks_1.bold,
|
|
@@ -256,5 +260,7 @@ exports.schema = new prosemirror_model_1.Schema({
|
|
|
256
260
|
attachment: attachment_1.attachment,
|
|
257
261
|
attachments: attachments_1.attachments,
|
|
258
262
|
alt_title: alt_title_1.altTitle,
|
|
263
|
+
alt_text: alt_text_1.altText,
|
|
264
|
+
long_desc: long_desc_1.longDesc,
|
|
259
265
|
},
|
|
260
266
|
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* © 2025 Atypon Systems LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.altText = void 0;
|
|
19
|
+
exports.altText = {
|
|
20
|
+
content: 'text*',
|
|
21
|
+
attrs: {
|
|
22
|
+
id: { default: '' },
|
|
23
|
+
},
|
|
24
|
+
parseDOM: [{ tag: 'div' }],
|
|
25
|
+
toDOM: () => ['div', 0],
|
|
26
|
+
};
|
|
@@ -17,13 +17,14 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.isEmbedNode = exports.embed = void 0;
|
|
19
19
|
exports.embed = {
|
|
20
|
-
content: 'figcaption',
|
|
20
|
+
content: 'figcaption alt_text? long_desc?',
|
|
21
21
|
attrs: {
|
|
22
22
|
id: { default: '' },
|
|
23
23
|
dataTracked: { default: null },
|
|
24
24
|
href: { default: undefined },
|
|
25
25
|
mimetype: { default: undefined },
|
|
26
26
|
mimeSubtype: { default: undefined },
|
|
27
|
+
longDesc: { default: '' },
|
|
27
28
|
},
|
|
28
29
|
group: 'block element',
|
|
29
30
|
toDOM: (node) => {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.isFigureElementNode = exports.figureElement = void 0;
|
|
19
19
|
exports.figureElement = {
|
|
20
|
-
content: '(paragraph | figure | missing_figure | placeholder)+ attribution*
|
|
20
|
+
content: '(paragraph | figure | missing_figure | placeholder)+ attribution* figcaption alt_text? long_desc? (listing | placeholder)',
|
|
21
21
|
attrs: {
|
|
22
22
|
id: { default: '' },
|
|
23
23
|
attribution: { default: undefined },
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isImageElementNode = exports.imageElement = void 0;
|
|
4
4
|
exports.imageElement = {
|
|
5
|
-
content: 'figure?',
|
|
5
|
+
content: 'figure? alt_text? long_desc?',
|
|
6
6
|
attrs: {
|
|
7
7
|
id: { default: '' },
|
|
8
8
|
dataTracked: { default: null },
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* © 2025 Atypon Systems LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.longDesc = void 0;
|
|
19
|
+
exports.longDesc = {
|
|
20
|
+
content: 'text*',
|
|
21
|
+
attrs: {
|
|
22
|
+
id: { default: '' },
|
|
23
|
+
},
|
|
24
|
+
parseDOM: [{ tag: 'div' }],
|
|
25
|
+
toDOM: () => ['div', 0],
|
|
26
|
+
};
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.isTableElementNode = exports.tableElement = void 0;
|
|
19
19
|
exports.tableElement = {
|
|
20
|
-
content: '
|
|
20
|
+
content: 'figcaption? (table | placeholder) table_colgroup? table_element_footer? alt_text? long_desc? (listing | placeholder)',
|
|
21
21
|
attrs: {
|
|
22
22
|
id: { default: '' },
|
|
23
23
|
dataTracked: { default: null },
|
package/dist/cjs/version.js
CHANGED
|
@@ -551,11 +551,19 @@ export class JATSExporter {
|
|
|
551
551
|
};
|
|
552
552
|
this.createSerializer = () => {
|
|
553
553
|
const nodes = {
|
|
554
|
+
alt_text: (node) => {
|
|
555
|
+
const altText = this.document.createElement('alt-text');
|
|
556
|
+
altText.textContent = node.textContent;
|
|
557
|
+
return altText;
|
|
558
|
+
},
|
|
559
|
+
long_desc: (node) => {
|
|
560
|
+
const longDesc = this.document.createElement('long-desc');
|
|
561
|
+
longDesc.textContent = node.textContent;
|
|
562
|
+
return longDesc;
|
|
563
|
+
},
|
|
554
564
|
attachment: () => '',
|
|
555
565
|
attachments: () => '',
|
|
556
|
-
image_element: (node) => node
|
|
557
|
-
? createGraphic(node.content.firstChild, false)
|
|
558
|
-
: '',
|
|
566
|
+
image_element: (node) => createImage(node),
|
|
559
567
|
embed: (node) => {
|
|
560
568
|
const mediaElement = this.document.createElement('media');
|
|
561
569
|
const { id, href, mimetype, mimeSubtype } = node.attrs;
|
|
@@ -571,7 +579,9 @@ export class JATSExporter {
|
|
|
571
579
|
mediaElement.setAttribute('mime-subtype', node.attrs.mimeSubtype);
|
|
572
580
|
}
|
|
573
581
|
appendLabels(mediaElement, node);
|
|
574
|
-
appendChildNodeOfType(mediaElement, node,
|
|
582
|
+
appendChildNodeOfType(mediaElement, node, schema.nodes.alt_text);
|
|
583
|
+
appendChildNodeOfType(mediaElement, node, schema.nodes.long_desc);
|
|
584
|
+
appendChildNodeOfType(mediaElement, node, schema.nodes.figcaption);
|
|
575
585
|
return mediaElement;
|
|
576
586
|
},
|
|
577
587
|
awards: () => ['funding-group', 0],
|
|
@@ -929,6 +939,16 @@ export class JATSExporter {
|
|
|
929
939
|
processChildNodes(element, node, node.type.schema.nodes.section);
|
|
930
940
|
return element;
|
|
931
941
|
};
|
|
942
|
+
const createImage = (node) => {
|
|
943
|
+
const graphicNode = node.content.firstChild;
|
|
944
|
+
if (graphicNode) {
|
|
945
|
+
const graphicElement = createGraphic(graphicNode);
|
|
946
|
+
appendChildNodeOfType(graphicElement, node, schema.nodes.alt_text);
|
|
947
|
+
appendChildNodeOfType(graphicElement, node, schema.nodes.long_desc);
|
|
948
|
+
return graphicElement;
|
|
949
|
+
}
|
|
950
|
+
return '';
|
|
951
|
+
};
|
|
932
952
|
const createGraphic = (node, isChildOfFigure = true) => {
|
|
933
953
|
const graphic = this.document.createElement('graphic');
|
|
934
954
|
graphic.setAttributeNS(XLINK_NAMESPACE, 'xlink:href', node.attrs.src);
|
|
@@ -946,6 +966,8 @@ export class JATSExporter {
|
|
|
946
966
|
}
|
|
947
967
|
appendLabels(element, node);
|
|
948
968
|
appendChildNodeOfType(element, node, node.type.schema.nodes.figcaption);
|
|
969
|
+
appendChildNodeOfType(element, node, schema.nodes.alt_text);
|
|
970
|
+
appendChildNodeOfType(element, node, schema.nodes.long_desc);
|
|
949
971
|
appendChildNodeOfType(element, node, node.type.schema.nodes.footnotes_element);
|
|
950
972
|
processChildNodes(element, node, contentNodeType);
|
|
951
973
|
appendAttributions(element, node);
|
|
@@ -958,7 +980,9 @@ export class JATSExporter {
|
|
|
958
980
|
const nodeName = 'table-wrap';
|
|
959
981
|
const element = createElement(node, nodeName);
|
|
960
982
|
appendLabels(element, node);
|
|
961
|
-
appendChildNodeOfType(element, node,
|
|
983
|
+
appendChildNodeOfType(element, node, schema.nodes.figcaption);
|
|
984
|
+
appendChildNodeOfType(element, node, schema.nodes.alt_text);
|
|
985
|
+
appendChildNodeOfType(element, node, schema.nodes.long_desc);
|
|
962
986
|
appendTable(element, node);
|
|
963
987
|
appendChildNodeOfType(element, node, node.type.schema.nodes.table_element_footer);
|
|
964
988
|
if (isExecutableNodeType(node.type)) {
|
|
@@ -1379,6 +1403,10 @@ export class JATSExporter {
|
|
|
1379
1403
|
if (availabilitySection) {
|
|
1380
1404
|
back.insertBefore(availabilitySection, back.firstChild);
|
|
1381
1405
|
}
|
|
1406
|
+
const ethicsSection = body.querySelector('sec[sec-type="ethics-statement"]');
|
|
1407
|
+
if (ethicsSection) {
|
|
1408
|
+
back.appendChild(ethicsSection);
|
|
1409
|
+
}
|
|
1382
1410
|
const section = body.querySelector('sec[sec-type="acknowledgements"]');
|
|
1383
1411
|
if (section) {
|
|
1384
1412
|
const ack = this.document.createElement('ack');
|
|
@@ -1415,7 +1443,6 @@ export class JATSExporter {
|
|
|
1415
1443
|
'supplementary-material',
|
|
1416
1444
|
'supported-by',
|
|
1417
1445
|
'financial-disclosure',
|
|
1418
|
-
'ethics-statement',
|
|
1419
1446
|
'coi-statement',
|
|
1420
1447
|
];
|
|
1421
1448
|
const sections = body.querySelectorAll('sec');
|
|
@@ -219,6 +219,14 @@ export class JATSDOMParser {
|
|
|
219
219
|
return attrs;
|
|
220
220
|
};
|
|
221
221
|
this.nodes = [
|
|
222
|
+
{
|
|
223
|
+
tag: 'long-desc',
|
|
224
|
+
node: 'long_desc',
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
tag: 'alt-text',
|
|
228
|
+
node: 'alt_text',
|
|
229
|
+
},
|
|
222
230
|
{
|
|
223
231
|
tag: 'attachments > self-uri',
|
|
224
232
|
node: 'attachment',
|
|
@@ -615,8 +623,21 @@ export class JATSDOMParser {
|
|
|
615
623
|
tag: 'graphic',
|
|
616
624
|
node: 'image_element',
|
|
617
625
|
getContent: (node) => {
|
|
618
|
-
const
|
|
619
|
-
|
|
626
|
+
const element = node;
|
|
627
|
+
const content = [
|
|
628
|
+
this.schema.nodes.figure.create(this.getFigureAttrs(element)),
|
|
629
|
+
];
|
|
630
|
+
const altText = element.querySelector('alt-text');
|
|
631
|
+
if (altText) {
|
|
632
|
+
const altTextNode = this.schema.nodes.alt_text.create();
|
|
633
|
+
content.push(this.parse(altText, { topNode: altTextNode }));
|
|
634
|
+
}
|
|
635
|
+
const longDesc = element.querySelector('long-desc');
|
|
636
|
+
if (longDesc) {
|
|
637
|
+
const longDescNode = this.schema.nodes.long_desc.create();
|
|
638
|
+
content.push(this.parse(longDesc, { topNode: longDescNode }));
|
|
639
|
+
}
|
|
640
|
+
return Fragment.from(content);
|
|
620
641
|
},
|
|
621
642
|
},
|
|
622
643
|
{
|
|
@@ -324,6 +324,13 @@ export const createSupplementaryMaterialsSection = (document, body, createElemen
|
|
|
324
324
|
body.prepend(section);
|
|
325
325
|
}
|
|
326
326
|
};
|
|
327
|
+
export const moveAccessibilityItems = (doc) => {
|
|
328
|
+
const items = doc.querySelectorAll('alt-text, long-desc');
|
|
329
|
+
items.forEach((item) => {
|
|
330
|
+
var _a;
|
|
331
|
+
(_a = item.parentNode) === null || _a === void 0 ? void 0 : _a.appendChild(item);
|
|
332
|
+
});
|
|
333
|
+
};
|
|
327
334
|
export const moveReferencesToBackmatter = (body, back, createElement) => {
|
|
328
335
|
const backmatter = body.querySelector('sec[sec-type="backmatter"]');
|
|
329
336
|
const refList = back.querySelector('ref-list');
|
|
@@ -18,7 +18,7 @@ import { markComments } from './jats-comments';
|
|
|
18
18
|
import { JATSDOMParser } from './jats-dom-parser';
|
|
19
19
|
import { parseJournal } from './jats-journal-meta-parser';
|
|
20
20
|
import { updateDocumentIDs } from './jats-parser-utils';
|
|
21
|
-
import { addMissingCaptions, createAbstracts, createAttachments, createBackmatter, createBody, createBoxedElementSection, createKeywordsSection, createSupplementaryMaterialsSection, createTitles, fixTables, moveAffiliations, moveAuthorNotes, moveAwards, moveCaptionsToEnd, moveContributors, moveReferencesToBackmatter, orderTableFootnote, } from './jats-transformations';
|
|
21
|
+
import { addMissingCaptions, createAbstracts, createAttachments, createBackmatter, createBody, createBoxedElementSection, createKeywordsSection, createSupplementaryMaterialsSection, createTitles, fixTables, moveAccessibilityItems, moveAffiliations, moveAuthorNotes, moveAwards, moveCaptionsToEnd, moveContributors, moveReferencesToBackmatter, orderTableFootnote, } from './jats-transformations';
|
|
22
22
|
const processJATS = (doc, sectionCategories) => {
|
|
23
23
|
const createElement = createElementFn(doc);
|
|
24
24
|
markComments(doc);
|
|
@@ -51,6 +51,7 @@ const processJATS = (doc, sectionCategories) => {
|
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
moveReferencesToBackmatter(body, back, createElement);
|
|
54
|
+
moveAccessibilityItems(doc);
|
|
54
55
|
};
|
|
55
56
|
const createElementFn = (doc) => (tagName) => doc.createElement(tagName);
|
|
56
57
|
export const parseJATSArticle = (doc, sectionCategories, template) => {
|
package/dist/es/schema/index.js
CHANGED
|
@@ -18,6 +18,7 @@ import { bold, code, italic, smallcaps, strikethrough, styled, subscript, supers
|
|
|
18
18
|
import { abstracts } from './nodes/abstracts';
|
|
19
19
|
import { affiliation } from './nodes/affiliation';
|
|
20
20
|
import { affiliations } from './nodes/affiliations';
|
|
21
|
+
import { altText } from './nodes/alt_text';
|
|
21
22
|
import { altTitle } from './nodes/alt_title';
|
|
22
23
|
import { attachment } from './nodes/attachment';
|
|
23
24
|
import { attachments } from './nodes/attachments';
|
|
@@ -66,6 +67,7 @@ import { link } from './nodes/link';
|
|
|
66
67
|
import { list, listItem } from './nodes/list';
|
|
67
68
|
import { listing } from './nodes/listing';
|
|
68
69
|
import { listingElement } from './nodes/listing_element';
|
|
70
|
+
import { longDesc } from './nodes/long_desc';
|
|
69
71
|
import { manuscript } from './nodes/manuscript';
|
|
70
72
|
import { missingFigure } from './nodes/missing_figure';
|
|
71
73
|
import { paragraph } from './nodes/paragraph';
|
|
@@ -149,6 +151,8 @@ export * from './types';
|
|
|
149
151
|
export * from './nodes/attachment';
|
|
150
152
|
export * from './nodes/attachments';
|
|
151
153
|
export * from './nodes/alt_title';
|
|
154
|
+
export * from './nodes/alt_text';
|
|
155
|
+
export * from './nodes/long_desc';
|
|
152
156
|
export const schema = new Schema({
|
|
153
157
|
marks: {
|
|
154
158
|
bold,
|
|
@@ -239,5 +243,7 @@ export const schema = new Schema({
|
|
|
239
243
|
attachment,
|
|
240
244
|
attachments,
|
|
241
245
|
alt_title: altTitle,
|
|
246
|
+
alt_text: altText,
|
|
247
|
+
long_desc: longDesc,
|
|
242
248
|
},
|
|
243
249
|
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2025 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export const altText = {
|
|
17
|
+
content: 'text*',
|
|
18
|
+
attrs: {
|
|
19
|
+
id: { default: '' },
|
|
20
|
+
},
|
|
21
|
+
parseDOM: [{ tag: 'div' }],
|
|
22
|
+
toDOM: () => ['div', 0],
|
|
23
|
+
};
|
|
@@ -14,13 +14,14 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export const embed = {
|
|
17
|
-
content: 'figcaption',
|
|
17
|
+
content: 'figcaption alt_text? long_desc?',
|
|
18
18
|
attrs: {
|
|
19
19
|
id: { default: '' },
|
|
20
20
|
dataTracked: { default: null },
|
|
21
21
|
href: { default: undefined },
|
|
22
22
|
mimetype: { default: undefined },
|
|
23
23
|
mimeSubtype: { default: undefined },
|
|
24
|
+
longDesc: { default: '' },
|
|
24
25
|
},
|
|
25
26
|
group: 'block element',
|
|
26
27
|
toDOM: (node) => {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export const figureElement = {
|
|
17
|
-
content: '(paragraph | figure | missing_figure | placeholder)+ attribution*
|
|
17
|
+
content: '(paragraph | figure | missing_figure | placeholder)+ attribution* figcaption alt_text? long_desc? (listing | placeholder)',
|
|
18
18
|
attrs: {
|
|
19
19
|
id: { default: '' },
|
|
20
20
|
attribution: { default: undefined },
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2025 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export const longDesc = {
|
|
17
|
+
content: 'text*',
|
|
18
|
+
attrs: {
|
|
19
|
+
id: { default: '' },
|
|
20
|
+
},
|
|
21
|
+
parseDOM: [{ tag: 'div' }],
|
|
22
|
+
toDOM: () => ['div', 0],
|
|
23
|
+
};
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export const tableElement = {
|
|
17
|
-
content: '
|
|
17
|
+
content: 'figcaption? (table | placeholder) table_colgroup? table_element_footer? alt_text? long_desc? (listing | placeholder)',
|
|
18
18
|
attrs: {
|
|
19
19
|
id: { default: '' },
|
|
20
20
|
dataTracked: { default: null },
|
package/dist/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "3.0.
|
|
1
|
+
export const VERSION = "3.0.49";
|
|
@@ -29,6 +29,7 @@ export declare const createBackmatter: (doc: Document, body: Element, sectionCat
|
|
|
29
29
|
export declare const moveCaptionsToEnd: (body: Element) => void;
|
|
30
30
|
export declare const createKeywordsSection: (document: Document, body: Element, createElement: CreateElement) => void;
|
|
31
31
|
export declare const createSupplementaryMaterialsSection: (document: Document, body: Element, createElement: CreateElement) => void;
|
|
32
|
+
export declare const moveAccessibilityItems: (doc: Document) => void;
|
|
32
33
|
export declare const moveReferencesToBackmatter: (body: Element, back: Element, createElement: CreateElement) => void;
|
|
33
34
|
export declare const orderTableFootnote: (doc: Document, body: Element) => void;
|
|
34
35
|
export declare const createAttachments: (doc: Document, createElement: CreateElement) => void;
|
|
@@ -81,4 +81,6 @@ export * from './types';
|
|
|
81
81
|
export * from './nodes/attachment';
|
|
82
82
|
export * from './nodes/attachments';
|
|
83
83
|
export * from './nodes/alt_title';
|
|
84
|
+
export * from './nodes/alt_text';
|
|
85
|
+
export * from './nodes/long_desc';
|
|
84
86
|
export declare const schema: Schema<Nodes, Marks>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2025 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { NodeSpec } from 'prosemirror-model';
|
|
17
|
+
import type { ManuscriptNode } from '../types';
|
|
18
|
+
export interface AltTextAttrs {
|
|
19
|
+
id: string;
|
|
20
|
+
}
|
|
21
|
+
export interface AltTextNode extends ManuscriptNode {
|
|
22
|
+
attrs: AltTextAttrs;
|
|
23
|
+
}
|
|
24
|
+
export declare const altText: NodeSpec;
|
|
@@ -15,16 +15,14 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
interface
|
|
18
|
+
export interface EmbedAttrs {
|
|
19
19
|
id: string;
|
|
20
20
|
href: string;
|
|
21
|
-
show: string;
|
|
22
21
|
mimetype: string;
|
|
23
22
|
mimeSubtype: string;
|
|
24
23
|
}
|
|
25
24
|
export interface EmbedNode extends ManuscriptNode {
|
|
26
|
-
attrs:
|
|
25
|
+
attrs: EmbedAttrs;
|
|
27
26
|
}
|
|
28
27
|
export declare const embed: NodeSpec;
|
|
29
28
|
export declare const isEmbedNode: (node: ManuscriptNode) => node is EmbedNode;
|
|
30
|
-
export {};
|
|
@@ -15,11 +15,12 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
+
export interface FigureAttrs {
|
|
19
|
+
id: string;
|
|
20
|
+
src: string;
|
|
21
|
+
type: string;
|
|
22
|
+
}
|
|
18
23
|
export interface FigureNode extends ManuscriptNode {
|
|
19
|
-
attrs:
|
|
20
|
-
id: string;
|
|
21
|
-
src: string;
|
|
22
|
-
type: string;
|
|
23
|
-
};
|
|
24
|
+
attrs: FigureAttrs;
|
|
24
25
|
}
|
|
25
26
|
export declare const figure: NodeSpec;
|
|
@@ -16,13 +16,12 @@
|
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
18
|
import { AttributionNode } from './attribution';
|
|
19
|
-
interface
|
|
19
|
+
export interface FigureElementAttrs {
|
|
20
20
|
id: string;
|
|
21
21
|
attribution?: AttributionNode;
|
|
22
22
|
}
|
|
23
23
|
export interface FigureElementNode extends ManuscriptNode {
|
|
24
|
-
attrs:
|
|
24
|
+
attrs: FigureElementAttrs;
|
|
25
25
|
}
|
|
26
26
|
export declare const figureElement: NodeSpec;
|
|
27
27
|
export declare const isFigureElementNode: (node: ManuscriptNode) => node is FigureElementNode;
|
|
28
|
-
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2025 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { NodeSpec } from 'prosemirror-model';
|
|
17
|
+
import type { ManuscriptNode } from '../types';
|
|
18
|
+
export interface LongDescAttrs {
|
|
19
|
+
id: string;
|
|
20
|
+
}
|
|
21
|
+
export interface LongDescNode extends ManuscriptNode {
|
|
22
|
+
attrs: LongDescAttrs;
|
|
23
|
+
}
|
|
24
|
+
export declare const longDesc: NodeSpec;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
interface
|
|
18
|
+
export interface SupplementAttrs {
|
|
19
19
|
id: string;
|
|
20
20
|
href: string;
|
|
21
21
|
mimeType: string;
|
|
@@ -23,7 +23,6 @@ interface Attrs {
|
|
|
23
23
|
title: string;
|
|
24
24
|
}
|
|
25
25
|
export interface SupplementNode extends ManuscriptNode {
|
|
26
|
-
attrs:
|
|
26
|
+
attrs: SupplementAttrs;
|
|
27
27
|
}
|
|
28
28
|
export declare const supplement: NodeSpec;
|
|
29
|
-
export {};
|
|
@@ -15,12 +15,11 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
interface
|
|
18
|
+
export interface TableAttrs {
|
|
19
19
|
id: string;
|
|
20
20
|
}
|
|
21
21
|
export interface TableElementNode extends ManuscriptNode {
|
|
22
|
-
attrs:
|
|
22
|
+
attrs: TableAttrs;
|
|
23
23
|
}
|
|
24
24
|
export declare const tableElement: NodeSpec;
|
|
25
25
|
export declare const isTableElementNode: (node: ManuscriptNode) => node is TableElementNode;
|
|
26
|
-
export {};
|
|
@@ -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' | 'list' | 'caption' | 'caption_title' | 'comment' | 'comments' | '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' | 'keyword_group' | 'keywords' | 'link' | 'list_item' | 'listing' | 'listing_element' | 'manuscript' | 'abstracts' | 'body' | 'backmatter' | 'missing_figure' | 'paragraph' | 'placeholder' | 'placeholder_element' | 'pullquote_element' | 'section' | 'section_label' | 'section_title' | 'section_title_plain' | 'table' | 'table_cell' | 'table_element' | 'table_row' | 'table_colgroup' | 'table_col' | 'table_header' | 'text' | 'text_block' | 'affiliation' | 'contributor' | 'table_element_footer' | 'title' | 'affiliations' | 'contributors' | 'supplements' | 'supplement' | 'author_notes' | 'corresp' | 'general_table_footnote' | 'box_element' | 'awards' | 'award' | 'embed' | 'image_element' | 'attachment' | 'attachments' | 'alt_title';
|
|
20
|
+
export type Nodes = 'attribution' | 'bibliography_item' | 'bibliography_element' | 'bibliography_section' | 'blockquote_element' | 'list' | 'caption' | 'caption_title' | 'comment' | 'comments' | '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' | 'keyword_group' | 'keywords' | 'link' | 'list_item' | 'listing' | 'listing_element' | 'manuscript' | 'abstracts' | 'body' | 'backmatter' | 'missing_figure' | 'paragraph' | 'placeholder' | 'placeholder_element' | 'pullquote_element' | 'section' | 'section_label' | 'section_title' | 'section_title_plain' | 'table' | 'table_cell' | 'table_element' | 'table_row' | 'table_colgroup' | 'table_col' | 'table_header' | 'text' | 'text_block' | 'affiliation' | 'contributor' | 'table_element_footer' | 'title' | 'affiliations' | 'contributors' | 'supplements' | 'supplement' | 'author_notes' | 'corresp' | 'general_table_footnote' | 'box_element' | 'awards' | 'award' | 'embed' | 'image_element' | 'attachment' | 'attachments' | 'alt_title' | 'alt_text' | 'long_desc';
|
|
21
21
|
export type ManuscriptSchema = Schema<Nodes, Marks>;
|
|
22
22
|
export type ManuscriptEditorState = EditorState;
|
|
23
23
|
export type ManuscriptEditorView = EditorView;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.0.
|
|
1
|
+
export declare const VERSION = "3.0.49";
|
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.49",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@manuscripts/json-schema": "2.2.11",
|
|
34
|
-
"@manuscripts/library": "1.3.
|
|
34
|
+
"@manuscripts/library": "1.3.11",
|
|
35
35
|
"debug": "^4.3.4",
|
|
36
36
|
"jszip": "^3.10.1",
|
|
37
37
|
"lodash": "^4.17.21",
|