@manuscripts/transform 2.3.25-LEAN3923-1.2 → 2.3.25
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 +8 -1
- package/dist/cjs/schema/nodes/abstracts.js +1 -1
- package/dist/cjs/transformer/decode.js +2 -10
- package/dist/cjs/version.js +1 -1
- package/dist/es/jats/jats-exporter.js +8 -1
- package/dist/es/schema/nodes/abstracts.js +1 -1
- package/dist/es/transformer/decode.js +2 -10
- package/dist/es/version.js +1 -1
- package/dist/types/lib/table-cell-styles.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1582,7 +1582,14 @@ class JATSExporter {
|
|
|
1582
1582
|
createEquation(node, isInline = false) {
|
|
1583
1583
|
if (node.attrs.format === 'tex') {
|
|
1584
1584
|
const texMath = this.document.createElement('tex-math');
|
|
1585
|
-
texMath.
|
|
1585
|
+
texMath.setAttribute('notation', 'LaTeX');
|
|
1586
|
+
texMath.setAttribute('version', 'MathJax');
|
|
1587
|
+
if (node.attrs.contents.includes('<![CDATA[')) {
|
|
1588
|
+
texMath.innerHTML = node.attrs.contents;
|
|
1589
|
+
}
|
|
1590
|
+
else {
|
|
1591
|
+
texMath.innerHTML = `<![CDATA[ ${node.attrs.contents} ]]>`;
|
|
1592
|
+
}
|
|
1586
1593
|
return texMath;
|
|
1587
1594
|
}
|
|
1588
1595
|
else {
|
|
@@ -103,14 +103,9 @@ class Decoder {
|
|
|
103
103
|
return schema_1.schema.nodes.contributors.createAndFill({}, content);
|
|
104
104
|
}
|
|
105
105
|
createAuthorNotesNode() {
|
|
106
|
-
|
|
106
|
+
return getAuthorNotes(this.modelMap)
|
|
107
107
|
.map((authorNote) => this.decode(authorNote))
|
|
108
108
|
.filter(Boolean);
|
|
109
|
-
console.log('authorNotes', authorNotes);
|
|
110
|
-
if (!authorNotes.length) {
|
|
111
|
-
return [];
|
|
112
|
-
}
|
|
113
|
-
return authorNotes;
|
|
114
109
|
}
|
|
115
110
|
createKeywordsNode() {
|
|
116
111
|
const elements = getKeywordElements(this.modelMap)
|
|
@@ -525,11 +520,10 @@ class Decoder {
|
|
|
525
520
|
[json_schema_1.ObjectTypes.AuthorNotes]: (data) => {
|
|
526
521
|
const model = data;
|
|
527
522
|
const content = model.containedObjectIDs.map((id) => this.decode(this.modelMap.get(id)));
|
|
528
|
-
console.log('author notes contents', content);
|
|
529
523
|
return schema_1.schema.nodes.author_notes.createAndFill({
|
|
530
524
|
id: model._id,
|
|
531
525
|
}, [
|
|
532
|
-
schema_1.schema.nodes.section_title.create({}, schema_1.schema.text('Correspondence
|
|
526
|
+
schema_1.schema.nodes.section_title.create({}, schema_1.schema.text('Correspondence')),
|
|
533
527
|
...content,
|
|
534
528
|
]);
|
|
535
529
|
},
|
|
@@ -731,9 +725,7 @@ class Decoder {
|
|
|
731
725
|
...this.createContentSections(),
|
|
732
726
|
this.createCommentsNode(),
|
|
733
727
|
];
|
|
734
|
-
console.log('nodes', nodes);
|
|
735
728
|
const contents = nodes.filter((node) => node !== false);
|
|
736
|
-
console.log('contents', contents);
|
|
737
729
|
const props = this.getManuscript();
|
|
738
730
|
return schema_1.schema.nodes.manuscript.create({
|
|
739
731
|
id: manuscriptID || this.getManuscriptID(),
|
package/dist/cjs/version.js
CHANGED
|
@@ -1574,7 +1574,14 @@ export class JATSExporter {
|
|
|
1574
1574
|
createEquation(node, isInline = false) {
|
|
1575
1575
|
if (node.attrs.format === 'tex') {
|
|
1576
1576
|
const texMath = this.document.createElement('tex-math');
|
|
1577
|
-
texMath.
|
|
1577
|
+
texMath.setAttribute('notation', 'LaTeX');
|
|
1578
|
+
texMath.setAttribute('version', 'MathJax');
|
|
1579
|
+
if (node.attrs.contents.includes('<![CDATA[')) {
|
|
1580
|
+
texMath.innerHTML = node.attrs.contents;
|
|
1581
|
+
}
|
|
1582
|
+
else {
|
|
1583
|
+
texMath.innerHTML = `<![CDATA[ ${node.attrs.contents} ]]>`;
|
|
1584
|
+
}
|
|
1578
1585
|
return texMath;
|
|
1579
1586
|
}
|
|
1580
1587
|
else {
|
|
@@ -94,14 +94,9 @@ export class Decoder {
|
|
|
94
94
|
return schema.nodes.contributors.createAndFill({}, content);
|
|
95
95
|
}
|
|
96
96
|
createAuthorNotesNode() {
|
|
97
|
-
|
|
97
|
+
return getAuthorNotes(this.modelMap)
|
|
98
98
|
.map((authorNote) => this.decode(authorNote))
|
|
99
99
|
.filter(Boolean);
|
|
100
|
-
console.log('authorNotes', authorNotes);
|
|
101
|
-
if (!authorNotes.length) {
|
|
102
|
-
return [];
|
|
103
|
-
}
|
|
104
|
-
return authorNotes;
|
|
105
100
|
}
|
|
106
101
|
createKeywordsNode() {
|
|
107
102
|
const elements = getKeywordElements(this.modelMap)
|
|
@@ -516,11 +511,10 @@ export class Decoder {
|
|
|
516
511
|
[ObjectTypes.AuthorNotes]: (data) => {
|
|
517
512
|
const model = data;
|
|
518
513
|
const content = model.containedObjectIDs.map((id) => this.decode(this.modelMap.get(id)));
|
|
519
|
-
console.log('author notes contents', content);
|
|
520
514
|
return schema.nodes.author_notes.createAndFill({
|
|
521
515
|
id: model._id,
|
|
522
516
|
}, [
|
|
523
|
-
schema.nodes.section_title.create({}, schema.text('Correspondence
|
|
517
|
+
schema.nodes.section_title.create({}, schema.text('Correspondence')),
|
|
524
518
|
...content,
|
|
525
519
|
]);
|
|
526
520
|
},
|
|
@@ -722,9 +716,7 @@ export class Decoder {
|
|
|
722
716
|
...this.createContentSections(),
|
|
723
717
|
this.createCommentsNode(),
|
|
724
718
|
];
|
|
725
|
-
console.log('nodes', nodes);
|
|
726
719
|
const contents = nodes.filter((node) => node !== false);
|
|
727
|
-
console.log('contents', contents);
|
|
728
720
|
const props = this.getManuscript();
|
|
729
721
|
return schema.nodes.manuscript.create({
|
|
730
722
|
id: manuscriptID || this.getManuscriptID(),
|
package/dist/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "2.3.25
|
|
1
|
+
export const VERSION = "2.3.25";
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export declare const TABLE_CELL_STYLES: readonly ["backgroundColor", "border-top", "border-right", "border-bottom", "border-left", "verticalAlign", "textAlign"];
|
|
17
|
-
export type TableCellStyleKey =
|
|
17
|
+
export type TableCellStyleKey = typeof TABLE_CELL_STYLES[number];
|
|
18
18
|
export declare const serializeTableCellStyles: (styles: {
|
|
19
19
|
backgroundColor?: string | null | undefined;
|
|
20
20
|
"border-top"?: string | null | undefined;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "2.3.25
|
|
1
|
+
export declare const VERSION = "2.3.25";
|
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": "2.3.25
|
|
4
|
+
"version": "2.3.25",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|