@manuscripts/transform 3.0.48-LEAN-4406-2.0 → 3.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/jats/exporter/jats-exporter.js +0 -1
- package/dist/cjs/jats/importer/jats-dom-parser.js +0 -10
- package/dist/cjs/schema/index.js +0 -3
- package/dist/cjs/schema/nodes/manuscript.js +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/es/jats/exporter/jats-exporter.js +0 -1
- package/dist/es/jats/importer/jats-dom-parser.js +0 -10
- package/dist/es/schema/index.js +0 -3
- package/dist/es/schema/nodes/manuscript.js +1 -1
- package/dist/es/version.js +1 -1
- package/dist/types/schema/index.d.ts +0 -1
- package/dist/types/schema/types.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +2 -3
- package/dist/cjs/schema/nodes/alt_titles_section.js +0 -44
- package/dist/es/schema/nodes/alt_titles_section.js +0 -40
- package/dist/types/schema/nodes/alt_titles_section.d.ts +0 -26
|
@@ -246,16 +246,6 @@ class JATSDOMParser {
|
|
|
246
246
|
return Object.assign({ doi: (0, utils_1.getTrimmedTextContent)(doi), articleType: (_a = element.getAttribute('article-type')) !== null && _a !== void 0 ? _a : '', primaryLanguageCode: (_b = element.getAttribute('lang')) !== null && _b !== void 0 ? _b : '' }, dates);
|
|
247
247
|
},
|
|
248
248
|
},
|
|
249
|
-
{
|
|
250
|
-
tag: 'titles',
|
|
251
|
-
node: 'alt_titles',
|
|
252
|
-
getAttrs: (node) => {
|
|
253
|
-
const element = node;
|
|
254
|
-
return {
|
|
255
|
-
id: element.getAttribute('id'),
|
|
256
|
-
};
|
|
257
|
-
},
|
|
258
|
-
},
|
|
259
249
|
{
|
|
260
250
|
tag: 'alt-title[alt-title-type]',
|
|
261
251
|
node: 'alt_title',
|
package/dist/cjs/schema/index.js
CHANGED
|
@@ -36,7 +36,6 @@ const abstracts_1 = require("./nodes/abstracts");
|
|
|
36
36
|
const affiliation_1 = require("./nodes/affiliation");
|
|
37
37
|
const affiliations_1 = require("./nodes/affiliations");
|
|
38
38
|
const alt_title_1 = require("./nodes/alt_title");
|
|
39
|
-
const alt_titles_section_1 = require("./nodes/alt_titles_section");
|
|
40
39
|
const attachment_1 = require("./nodes/attachment");
|
|
41
40
|
const attachments_1 = require("./nodes/attachments");
|
|
42
41
|
const attribution_1 = require("./nodes/attribution");
|
|
@@ -167,7 +166,6 @@ __exportStar(require("./types"), exports);
|
|
|
167
166
|
__exportStar(require("./nodes/attachment"), exports);
|
|
168
167
|
__exportStar(require("./nodes/attachments"), exports);
|
|
169
168
|
__exportStar(require("./nodes/alt_title"), exports);
|
|
170
|
-
__exportStar(require("./nodes/alt_titles_section"), exports);
|
|
171
169
|
exports.schema = new prosemirror_model_1.Schema({
|
|
172
170
|
marks: {
|
|
173
171
|
bold: marks_1.bold,
|
|
@@ -258,6 +256,5 @@ exports.schema = new prosemirror_model_1.Schema({
|
|
|
258
256
|
attachment: attachment_1.attachment,
|
|
259
257
|
attachments: attachments_1.attachments,
|
|
260
258
|
alt_title: alt_title_1.altTitle,
|
|
261
|
-
alt_titles: alt_titles_section_1.altTitlesSection,
|
|
262
259
|
},
|
|
263
260
|
});
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.isManuscriptNode = exports.manuscript = void 0;
|
|
19
19
|
exports.manuscript = {
|
|
20
|
-
content: 'title
|
|
20
|
+
content: 'title alt_title* contributors? affiliations? author_notes? awards? keywords? supplements? abstracts body backmatter comments attachments?',
|
|
21
21
|
attrs: {
|
|
22
22
|
id: { default: '' },
|
|
23
23
|
doi: { default: '' },
|
package/dist/cjs/version.js
CHANGED
|
@@ -243,16 +243,6 @@ export class JATSDOMParser {
|
|
|
243
243
|
return Object.assign({ doi: getTrimmedTextContent(doi), articleType: (_a = element.getAttribute('article-type')) !== null && _a !== void 0 ? _a : '', primaryLanguageCode: (_b = element.getAttribute('lang')) !== null && _b !== void 0 ? _b : '' }, dates);
|
|
244
244
|
},
|
|
245
245
|
},
|
|
246
|
-
{
|
|
247
|
-
tag: 'titles',
|
|
248
|
-
node: 'alt_titles',
|
|
249
|
-
getAttrs: (node) => {
|
|
250
|
-
const element = node;
|
|
251
|
-
return {
|
|
252
|
-
id: element.getAttribute('id'),
|
|
253
|
-
};
|
|
254
|
-
},
|
|
255
|
-
},
|
|
256
246
|
{
|
|
257
247
|
tag: 'alt-title[alt-title-type]',
|
|
258
248
|
node: 'alt_title',
|
package/dist/es/schema/index.js
CHANGED
|
@@ -19,7 +19,6 @@ import { abstracts } from './nodes/abstracts';
|
|
|
19
19
|
import { affiliation } from './nodes/affiliation';
|
|
20
20
|
import { affiliations } from './nodes/affiliations';
|
|
21
21
|
import { altTitle } from './nodes/alt_title';
|
|
22
|
-
import { altTitlesSection } from './nodes/alt_titles_section';
|
|
23
22
|
import { attachment } from './nodes/attachment';
|
|
24
23
|
import { attachments } from './nodes/attachments';
|
|
25
24
|
import { attribution } from './nodes/attribution';
|
|
@@ -150,7 +149,6 @@ export * from './types';
|
|
|
150
149
|
export * from './nodes/attachment';
|
|
151
150
|
export * from './nodes/attachments';
|
|
152
151
|
export * from './nodes/alt_title';
|
|
153
|
-
export * from './nodes/alt_titles_section';
|
|
154
152
|
export const schema = new Schema({
|
|
155
153
|
marks: {
|
|
156
154
|
bold,
|
|
@@ -241,6 +239,5 @@ export const schema = new Schema({
|
|
|
241
239
|
attachment,
|
|
242
240
|
attachments,
|
|
243
241
|
alt_title: altTitle,
|
|
244
|
-
alt_titles: altTitlesSection,
|
|
245
242
|
},
|
|
246
243
|
});
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export const manuscript = {
|
|
17
|
-
content: 'title
|
|
17
|
+
content: 'title alt_title* contributors? affiliations? author_notes? awards? keywords? supplements? abstracts body backmatter comments attachments?',
|
|
18
18
|
attrs: {
|
|
19
19
|
id: { default: '' },
|
|
20
20
|
doi: { default: '' },
|
package/dist/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "3.0.48
|
|
1
|
+
export const VERSION = "3.0.48";
|
|
@@ -17,7 +17,7 @@ import { Fragment, Mark as ProsemirrorMark, MarkType, Node as ProsemirrorNode, N
|
|
|
17
17
|
import { EditorState, NodeSelection, Plugin, TextSelection, Transaction } from 'prosemirror-state';
|
|
18
18
|
import { EditorView, NodeView } from 'prosemirror-view';
|
|
19
19
|
export type Marks = 'bold' | 'code' | 'italic' | 'smallcaps' | 'strikethrough' | 'styled' | 'subscript' | 'superscript' | 'underline' | 'tracked_insert' | 'tracked_delete';
|
|
20
|
-
export type Nodes = 'attribution' | 'bibliography_item' | 'bibliography_element' | 'bibliography_section' | 'blockquote_element' | 'list' | 'caption' | 'caption_title' | 'comment' | 'comments' | 'citation' | 'cross_reference' | 'doc' | 'equation' | 'equation_element' | 'figcaption' | 'figure' | 'graphical_abstract_section' | 'figure_element' | 'footnote' | 'footnotes_element' | 'footnotes_section' | 'hard_break' | 'highlight_marker' | 'inline_equation' | 'inline_footnote' | 'keyword' | 'keywords_element' | 'keyword_group' | 'keywords' | 'link' | 'list_item' | 'listing' | 'listing_element' | 'manuscript' | 'abstracts' | 'body' | 'backmatter' | 'missing_figure' | 'paragraph' | 'placeholder' | 'placeholder_element' | 'pullquote_element' | 'section' | 'section_label' | 'section_title' | 'section_title_plain' | 'table' | 'table_cell' | 'table_element' | 'table_row' | 'table_colgroup' | 'table_col' | 'table_header' | 'text' | 'text_block' | 'affiliation' | 'contributor' | 'table_element_footer' | 'title' | 'affiliations' | 'contributors' | 'supplements' | 'supplement' | 'author_notes' | 'corresp' | 'general_table_footnote' | 'box_element' | 'awards' | 'award' | 'embed' | 'image_element' | 'attachment' | 'attachments' | 'alt_title'
|
|
20
|
+
export type Nodes = 'attribution' | 'bibliography_item' | 'bibliography_element' | 'bibliography_section' | 'blockquote_element' | 'list' | 'caption' | 'caption_title' | 'comment' | 'comments' | 'citation' | 'cross_reference' | 'doc' | 'equation' | 'equation_element' | 'figcaption' | 'figure' | 'graphical_abstract_section' | 'figure_element' | 'footnote' | 'footnotes_element' | 'footnotes_section' | 'hard_break' | 'highlight_marker' | 'inline_equation' | 'inline_footnote' | 'keyword' | 'keywords_element' | 'keyword_group' | 'keywords' | 'link' | 'list_item' | 'listing' | 'listing_element' | 'manuscript' | 'abstracts' | 'body' | 'backmatter' | 'missing_figure' | 'paragraph' | 'placeholder' | 'placeholder_element' | 'pullquote_element' | 'section' | 'section_label' | 'section_title' | 'section_title_plain' | 'table' | 'table_cell' | 'table_element' | 'table_row' | 'table_colgroup' | 'table_col' | 'table_header' | 'text' | 'text_block' | 'affiliation' | 'contributor' | 'table_element_footer' | 'title' | 'affiliations' | 'contributors' | 'supplements' | 'supplement' | 'author_notes' | 'corresp' | 'general_table_footnote' | 'box_element' | 'awards' | 'award' | 'embed' | 'image_element' | 'attachment' | 'attachments' | 'alt_title';
|
|
21
21
|
export type ManuscriptSchema = Schema<Nodes, Marks>;
|
|
22
22
|
export type ManuscriptEditorState = EditorState;
|
|
23
23
|
export type ManuscriptEditorView = EditorView;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.0.48
|
|
1
|
+
export declare const VERSION = "3.0.48";
|
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.48
|
|
4
|
+
"version": "3.0.48",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -25,14 +25,13 @@
|
|
|
25
25
|
"prettier": "prettier --write \"src/**/*.{ts,tsx}\" \"*.{js,json}\"",
|
|
26
26
|
"preversion": "npm-run-all --parallel typecheck lint build test",
|
|
27
27
|
"test": "jest --runInBand",
|
|
28
|
-
"test-importer": "jest -i src/jats/__tests__/jats-importer.test.ts",
|
|
29
28
|
"test:debug": "DEBUG=manuscripts-transform yarn test",
|
|
30
29
|
"typecheck": "tsc --noEmit",
|
|
31
30
|
"version": "yarn build"
|
|
32
31
|
},
|
|
33
32
|
"dependencies": {
|
|
34
33
|
"@manuscripts/json-schema": "2.2.11",
|
|
35
|
-
"@manuscripts/library": "1.3.
|
|
34
|
+
"@manuscripts/library": "1.3.12",
|
|
36
35
|
"debug": "^4.3.4",
|
|
37
36
|
"jszip": "^3.10.1",
|
|
38
37
|
"lodash": "^4.17.21",
|
|
@@ -1,44 +0,0 @@
|
|
|
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.isAltTitlesSectionNode = exports.altTitlesSection = void 0;
|
|
19
|
-
exports.altTitlesSection = {
|
|
20
|
-
content: 'alt_title*',
|
|
21
|
-
attrs: {
|
|
22
|
-
id: { default: '' },
|
|
23
|
-
},
|
|
24
|
-
group: 'block sections',
|
|
25
|
-
selectable: false,
|
|
26
|
-
parseDOM: [
|
|
27
|
-
{
|
|
28
|
-
tag: 'section.alt-titles',
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
toDOM: (node) => {
|
|
32
|
-
const altTitlesSectionNode = node;
|
|
33
|
-
return [
|
|
34
|
-
'section',
|
|
35
|
-
{
|
|
36
|
-
id: altTitlesSectionNode.attrs.id,
|
|
37
|
-
class: 'alt-titles',
|
|
38
|
-
},
|
|
39
|
-
0,
|
|
40
|
-
];
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
const isAltTitlesSectionNode = (node) => node.type === node.type.schema.nodes.footnotes_section;
|
|
44
|
-
exports.isAltTitlesSectionNode = isAltTitlesSectionNode;
|
|
@@ -1,40 +0,0 @@
|
|
|
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 altTitlesSection = {
|
|
17
|
-
content: 'alt_title*',
|
|
18
|
-
attrs: {
|
|
19
|
-
id: { default: '' },
|
|
20
|
-
},
|
|
21
|
-
group: 'block sections',
|
|
22
|
-
selectable: false,
|
|
23
|
-
parseDOM: [
|
|
24
|
-
{
|
|
25
|
-
tag: 'section.alt-titles',
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
toDOM: (node) => {
|
|
29
|
-
const altTitlesSectionNode = node;
|
|
30
|
-
return [
|
|
31
|
-
'section',
|
|
32
|
-
{
|
|
33
|
-
id: altTitlesSectionNode.attrs.id,
|
|
34
|
-
class: 'alt-titles',
|
|
35
|
-
},
|
|
36
|
-
0,
|
|
37
|
-
];
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
export const isAltTitlesSectionNode = (node) => node.type === node.type.schema.nodes.footnotes_section;
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
}
|
|
21
|
-
export interface AltTitlesSectionNode extends ManuscriptNode {
|
|
22
|
-
attrs: Attrs;
|
|
23
|
-
}
|
|
24
|
-
export declare const altTitlesSection: NodeSpec;
|
|
25
|
-
export declare const isAltTitlesSectionNode: (node: ManuscriptNode) => node is AltTitlesSectionNode;
|
|
26
|
-
export {};
|