@manuscripts/transform 1.5.1 → 1.5.2-LEAN-3034
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 +32 -2
- package/dist/cjs/lib/citationProvider.js +50 -0
- package/dist/cjs/lib/defaultLocale.js +3 -0
- package/dist/cjs/transformer/labels.js +8 -4
- package/dist/es/jats/jats-exporter.js +33 -3
- package/dist/es/lib/citationProvider.js +43 -0
- package/dist/es/lib/defaultLocale.js +1 -0
- package/dist/es/transformer/labels.js +8 -4
- package/dist/types/jats/jats-exporter.d.ts +8 -1
- package/dist/types/lib/citationProvider.d.ts +31 -0
- package/dist/types/lib/defaultLocale.d.ts +2 -0
- package/package.json +3 -2
|
@@ -23,6 +23,7 @@ const json_schema_1 = require("@manuscripts/json-schema");
|
|
|
23
23
|
const debug_1 = __importDefault(require("debug"));
|
|
24
24
|
const prosemirror_model_1 = require("prosemirror-model");
|
|
25
25
|
const w3c_xmlserializer_1 = __importDefault(require("w3c-xmlserializer"));
|
|
26
|
+
const citationProvider_1 = require("../lib/citationProvider");
|
|
26
27
|
const html_1 = require("../lib/html");
|
|
27
28
|
const styled_content_1 = require("../lib/styled-content");
|
|
28
29
|
const utils_1 = require("../lib/utils");
|
|
@@ -118,9 +119,16 @@ const sortContributors = (a, b) => Number(a.priority) - Number(b.priority);
|
|
|
118
119
|
class JATSExporter {
|
|
119
120
|
constructor() {
|
|
120
121
|
this.serializeToJATS = async (fragment, modelMap, manuscriptID, options = {}) => {
|
|
121
|
-
const { version = '1.2', doi, id, frontMatterOnly = false, links, idGenerator, mediaPathGenerator, } = options;
|
|
122
|
+
const { version = '1.2', doi, id, frontMatterOnly = false, links, idGenerator, mediaPathGenerator, citationStyle, locale, } = options;
|
|
122
123
|
this.modelMap = modelMap;
|
|
123
124
|
this.models = Array.from(this.modelMap.values());
|
|
125
|
+
if (citationStyle) {
|
|
126
|
+
this.citeProcEngine = citationProvider_1.CitationProvider.getEngine({
|
|
127
|
+
bibliographyItemsMap: this.getBibliographyItemsMap(),
|
|
128
|
+
citationStyle: citationStyle,
|
|
129
|
+
locale: locale,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
124
132
|
this.createSerializer();
|
|
125
133
|
const versionIds = (0, jats_versions_1.selectVersionIds)(version);
|
|
126
134
|
this.document = document.implementation.createDocument(null, 'article', document.implementation.createDocumentType('article', versionIds.publicId, versionIds.systemId));
|
|
@@ -643,7 +651,10 @@ class JATSExporter {
|
|
|
643
651
|
const xref = this.document.createElement('xref');
|
|
644
652
|
xref.setAttribute('ref-type', 'bibr');
|
|
645
653
|
xref.setAttribute('rid', rids.map((item) => normalizeID(item.bibliographyItem)).join(' '));
|
|
646
|
-
if (
|
|
654
|
+
if (this.citeProcEngine) {
|
|
655
|
+
xref.textContent = this.generateCitationContent(node);
|
|
656
|
+
}
|
|
657
|
+
else if (node.attrs.contents) {
|
|
647
658
|
const text = (0, html_1.textFromHTML)(node.attrs.contents);
|
|
648
659
|
if (text !== null && text.length) {
|
|
649
660
|
xref.textContent = text;
|
|
@@ -1573,6 +1584,25 @@ class JATSExporter {
|
|
|
1573
1584
|
return name;
|
|
1574
1585
|
};
|
|
1575
1586
|
}
|
|
1587
|
+
getBibliographyItemsMap() {
|
|
1588
|
+
const map = new Map();
|
|
1589
|
+
this.modelMap.forEach((model) => {
|
|
1590
|
+
if (model.objectType === json_schema_1.ObjectTypes.BibliographyItem) {
|
|
1591
|
+
map.set(model._id, model);
|
|
1592
|
+
}
|
|
1593
|
+
});
|
|
1594
|
+
return map;
|
|
1595
|
+
}
|
|
1596
|
+
generateCitationContent(node) {
|
|
1597
|
+
var _a;
|
|
1598
|
+
const citationItems = (_a = node.attrs.embeddedCitationItems) === null || _a === void 0 ? void 0 : _a.map(({ bibliographyItem }) => ({
|
|
1599
|
+
id: bibliographyItem,
|
|
1600
|
+
}));
|
|
1601
|
+
return this.citeProcEngine.previewCitationCluster({
|
|
1602
|
+
citationID: node.attrs.rid,
|
|
1603
|
+
citationItems: citationItems,
|
|
1604
|
+
}, [], [], 'text');
|
|
1605
|
+
}
|
|
1576
1606
|
buildKeywords(articleMeta) {
|
|
1577
1607
|
const keywords = [...this.modelMap.values()].filter((model) => model.objectType === json_schema_1.ObjectTypes.Keyword);
|
|
1578
1608
|
const keywordGroups = new Map();
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* © 2023 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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.CitationProvider = void 0;
|
|
22
|
+
const citeproc_1 = __importDefault(require("citeproc"));
|
|
23
|
+
const defaultLocale_1 = __importDefault(require("./defaultLocale"));
|
|
24
|
+
class CitationProvider {
|
|
25
|
+
constructor() {
|
|
26
|
+
}
|
|
27
|
+
static getEngine(props) {
|
|
28
|
+
if (!CitationProvider.engine) {
|
|
29
|
+
CitationProvider.engine = CitationProvider.createCiteProcEngine(props);
|
|
30
|
+
}
|
|
31
|
+
return CitationProvider.engine;
|
|
32
|
+
}
|
|
33
|
+
static createCiteProcEngine(props) {
|
|
34
|
+
const { bibliographyItemsMap, citationStyle, locale } = props;
|
|
35
|
+
return new citeproc_1.default.Engine({
|
|
36
|
+
retrieveItem: (id) => this.retrieveBibliographyItem(id, bibliographyItemsMap),
|
|
37
|
+
retrieveLocale: () => locale || defaultLocale_1.default,
|
|
38
|
+
}, citationStyle, 'en-US', false);
|
|
39
|
+
}
|
|
40
|
+
static retrieveBibliographyItem(id, map) {
|
|
41
|
+
const item = map.get(id);
|
|
42
|
+
return Object.assign(Object.assign({}, item), { id, type: (item === null || item === void 0 ? void 0 : item.type) || 'article-journal' });
|
|
43
|
+
}
|
|
44
|
+
static recreateEngine(props) {
|
|
45
|
+
CitationProvider.engine = CitationProvider.createCiteProcEngine(props);
|
|
46
|
+
return CitationProvider.engine;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.CitationProvider = CitationProvider;
|
|
50
|
+
CitationProvider.engine = null;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = '<?xml version="1.0" encoding="utf-8"?><locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0" xml:lang="en-US"><info><translator><name>Andrew Dunning</name></translator><translator><name>Sebastian Karcher</name></translator><translator><name>Rintze M. Zelle</name></translator><translator><name>Denis Meier</name></translator><translator><name>Brenton M. Wiernik</name></translator><rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights><updated>2015-10-10T23:31:02+00:00</updated></info><style-options punctuation-in-quote="true"/><date form="text"><date-part name="month" suffix=" "/><date-part name="day" suffix=", "/><date-part name="year"/></date><date form="numeric"><date-part name="month" form="numeric-leading-zeros" suffix="/"/><date-part name="day" form="numeric-leading-zeros" suffix="/"/><date-part name="year"/></date><terms><term name="advance-online-publication">advance online publication</term><term name="album">album</term><term name="audio-recording">audio recording</term><term name="film">film</term><term name="henceforth">henceforth</term><term name="loc-cit">loc. cit.</term><!-- like ibid., the abbreviated form is the regular form --><term name="no-place">no place</term><term name="no-place" form="short">n.p.</term><term name="no-publisher">no publisher</term><!-- sine nomine --><term name="no-publisher" form="short">n.p.</term><term name="on">on</term><term name="op-cit">op. cit.</term><!-- like ibid., the abbreviated form is the regular form --><term name="original-work-published">original work published</term><term name="personal-communication">personal communication</term><term name="podcast">podcast</term><term name="podcast-episode">podcast episode</term><term name="preprint">preprint</term><term name="radio-broadcast">radio broadcast</term><term name="radio-series">radio series</term><term name="radio-series-episode">radio series episode</term><term name="special-issue">special issue</term><term name="special-section">special section</term><term name="television-broadcast">television broadcast</term><term name="television-series">television series</term><term name="television-series-episode">television series episode</term><term name="video">video</term><term name="working-paper">working paper</term><term name="accessed">accessed</term><term name="and">and</term><term name="and others">and others</term><term name="anonymous">anonymous</term><term name="anonymous" form="short">anon.</term><term name="at">at</term><term name="available at">available at</term><term name="by">by</term><term name="circa">circa</term><term name="circa" form="short">c.</term><term name="cited">cited</term><term name="edition"><single>edition</single><multiple>editions</multiple></term><term name="edition" form="short">ed.</term><term name="et-al">et al.</term><term name="forthcoming">forthcoming</term><term name="from">from</term><term name="ibid">ibid.</term><term name="in">in</term><term name="in press">in press</term><term name="internet">internet</term><term name="letter">letter</term><term name="no date">no date</term><term name="no date" form="short">n.d.</term><term name="online">online</term><term name="presented at">presented at the</term><term name="reference"><single>reference</single><multiple>references</multiple></term><term name="reference" form="short"><single>ref.</single><multiple>refs.</multiple></term><term name="retrieved">retrieved</term><term name="scale">scale</term><term name="version">version</term><!-- LONG ITEM TYPE FORMS --><term name="article">preprint</term><term name="article-journal">journal article</term><term name="article-magazine">magazine article</term><term name="article-newspaper">newspaper article</term><term name="bill">bill</term><!-- book is in the list of locator terms --><term name="broadcast">broadcast</term><!-- chapter is in the list of locator terms --><term name="classic">classic</term><term name="collection">collection</term><term name="dataset">dataset</term><term name="document">document</term><term name="entry">entry</term><term name="entry-dictionary">dictionary entry</term><term name="entry-encyclopedia">encyclopedia entry</term><term name="event">event</term><!-- figure is in the list of locator terms --><term name="graphic">graphic</term><term name="hearing">hearing</term><term name="interview">interview</term><term name="legal_case">legal case</term><term name="legislation">legislation</term><term name="manuscript">manuscript</term><term name="map">map</term><term name="motion_picture">video recording</term><term name="musical_score">musical score</term><term name="pamphlet">pamphlet</term><term name="paper-conference">conference paper</term><term name="patent">patent</term><term name="performance">performance</term><term name="periodical">periodical</term><term name="personal_communication">personal communication</term><term name="post">post</term><term name="post-weblog">blog post</term><term name="regulation">regulation</term><term name="report">report</term><term name="review">review</term><term name="review-book">book review</term><term name="software">software</term><term name="song">audio recording</term><term name="speech">presentation</term><term name="standard">standard</term><term name="thesis">thesis</term><term name="treaty">treaty</term><term name="webpage">webpage</term><!-- SHORT ITEM TYPE FORMS --><term name="article-journal" form="short">journal art.</term><term name="article-magazine" form="short">mag. art.</term><term name="article-newspaper" form="short">newspaper art.</term><!-- book is in the list of locator terms --><!-- chapter is in the list of locator terms --><term name="document" form="short">doc.</term><!-- figure is in the list of locator terms --><term name="graphic" form="short">graph.</term><term name="interview" form="short">interv.</term><term name="manuscript" form="short">MS</term><term name="motion_picture" form="short">video rec.</term><term name="report" form="short">rep.</term><term name="review" form="short">rev.</term><term name="review-book" form="short">bk. rev.</term><term name="song" form="short">audio rec.</term><!-- HISTORICAL ERA TERMS --><term name="ad">AD</term><term name="bc">BC</term><term name="bce">BCE</term><term name="ce">CE</term><!-- PUNCTUATION --><term name="open-quote">“</term><term name="close-quote">”</term><term name="open-inner-quote">‘</term><term name="close-inner-quote">’</term><term name="page-range-delimiter">–</term><term name="colon">:</term><term name="comma">,</term><term name="semicolon">;</term><!-- ORDINALS --><term name="ordinal">th</term><term name="ordinal-01">st</term><term name="ordinal-02">nd</term><term name="ordinal-03">rd</term><term name="ordinal-11">th</term><term name="ordinal-12">th</term><term name="ordinal-13">th</term><!-- LONG ORDINALS --><term name="long-ordinal-01">first</term><term name="long-ordinal-02">second</term><term name="long-ordinal-03">third</term><term name="long-ordinal-04">fourth</term><term name="long-ordinal-05">fifth</term><term name="long-ordinal-06">sixth</term><term name="long-ordinal-07">seventh</term><term name="long-ordinal-08">eighth</term><term name="long-ordinal-09">ninth</term><term name="long-ordinal-10">tenth</term><!-- LONG LOCATOR FORMS --><term name="act"><single>act</single><multiple>acts</multiple></term><term name="appendix"><single>appendix</single><multiple>appendices</multiple></term><term name="article-locator"><single>article</single><multiple>articles</multiple></term><term name="canon"><single>canon</single><multiple>canons</multiple></term><term name="elocation"><single>location</single><multiple>locations</multiple></term><term name="equation"><single>equation</single><multiple>equations</multiple></term><term name="rule"><single>rule</single><multiple>rules</multiple></term><term name="scene"><single>scene</single><multiple>scenes</multiple></term><term name="table"><single>table</single><multiple>tables</multiple></term><term name="timestamp"><!-- generally blank --><single></single><multiple></multiple></term><term name="title-locator"><single>title</single><multiple>titles</multiple></term><term name="book"><single>book</single><multiple>books</multiple></term><term name="chapter"><single>chapter</single><multiple>chapters</multiple></term><term name="column"><single>column</single><multiple>columns</multiple></term><term name="figure"><single>figure</single><multiple>figures</multiple></term><term name="folio"><single>folio</single><multiple>folios</multiple></term><term name="issue"><single>number</single><multiple>numbers</multiple></term><term name="line"><single>line</single><multiple>lines</multiple></term><term name="note"><single>note</single><multiple>notes</multiple></term><term name="opus"><single>opus</single><multiple>opera</multiple></term><term name="page"><single>page</single><multiple>pages</multiple></term><term name="number-of-pages"><single>page</single><multiple>pages</multiple></term><term name="paragraph"><single>paragraph</single><multiple>paragraphs</multiple></term><term name="part"><single>part</single><multiple>parts</multiple></term><term name="section"><single>section</single><multiple>sections</multiple></term><term name="sub-verbo"><single>sub verbo</single><multiple>sub verbis</multiple></term><term name="verse"><single>verse</single><multiple>verses</multiple></term><term name="volume"><single>volume</single><multiple>volumes</multiple></term><!-- SHORT LOCATOR FORMS --><term name="appendix" form="short"><single>app.</single><multiple>apps.</multiple></term><term name="article-locator" form="short"><single>art.</single><multiple>arts.</multiple></term><term name="elocation" form="short"><single>loc.</single><multiple>locs.</multiple></term><term name="equation" form="short"><single>eq.</single><multiple>eqs.</multiple></term><term name="rule" form="short"><single>r.</single><multiple>rr.</multiple></term><term name="scene" form="short"><single>sc.</single><multiple>scs.</multiple></term><term name="table" form="short"><single>tbl.</single><multiple>tbls.</multiple></term><term name="timestamp" form="short"><!-- generally blank --><single></single><multiple></multiple></term><term name="title-locator" form="short"><single>tit.</single><multiple>tits.</multiple></term><term name="book" form="short"><single>bk.</single><multiple>bks.</multiple></term><term name="chapter" form="short"><single>chap.</single><multiple>chaps.</multiple></term><term name="column" form="short"><single>col.</single><multiple>cols.</multiple></term><term name="figure" form="short"><single>fig.</single><multiple>figs.</multiple></term><term name="folio" form="short"><single>fol.</single><multiple>fols.</multiple></term><term name="issue" form="short"><single>no.</single><multiple>nos.</multiple></term><term name="line" form="short"><single>l.</single><multiple>ll.</multiple></term><term name="note" form="short"><single>n.</single><multiple>nn.</multiple></term><term name="opus" form="short"><single>op.</single><multiple>opp.</multiple></term><term name="page" form="short"><single>p.</single><multiple>pp.</multiple></term><term name="number-of-pages" form="short"><single>p.</single><multiple>pp.</multiple></term><term name="paragraph" form="short"><single>para.</single><multiple>paras.</multiple></term><term name="part" form="short"><single>pt.</single><multiple>pts.</multiple></term><term name="section" form="short"><single>sec.</single><multiple>secs.</multiple></term><term name="sub-verbo" form="short"><single>s.v.</single><multiple>s.vv.</multiple></term><term name="verse" form="short"><single>v.</single><multiple>vv.</multiple></term><term name="volume" form="short"><single>vol.</single><multiple>vols.</multiple></term><!-- SYMBOL LOCATOR FORMS --><term name="paragraph" form="symbol"><single>¶</single><multiple>¶¶</multiple></term><term name="section" form="symbol"><single>§</single><multiple>§§</multiple></term><!-- LONG ROLE FORMS --><term name="chair"><single>chair</single><multiple>chairs</multiple></term><term name="compiler"><single>compiler</single><multiple>compilers</multiple></term><term name="contributor"><single>contributor</single><multiple>contributors</multiple></term><term name="curator"><single>curator</single><multiple>curators</multiple></term><term name="executive-producer"><single>executive producer</single><multiple>executive producers</multiple></term><term name="guest"><single>guest</single><multiple>guests</multiple></term><term name="host"><single>host</single><multiple>hosts</multiple></term><term name="narrator"><single>narrator</single><multiple>narrators</multiple></term><term name="organizer"><single>organizer</single><multiple>organizers</multiple></term><term name="performer"><single>performer</single><multiple>performers</multiple></term><term name="producer"><single>producer</single><multiple>producers</multiple></term><term name="script-writer"><single>writer</single><multiple>writers</multiple></term><term name="series-creator"><single>series creator</single><multiple>series creators</multiple></term><term name="director"><single>director</single><multiple>directors</multiple></term><term name="editor"><single>editor</single><multiple>editors</multiple></term><term name="editorial-director"><single>editor</single><multiple>editors</multiple></term><term name="illustrator"><single>illustrator</single><multiple>illustrators</multiple></term><term name="translator"><single>translator</single><multiple>translators</multiple></term><term name="editortranslator"><single>editor & translator</single><multiple>editors & translators</multiple></term><!-- SHORT ROLE FORMS --><term name="compiler" form="short"><single>comp.</single><multiple>comps.</multiple></term><term name="contributor" form="short"><single>contrib.</single><multiple>contribs.</multiple></term><term name="curator" form="short"><single>cur.</single><multiple>curs.</multiple></term><term name="executive-producer" form="short"><single>exec. prod.</single><multiple>exec. prods.</multiple></term><term name="narrator" form="short"><single>narr.</single><multiple>narrs.</multiple></term><term name="organizer" form="short"><single>org.</single><multiple>orgs.</multiple></term><term name="performer" form="short"><single>perf.</single><multiple>perfs.</multiple></term><term name="producer" form="short"><single>prod.</single><multiple>prods.</multiple></term><term name="script-writer" form="short"><single>writ.</single><multiple>writs.</multiple></term><term name="series-creator" form="short"><single>cre.</single><multiple>cres.</multiple></term><term name="director" form="short"><single>dir.</single><multiple>dirs.</multiple></term><term name="editor" form="short"><single>ed.</single><multiple>eds.</multiple></term><term name="editorial-director" form="short"><single>ed.</single><multiple>eds.</multiple></term><term name="illustrator" form="short"><single>ill.</single><multiple>ills.</multiple></term><term name="translator" form="short"><single>tran.</single><multiple>trans.</multiple></term><term name="editortranslator" form="short"><single>ed. & tran.</single><multiple>eds. & trans.</multiple></term><!-- VERB ROLE FORMS --><term name="chair" form="verb">chaired by</term><term name="compiler" form="verb">compiled by</term><term name="contributor" form="verb">with</term><term name="curator" form="verb">curated by</term><term name="executive-producer" form="verb">executive produced by</term><term name="guest" form="verb">with guest</term><term name="host" form="verb">hosted by</term><term name="narrator" form="verb">narrated by</term><term name="organizer" form="verb">organized by</term><term name="performer" form="verb">performed by</term><term name="producer" form="verb">produced by</term><term name="script-writer" form="verb">written by</term><term name="series-creator" form="verb">created by</term><term name="container-author" form="verb">by</term><term name="director" form="verb">directed by</term><term name="editor" form="verb">edited by</term><term name="editorial-director" form="verb">edited by</term><term name="illustrator" form="verb">illustrated by</term><term name="interviewer" form="verb">interview by</term><term name="recipient" form="verb">to</term><term name="reviewed-author" form="verb">by</term><term name="translator" form="verb">translated by</term><term name="editortranslator" form="verb">edited & translated by</term><!-- SHORT VERB ROLE FORMS --><term name="compiler" form="verb-short">comp. by</term><term name="contributor" form="verb-short">w.</term><term name="curator" form="verb-short">cur. by</term><term name="executive-producer" form="verb-short">exec. prod. by</term><term name="guest" form="verb-short">w. guest</term><term name="host" form="verb-short">hosted by</term><term name="narrator" form="verb-short">narr. by</term><term name="organizer" form="verb-short">org. by</term><term name="performer" form="verb-short">perf. by</term><term name="producer" form="verb-short">prod. by</term><term name="script-writer" form="verb-short">writ. by</term><term name="series-creator" form="verb-short">cre. by</term><term name="director" form="verb-short">dir. by</term><term name="editor" form="verb-short">ed. by</term><term name="editorial-director" form="verb-short">ed. by</term><term name="illustrator" form="verb-short">illus. by</term><term name="translator" form="verb-short">trans. by</term><term name="editortranslator" form="verb-short">ed. & trans. by</term><!-- LONG MONTH FORMS --><term name="month-01">January</term><term name="month-02">February</term><term name="month-03">March</term><term name="month-04">April</term><term name="month-05">May</term><term name="month-06">June</term><term name="month-07">July</term><term name="month-08">August</term><term name="month-09">September</term><term name="month-10">October</term><term name="month-11">November</term><term name="month-12">December</term><!-- SHORT MONTH FORMS --><term name="month-01" form="short">Jan.</term><term name="month-02" form="short">Feb.</term><term name="month-03" form="short">Mar.</term><term name="month-04" form="short">Apr.</term><term name="month-05" form="short">May</term><term name="month-06" form="short">Jun.</term><term name="month-07" form="short">Jul.</term><term name="month-08" form="short">Aug.</term><term name="month-09" form="short">Sep.</term><term name="month-10" form="short">Oct.</term><term name="month-11" form="short">Nov.</term><term name="month-12" form="short">Dec.</term><!-- SEASONS --><term name="season-01">Spring</term><term name="season-02">Summer</term><term name="season-03">Autumn</term><term name="season-04">Winter</term></terms></locale>';
|
|
@@ -56,10 +56,14 @@ const buildTargets = (fragment, manuscript) => {
|
|
|
56
56
|
const targets = new Map();
|
|
57
57
|
const figures = [];
|
|
58
58
|
fragment.forEach((node) => {
|
|
59
|
-
if (node.
|
|
60
|
-
node.forEach((
|
|
61
|
-
if (
|
|
62
|
-
|
|
59
|
+
if (node.attrs.category === 'MPSectionCategory:abstracts') {
|
|
60
|
+
node.forEach((child) => {
|
|
61
|
+
if (child.type === node.type.schema.nodes.graphical_abstract_section) {
|
|
62
|
+
child.forEach((item) => {
|
|
63
|
+
if (item.type === node.type.schema.nodes.figure_element) {
|
|
64
|
+
figures.push(item.attrs.id);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
63
67
|
}
|
|
64
68
|
});
|
|
65
69
|
}
|
|
@@ -15,8 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { ObjectTypes, } from '@manuscripts/json-schema';
|
|
17
17
|
import debug from 'debug';
|
|
18
|
-
import { DOMParser, DOMSerializer } from 'prosemirror-model';
|
|
18
|
+
import { DOMParser, DOMSerializer, } from 'prosemirror-model';
|
|
19
19
|
import serializeToXML from 'w3c-xmlserializer';
|
|
20
|
+
import { CitationProvider } from '../lib/citationProvider';
|
|
20
21
|
import { nodeFromHTML, textFromHTML } from '../lib/html';
|
|
21
22
|
import { normalizeStyleName } from '../lib/styled-content';
|
|
22
23
|
import { iterateChildren } from '../lib/utils';
|
|
@@ -111,9 +112,16 @@ const sortContributors = (a, b) => Number(a.priority) - Number(b.priority);
|
|
|
111
112
|
export class JATSExporter {
|
|
112
113
|
constructor() {
|
|
113
114
|
this.serializeToJATS = async (fragment, modelMap, manuscriptID, options = {}) => {
|
|
114
|
-
const { version = '1.2', doi, id, frontMatterOnly = false, links, idGenerator, mediaPathGenerator, } = options;
|
|
115
|
+
const { version = '1.2', doi, id, frontMatterOnly = false, links, idGenerator, mediaPathGenerator, citationStyle, locale, } = options;
|
|
115
116
|
this.modelMap = modelMap;
|
|
116
117
|
this.models = Array.from(this.modelMap.values());
|
|
118
|
+
if (citationStyle) {
|
|
119
|
+
this.citeProcEngine = CitationProvider.getEngine({
|
|
120
|
+
bibliographyItemsMap: this.getBibliographyItemsMap(),
|
|
121
|
+
citationStyle: citationStyle,
|
|
122
|
+
locale: locale,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
117
125
|
this.createSerializer();
|
|
118
126
|
const versionIds = selectVersionIds(version);
|
|
119
127
|
this.document = document.implementation.createDocument(null, 'article', document.implementation.createDocumentType('article', versionIds.publicId, versionIds.systemId));
|
|
@@ -636,7 +644,10 @@ export class JATSExporter {
|
|
|
636
644
|
const xref = this.document.createElement('xref');
|
|
637
645
|
xref.setAttribute('ref-type', 'bibr');
|
|
638
646
|
xref.setAttribute('rid', rids.map((item) => normalizeID(item.bibliographyItem)).join(' '));
|
|
639
|
-
if (
|
|
647
|
+
if (this.citeProcEngine) {
|
|
648
|
+
xref.textContent = this.generateCitationContent(node);
|
|
649
|
+
}
|
|
650
|
+
else if (node.attrs.contents) {
|
|
640
651
|
const text = textFromHTML(node.attrs.contents);
|
|
641
652
|
if (text !== null && text.length) {
|
|
642
653
|
xref.textContent = text;
|
|
@@ -1566,6 +1577,25 @@ export class JATSExporter {
|
|
|
1566
1577
|
return name;
|
|
1567
1578
|
};
|
|
1568
1579
|
}
|
|
1580
|
+
getBibliographyItemsMap() {
|
|
1581
|
+
const map = new Map();
|
|
1582
|
+
this.modelMap.forEach((model) => {
|
|
1583
|
+
if (model.objectType === ObjectTypes.BibliographyItem) {
|
|
1584
|
+
map.set(model._id, model);
|
|
1585
|
+
}
|
|
1586
|
+
});
|
|
1587
|
+
return map;
|
|
1588
|
+
}
|
|
1589
|
+
generateCitationContent(node) {
|
|
1590
|
+
var _a;
|
|
1591
|
+
const citationItems = (_a = node.attrs.embeddedCitationItems) === null || _a === void 0 ? void 0 : _a.map(({ bibliographyItem }) => ({
|
|
1592
|
+
id: bibliographyItem,
|
|
1593
|
+
}));
|
|
1594
|
+
return this.citeProcEngine.previewCitationCluster({
|
|
1595
|
+
citationID: node.attrs.rid,
|
|
1596
|
+
citationItems: citationItems,
|
|
1597
|
+
}, [], [], 'text');
|
|
1598
|
+
}
|
|
1569
1599
|
buildKeywords(articleMeta) {
|
|
1570
1600
|
const keywords = [...this.modelMap.values()].filter((model) => model.objectType === ObjectTypes.Keyword);
|
|
1571
1601
|
const keywordGroups = new Map();
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2023 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 CiteProc from 'citeproc';
|
|
17
|
+
import defaultLocale from './defaultLocale';
|
|
18
|
+
export class CitationProvider {
|
|
19
|
+
constructor() {
|
|
20
|
+
}
|
|
21
|
+
static getEngine(props) {
|
|
22
|
+
if (!CitationProvider.engine) {
|
|
23
|
+
CitationProvider.engine = CitationProvider.createCiteProcEngine(props);
|
|
24
|
+
}
|
|
25
|
+
return CitationProvider.engine;
|
|
26
|
+
}
|
|
27
|
+
static createCiteProcEngine(props) {
|
|
28
|
+
const { bibliographyItemsMap, citationStyle, locale } = props;
|
|
29
|
+
return new CiteProc.Engine({
|
|
30
|
+
retrieveItem: (id) => this.retrieveBibliographyItem(id, bibliographyItemsMap),
|
|
31
|
+
retrieveLocale: () => locale || defaultLocale,
|
|
32
|
+
}, citationStyle, 'en-US', false);
|
|
33
|
+
}
|
|
34
|
+
static retrieveBibliographyItem(id, map) {
|
|
35
|
+
const item = map.get(id);
|
|
36
|
+
return Object.assign(Object.assign({}, item), { id, type: (item === null || item === void 0 ? void 0 : item.type) || 'article-journal' });
|
|
37
|
+
}
|
|
38
|
+
static recreateEngine(props) {
|
|
39
|
+
CitationProvider.engine = CitationProvider.createCiteProcEngine(props);
|
|
40
|
+
return CitationProvider.engine;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
CitationProvider.engine = null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default '<?xml version="1.0" encoding="utf-8"?><locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0" xml:lang="en-US"><info><translator><name>Andrew Dunning</name></translator><translator><name>Sebastian Karcher</name></translator><translator><name>Rintze M. Zelle</name></translator><translator><name>Denis Meier</name></translator><translator><name>Brenton M. Wiernik</name></translator><rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights><updated>2015-10-10T23:31:02+00:00</updated></info><style-options punctuation-in-quote="true"/><date form="text"><date-part name="month" suffix=" "/><date-part name="day" suffix=", "/><date-part name="year"/></date><date form="numeric"><date-part name="month" form="numeric-leading-zeros" suffix="/"/><date-part name="day" form="numeric-leading-zeros" suffix="/"/><date-part name="year"/></date><terms><term name="advance-online-publication">advance online publication</term><term name="album">album</term><term name="audio-recording">audio recording</term><term name="film">film</term><term name="henceforth">henceforth</term><term name="loc-cit">loc. cit.</term><!-- like ibid., the abbreviated form is the regular form --><term name="no-place">no place</term><term name="no-place" form="short">n.p.</term><term name="no-publisher">no publisher</term><!-- sine nomine --><term name="no-publisher" form="short">n.p.</term><term name="on">on</term><term name="op-cit">op. cit.</term><!-- like ibid., the abbreviated form is the regular form --><term name="original-work-published">original work published</term><term name="personal-communication">personal communication</term><term name="podcast">podcast</term><term name="podcast-episode">podcast episode</term><term name="preprint">preprint</term><term name="radio-broadcast">radio broadcast</term><term name="radio-series">radio series</term><term name="radio-series-episode">radio series episode</term><term name="special-issue">special issue</term><term name="special-section">special section</term><term name="television-broadcast">television broadcast</term><term name="television-series">television series</term><term name="television-series-episode">television series episode</term><term name="video">video</term><term name="working-paper">working paper</term><term name="accessed">accessed</term><term name="and">and</term><term name="and others">and others</term><term name="anonymous">anonymous</term><term name="anonymous" form="short">anon.</term><term name="at">at</term><term name="available at">available at</term><term name="by">by</term><term name="circa">circa</term><term name="circa" form="short">c.</term><term name="cited">cited</term><term name="edition"><single>edition</single><multiple>editions</multiple></term><term name="edition" form="short">ed.</term><term name="et-al">et al.</term><term name="forthcoming">forthcoming</term><term name="from">from</term><term name="ibid">ibid.</term><term name="in">in</term><term name="in press">in press</term><term name="internet">internet</term><term name="letter">letter</term><term name="no date">no date</term><term name="no date" form="short">n.d.</term><term name="online">online</term><term name="presented at">presented at the</term><term name="reference"><single>reference</single><multiple>references</multiple></term><term name="reference" form="short"><single>ref.</single><multiple>refs.</multiple></term><term name="retrieved">retrieved</term><term name="scale">scale</term><term name="version">version</term><!-- LONG ITEM TYPE FORMS --><term name="article">preprint</term><term name="article-journal">journal article</term><term name="article-magazine">magazine article</term><term name="article-newspaper">newspaper article</term><term name="bill">bill</term><!-- book is in the list of locator terms --><term name="broadcast">broadcast</term><!-- chapter is in the list of locator terms --><term name="classic">classic</term><term name="collection">collection</term><term name="dataset">dataset</term><term name="document">document</term><term name="entry">entry</term><term name="entry-dictionary">dictionary entry</term><term name="entry-encyclopedia">encyclopedia entry</term><term name="event">event</term><!-- figure is in the list of locator terms --><term name="graphic">graphic</term><term name="hearing">hearing</term><term name="interview">interview</term><term name="legal_case">legal case</term><term name="legislation">legislation</term><term name="manuscript">manuscript</term><term name="map">map</term><term name="motion_picture">video recording</term><term name="musical_score">musical score</term><term name="pamphlet">pamphlet</term><term name="paper-conference">conference paper</term><term name="patent">patent</term><term name="performance">performance</term><term name="periodical">periodical</term><term name="personal_communication">personal communication</term><term name="post">post</term><term name="post-weblog">blog post</term><term name="regulation">regulation</term><term name="report">report</term><term name="review">review</term><term name="review-book">book review</term><term name="software">software</term><term name="song">audio recording</term><term name="speech">presentation</term><term name="standard">standard</term><term name="thesis">thesis</term><term name="treaty">treaty</term><term name="webpage">webpage</term><!-- SHORT ITEM TYPE FORMS --><term name="article-journal" form="short">journal art.</term><term name="article-magazine" form="short">mag. art.</term><term name="article-newspaper" form="short">newspaper art.</term><!-- book is in the list of locator terms --><!-- chapter is in the list of locator terms --><term name="document" form="short">doc.</term><!-- figure is in the list of locator terms --><term name="graphic" form="short">graph.</term><term name="interview" form="short">interv.</term><term name="manuscript" form="short">MS</term><term name="motion_picture" form="short">video rec.</term><term name="report" form="short">rep.</term><term name="review" form="short">rev.</term><term name="review-book" form="short">bk. rev.</term><term name="song" form="short">audio rec.</term><!-- HISTORICAL ERA TERMS --><term name="ad">AD</term><term name="bc">BC</term><term name="bce">BCE</term><term name="ce">CE</term><!-- PUNCTUATION --><term name="open-quote">“</term><term name="close-quote">”</term><term name="open-inner-quote">‘</term><term name="close-inner-quote">’</term><term name="page-range-delimiter">–</term><term name="colon">:</term><term name="comma">,</term><term name="semicolon">;</term><!-- ORDINALS --><term name="ordinal">th</term><term name="ordinal-01">st</term><term name="ordinal-02">nd</term><term name="ordinal-03">rd</term><term name="ordinal-11">th</term><term name="ordinal-12">th</term><term name="ordinal-13">th</term><!-- LONG ORDINALS --><term name="long-ordinal-01">first</term><term name="long-ordinal-02">second</term><term name="long-ordinal-03">third</term><term name="long-ordinal-04">fourth</term><term name="long-ordinal-05">fifth</term><term name="long-ordinal-06">sixth</term><term name="long-ordinal-07">seventh</term><term name="long-ordinal-08">eighth</term><term name="long-ordinal-09">ninth</term><term name="long-ordinal-10">tenth</term><!-- LONG LOCATOR FORMS --><term name="act"><single>act</single><multiple>acts</multiple></term><term name="appendix"><single>appendix</single><multiple>appendices</multiple></term><term name="article-locator"><single>article</single><multiple>articles</multiple></term><term name="canon"><single>canon</single><multiple>canons</multiple></term><term name="elocation"><single>location</single><multiple>locations</multiple></term><term name="equation"><single>equation</single><multiple>equations</multiple></term><term name="rule"><single>rule</single><multiple>rules</multiple></term><term name="scene"><single>scene</single><multiple>scenes</multiple></term><term name="table"><single>table</single><multiple>tables</multiple></term><term name="timestamp"><!-- generally blank --><single></single><multiple></multiple></term><term name="title-locator"><single>title</single><multiple>titles</multiple></term><term name="book"><single>book</single><multiple>books</multiple></term><term name="chapter"><single>chapter</single><multiple>chapters</multiple></term><term name="column"><single>column</single><multiple>columns</multiple></term><term name="figure"><single>figure</single><multiple>figures</multiple></term><term name="folio"><single>folio</single><multiple>folios</multiple></term><term name="issue"><single>number</single><multiple>numbers</multiple></term><term name="line"><single>line</single><multiple>lines</multiple></term><term name="note"><single>note</single><multiple>notes</multiple></term><term name="opus"><single>opus</single><multiple>opera</multiple></term><term name="page"><single>page</single><multiple>pages</multiple></term><term name="number-of-pages"><single>page</single><multiple>pages</multiple></term><term name="paragraph"><single>paragraph</single><multiple>paragraphs</multiple></term><term name="part"><single>part</single><multiple>parts</multiple></term><term name="section"><single>section</single><multiple>sections</multiple></term><term name="sub-verbo"><single>sub verbo</single><multiple>sub verbis</multiple></term><term name="verse"><single>verse</single><multiple>verses</multiple></term><term name="volume"><single>volume</single><multiple>volumes</multiple></term><!-- SHORT LOCATOR FORMS --><term name="appendix" form="short"><single>app.</single><multiple>apps.</multiple></term><term name="article-locator" form="short"><single>art.</single><multiple>arts.</multiple></term><term name="elocation" form="short"><single>loc.</single><multiple>locs.</multiple></term><term name="equation" form="short"><single>eq.</single><multiple>eqs.</multiple></term><term name="rule" form="short"><single>r.</single><multiple>rr.</multiple></term><term name="scene" form="short"><single>sc.</single><multiple>scs.</multiple></term><term name="table" form="short"><single>tbl.</single><multiple>tbls.</multiple></term><term name="timestamp" form="short"><!-- generally blank --><single></single><multiple></multiple></term><term name="title-locator" form="short"><single>tit.</single><multiple>tits.</multiple></term><term name="book" form="short"><single>bk.</single><multiple>bks.</multiple></term><term name="chapter" form="short"><single>chap.</single><multiple>chaps.</multiple></term><term name="column" form="short"><single>col.</single><multiple>cols.</multiple></term><term name="figure" form="short"><single>fig.</single><multiple>figs.</multiple></term><term name="folio" form="short"><single>fol.</single><multiple>fols.</multiple></term><term name="issue" form="short"><single>no.</single><multiple>nos.</multiple></term><term name="line" form="short"><single>l.</single><multiple>ll.</multiple></term><term name="note" form="short"><single>n.</single><multiple>nn.</multiple></term><term name="opus" form="short"><single>op.</single><multiple>opp.</multiple></term><term name="page" form="short"><single>p.</single><multiple>pp.</multiple></term><term name="number-of-pages" form="short"><single>p.</single><multiple>pp.</multiple></term><term name="paragraph" form="short"><single>para.</single><multiple>paras.</multiple></term><term name="part" form="short"><single>pt.</single><multiple>pts.</multiple></term><term name="section" form="short"><single>sec.</single><multiple>secs.</multiple></term><term name="sub-verbo" form="short"><single>s.v.</single><multiple>s.vv.</multiple></term><term name="verse" form="short"><single>v.</single><multiple>vv.</multiple></term><term name="volume" form="short"><single>vol.</single><multiple>vols.</multiple></term><!-- SYMBOL LOCATOR FORMS --><term name="paragraph" form="symbol"><single>¶</single><multiple>¶¶</multiple></term><term name="section" form="symbol"><single>§</single><multiple>§§</multiple></term><!-- LONG ROLE FORMS --><term name="chair"><single>chair</single><multiple>chairs</multiple></term><term name="compiler"><single>compiler</single><multiple>compilers</multiple></term><term name="contributor"><single>contributor</single><multiple>contributors</multiple></term><term name="curator"><single>curator</single><multiple>curators</multiple></term><term name="executive-producer"><single>executive producer</single><multiple>executive producers</multiple></term><term name="guest"><single>guest</single><multiple>guests</multiple></term><term name="host"><single>host</single><multiple>hosts</multiple></term><term name="narrator"><single>narrator</single><multiple>narrators</multiple></term><term name="organizer"><single>organizer</single><multiple>organizers</multiple></term><term name="performer"><single>performer</single><multiple>performers</multiple></term><term name="producer"><single>producer</single><multiple>producers</multiple></term><term name="script-writer"><single>writer</single><multiple>writers</multiple></term><term name="series-creator"><single>series creator</single><multiple>series creators</multiple></term><term name="director"><single>director</single><multiple>directors</multiple></term><term name="editor"><single>editor</single><multiple>editors</multiple></term><term name="editorial-director"><single>editor</single><multiple>editors</multiple></term><term name="illustrator"><single>illustrator</single><multiple>illustrators</multiple></term><term name="translator"><single>translator</single><multiple>translators</multiple></term><term name="editortranslator"><single>editor & translator</single><multiple>editors & translators</multiple></term><!-- SHORT ROLE FORMS --><term name="compiler" form="short"><single>comp.</single><multiple>comps.</multiple></term><term name="contributor" form="short"><single>contrib.</single><multiple>contribs.</multiple></term><term name="curator" form="short"><single>cur.</single><multiple>curs.</multiple></term><term name="executive-producer" form="short"><single>exec. prod.</single><multiple>exec. prods.</multiple></term><term name="narrator" form="short"><single>narr.</single><multiple>narrs.</multiple></term><term name="organizer" form="short"><single>org.</single><multiple>orgs.</multiple></term><term name="performer" form="short"><single>perf.</single><multiple>perfs.</multiple></term><term name="producer" form="short"><single>prod.</single><multiple>prods.</multiple></term><term name="script-writer" form="short"><single>writ.</single><multiple>writs.</multiple></term><term name="series-creator" form="short"><single>cre.</single><multiple>cres.</multiple></term><term name="director" form="short"><single>dir.</single><multiple>dirs.</multiple></term><term name="editor" form="short"><single>ed.</single><multiple>eds.</multiple></term><term name="editorial-director" form="short"><single>ed.</single><multiple>eds.</multiple></term><term name="illustrator" form="short"><single>ill.</single><multiple>ills.</multiple></term><term name="translator" form="short"><single>tran.</single><multiple>trans.</multiple></term><term name="editortranslator" form="short"><single>ed. & tran.</single><multiple>eds. & trans.</multiple></term><!-- VERB ROLE FORMS --><term name="chair" form="verb">chaired by</term><term name="compiler" form="verb">compiled by</term><term name="contributor" form="verb">with</term><term name="curator" form="verb">curated by</term><term name="executive-producer" form="verb">executive produced by</term><term name="guest" form="verb">with guest</term><term name="host" form="verb">hosted by</term><term name="narrator" form="verb">narrated by</term><term name="organizer" form="verb">organized by</term><term name="performer" form="verb">performed by</term><term name="producer" form="verb">produced by</term><term name="script-writer" form="verb">written by</term><term name="series-creator" form="verb">created by</term><term name="container-author" form="verb">by</term><term name="director" form="verb">directed by</term><term name="editor" form="verb">edited by</term><term name="editorial-director" form="verb">edited by</term><term name="illustrator" form="verb">illustrated by</term><term name="interviewer" form="verb">interview by</term><term name="recipient" form="verb">to</term><term name="reviewed-author" form="verb">by</term><term name="translator" form="verb">translated by</term><term name="editortranslator" form="verb">edited & translated by</term><!-- SHORT VERB ROLE FORMS --><term name="compiler" form="verb-short">comp. by</term><term name="contributor" form="verb-short">w.</term><term name="curator" form="verb-short">cur. by</term><term name="executive-producer" form="verb-short">exec. prod. by</term><term name="guest" form="verb-short">w. guest</term><term name="host" form="verb-short">hosted by</term><term name="narrator" form="verb-short">narr. by</term><term name="organizer" form="verb-short">org. by</term><term name="performer" form="verb-short">perf. by</term><term name="producer" form="verb-short">prod. by</term><term name="script-writer" form="verb-short">writ. by</term><term name="series-creator" form="verb-short">cre. by</term><term name="director" form="verb-short">dir. by</term><term name="editor" form="verb-short">ed. by</term><term name="editorial-director" form="verb-short">ed. by</term><term name="illustrator" form="verb-short">illus. by</term><term name="translator" form="verb-short">trans. by</term><term name="editortranslator" form="verb-short">ed. & trans. by</term><!-- LONG MONTH FORMS --><term name="month-01">January</term><term name="month-02">February</term><term name="month-03">March</term><term name="month-04">April</term><term name="month-05">May</term><term name="month-06">June</term><term name="month-07">July</term><term name="month-08">August</term><term name="month-09">September</term><term name="month-10">October</term><term name="month-11">November</term><term name="month-12">December</term><!-- SHORT MONTH FORMS --><term name="month-01" form="short">Jan.</term><term name="month-02" form="short">Feb.</term><term name="month-03" form="short">Mar.</term><term name="month-04" form="short">Apr.</term><term name="month-05" form="short">May</term><term name="month-06" form="short">Jun.</term><term name="month-07" form="short">Jul.</term><term name="month-08" form="short">Aug.</term><term name="month-09" form="short">Sep.</term><term name="month-10" form="short">Oct.</term><term name="month-11" form="short">Nov.</term><term name="month-12" form="short">Dec.</term><!-- SEASONS --><term name="season-01">Spring</term><term name="season-02">Summer</term><term name="season-03">Autumn</term><term name="season-04">Winter</term></terms></locale>';
|
|
@@ -53,10 +53,14 @@ export const buildTargets = (fragment, manuscript) => {
|
|
|
53
53
|
const targets = new Map();
|
|
54
54
|
const figures = [];
|
|
55
55
|
fragment.forEach((node) => {
|
|
56
|
-
if (node.
|
|
57
|
-
node.forEach((
|
|
58
|
-
if (
|
|
59
|
-
|
|
56
|
+
if (node.attrs.category === 'MPSectionCategory:abstracts') {
|
|
57
|
+
node.forEach((child) => {
|
|
58
|
+
if (child.type === node.type.schema.nodes.graphical_abstract_section) {
|
|
59
|
+
child.forEach((item) => {
|
|
60
|
+
if (item.type === node.type.schema.nodes.figure_element) {
|
|
61
|
+
figures.push(item.attrs.id);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
60
64
|
}
|
|
61
65
|
});
|
|
62
66
|
}
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Model } from '@manuscripts/json-schema';
|
|
16
|
+
import { BibliographyItem, Model } from '@manuscripts/json-schema';
|
|
17
|
+
import CiteProc from 'citeproc';
|
|
17
18
|
import { DOMSerializer } from 'prosemirror-model';
|
|
18
19
|
import { ManuscriptFragment, ManuscriptNode } from '../schema';
|
|
19
20
|
import { Target } from '../transformer/labels';
|
|
@@ -36,13 +37,19 @@ export interface JATSExporterOptions {
|
|
|
36
37
|
citationType?: 'element' | 'mixed';
|
|
37
38
|
idGenerator?: IDGenerator;
|
|
38
39
|
mediaPathGenerator?: MediaPathGenerator;
|
|
40
|
+
citationStyle?: string;
|
|
41
|
+
locale?: string;
|
|
39
42
|
}
|
|
40
43
|
export declare class JATSExporter {
|
|
41
44
|
protected document: Document;
|
|
45
|
+
protected citeProcEngine: CiteProc.Engine;
|
|
42
46
|
protected modelMap: Map<string, Model>;
|
|
47
|
+
protected bibliographyItemsMap: Map<string, BibliographyItem>;
|
|
43
48
|
protected models: Model[];
|
|
44
49
|
protected serializer: DOMSerializer;
|
|
45
50
|
protected labelTargets?: Map<string, Target>;
|
|
51
|
+
private getBibliographyItemsMap;
|
|
52
|
+
private generateCitationContent;
|
|
46
53
|
serializeToJATS: (fragment: ManuscriptFragment, modelMap: Map<string, Model>, manuscriptID: string, options?: JATSExporterOptions) => Promise<string>;
|
|
47
54
|
private nodeFromJATS;
|
|
48
55
|
protected rewriteCrossReferenceTypes: () => void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2023 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 { BibliographyItem } from '@manuscripts/json-schema';
|
|
17
|
+
import CiteProc from 'citeproc';
|
|
18
|
+
interface Props {
|
|
19
|
+
bibliographyItemsMap: Map<string, BibliographyItem>;
|
|
20
|
+
citationStyle: string;
|
|
21
|
+
locale?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare class CitationProvider {
|
|
24
|
+
private static engine;
|
|
25
|
+
private constructor();
|
|
26
|
+
static getEngine(props: Props): CiteProc.Engine;
|
|
27
|
+
static createCiteProcEngine(props: Props): CiteProc.Engine;
|
|
28
|
+
private static retrieveBibliographyItem;
|
|
29
|
+
static recreateEngine(props: Props): CiteProc.Engine;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "<?xml version=\"1.0\" encoding=\"utf-8\"?><locale xmlns=\"http://purl.org/net/xbiblio/csl\" version=\"1.0\" xml:lang=\"en-US\"><info><translator><name>Andrew Dunning</name></translator><translator><name>Sebastian Karcher</name></translator><translator><name>Rintze M. Zelle</name></translator><translator><name>Denis Meier</name></translator><translator><name>Brenton M. Wiernik</name></translator><rights license=\"http://creativecommons.org/licenses/by-sa/3.0/\">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights><updated>2015-10-10T23:31:02+00:00</updated></info><style-options punctuation-in-quote=\"true\"/><date form=\"text\"><date-part name=\"month\" suffix=\" \"/><date-part name=\"day\" suffix=\", \"/><date-part name=\"year\"/></date><date form=\"numeric\"><date-part name=\"month\" form=\"numeric-leading-zeros\" suffix=\"/\"/><date-part name=\"day\" form=\"numeric-leading-zeros\" suffix=\"/\"/><date-part name=\"year\"/></date><terms><term name=\"advance-online-publication\">advance online publication</term><term name=\"album\">album</term><term name=\"audio-recording\">audio recording</term><term name=\"film\">film</term><term name=\"henceforth\">henceforth</term><term name=\"loc-cit\">loc. cit.</term><!-- like ibid., the abbreviated form is the regular form --><term name=\"no-place\">no place</term><term name=\"no-place\" form=\"short\">n.p.</term><term name=\"no-publisher\">no publisher</term><!-- sine nomine --><term name=\"no-publisher\" form=\"short\">n.p.</term><term name=\"on\">on</term><term name=\"op-cit\">op. cit.</term><!-- like ibid., the abbreviated form is the regular form --><term name=\"original-work-published\">original work published</term><term name=\"personal-communication\">personal communication</term><term name=\"podcast\">podcast</term><term name=\"podcast-episode\">podcast episode</term><term name=\"preprint\">preprint</term><term name=\"radio-broadcast\">radio broadcast</term><term name=\"radio-series\">radio series</term><term name=\"radio-series-episode\">radio series episode</term><term name=\"special-issue\">special issue</term><term name=\"special-section\">special section</term><term name=\"television-broadcast\">television broadcast</term><term name=\"television-series\">television series</term><term name=\"television-series-episode\">television series episode</term><term name=\"video\">video</term><term name=\"working-paper\">working paper</term><term name=\"accessed\">accessed</term><term name=\"and\">and</term><term name=\"and others\">and others</term><term name=\"anonymous\">anonymous</term><term name=\"anonymous\" form=\"short\">anon.</term><term name=\"at\">at</term><term name=\"available at\">available at</term><term name=\"by\">by</term><term name=\"circa\">circa</term><term name=\"circa\" form=\"short\">c.</term><term name=\"cited\">cited</term><term name=\"edition\"><single>edition</single><multiple>editions</multiple></term><term name=\"edition\" form=\"short\">ed.</term><term name=\"et-al\">et al.</term><term name=\"forthcoming\">forthcoming</term><term name=\"from\">from</term><term name=\"ibid\">ibid.</term><term name=\"in\">in</term><term name=\"in press\">in press</term><term name=\"internet\">internet</term><term name=\"letter\">letter</term><term name=\"no date\">no date</term><term name=\"no date\" form=\"short\">n.d.</term><term name=\"online\">online</term><term name=\"presented at\">presented at the</term><term name=\"reference\"><single>reference</single><multiple>references</multiple></term><term name=\"reference\" form=\"short\"><single>ref.</single><multiple>refs.</multiple></term><term name=\"retrieved\">retrieved</term><term name=\"scale\">scale</term><term name=\"version\">version</term><!-- LONG ITEM TYPE FORMS --><term name=\"article\">preprint</term><term name=\"article-journal\">journal article</term><term name=\"article-magazine\">magazine article</term><term name=\"article-newspaper\">newspaper article</term><term name=\"bill\">bill</term><!-- book is in the list of locator terms --><term name=\"broadcast\">broadcast</term><!-- chapter is in the list of locator terms --><term name=\"classic\">classic</term><term name=\"collection\">collection</term><term name=\"dataset\">dataset</term><term name=\"document\">document</term><term name=\"entry\">entry</term><term name=\"entry-dictionary\">dictionary entry</term><term name=\"entry-encyclopedia\">encyclopedia entry</term><term name=\"event\">event</term><!-- figure is in the list of locator terms --><term name=\"graphic\">graphic</term><term name=\"hearing\">hearing</term><term name=\"interview\">interview</term><term name=\"legal_case\">legal case</term><term name=\"legislation\">legislation</term><term name=\"manuscript\">manuscript</term><term name=\"map\">map</term><term name=\"motion_picture\">video recording</term><term name=\"musical_score\">musical score</term><term name=\"pamphlet\">pamphlet</term><term name=\"paper-conference\">conference paper</term><term name=\"patent\">patent</term><term name=\"performance\">performance</term><term name=\"periodical\">periodical</term><term name=\"personal_communication\">personal communication</term><term name=\"post\">post</term><term name=\"post-weblog\">blog post</term><term name=\"regulation\">regulation</term><term name=\"report\">report</term><term name=\"review\">review</term><term name=\"review-book\">book review</term><term name=\"software\">software</term><term name=\"song\">audio recording</term><term name=\"speech\">presentation</term><term name=\"standard\">standard</term><term name=\"thesis\">thesis</term><term name=\"treaty\">treaty</term><term name=\"webpage\">webpage</term><!-- SHORT ITEM TYPE FORMS --><term name=\"article-journal\" form=\"short\">journal art.</term><term name=\"article-magazine\" form=\"short\">mag. art.</term><term name=\"article-newspaper\" form=\"short\">newspaper art.</term><!-- book is in the list of locator terms --><!-- chapter is in the list of locator terms --><term name=\"document\" form=\"short\">doc.</term><!-- figure is in the list of locator terms --><term name=\"graphic\" form=\"short\">graph.</term><term name=\"interview\" form=\"short\">interv.</term><term name=\"manuscript\" form=\"short\">MS</term><term name=\"motion_picture\" form=\"short\">video rec.</term><term name=\"report\" form=\"short\">rep.</term><term name=\"review\" form=\"short\">rev.</term><term name=\"review-book\" form=\"short\">bk. rev.</term><term name=\"song\" form=\"short\">audio rec.</term><!-- HISTORICAL ERA TERMS --><term name=\"ad\">AD</term><term name=\"bc\">BC</term><term name=\"bce\">BCE</term><term name=\"ce\">CE</term><!-- PUNCTUATION --><term name=\"open-quote\">“</term><term name=\"close-quote\">”</term><term name=\"open-inner-quote\">‘</term><term name=\"close-inner-quote\">’</term><term name=\"page-range-delimiter\">–</term><term name=\"colon\">:</term><term name=\"comma\">,</term><term name=\"semicolon\">;</term><!-- ORDINALS --><term name=\"ordinal\">th</term><term name=\"ordinal-01\">st</term><term name=\"ordinal-02\">nd</term><term name=\"ordinal-03\">rd</term><term name=\"ordinal-11\">th</term><term name=\"ordinal-12\">th</term><term name=\"ordinal-13\">th</term><!-- LONG ORDINALS --><term name=\"long-ordinal-01\">first</term><term name=\"long-ordinal-02\">second</term><term name=\"long-ordinal-03\">third</term><term name=\"long-ordinal-04\">fourth</term><term name=\"long-ordinal-05\">fifth</term><term name=\"long-ordinal-06\">sixth</term><term name=\"long-ordinal-07\">seventh</term><term name=\"long-ordinal-08\">eighth</term><term name=\"long-ordinal-09\">ninth</term><term name=\"long-ordinal-10\">tenth</term><!-- LONG LOCATOR FORMS --><term name=\"act\"><single>act</single><multiple>acts</multiple></term><term name=\"appendix\"><single>appendix</single><multiple>appendices</multiple></term><term name=\"article-locator\"><single>article</single><multiple>articles</multiple></term><term name=\"canon\"><single>canon</single><multiple>canons</multiple></term><term name=\"elocation\"><single>location</single><multiple>locations</multiple></term><term name=\"equation\"><single>equation</single><multiple>equations</multiple></term><term name=\"rule\"><single>rule</single><multiple>rules</multiple></term><term name=\"scene\"><single>scene</single><multiple>scenes</multiple></term><term name=\"table\"><single>table</single><multiple>tables</multiple></term><term name=\"timestamp\"><!-- generally blank --><single></single><multiple></multiple></term><term name=\"title-locator\"><single>title</single><multiple>titles</multiple></term><term name=\"book\"><single>book</single><multiple>books</multiple></term><term name=\"chapter\"><single>chapter</single><multiple>chapters</multiple></term><term name=\"column\"><single>column</single><multiple>columns</multiple></term><term name=\"figure\"><single>figure</single><multiple>figures</multiple></term><term name=\"folio\"><single>folio</single><multiple>folios</multiple></term><term name=\"issue\"><single>number</single><multiple>numbers</multiple></term><term name=\"line\"><single>line</single><multiple>lines</multiple></term><term name=\"note\"><single>note</single><multiple>notes</multiple></term><term name=\"opus\"><single>opus</single><multiple>opera</multiple></term><term name=\"page\"><single>page</single><multiple>pages</multiple></term><term name=\"number-of-pages\"><single>page</single><multiple>pages</multiple></term><term name=\"paragraph\"><single>paragraph</single><multiple>paragraphs</multiple></term><term name=\"part\"><single>part</single><multiple>parts</multiple></term><term name=\"section\"><single>section</single><multiple>sections</multiple></term><term name=\"sub-verbo\"><single>sub verbo</single><multiple>sub verbis</multiple></term><term name=\"verse\"><single>verse</single><multiple>verses</multiple></term><term name=\"volume\"><single>volume</single><multiple>volumes</multiple></term><!-- SHORT LOCATOR FORMS --><term name=\"appendix\" form=\"short\"><single>app.</single><multiple>apps.</multiple></term><term name=\"article-locator\" form=\"short\"><single>art.</single><multiple>arts.</multiple></term><term name=\"elocation\" form=\"short\"><single>loc.</single><multiple>locs.</multiple></term><term name=\"equation\" form=\"short\"><single>eq.</single><multiple>eqs.</multiple></term><term name=\"rule\" form=\"short\"><single>r.</single><multiple>rr.</multiple></term><term name=\"scene\" form=\"short\"><single>sc.</single><multiple>scs.</multiple></term><term name=\"table\" form=\"short\"><single>tbl.</single><multiple>tbls.</multiple></term><term name=\"timestamp\" form=\"short\"><!-- generally blank --><single></single><multiple></multiple></term><term name=\"title-locator\" form=\"short\"><single>tit.</single><multiple>tits.</multiple></term><term name=\"book\" form=\"short\"><single>bk.</single><multiple>bks.</multiple></term><term name=\"chapter\" form=\"short\"><single>chap.</single><multiple>chaps.</multiple></term><term name=\"column\" form=\"short\"><single>col.</single><multiple>cols.</multiple></term><term name=\"figure\" form=\"short\"><single>fig.</single><multiple>figs.</multiple></term><term name=\"folio\" form=\"short\"><single>fol.</single><multiple>fols.</multiple></term><term name=\"issue\" form=\"short\"><single>no.</single><multiple>nos.</multiple></term><term name=\"line\" form=\"short\"><single>l.</single><multiple>ll.</multiple></term><term name=\"note\" form=\"short\"><single>n.</single><multiple>nn.</multiple></term><term name=\"opus\" form=\"short\"><single>op.</single><multiple>opp.</multiple></term><term name=\"page\" form=\"short\"><single>p.</single><multiple>pp.</multiple></term><term name=\"number-of-pages\" form=\"short\"><single>p.</single><multiple>pp.</multiple></term><term name=\"paragraph\" form=\"short\"><single>para.</single><multiple>paras.</multiple></term><term name=\"part\" form=\"short\"><single>pt.</single><multiple>pts.</multiple></term><term name=\"section\" form=\"short\"><single>sec.</single><multiple>secs.</multiple></term><term name=\"sub-verbo\" form=\"short\"><single>s.v.</single><multiple>s.vv.</multiple></term><term name=\"verse\" form=\"short\"><single>v.</single><multiple>vv.</multiple></term><term name=\"volume\" form=\"short\"><single>vol.</single><multiple>vols.</multiple></term><!-- SYMBOL LOCATOR FORMS --><term name=\"paragraph\" form=\"symbol\"><single>¶</single><multiple>¶¶</multiple></term><term name=\"section\" form=\"symbol\"><single>§</single><multiple>§§</multiple></term><!-- LONG ROLE FORMS --><term name=\"chair\"><single>chair</single><multiple>chairs</multiple></term><term name=\"compiler\"><single>compiler</single><multiple>compilers</multiple></term><term name=\"contributor\"><single>contributor</single><multiple>contributors</multiple></term><term name=\"curator\"><single>curator</single><multiple>curators</multiple></term><term name=\"executive-producer\"><single>executive producer</single><multiple>executive producers</multiple></term><term name=\"guest\"><single>guest</single><multiple>guests</multiple></term><term name=\"host\"><single>host</single><multiple>hosts</multiple></term><term name=\"narrator\"><single>narrator</single><multiple>narrators</multiple></term><term name=\"organizer\"><single>organizer</single><multiple>organizers</multiple></term><term name=\"performer\"><single>performer</single><multiple>performers</multiple></term><term name=\"producer\"><single>producer</single><multiple>producers</multiple></term><term name=\"script-writer\"><single>writer</single><multiple>writers</multiple></term><term name=\"series-creator\"><single>series creator</single><multiple>series creators</multiple></term><term name=\"director\"><single>director</single><multiple>directors</multiple></term><term name=\"editor\"><single>editor</single><multiple>editors</multiple></term><term name=\"editorial-director\"><single>editor</single><multiple>editors</multiple></term><term name=\"illustrator\"><single>illustrator</single><multiple>illustrators</multiple></term><term name=\"translator\"><single>translator</single><multiple>translators</multiple></term><term name=\"editortranslator\"><single>editor & translator</single><multiple>editors & translators</multiple></term><!-- SHORT ROLE FORMS --><term name=\"compiler\" form=\"short\"><single>comp.</single><multiple>comps.</multiple></term><term name=\"contributor\" form=\"short\"><single>contrib.</single><multiple>contribs.</multiple></term><term name=\"curator\" form=\"short\"><single>cur.</single><multiple>curs.</multiple></term><term name=\"executive-producer\" form=\"short\"><single>exec. prod.</single><multiple>exec. prods.</multiple></term><term name=\"narrator\" form=\"short\"><single>narr.</single><multiple>narrs.</multiple></term><term name=\"organizer\" form=\"short\"><single>org.</single><multiple>orgs.</multiple></term><term name=\"performer\" form=\"short\"><single>perf.</single><multiple>perfs.</multiple></term><term name=\"producer\" form=\"short\"><single>prod.</single><multiple>prods.</multiple></term><term name=\"script-writer\" form=\"short\"><single>writ.</single><multiple>writs.</multiple></term><term name=\"series-creator\" form=\"short\"><single>cre.</single><multiple>cres.</multiple></term><term name=\"director\" form=\"short\"><single>dir.</single><multiple>dirs.</multiple></term><term name=\"editor\" form=\"short\"><single>ed.</single><multiple>eds.</multiple></term><term name=\"editorial-director\" form=\"short\"><single>ed.</single><multiple>eds.</multiple></term><term name=\"illustrator\" form=\"short\"><single>ill.</single><multiple>ills.</multiple></term><term name=\"translator\" form=\"short\"><single>tran.</single><multiple>trans.</multiple></term><term name=\"editortranslator\" form=\"short\"><single>ed. & tran.</single><multiple>eds. & trans.</multiple></term><!-- VERB ROLE FORMS --><term name=\"chair\" form=\"verb\">chaired by</term><term name=\"compiler\" form=\"verb\">compiled by</term><term name=\"contributor\" form=\"verb\">with</term><term name=\"curator\" form=\"verb\">curated by</term><term name=\"executive-producer\" form=\"verb\">executive produced by</term><term name=\"guest\" form=\"verb\">with guest</term><term name=\"host\" form=\"verb\">hosted by</term><term name=\"narrator\" form=\"verb\">narrated by</term><term name=\"organizer\" form=\"verb\">organized by</term><term name=\"performer\" form=\"verb\">performed by</term><term name=\"producer\" form=\"verb\">produced by</term><term name=\"script-writer\" form=\"verb\">written by</term><term name=\"series-creator\" form=\"verb\">created by</term><term name=\"container-author\" form=\"verb\">by</term><term name=\"director\" form=\"verb\">directed by</term><term name=\"editor\" form=\"verb\">edited by</term><term name=\"editorial-director\" form=\"verb\">edited by</term><term name=\"illustrator\" form=\"verb\">illustrated by</term><term name=\"interviewer\" form=\"verb\">interview by</term><term name=\"recipient\" form=\"verb\">to</term><term name=\"reviewed-author\" form=\"verb\">by</term><term name=\"translator\" form=\"verb\">translated by</term><term name=\"editortranslator\" form=\"verb\">edited & translated by</term><!-- SHORT VERB ROLE FORMS --><term name=\"compiler\" form=\"verb-short\">comp. by</term><term name=\"contributor\" form=\"verb-short\">w.</term><term name=\"curator\" form=\"verb-short\">cur. by</term><term name=\"executive-producer\" form=\"verb-short\">exec. prod. by</term><term name=\"guest\" form=\"verb-short\">w. guest</term><term name=\"host\" form=\"verb-short\">hosted by</term><term name=\"narrator\" form=\"verb-short\">narr. by</term><term name=\"organizer\" form=\"verb-short\">org. by</term><term name=\"performer\" form=\"verb-short\">perf. by</term><term name=\"producer\" form=\"verb-short\">prod. by</term><term name=\"script-writer\" form=\"verb-short\">writ. by</term><term name=\"series-creator\" form=\"verb-short\">cre. by</term><term name=\"director\" form=\"verb-short\">dir. by</term><term name=\"editor\" form=\"verb-short\">ed. by</term><term name=\"editorial-director\" form=\"verb-short\">ed. by</term><term name=\"illustrator\" form=\"verb-short\">illus. by</term><term name=\"translator\" form=\"verb-short\">trans. by</term><term name=\"editortranslator\" form=\"verb-short\">ed. & trans. by</term><!-- LONG MONTH FORMS --><term name=\"month-01\">January</term><term name=\"month-02\">February</term><term name=\"month-03\">March</term><term name=\"month-04\">April</term><term name=\"month-05\">May</term><term name=\"month-06\">June</term><term name=\"month-07\">July</term><term name=\"month-08\">August</term><term name=\"month-09\">September</term><term name=\"month-10\">October</term><term name=\"month-11\">November</term><term name=\"month-12\">December</term><!-- SHORT MONTH FORMS --><term name=\"month-01\" form=\"short\">Jan.</term><term name=\"month-02\" form=\"short\">Feb.</term><term name=\"month-03\" form=\"short\">Mar.</term><term name=\"month-04\" form=\"short\">Apr.</term><term name=\"month-05\" form=\"short\">May</term><term name=\"month-06\" form=\"short\">Jun.</term><term name=\"month-07\" form=\"short\">Jul.</term><term name=\"month-08\" form=\"short\">Aug.</term><term name=\"month-09\" form=\"short\">Sep.</term><term name=\"month-10\" form=\"short\">Oct.</term><term name=\"month-11\" form=\"short\">Nov.</term><term name=\"month-12\" form=\"short\">Dec.</term><!-- SEASONS --><term name=\"season-01\">Spring</term><term name=\"season-02\">Summer</term><term name=\"season-03\">Autumn</term><term name=\"season-04\">Winter</term></terms></locale>";
|
|
2
|
+
export default _default;
|
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.5.
|
|
4
|
+
"version": "1.5.2-LEAN-3034",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@manuscripts/json-schema": "^2.2.0",
|
|
33
|
+
"citeproc": "^2.4.63",
|
|
33
34
|
"debug": "^4.3.4",
|
|
34
35
|
"jszip": "^3.10.1",
|
|
35
36
|
"mathjax-full": "^3.2.2",
|
|
@@ -82,4 +83,4 @@
|
|
|
82
83
|
"prosemirror-state": "^1.4.2",
|
|
83
84
|
"prosemirror-view": "^1.29.1"
|
|
84
85
|
}
|
|
85
|
-
}
|
|
86
|
+
}
|