@manuscripts/transform 3.0.52 → 3.0.53
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 +1 -0
- package/dist/cjs/jats/importer/jats-dom-parser.js +10 -0
- package/dist/cjs/schema/index.js +3 -0
- package/dist/cjs/schema/nodes/alt_titles_section.js +44 -0
- package/dist/cjs/schema/nodes/manuscript.js +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/es/jats/exporter/jats-exporter.js +1 -0
- package/dist/es/jats/importer/jats-dom-parser.js +10 -0
- package/dist/es/schema/index.js +3 -0
- package/dist/es/schema/nodes/alt_titles_section.js +40 -0
- package/dist/es/schema/nodes/manuscript.js +1 -1
- package/dist/es/version.js +1 -1
- package/dist/types/schema/index.d.ts +1 -0
- package/dist/types/schema/nodes/alt_titles_section.d.ts +26 -0
- package/dist/types/schema/types.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -254,6 +254,16 @@ class JATSDOMParser {
|
|
|
254
254
|
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);
|
|
255
255
|
},
|
|
256
256
|
},
|
|
257
|
+
{
|
|
258
|
+
tag: 'titles',
|
|
259
|
+
node: 'alt_titles',
|
|
260
|
+
getAttrs: (node) => {
|
|
261
|
+
const element = node;
|
|
262
|
+
return {
|
|
263
|
+
id: element.getAttribute('id'),
|
|
264
|
+
};
|
|
265
|
+
},
|
|
266
|
+
},
|
|
257
267
|
{
|
|
258
268
|
tag: 'alt-title[alt-title-type]',
|
|
259
269
|
node: 'alt_title',
|
package/dist/cjs/schema/index.js
CHANGED
|
@@ -37,6 +37,7 @@ const affiliation_1 = require("./nodes/affiliation");
|
|
|
37
37
|
const affiliations_1 = require("./nodes/affiliations");
|
|
38
38
|
const alt_text_1 = require("./nodes/alt_text");
|
|
39
39
|
const alt_title_1 = require("./nodes/alt_title");
|
|
40
|
+
const alt_titles_section_1 = require("./nodes/alt_titles_section");
|
|
40
41
|
const attachment_1 = require("./nodes/attachment");
|
|
41
42
|
const attachments_1 = require("./nodes/attachments");
|
|
42
43
|
const attribution_1 = require("./nodes/attribution");
|
|
@@ -168,6 +169,7 @@ __exportStar(require("./types"), exports);
|
|
|
168
169
|
__exportStar(require("./nodes/attachment"), exports);
|
|
169
170
|
__exportStar(require("./nodes/attachments"), exports);
|
|
170
171
|
__exportStar(require("./nodes/alt_title"), exports);
|
|
172
|
+
__exportStar(require("./nodes/alt_titles_section"), exports);
|
|
171
173
|
__exportStar(require("./nodes/alt_text"), exports);
|
|
172
174
|
__exportStar(require("./nodes/long_desc"), exports);
|
|
173
175
|
exports.schema = new prosemirror_model_1.Schema({
|
|
@@ -260,6 +262,7 @@ exports.schema = new prosemirror_model_1.Schema({
|
|
|
260
262
|
attachment: attachment_1.attachment,
|
|
261
263
|
attachments: attachments_1.attachments,
|
|
262
264
|
alt_title: alt_title_1.altTitle,
|
|
265
|
+
alt_titles: alt_titles_section_1.altTitlesSection,
|
|
263
266
|
alt_text: alt_text_1.altText,
|
|
264
267
|
long_desc: long_desc_1.longDesc,
|
|
265
268
|
},
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* © 2025 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.alt_titles_section;
|
|
44
|
+
exports.isAltTitlesSectionNode = isAltTitlesSectionNode;
|
|
@@ -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_titles? 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
|
@@ -251,6 +251,16 @@ export class JATSDOMParser {
|
|
|
251
251
|
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);
|
|
252
252
|
},
|
|
253
253
|
},
|
|
254
|
+
{
|
|
255
|
+
tag: 'titles',
|
|
256
|
+
node: 'alt_titles',
|
|
257
|
+
getAttrs: (node) => {
|
|
258
|
+
const element = node;
|
|
259
|
+
return {
|
|
260
|
+
id: element.getAttribute('id'),
|
|
261
|
+
};
|
|
262
|
+
},
|
|
263
|
+
},
|
|
254
264
|
{
|
|
255
265
|
tag: 'alt-title[alt-title-type]',
|
|
256
266
|
node: 'alt_title',
|
package/dist/es/schema/index.js
CHANGED
|
@@ -20,6 +20,7 @@ import { affiliation } from './nodes/affiliation';
|
|
|
20
20
|
import { affiliations } from './nodes/affiliations';
|
|
21
21
|
import { altText } from './nodes/alt_text';
|
|
22
22
|
import { altTitle } from './nodes/alt_title';
|
|
23
|
+
import { altTitlesSection } from './nodes/alt_titles_section';
|
|
23
24
|
import { attachment } from './nodes/attachment';
|
|
24
25
|
import { attachments } from './nodes/attachments';
|
|
25
26
|
import { attribution } from './nodes/attribution';
|
|
@@ -151,6 +152,7 @@ export * from './types';
|
|
|
151
152
|
export * from './nodes/attachment';
|
|
152
153
|
export * from './nodes/attachments';
|
|
153
154
|
export * from './nodes/alt_title';
|
|
155
|
+
export * from './nodes/alt_titles_section';
|
|
154
156
|
export * from './nodes/alt_text';
|
|
155
157
|
export * from './nodes/long_desc';
|
|
156
158
|
export const schema = new Schema({
|
|
@@ -243,6 +245,7 @@ export const schema = new Schema({
|
|
|
243
245
|
attachment,
|
|
244
246
|
attachments,
|
|
245
247
|
alt_title: altTitle,
|
|
248
|
+
alt_titles: altTitlesSection,
|
|
246
249
|
alt_text: altText,
|
|
247
250
|
long_desc: longDesc,
|
|
248
251
|
},
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2025 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.alt_titles_section;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export const manuscript = {
|
|
17
|
-
content: 'title
|
|
17
|
+
content: 'title alt_titles? 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.
|
|
1
|
+
export const VERSION = "3.0.53";
|
|
@@ -81,6 +81,7 @@ export * from './types';
|
|
|
81
81
|
export * from './nodes/attachment';
|
|
82
82
|
export * from './nodes/attachments';
|
|
83
83
|
export * from './nodes/alt_title';
|
|
84
|
+
export * from './nodes/alt_titles_section';
|
|
84
85
|
export * from './nodes/alt_text';
|
|
85
86
|
export * from './nodes/long_desc';
|
|
86
87
|
export declare const schema: Schema<Nodes, Marks>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2025 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 {};
|
|
@@ -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' | 'alt_text' | 'long_desc';
|
|
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' | 'alt_text' | 'alt_titles' | 'long_desc';
|
|
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.
|
|
1
|
+
export declare const VERSION = "3.0.53";
|
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.53",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|