@manuscripts/transform 3.0.47 → 3.0.48-LEAN-4406-2.1

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.
@@ -599,6 +599,7 @@ class JATSExporter {
599
599
  corresp: () => '',
600
600
  title: () => '',
601
601
  alt_title: () => '',
602
+ alt_titles: () => '',
602
603
  text_block: (node) => nodes.paragraph(node),
603
604
  affiliations: () => '',
604
605
  contributors: () => '',
@@ -246,6 +246,16 @@ 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
+ },
249
259
  {
250
260
  tag: 'alt-title[alt-title-type]',
251
261
  node: 'alt_title',
@@ -36,6 +36,7 @@ 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");
39
40
  const attachment_1 = require("./nodes/attachment");
40
41
  const attachments_1 = require("./nodes/attachments");
41
42
  const attribution_1 = require("./nodes/attribution");
@@ -166,6 +167,7 @@ __exportStar(require("./types"), exports);
166
167
  __exportStar(require("./nodes/attachment"), exports);
167
168
  __exportStar(require("./nodes/attachments"), exports);
168
169
  __exportStar(require("./nodes/alt_title"), exports);
170
+ __exportStar(require("./nodes/alt_titles_section"), exports);
169
171
  exports.schema = new prosemirror_model_1.Schema({
170
172
  marks: {
171
173
  bold: marks_1.bold,
@@ -256,5 +258,6 @@ exports.schema = new prosemirror_model_1.Schema({
256
258
  attachment: attachment_1.attachment,
257
259
  attachments: attachments_1.attachments,
258
260
  alt_title: alt_title_1.altTitle,
261
+ alt_titles: alt_titles_section_1.altTitlesSection,
259
262
  },
260
263
  });
@@ -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 alt_title* contributors? affiliations? author_notes? awards? keywords? supplements? abstracts body backmatter comments attachments?',
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: '' },
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = "3.0.47";
4
+ exports.VERSION = "3.0.48-LEAN-4406-2.1";
@@ -591,6 +591,7 @@ export class JATSExporter {
591
591
  corresp: () => '',
592
592
  title: () => '',
593
593
  alt_title: () => '',
594
+ alt_titles: () => '',
594
595
  text_block: (node) => nodes.paragraph(node),
595
596
  affiliations: () => '',
596
597
  contributors: () => '',
@@ -243,6 +243,16 @@ 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
+ },
246
256
  {
247
257
  tag: 'alt-title[alt-title-type]',
248
258
  node: 'alt_title',
@@ -19,6 +19,7 @@ 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';
22
23
  import { attachment } from './nodes/attachment';
23
24
  import { attachments } from './nodes/attachments';
24
25
  import { attribution } from './nodes/attribution';
@@ -149,6 +150,7 @@ export * from './types';
149
150
  export * from './nodes/attachment';
150
151
  export * from './nodes/attachments';
151
152
  export * from './nodes/alt_title';
153
+ export * from './nodes/alt_titles_section';
152
154
  export const schema = new Schema({
153
155
  marks: {
154
156
  bold,
@@ -239,5 +241,6 @@ export const schema = new Schema({
239
241
  attachment,
240
242
  attachments,
241
243
  alt_title: altTitle,
244
+ alt_titles: altTitlesSection,
242
245
  },
243
246
  });
@@ -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 alt_title* contributors? affiliations? author_notes? awards? keywords? supplements? abstracts body backmatter comments attachments?',
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: '' },
@@ -1 +1 @@
1
- export const VERSION = "3.0.47";
1
+ export const VERSION = "3.0.48-LEAN-4406-2.1";
@@ -81,4 +81,5 @@ 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 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';
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_titles';
21
21
  export type ManuscriptSchema = Schema<Nodes, Marks>;
22
22
  export type ManuscriptEditorState = EditorState;
23
23
  export type ManuscriptEditorView = EditorView;
@@ -1 +1 @@
1
- export declare const VERSION = "3.0.47";
1
+ export declare const VERSION = "3.0.48-LEAN-4406-2.1";
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.47",
4
+ "version": "3.0.48-LEAN-4406-2.1",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-transform",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",