@manuscripts/transform 2.3.34 → 2.3.36-LEAN-3958.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/jats/jats-exporter.js +1 -0
- package/dist/cjs/schema/index.js +2 -0
- package/dist/cjs/schema/nodes/bibliography_item.js +1 -0
- package/dist/cjs/schema/nodes/blockquote_element.js +1 -0
- package/dist/cjs/schema/nodes/box_element.js +55 -0
- package/dist/cjs/schema/nodes/cross_reference.js +1 -0
- package/dist/cjs/schema/nodes/equation_element.js +1 -0
- package/dist/cjs/schema/nodes/figure_element.js +1 -0
- package/dist/cjs/schema/nodes/general_table_footnote.js +1 -0
- package/dist/cjs/schema/nodes/inline_equation.js +1 -0
- package/dist/cjs/schema/nodes/table_element.js +1 -0
- package/dist/cjs/transformer/node-types.js +1 -0
- package/dist/cjs/transformer/section-category.js +8 -0
- package/dist/cjs/version.js +1 -1
- package/dist/es/jats/jats-exporter.js +1 -0
- package/dist/es/schema/index.js +2 -0
- package/dist/es/schema/nodes/bibliography_item.js +1 -0
- package/dist/es/schema/nodes/blockquote_element.js +1 -0
- package/dist/es/schema/nodes/box_element.js +52 -0
- package/dist/es/schema/nodes/cross_reference.js +1 -0
- package/dist/es/schema/nodes/equation_element.js +1 -0
- package/dist/es/schema/nodes/figure_element.js +1 -0
- package/dist/es/schema/nodes/general_table_footnote.js +1 -0
- package/dist/es/schema/nodes/inline_equation.js +1 -0
- package/dist/es/schema/nodes/table_element.js +1 -0
- package/dist/es/transformer/node-types.js +1 -0
- package/dist/es/transformer/section-category.js +8 -0
- package/dist/es/version.js +1 -1
- package/dist/types/lib/table-cell-styles.d.ts +1 -1
- package/dist/types/schema/nodes/bibliography_item.d.ts +2 -3
- package/dist/types/schema/nodes/blockquote_element.d.ts +2 -3
- package/dist/types/schema/nodes/box_element.d.ts +26 -0
- package/dist/types/schema/nodes/cross_reference.d.ts +2 -3
- package/dist/types/schema/nodes/equation_element.d.ts +2 -3
- package/dist/types/schema/nodes/figure_element.d.ts +2 -3
- package/dist/types/schema/nodes/general_table_footnote.d.ts +2 -3
- package/dist/types/schema/nodes/inline_equation.d.ts +2 -3
- package/dist/types/schema/nodes/inline_footnote.d.ts +2 -3
- package/dist/types/schema/nodes/table_element.d.ts +2 -3
- package/dist/types/schema/types.d.ts +4 -1
- package/dist/types/transformer/section-category.d.ts +2 -2
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -594,6 +594,7 @@ class JATSExporter {
|
|
|
594
594
|
this.createSerializer = () => {
|
|
595
595
|
const getModel = (id) => id ? this.modelMap.get(id) : undefined;
|
|
596
596
|
const nodes = {
|
|
597
|
+
box_element: () => ['boxed-text', 0],
|
|
597
598
|
author_notes: () => '',
|
|
598
599
|
corresp: () => '',
|
|
599
600
|
title: () => '',
|
package/dist/cjs/schema/index.js
CHANGED
|
@@ -43,6 +43,7 @@ const bibliography_item_1 = require("./nodes/bibliography_item");
|
|
|
43
43
|
const bibliography_section_1 = require("./nodes/bibliography_section");
|
|
44
44
|
const blockquote_element_1 = require("./nodes/blockquote_element");
|
|
45
45
|
const body_1 = require("./nodes/body");
|
|
46
|
+
const box_element_1 = require("./nodes/box_element");
|
|
46
47
|
const caption_1 = require("./nodes/caption");
|
|
47
48
|
const caption_title_1 = require("./nodes/caption_title");
|
|
48
49
|
const citation_1 = require("./nodes/citation");
|
|
@@ -237,5 +238,6 @@ exports.schema = new prosemirror_model_1.Schema({
|
|
|
237
238
|
supplement: supplement_1.supplement,
|
|
238
239
|
author_notes: author_notes_1.authorNotes,
|
|
239
240
|
corresp: corresp_1.corresp,
|
|
241
|
+
box_element: box_element_1.box_element,
|
|
240
242
|
},
|
|
241
243
|
});
|
|
@@ -19,6 +19,7 @@ exports.isBlockquoteElement = exports.blockquoteElement = void 0;
|
|
|
19
19
|
const json_schema_1 = require("@manuscripts/json-schema");
|
|
20
20
|
const attributes_1 = require("../../lib/attributes");
|
|
21
21
|
exports.blockquoteElement = {
|
|
22
|
+
name: 'Blockquote',
|
|
22
23
|
content: 'paragraph+ attribution',
|
|
23
24
|
attrs: {
|
|
24
25
|
id: { default: '' },
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* © 2019 Atypon Systems LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.box_element = void 0;
|
|
19
|
+
exports.box_element = {
|
|
20
|
+
content: 'figcaption? section?',
|
|
21
|
+
attrs: {
|
|
22
|
+
id: { default: '' },
|
|
23
|
+
label: { default: '' },
|
|
24
|
+
dataTracked: { default: null },
|
|
25
|
+
},
|
|
26
|
+
group: 'block element',
|
|
27
|
+
selectable: false,
|
|
28
|
+
parseDOM: [
|
|
29
|
+
{
|
|
30
|
+
tag: 'div.boxed-text',
|
|
31
|
+
getAttrs: (p) => {
|
|
32
|
+
const dom = p;
|
|
33
|
+
const attrs = {
|
|
34
|
+
id: dom.getAttribute('id') || undefined,
|
|
35
|
+
label: dom.getAttribute('label') || undefined,
|
|
36
|
+
};
|
|
37
|
+
return attrs;
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
toDOM: (node) => {
|
|
42
|
+
const boxElementNode = node;
|
|
43
|
+
const attrs = {};
|
|
44
|
+
if (boxElementNode.attrs.id) {
|
|
45
|
+
attrs.id = boxElementNode.attrs.id;
|
|
46
|
+
}
|
|
47
|
+
if (boxElementNode.attrs.label) {
|
|
48
|
+
attrs.label = boxElementNode.attrs.label;
|
|
49
|
+
}
|
|
50
|
+
return [
|
|
51
|
+
'div',
|
|
52
|
+
Object.assign({ class: 'boxed-text' }, attrs),
|
|
53
|
+
];
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.isFigureElementNode = exports.figureElement = void 0;
|
|
19
19
|
exports.figureElement = {
|
|
20
|
+
name: 'Figure',
|
|
20
21
|
content: '(paragraph | figure | missing_figure | placeholder)+ attribution* figcaption (listing | placeholder)',
|
|
21
22
|
attrs: {
|
|
22
23
|
figureLayout: { default: '' },
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.tableElement = void 0;
|
|
19
19
|
exports.tableElement = {
|
|
20
|
+
name: 'Table',
|
|
20
21
|
content: ' figcaption? (table | placeholder) table_colgroup? table_element_footer? (listing | placeholder)',
|
|
21
22
|
attrs: {
|
|
22
23
|
id: { default: '' },
|
|
@@ -62,6 +62,7 @@ exports.nodeTypesMap = new Map([
|
|
|
62
62
|
[schema_1.schema.nodes.supplement, json_schema_1.ObjectTypes.Supplement],
|
|
63
63
|
[schema_1.schema.nodes.author_notes, json_schema_1.ObjectTypes.AuthorNotes],
|
|
64
64
|
[schema_1.schema.nodes.corresp, json_schema_1.ObjectTypes.Corresponding],
|
|
65
|
+
[schema_1.schema.nodes.box_element, json_schema_1.ObjectTypes.Section],
|
|
65
66
|
]);
|
|
66
67
|
const isExecutableNodeType = (type) => (0, schema_1.hasGroup)(type, schema_1.GROUP_EXECUTABLE);
|
|
67
68
|
exports.isExecutableNodeType = isExecutableNodeType;
|
|
@@ -40,6 +40,8 @@ const chooseSectionNodeType = (category) => {
|
|
|
40
40
|
return schema_1.schema.nodes.keywords;
|
|
41
41
|
case 'MPSectionCategory:toc':
|
|
42
42
|
return schema_1.schema.nodes.toc_section;
|
|
43
|
+
case 'MPSectionCategory:box-element':
|
|
44
|
+
return schema_1.schema.nodes.box_element;
|
|
43
45
|
default:
|
|
44
46
|
return schema_1.schema.nodes.section;
|
|
45
47
|
}
|
|
@@ -84,6 +86,8 @@ const buildSectionCategory = (node) => {
|
|
|
84
86
|
return 'MPSectionCategory:toc';
|
|
85
87
|
case schema_1.schema.nodes.graphical_abstract_section:
|
|
86
88
|
return 'MPSectionCategory:abstract-graphical';
|
|
89
|
+
case schema_1.schema.nodes.box_element:
|
|
90
|
+
return 'MPSectionCategory:box-element';
|
|
87
91
|
default:
|
|
88
92
|
return node.attrs.category || undefined;
|
|
89
93
|
}
|
|
@@ -197,6 +201,8 @@ const chooseSectionCategoryByType = (secType) => {
|
|
|
197
201
|
return 'MPSectionCategory:supported-by';
|
|
198
202
|
case 'ethics-statement':
|
|
199
203
|
return 'MPSectionCategory:ethics-statement';
|
|
204
|
+
case 'box-element':
|
|
205
|
+
return 'MPSectionCategory:box-element';
|
|
200
206
|
default:
|
|
201
207
|
return undefined;
|
|
202
208
|
}
|
|
@@ -253,6 +259,8 @@ const chooseSectionCategoryFromTitle = (title) => {
|
|
|
253
259
|
case 'financial-disclosure':
|
|
254
260
|
case 'funding information':
|
|
255
261
|
return 'MPSectionCategory:financial-disclosure';
|
|
262
|
+
case 'box-element':
|
|
263
|
+
return 'MPSectionCategory:box-element';
|
|
256
264
|
}
|
|
257
265
|
};
|
|
258
266
|
exports.chooseSectionCategoryFromTitle = chooseSectionCategoryFromTitle;
|
package/dist/cjs/version.js
CHANGED
|
@@ -586,6 +586,7 @@ export class JATSExporter {
|
|
|
586
586
|
this.createSerializer = () => {
|
|
587
587
|
const getModel = (id) => id ? this.modelMap.get(id) : undefined;
|
|
588
588
|
const nodes = {
|
|
589
|
+
box_element: () => ['boxed-text', 0],
|
|
589
590
|
author_notes: () => '',
|
|
590
591
|
corresp: () => '',
|
|
591
592
|
title: () => '',
|
package/dist/es/schema/index.js
CHANGED
|
@@ -26,6 +26,7 @@ import { bibliographyItem } from './nodes/bibliography_item';
|
|
|
26
26
|
import { bibliographySection } from './nodes/bibliography_section';
|
|
27
27
|
import { blockquoteElement } from './nodes/blockquote_element';
|
|
28
28
|
import { body } from './nodes/body';
|
|
29
|
+
import { box_element } from './nodes/box_element';
|
|
29
30
|
import { caption } from './nodes/caption';
|
|
30
31
|
import { captionTitle } from './nodes/caption_title';
|
|
31
32
|
import { citation } from './nodes/citation';
|
|
@@ -220,5 +221,6 @@ export const schema = new Schema({
|
|
|
220
221
|
supplement,
|
|
221
222
|
author_notes: authorNotes,
|
|
222
223
|
corresp,
|
|
224
|
+
box_element,
|
|
223
225
|
},
|
|
224
226
|
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2019 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export const box_element = {
|
|
17
|
+
content: 'figcaption? section?',
|
|
18
|
+
attrs: {
|
|
19
|
+
id: { default: '' },
|
|
20
|
+
label: { default: '' },
|
|
21
|
+
dataTracked: { default: null },
|
|
22
|
+
},
|
|
23
|
+
group: 'block element',
|
|
24
|
+
selectable: false,
|
|
25
|
+
parseDOM: [
|
|
26
|
+
{
|
|
27
|
+
tag: 'div.boxed-text',
|
|
28
|
+
getAttrs: (p) => {
|
|
29
|
+
const dom = p;
|
|
30
|
+
const attrs = {
|
|
31
|
+
id: dom.getAttribute('id') || undefined,
|
|
32
|
+
label: dom.getAttribute('label') || undefined,
|
|
33
|
+
};
|
|
34
|
+
return attrs;
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
toDOM: (node) => {
|
|
39
|
+
const boxElementNode = node;
|
|
40
|
+
const attrs = {};
|
|
41
|
+
if (boxElementNode.attrs.id) {
|
|
42
|
+
attrs.id = boxElementNode.attrs.id;
|
|
43
|
+
}
|
|
44
|
+
if (boxElementNode.attrs.label) {
|
|
45
|
+
attrs.label = boxElementNode.attrs.label;
|
|
46
|
+
}
|
|
47
|
+
return [
|
|
48
|
+
'div',
|
|
49
|
+
Object.assign({ class: 'boxed-text' }, attrs),
|
|
50
|
+
];
|
|
51
|
+
},
|
|
52
|
+
};
|
|
@@ -59,6 +59,7 @@ export const nodeTypesMap = new Map([
|
|
|
59
59
|
[schema.nodes.supplement, ObjectTypes.Supplement],
|
|
60
60
|
[schema.nodes.author_notes, ObjectTypes.AuthorNotes],
|
|
61
61
|
[schema.nodes.corresp, ObjectTypes.Corresponding],
|
|
62
|
+
[schema.nodes.box_element, ObjectTypes.Section],
|
|
62
63
|
]);
|
|
63
64
|
export const isExecutableNodeType = (type) => hasGroup(type, GROUP_EXECUTABLE);
|
|
64
65
|
export const isElementNodeType = (type) => hasGroup(type, GROUP_ELEMENT);
|
|
@@ -36,6 +36,8 @@ export const chooseSectionNodeType = (category) => {
|
|
|
36
36
|
return schema.nodes.keywords;
|
|
37
37
|
case 'MPSectionCategory:toc':
|
|
38
38
|
return schema.nodes.toc_section;
|
|
39
|
+
case 'MPSectionCategory:box-element':
|
|
40
|
+
return schema.nodes.box_element;
|
|
39
41
|
default:
|
|
40
42
|
return schema.nodes.section;
|
|
41
43
|
}
|
|
@@ -77,6 +79,8 @@ export const buildSectionCategory = (node) => {
|
|
|
77
79
|
return 'MPSectionCategory:toc';
|
|
78
80
|
case schema.nodes.graphical_abstract_section:
|
|
79
81
|
return 'MPSectionCategory:abstract-graphical';
|
|
82
|
+
case schema.nodes.box_element:
|
|
83
|
+
return 'MPSectionCategory:box-element';
|
|
80
84
|
default:
|
|
81
85
|
return node.attrs.category || undefined;
|
|
82
86
|
}
|
|
@@ -186,6 +190,8 @@ export const chooseSectionCategoryByType = (secType) => {
|
|
|
186
190
|
return 'MPSectionCategory:supported-by';
|
|
187
191
|
case 'ethics-statement':
|
|
188
192
|
return 'MPSectionCategory:ethics-statement';
|
|
193
|
+
case 'box-element':
|
|
194
|
+
return 'MPSectionCategory:box-element';
|
|
189
195
|
default:
|
|
190
196
|
return undefined;
|
|
191
197
|
}
|
|
@@ -240,5 +246,7 @@ export const chooseSectionCategoryFromTitle = (title) => {
|
|
|
240
246
|
case 'financial-disclosure':
|
|
241
247
|
case 'funding information':
|
|
242
248
|
return 'MPSectionCategory:financial-disclosure';
|
|
249
|
+
case 'box-element':
|
|
250
|
+
return 'MPSectionCategory:box-element';
|
|
243
251
|
}
|
|
244
252
|
};
|
package/dist/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "2.3.
|
|
1
|
+
export const VERSION = "2.3.36-LEAN-3958.0";
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export declare const TABLE_CELL_STYLES: readonly ["backgroundColor", "border-top", "border-right", "border-bottom", "border-left", "verticalAlign", "textAlign"];
|
|
17
|
-
export type TableCellStyleKey = typeof TABLE_CELL_STYLES[number];
|
|
17
|
+
export type TableCellStyleKey = (typeof TABLE_CELL_STYLES)[number];
|
|
18
18
|
export declare const serializeTableCellStyles: (styles: {
|
|
19
19
|
backgroundColor?: string | null | undefined;
|
|
20
20
|
"border-top"?: string | null | undefined;
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { BibliographicDate, BibliographicName } from '@manuscripts/json-schema';
|
|
17
|
-
import {
|
|
18
|
-
import { ManuscriptNode } from '../types';
|
|
17
|
+
import { ManuscriptNode, ManuscriptNodeSpec } from '../types';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
id: string;
|
|
21
20
|
type: string;
|
|
@@ -33,5 +32,5 @@ interface Attrs {
|
|
|
33
32
|
export interface BibliographyItemNode extends ManuscriptNode {
|
|
34
33
|
attrs: Attrs;
|
|
35
34
|
}
|
|
36
|
-
export declare const bibliographyItem:
|
|
35
|
+
export declare const bibliographyItem: ManuscriptNodeSpec;
|
|
37
36
|
export {};
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import { ManuscriptNode } from '../types';
|
|
16
|
+
import { ManuscriptNode, ManuscriptNodeSpec } from '../types';
|
|
18
17
|
interface Attrs {
|
|
19
18
|
id: string;
|
|
20
19
|
paragraphStyle: string;
|
|
@@ -23,6 +22,6 @@ interface Attrs {
|
|
|
23
22
|
export interface BlockquoteElementNode extends ManuscriptNode {
|
|
24
23
|
attrs: Attrs;
|
|
25
24
|
}
|
|
26
|
-
export declare const blockquoteElement:
|
|
25
|
+
export declare const blockquoteElement: ManuscriptNodeSpec;
|
|
27
26
|
export declare const isBlockquoteElement: (node: ManuscriptNode) => node is BlockquoteElementNode;
|
|
28
27
|
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2019 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 { NodeSpec } from 'prosemirror-model';
|
|
17
|
+
import { ManuscriptNode } from '../types';
|
|
18
|
+
interface Attrs {
|
|
19
|
+
id: string;
|
|
20
|
+
label: string;
|
|
21
|
+
}
|
|
22
|
+
export interface BoxElementNode extends ManuscriptNode {
|
|
23
|
+
attrs: Attrs;
|
|
24
|
+
}
|
|
25
|
+
export declare const box_element: NodeSpec;
|
|
26
|
+
export {};
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import { ManuscriptNode } from '../types';
|
|
16
|
+
import { ManuscriptNode, ManuscriptNodeSpec } from '../types';
|
|
18
17
|
interface Attrs {
|
|
19
18
|
rids: string[];
|
|
20
19
|
label: string;
|
|
@@ -23,5 +22,5 @@ interface Attrs {
|
|
|
23
22
|
export interface CrossReferenceNode extends ManuscriptNode {
|
|
24
23
|
attrs: Attrs;
|
|
25
24
|
}
|
|
26
|
-
export declare const crossReference:
|
|
25
|
+
export declare const crossReference: ManuscriptNodeSpec;
|
|
27
26
|
export {};
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import { ManuscriptNode } from '../types';
|
|
16
|
+
import { ManuscriptNode, ManuscriptNodeSpec } from '../types';
|
|
18
17
|
interface Attrs {
|
|
19
18
|
id: string;
|
|
20
19
|
label: string;
|
|
@@ -22,5 +21,5 @@ interface Attrs {
|
|
|
22
21
|
export interface EquationElementNode extends ManuscriptNode {
|
|
23
22
|
attrs: Attrs;
|
|
24
23
|
}
|
|
25
|
-
export declare const equationElement:
|
|
24
|
+
export declare const equationElement: ManuscriptNodeSpec;
|
|
26
25
|
export {};
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import { ManuscriptNode } from '../types';
|
|
16
|
+
import { ManuscriptNode, ManuscriptNodeSpec } from '../types';
|
|
18
17
|
import { AttributionNode } from './attribution';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
columns: number;
|
|
@@ -37,6 +36,6 @@ interface Attrs {
|
|
|
37
36
|
export interface FigureElementNode extends ManuscriptNode {
|
|
38
37
|
attrs: Attrs;
|
|
39
38
|
}
|
|
40
|
-
export declare const figureElement:
|
|
39
|
+
export declare const figureElement: ManuscriptNodeSpec;
|
|
41
40
|
export declare const isFigureElementNode: (node: ManuscriptNode) => node is FigureElementNode;
|
|
42
41
|
export {};
|
|
@@ -13,13 +13,12 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import { ManuscriptNode } from '../types';
|
|
16
|
+
import { ManuscriptNode, ManuscriptNodeSpec } from '../types';
|
|
18
17
|
interface Attrs {
|
|
19
18
|
id: string;
|
|
20
19
|
}
|
|
21
20
|
export interface GeneralTableFootnote extends ManuscriptNode {
|
|
22
21
|
attrs: Attrs;
|
|
23
22
|
}
|
|
24
|
-
export declare const generalTableFootnote:
|
|
23
|
+
export declare const generalTableFootnote: ManuscriptNodeSpec;
|
|
25
24
|
export {};
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import { ManuscriptNode } from '../types';
|
|
16
|
+
import { ManuscriptNode, ManuscriptNodeSpec } from '../types';
|
|
18
17
|
interface Attrs {
|
|
19
18
|
id: string;
|
|
20
19
|
contents: string;
|
|
@@ -23,5 +22,5 @@ interface Attrs {
|
|
|
23
22
|
export interface InlineEquationNode extends ManuscriptNode {
|
|
24
23
|
attrs: Attrs;
|
|
25
24
|
}
|
|
26
|
-
export declare const inlineEquation:
|
|
25
|
+
export declare const inlineEquation: ManuscriptNodeSpec;
|
|
27
26
|
export {};
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import { ManuscriptNode } from '../types';
|
|
16
|
+
import { ManuscriptNode, ManuscriptNodeSpec } from '../types';
|
|
18
17
|
interface Attrs {
|
|
19
18
|
rids: string[];
|
|
20
19
|
contents: string;
|
|
@@ -22,6 +21,6 @@ interface Attrs {
|
|
|
22
21
|
export interface InlineFootnoteNode extends ManuscriptNode {
|
|
23
22
|
attrs: Attrs;
|
|
24
23
|
}
|
|
25
|
-
export declare const inlineFootnote:
|
|
24
|
+
export declare const inlineFootnote: ManuscriptNodeSpec;
|
|
26
25
|
export declare const isInlineFootnoteNode: (node: ManuscriptNode) => node is InlineFootnoteNode;
|
|
27
26
|
export {};
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import { ManuscriptNode } from '../types';
|
|
16
|
+
import { ManuscriptNode, ManuscriptNodeSpec } from '../types';
|
|
18
17
|
interface Attrs {
|
|
19
18
|
id: string;
|
|
20
19
|
paragraphStyle: string;
|
|
@@ -29,5 +28,5 @@ interface Attrs {
|
|
|
29
28
|
export interface TableElementNode extends ManuscriptNode {
|
|
30
29
|
attrs: Attrs;
|
|
31
30
|
}
|
|
32
|
-
export declare const tableElement:
|
|
31
|
+
export declare const tableElement: ManuscriptNodeSpec;
|
|
33
32
|
export {};
|
|
@@ -17,7 +17,7 @@ import { Fragment, Mark as ProsemirrorMark, MarkType, Node as ProsemirrorNode, N
|
|
|
17
17
|
import { EditorState, NodeSelection, Plugin, TextSelection, Transaction } from 'prosemirror-state';
|
|
18
18
|
import { EditorView, NodeView } from 'prosemirror-view';
|
|
19
19
|
export type Marks = 'bold' | 'code' | 'italic' | 'smallcaps' | 'strikethrough' | 'styled' | 'subscript' | 'superscript' | 'underline' | 'tracked_insert' | 'tracked_delete';
|
|
20
|
-
export type Nodes = 'attribution' | 'bibliography_item' | 'bibliography_element' | 'bibliography_section' | 'blockquote_element' | 'list' | 'caption' | 'caption_title' | 'comment' | 'comments' | 'citation' | 'cross_reference' | 'doc' | 'equation' | 'equation_element' | 'figcaption' | 'figure' | 'graphical_abstract_section' | 'figure_element' | 'footnote' | 'footnotes_element' | 'footnotes_section' | 'hard_break' | 'highlight_marker' | 'inline_equation' | 'inline_footnote' | 'keyword' | 'keywords_element' | 'keyword_group' | 'keywords' | 'link' | 'list_item' | 'listing' | 'listing_element' | 'manuscript' | 'abstracts' | 'body' | 'backmatter' | 'missing_figure' | 'paragraph' | 'placeholder' | 'placeholder_element' | 'pullquote_element' | 'section' | 'section_label' | 'section_title' | 'section_title_plain' | 'table' | 'table_cell' | 'table_element' | 'table_row' | 'table_colgroup' | 'table_col' | 'table_header' | 'text' | 'toc_element' | 'toc_section' | 'affiliation' | 'contributor' | 'table_element_footer' | 'title' | 'affiliations' | 'contributors' | 'supplements' | 'supplement' | 'author_notes' | 'corresp' | 'general_table_footnote';
|
|
20
|
+
export type Nodes = 'attribution' | 'bibliography_item' | 'bibliography_element' | 'bibliography_section' | 'blockquote_element' | 'list' | 'caption' | 'caption_title' | 'comment' | 'comments' | 'citation' | 'cross_reference' | 'doc' | 'equation' | 'equation_element' | 'figcaption' | 'figure' | 'graphical_abstract_section' | 'figure_element' | 'footnote' | 'footnotes_element' | 'footnotes_section' | 'hard_break' | 'highlight_marker' | 'inline_equation' | 'inline_footnote' | 'keyword' | 'keywords_element' | 'keyword_group' | 'keywords' | 'link' | 'list_item' | 'listing' | 'listing_element' | 'manuscript' | 'abstracts' | 'body' | 'backmatter' | 'missing_figure' | 'paragraph' | 'placeholder' | 'placeholder_element' | 'pullquote_element' | 'section' | 'section_label' | 'section_title' | 'section_title_plain' | 'table' | 'table_cell' | 'table_element' | 'table_row' | 'table_colgroup' | 'table_col' | 'table_header' | 'text' | 'toc_element' | 'toc_section' | 'affiliation' | 'contributor' | 'table_element_footer' | 'title' | 'affiliations' | 'contributors' | 'supplements' | 'supplement' | 'author_notes' | 'corresp' | 'general_table_footnote' | 'box_element';
|
|
21
21
|
export type ManuscriptSchema = Schema<Nodes, Marks>;
|
|
22
22
|
export type ManuscriptEditorState = EditorState;
|
|
23
23
|
export type ManuscriptEditorView = EditorView;
|
|
@@ -43,3 +43,6 @@ export type DataTrackedAttrs = {
|
|
|
43
43
|
userID: string;
|
|
44
44
|
createdAt: number;
|
|
45
45
|
};
|
|
46
|
+
export interface ManuscriptNodeSpec extends NodeSpec {
|
|
47
|
+
name: string;
|
|
48
|
+
}
|
|
@@ -17,8 +17,8 @@ import { Element } from '@manuscripts/json-schema';
|
|
|
17
17
|
import { SectionGroupType } from '../lib/section-group-type';
|
|
18
18
|
import { ManuscriptNode, ManuscriptNodeType } from '../schema';
|
|
19
19
|
export declare const isAnySectionNode: (node: ManuscriptNode) => boolean;
|
|
20
|
-
export type SectionCategory = 'MPSectionCategory:abstract' | 'MPSectionCategory:abstract-teaser' | 'MPSectionCategory:abstract-graphical' | 'MPSectionCategory:acknowledgement' | 'MPSectionCategory:availability' | 'MPSectionCategory:bibliography' | 'MPSectionCategory:conclusions' | 'MPSectionCategory:discussion' | 'MPSectionCategory:endnotes' | 'MPSectionCategory:introduction' | 'MPSectionCategory:keywords' | 'MPSectionCategory:materials-method' | 'MPSectionCategory:results' | 'MPSectionCategory:toc' | 'MPSectionCategory:floating-element' | 'MPSectionCategory:appendices' | 'MPSectionCategory:competing-interests' | 'MPSectionCategory:financial-disclosure' | 'MPSectionCategory:con' | 'MPSectionCategory:deceased' | 'MPSectionCategory:equal' | 'MPSectionCategory:present-address' | 'MPSectionCategory:presented-at' | 'MPSectionCategory:previously-at' | 'MPSectionCategory:supplementary-material' | 'MPSectionCategory:supported-by' | 'MPSectionCategory:ethics-statement';
|
|
21
|
-
export type SecType = 'abstract' | 'abstract-teaser' | 'abstract-graphical' | 'acknowledgments' | 'availability' | 'bibliography' | 'conclusions' | 'data-availability' | 'discussion' | 'endnotes' | 'intro' | 'keywords' | 'materials' | 'methods' | 'results' | 'toc' | 'floating-element' | 'appendices' | 'competing-interests' | 'financial-disclosure' | 'con' | 'deceased' | 'equal' | 'present-address' | 'presented-at' | 'previously-at' | 'supplementary-material' | 'supported-by' | 'ethics-statement';
|
|
20
|
+
export type SectionCategory = 'MPSectionCategory:abstract' | 'MPSectionCategory:abstract-teaser' | 'MPSectionCategory:abstract-graphical' | 'MPSectionCategory:acknowledgement' | 'MPSectionCategory:availability' | 'MPSectionCategory:bibliography' | 'MPSectionCategory:conclusions' | 'MPSectionCategory:discussion' | 'MPSectionCategory:endnotes' | 'MPSectionCategory:introduction' | 'MPSectionCategory:keywords' | 'MPSectionCategory:materials-method' | 'MPSectionCategory:results' | 'MPSectionCategory:toc' | 'MPSectionCategory:floating-element' | 'MPSectionCategory:appendices' | 'MPSectionCategory:competing-interests' | 'MPSectionCategory:financial-disclosure' | 'MPSectionCategory:con' | 'MPSectionCategory:deceased' | 'MPSectionCategory:equal' | 'MPSectionCategory:present-address' | 'MPSectionCategory:presented-at' | 'MPSectionCategory:previously-at' | 'MPSectionCategory:supplementary-material' | 'MPSectionCategory:supported-by' | 'MPSectionCategory:ethics-statement' | 'MPSectionCategory:box-element';
|
|
21
|
+
export type SecType = 'abstract' | 'abstract-teaser' | 'abstract-graphical' | 'acknowledgments' | 'availability' | 'bibliography' | 'conclusions' | 'data-availability' | 'discussion' | 'endnotes' | 'intro' | 'keywords' | 'materials' | 'methods' | 'results' | 'toc' | 'floating-element' | 'appendices' | 'competing-interests' | 'financial-disclosure' | 'con' | 'deceased' | 'equal' | 'present-address' | 'presented-at' | 'previously-at' | 'supplementary-material' | 'supported-by' | 'ethics-statement' | 'box-element';
|
|
22
22
|
export declare const chooseSectionNodeType: (category?: SectionCategory) => ManuscriptNodeType;
|
|
23
23
|
export declare const chooseSectionLableName: (type?: SecType) => string;
|
|
24
24
|
export declare const guessSectionCategory: (elements: Element[]) => SectionCategory | undefined;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "2.3.
|
|
1
|
+
export declare const VERSION = "2.3.36-LEAN-3958.0";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/transform",
|
|
3
3
|
"description": "ProseMirror transformer for Manuscripts applications",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.36-LEAN-3958.0",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|