@manuscripts/transform 3.0.10-date-fix.0 → 3.0.11
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/index.js +1 -0
- package/dist/cjs/jats/exporter/jats-exporter.js +6 -8
- package/dist/cjs/jats/importer/jats-dom-parser.js +0 -1
- package/dist/cjs/lib/footnotes.js +63 -0
- package/dist/cjs/schema/nodes/general_table_footnote.js +3 -1
- package/dist/cjs/schema/nodes/inline_footnote.js +5 -5
- package/dist/cjs/schema/nodes/table_element.js +3 -1
- package/dist/cjs/schema/nodes/table_element_footer.js +3 -1
- package/dist/cjs/transformer/id.js +6 -4
- package/dist/cjs/version.js +1 -1
- package/dist/es/index.js +1 -0
- package/dist/es/jats/exporter/jats-exporter.js +6 -8
- package/dist/es/jats/importer/jats-dom-parser.js +0 -1
- package/dist/es/lib/footnotes.js +56 -0
- package/dist/es/schema/nodes/general_table_footnote.js +1 -0
- package/dist/es/schema/nodes/inline_footnote.js +5 -5
- package/dist/es/schema/nodes/table_element.js +1 -0
- package/dist/es/schema/nodes/table_element_footer.js +1 -0
- package/dist/es/transformer/id.js +6 -4
- package/dist/es/version.js +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/jats/exporter/jats-exporter.d.ts +1 -0
- package/dist/types/lib/footnotes.d.ts +5 -0
- package/dist/types/schema/nodes/general_table_footnote.d.ts +2 -1
- package/dist/types/schema/nodes/inline_footnote.d.ts +1 -1
- package/dist/types/schema/nodes/table_element.d.ts +1 -0
- package/dist/types/schema/nodes/table_element_footer.d.ts +1 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -22,6 +22,7 @@ __exportStar(require("./jats"), exports);
|
|
|
22
22
|
__exportStar(require("./jats/types"), exports);
|
|
23
23
|
__exportStar(require("./lib/section-group-type"), exports);
|
|
24
24
|
__exportStar(require("./lib/table-cell-styles"), exports);
|
|
25
|
+
__exportStar(require("./lib/footnotes"), exports);
|
|
25
26
|
__exportStar(require("./lib/utils"), exports);
|
|
26
27
|
__exportStar(require("./schema"), exports);
|
|
27
28
|
var migrate_1 = require("./schema/migration/migrate");
|
|
@@ -25,6 +25,7 @@ const debug_1 = __importDefault(require("debug"));
|
|
|
25
25
|
const prosemirror_model_1 = require("prosemirror-model");
|
|
26
26
|
const prosemirror_utils_1 = require("prosemirror-utils");
|
|
27
27
|
const w3c_xmlserializer_1 = __importDefault(require("w3c-xmlserializer"));
|
|
28
|
+
const footnotes_1 = require("../../lib/footnotes");
|
|
28
29
|
const html_1 = require("../../lib/html");
|
|
29
30
|
const schema_1 = require("../../schema");
|
|
30
31
|
const transformer_1 = require("../../transformer");
|
|
@@ -139,6 +140,7 @@ class JATSExporter {
|
|
|
139
140
|
article.appendChild(front);
|
|
140
141
|
article.setAttribute('article-type', manuscriptNode.attrs.articleType || 'other');
|
|
141
142
|
this.labelTargets = (0, labels_1.buildTargets)(manuscriptNode);
|
|
143
|
+
this.footnoteLabels = (0, footnotes_1.generateFootnoteLabels)(manuscriptNode);
|
|
142
144
|
const body = this.buildBody();
|
|
143
145
|
article.appendChild(body);
|
|
144
146
|
const back = this.buildBack(body);
|
|
@@ -701,17 +703,13 @@ class JATSExporter {
|
|
|
701
703
|
hard_break: () => '',
|
|
702
704
|
highlight_marker: () => '',
|
|
703
705
|
inline_footnote: (node) => {
|
|
704
|
-
const rids = node.attrs.rids
|
|
705
|
-
var _a;
|
|
706
|
-
return (_a = (0, prosemirror_utils_1.findChildrenByAttr)(this.manuscriptNode, (attrs) => attrs.id === rid)[0]) === null || _a === void 0 ? void 0 : _a.node;
|
|
707
|
-
});
|
|
708
|
-
if (rids.length == 0) {
|
|
709
|
-
return '';
|
|
710
|
-
}
|
|
706
|
+
const rids = node.attrs.rids;
|
|
711
707
|
const xref = this.document.createElement('xref');
|
|
712
708
|
xref.setAttribute('ref-type', 'fn');
|
|
713
709
|
xref.setAttribute('rid', normalizeID(rids.join(' ')));
|
|
714
|
-
xref.textContent =
|
|
710
|
+
xref.textContent = rids
|
|
711
|
+
.map((rid) => this.footnoteLabels.get(rid))
|
|
712
|
+
.join(', ');
|
|
715
713
|
return xref;
|
|
716
714
|
},
|
|
717
715
|
keyword: () => '',
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateAlphaFootnoteLabel = exports.generateNumericFootnoteLabel = exports.footnoteLabelGenerator = exports.generateFootnoteLabels = void 0;
|
|
4
|
+
const schema_1 = require("../schema");
|
|
5
|
+
const generateFootnoteLabels = (doc) => {
|
|
6
|
+
const labels = new Map();
|
|
7
|
+
doc.descendants((node, pos, parent) => {
|
|
8
|
+
if ((0, schema_1.isFootnotesElementNode)(node) && parent) {
|
|
9
|
+
const generator = (0, exports.footnoteLabelGenerator)(parent);
|
|
10
|
+
for (let i = 0; i < node.childCount; i++) {
|
|
11
|
+
const footnote = node.child(i);
|
|
12
|
+
const label = generator(i);
|
|
13
|
+
labels.set(footnote.attrs.id, label);
|
|
14
|
+
}
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return labels;
|
|
19
|
+
};
|
|
20
|
+
exports.generateFootnoteLabels = generateFootnoteLabels;
|
|
21
|
+
const footnoteLabelGenerator = (parent) => {
|
|
22
|
+
if ((0, schema_1.isTableElementFooter)(parent)) {
|
|
23
|
+
return exports.generateNumericFootnoteLabel;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return exports.generateAlphaFootnoteLabel;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.footnoteLabelGenerator = footnoteLabelGenerator;
|
|
30
|
+
const generateNumericFootnoteLabel = (index) => String(index + 1);
|
|
31
|
+
exports.generateNumericFootnoteLabel = generateNumericFootnoteLabel;
|
|
32
|
+
const generateAlphaFootnoteLabel = (index) => {
|
|
33
|
+
const unicodeInterval = [97, 123];
|
|
34
|
+
const places = unicodeInterval[1] - unicodeInterval[0];
|
|
35
|
+
function getClassCount(n, order) {
|
|
36
|
+
return n * Math.pow(places, order - 1);
|
|
37
|
+
}
|
|
38
|
+
let indices = null;
|
|
39
|
+
for (;;) {
|
|
40
|
+
let current = index;
|
|
41
|
+
let position = 1;
|
|
42
|
+
while (current >= places) {
|
|
43
|
+
current = current / places;
|
|
44
|
+
position++;
|
|
45
|
+
}
|
|
46
|
+
const newIndex = Math.floor(current);
|
|
47
|
+
indices = indices ? indices : new Array(position).fill(0);
|
|
48
|
+
indices.splice(indices.length - position, 1, newIndex);
|
|
49
|
+
index -= getClassCount(newIndex, position);
|
|
50
|
+
if (position === 1) {
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return (indices || [])
|
|
55
|
+
.map((v, i, array) => {
|
|
56
|
+
if (array.length > 1 && i !== array.length - 1) {
|
|
57
|
+
return String.fromCodePoint(v + unicodeInterval[0] - 1);
|
|
58
|
+
}
|
|
59
|
+
return String.fromCodePoint(v + unicodeInterval[0]);
|
|
60
|
+
})
|
|
61
|
+
.join('');
|
|
62
|
+
};
|
|
63
|
+
exports.generateAlphaFootnoteLabel = generateAlphaFootnoteLabel;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.generalTableFootnote = void 0;
|
|
18
|
+
exports.isGeneralTableFootnoteNode = exports.generalTableFootnote = void 0;
|
|
19
19
|
exports.generalTableFootnote = {
|
|
20
20
|
content: 'paragraph*',
|
|
21
21
|
attrs: {
|
|
@@ -25,3 +25,5 @@ exports.generalTableFootnote = {
|
|
|
25
25
|
group: 'block',
|
|
26
26
|
toDOM: () => ['div', { class: 'general-table-footnote' }, 0],
|
|
27
27
|
};
|
|
28
|
+
const isGeneralTableFootnoteNode = (node) => node.type === node.type.schema.nodes.general_table_footnote;
|
|
29
|
+
exports.isGeneralTableFootnoteNode = isGeneralTableFootnoteNode;
|
|
@@ -18,8 +18,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
exports.isInlineFootnoteNode = exports.inlineFootnote = void 0;
|
|
19
19
|
exports.inlineFootnote = {
|
|
20
20
|
attrs: {
|
|
21
|
+
id: { default: '' },
|
|
21
22
|
rids: { default: [] },
|
|
22
|
-
contents: { default: '' },
|
|
23
23
|
dataTracked: { default: null },
|
|
24
24
|
},
|
|
25
25
|
atom: true,
|
|
@@ -28,13 +28,13 @@ exports.inlineFootnote = {
|
|
|
28
28
|
group: 'inline',
|
|
29
29
|
parseDOM: [
|
|
30
30
|
{
|
|
31
|
-
tag: 'span.footnote',
|
|
31
|
+
tag: 'span.footnote-marker',
|
|
32
32
|
getAttrs: (p) => {
|
|
33
33
|
var _a;
|
|
34
34
|
const dom = p;
|
|
35
35
|
return {
|
|
36
|
+
id: dom.id,
|
|
36
37
|
rids: ((_a = dom.getAttribute('data-reference-id')) === null || _a === void 0 ? void 0 : _a.split(/\s+/)) || [],
|
|
37
|
-
contents: dom.textContent,
|
|
38
38
|
};
|
|
39
39
|
},
|
|
40
40
|
},
|
|
@@ -42,9 +42,9 @@ exports.inlineFootnote = {
|
|
|
42
42
|
toDOM: (node) => {
|
|
43
43
|
const footnoteNode = node;
|
|
44
44
|
const dom = document.createElement('span');
|
|
45
|
-
dom.
|
|
45
|
+
dom.id = footnoteNode.attrs.id;
|
|
46
|
+
dom.className = 'footnote-marker';
|
|
46
47
|
dom.setAttribute('data-reference-id', footnoteNode.attrs.rids.join(' '));
|
|
47
|
-
dom.textContent = footnoteNode.attrs.contents;
|
|
48
48
|
return dom;
|
|
49
49
|
},
|
|
50
50
|
};
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.tableElement = void 0;
|
|
18
|
+
exports.isTableElementNode = exports.tableElement = void 0;
|
|
19
19
|
exports.tableElement = {
|
|
20
20
|
content: ' figcaption? (table | placeholder) table_colgroup? table_element_footer? (listing | placeholder)',
|
|
21
21
|
attrs: {
|
|
@@ -48,3 +48,5 @@ exports.tableElement = {
|
|
|
48
48
|
];
|
|
49
49
|
},
|
|
50
50
|
};
|
|
51
|
+
const isTableElementNode = (node) => node.type === node.type.schema.nodes.table_element;
|
|
52
|
+
exports.isTableElementNode = isTableElementNode;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.tableElementFooter = void 0;
|
|
18
|
+
exports.isTableElementFooter = exports.tableElementFooter = void 0;
|
|
19
19
|
exports.tableElementFooter = {
|
|
20
20
|
attrs: {
|
|
21
21
|
id: { default: '' },
|
|
@@ -25,3 +25,5 @@ exports.tableElementFooter = {
|
|
|
25
25
|
group: 'block element',
|
|
26
26
|
toDOM: () => ['table-wrap-foot', 0],
|
|
27
27
|
};
|
|
28
|
+
const isTableElementFooter = (node) => node.type === node.type.schema.nodes.table_element_footer;
|
|
29
|
+
exports.isTableElementFooter = isTableElementFooter;
|
|
@@ -22,10 +22,12 @@ const generateNodeID = (type) => {
|
|
|
22
22
|
const uniqueID = ':' + (0, uuid_1.v4)().toUpperCase();
|
|
23
23
|
let name = node_types_1.nodeTypesMap.get(type);
|
|
24
24
|
if (name === undefined) {
|
|
25
|
-
name =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
name =
|
|
26
|
+
'MP' +
|
|
27
|
+
type.name
|
|
28
|
+
.split('_')
|
|
29
|
+
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
|
|
30
|
+
.join('');
|
|
29
31
|
}
|
|
30
32
|
return name + uniqueID;
|
|
31
33
|
};
|
package/dist/cjs/version.js
CHANGED
package/dist/es/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export * from './jats';
|
|
|
4
4
|
export * from './jats/types';
|
|
5
5
|
export * from './lib/section-group-type';
|
|
6
6
|
export * from './lib/table-cell-styles';
|
|
7
|
+
export * from './lib/footnotes';
|
|
7
8
|
export * from './lib/utils';
|
|
8
9
|
export * from './schema';
|
|
9
10
|
export { migrateFor } from './schema/migration/migrate';
|
|
@@ -19,6 +19,7 @@ import debug from 'debug';
|
|
|
19
19
|
import { DOMParser as ProsemirrorDOMParser, DOMSerializer, } from 'prosemirror-model';
|
|
20
20
|
import { findChildrenByAttr, findChildrenByType } from 'prosemirror-utils';
|
|
21
21
|
import serializeToXML from 'w3c-xmlserializer';
|
|
22
|
+
import { generateFootnoteLabels } from '../../lib/footnotes';
|
|
22
23
|
import { nodeFromHTML, textFromHTML } from '../../lib/html';
|
|
23
24
|
import { isCitationNode, schema, } from '../../schema';
|
|
24
25
|
import { chooseJatsFnType, chooseSecType, isExecutableNodeType, isNodeType, } from '../../transformer';
|
|
@@ -131,6 +132,7 @@ export class JATSExporter {
|
|
|
131
132
|
article.appendChild(front);
|
|
132
133
|
article.setAttribute('article-type', manuscriptNode.attrs.articleType || 'other');
|
|
133
134
|
this.labelTargets = buildTargets(manuscriptNode);
|
|
135
|
+
this.footnoteLabels = generateFootnoteLabels(manuscriptNode);
|
|
134
136
|
const body = this.buildBody();
|
|
135
137
|
article.appendChild(body);
|
|
136
138
|
const back = this.buildBack(body);
|
|
@@ -693,17 +695,13 @@ export class JATSExporter {
|
|
|
693
695
|
hard_break: () => '',
|
|
694
696
|
highlight_marker: () => '',
|
|
695
697
|
inline_footnote: (node) => {
|
|
696
|
-
const rids = node.attrs.rids
|
|
697
|
-
var _a;
|
|
698
|
-
return (_a = findChildrenByAttr(this.manuscriptNode, (attrs) => attrs.id === rid)[0]) === null || _a === void 0 ? void 0 : _a.node;
|
|
699
|
-
});
|
|
700
|
-
if (rids.length == 0) {
|
|
701
|
-
return '';
|
|
702
|
-
}
|
|
698
|
+
const rids = node.attrs.rids;
|
|
703
699
|
const xref = this.document.createElement('xref');
|
|
704
700
|
xref.setAttribute('ref-type', 'fn');
|
|
705
701
|
xref.setAttribute('rid', normalizeID(rids.join(' ')));
|
|
706
|
-
xref.textContent =
|
|
702
|
+
xref.textContent = rids
|
|
703
|
+
.map((rid) => this.footnoteLabels.get(rid))
|
|
704
|
+
.join(', ');
|
|
707
705
|
return xref;
|
|
708
706
|
},
|
|
709
707
|
keyword: () => '',
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { isFootnotesElementNode, isTableElementFooter, } from '../schema';
|
|
2
|
+
export const generateFootnoteLabels = (doc) => {
|
|
3
|
+
const labels = new Map();
|
|
4
|
+
doc.descendants((node, pos, parent) => {
|
|
5
|
+
if (isFootnotesElementNode(node) && parent) {
|
|
6
|
+
const generator = footnoteLabelGenerator(parent);
|
|
7
|
+
for (let i = 0; i < node.childCount; i++) {
|
|
8
|
+
const footnote = node.child(i);
|
|
9
|
+
const label = generator(i);
|
|
10
|
+
labels.set(footnote.attrs.id, label);
|
|
11
|
+
}
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return labels;
|
|
16
|
+
};
|
|
17
|
+
export const footnoteLabelGenerator = (parent) => {
|
|
18
|
+
if (isTableElementFooter(parent)) {
|
|
19
|
+
return generateNumericFootnoteLabel;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
return generateAlphaFootnoteLabel;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
export const generateNumericFootnoteLabel = (index) => String(index + 1);
|
|
26
|
+
export const generateAlphaFootnoteLabel = (index) => {
|
|
27
|
+
const unicodeInterval = [97, 123];
|
|
28
|
+
const places = unicodeInterval[1] - unicodeInterval[0];
|
|
29
|
+
function getClassCount(n, order) {
|
|
30
|
+
return n * Math.pow(places, order - 1);
|
|
31
|
+
}
|
|
32
|
+
let indices = null;
|
|
33
|
+
for (;;) {
|
|
34
|
+
let current = index;
|
|
35
|
+
let position = 1;
|
|
36
|
+
while (current >= places) {
|
|
37
|
+
current = current / places;
|
|
38
|
+
position++;
|
|
39
|
+
}
|
|
40
|
+
const newIndex = Math.floor(current);
|
|
41
|
+
indices = indices ? indices : new Array(position).fill(0);
|
|
42
|
+
indices.splice(indices.length - position, 1, newIndex);
|
|
43
|
+
index -= getClassCount(newIndex, position);
|
|
44
|
+
if (position === 1) {
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return (indices || [])
|
|
49
|
+
.map((v, i, array) => {
|
|
50
|
+
if (array.length > 1 && i !== array.length - 1) {
|
|
51
|
+
return String.fromCodePoint(v + unicodeInterval[0] - 1);
|
|
52
|
+
}
|
|
53
|
+
return String.fromCodePoint(v + unicodeInterval[0]);
|
|
54
|
+
})
|
|
55
|
+
.join('');
|
|
56
|
+
};
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export const inlineFootnote = {
|
|
17
17
|
attrs: {
|
|
18
|
+
id: { default: '' },
|
|
18
19
|
rids: { default: [] },
|
|
19
|
-
contents: { default: '' },
|
|
20
20
|
dataTracked: { default: null },
|
|
21
21
|
},
|
|
22
22
|
atom: true,
|
|
@@ -25,13 +25,13 @@ export const inlineFootnote = {
|
|
|
25
25
|
group: 'inline',
|
|
26
26
|
parseDOM: [
|
|
27
27
|
{
|
|
28
|
-
tag: 'span.footnote',
|
|
28
|
+
tag: 'span.footnote-marker',
|
|
29
29
|
getAttrs: (p) => {
|
|
30
30
|
var _a;
|
|
31
31
|
const dom = p;
|
|
32
32
|
return {
|
|
33
|
+
id: dom.id,
|
|
33
34
|
rids: ((_a = dom.getAttribute('data-reference-id')) === null || _a === void 0 ? void 0 : _a.split(/\s+/)) || [],
|
|
34
|
-
contents: dom.textContent,
|
|
35
35
|
};
|
|
36
36
|
},
|
|
37
37
|
},
|
|
@@ -39,9 +39,9 @@ export const inlineFootnote = {
|
|
|
39
39
|
toDOM: (node) => {
|
|
40
40
|
const footnoteNode = node;
|
|
41
41
|
const dom = document.createElement('span');
|
|
42
|
-
dom.
|
|
42
|
+
dom.id = footnoteNode.attrs.id;
|
|
43
|
+
dom.className = 'footnote-marker';
|
|
43
44
|
dom.setAttribute('data-reference-id', footnoteNode.attrs.rids.join(' '));
|
|
44
|
-
dom.textContent = footnoteNode.attrs.contents;
|
|
45
45
|
return dom;
|
|
46
46
|
},
|
|
47
47
|
};
|
|
@@ -19,10 +19,12 @@ export const generateNodeID = (type) => {
|
|
|
19
19
|
const uniqueID = ':' + uuid().toUpperCase();
|
|
20
20
|
let name = nodeTypesMap.get(type);
|
|
21
21
|
if (name === undefined) {
|
|
22
|
-
name =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
name =
|
|
23
|
+
'MP' +
|
|
24
|
+
type.name
|
|
25
|
+
.split('_')
|
|
26
|
+
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
|
|
27
|
+
.join('');
|
|
26
28
|
}
|
|
27
29
|
return name + uniqueID;
|
|
28
30
|
};
|
package/dist/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "3.0.
|
|
1
|
+
export const VERSION = "3.0.11";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './jats';
|
|
|
4
4
|
export * from './jats/types';
|
|
5
5
|
export * from './lib/section-group-type';
|
|
6
6
|
export * from './lib/table-cell-styles';
|
|
7
|
+
export * from './lib/footnotes';
|
|
7
8
|
export * from './lib/utils';
|
|
8
9
|
export * from './schema';
|
|
9
10
|
export { JSONNode, migrateFor } from './schema/migration/migrate';
|
|
@@ -45,6 +45,7 @@ export declare class JATSExporter {
|
|
|
45
45
|
protected document: Document;
|
|
46
46
|
protected serializer: DOMSerializer;
|
|
47
47
|
protected labelTargets: Map<string, Target>;
|
|
48
|
+
protected footnoteLabels: Map<string, string>;
|
|
48
49
|
protected citationTexts: Map<string, string>;
|
|
49
50
|
protected citationProvider: CitationProvider;
|
|
50
51
|
protected manuscriptNode: ManuscriptNode;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ManuscriptNode } from '../schema';
|
|
2
|
+
export declare const generateFootnoteLabels: (doc: ManuscriptNode) => Map<any, any>;
|
|
3
|
+
export declare const footnoteLabelGenerator: (parent: ManuscriptNode) => (index: number) => string;
|
|
4
|
+
export declare const generateNumericFootnoteLabel: (index: number) => string;
|
|
5
|
+
export declare const generateAlphaFootnoteLabel: (index: number) => string;
|
|
@@ -18,8 +18,9 @@ import { ManuscriptNode } from '../types';
|
|
|
18
18
|
interface Attrs {
|
|
19
19
|
id: string;
|
|
20
20
|
}
|
|
21
|
-
export interface
|
|
21
|
+
export interface GeneralTableFootnoteNode extends ManuscriptNode {
|
|
22
22
|
attrs: Attrs;
|
|
23
23
|
}
|
|
24
24
|
export declare const generalTableFootnote: NodeSpec;
|
|
25
|
+
export declare const isGeneralTableFootnoteNode: (node: ManuscriptNode) => node is GeneralTableFootnoteNode;
|
|
25
26
|
export {};
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.0.
|
|
1
|
+
export declare const VERSION = "3.0.11";
|
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.11",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -83,4 +83,4 @@
|
|
|
83
83
|
"rimraf": "^3.0.2",
|
|
84
84
|
"typescript": "^4.0.5"
|
|
85
85
|
}
|
|
86
|
-
}
|
|
86
|
+
}
|