@manuscripts/transform 4.3.11 → 4.3.13

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.
@@ -1413,8 +1413,7 @@ class JATSExporter {
1413
1413
  footNote.setAttribute('fn-type', fnType);
1414
1414
  const title = section.querySelector('title');
1415
1415
  if (title) {
1416
- const footNoteTitle = this.createElement('p');
1417
- footNoteTitle.setAttribute('content-type', 'fn-title');
1416
+ const footNoteTitle = this.createElement('label');
1418
1417
  footNoteTitle.textContent = title.textContent;
1419
1418
  section.removeChild(title);
1420
1419
  footNote.append(footNoteTitle);
@@ -187,7 +187,8 @@ const moveSpecialFootnotes = (doc, group, sectionCategories, createElement) => {
187
187
  const category = sectionCategories.find((category) => category.synonyms.includes(type));
188
188
  if (category) {
189
189
  const section = createElement('sec');
190
- const fnTitle = fn.querySelector('p[content-type="fn-title"]');
190
+ const fnTitle = fn.querySelector('label') ||
191
+ fn.querySelector('p[content-type="fn-title"]');
191
192
  if (fnTitle) {
192
193
  const title = createElement('title');
193
194
  const titleText = fnTitle.textContent?.trim();
@@ -15,7 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.supplements = void 0;
18
+ exports.isSupplementsNode = exports.supplements = void 0;
19
19
  exports.supplements = {
20
20
  content: 'section_title supplement*',
21
21
  attrs: {
@@ -43,3 +43,5 @@ exports.supplements = {
43
43
  ];
44
44
  },
45
45
  };
46
+ const isSupplementsNode = (node) => node.type === node.type.schema.nodes.supplements;
47
+ exports.isSupplementsNode = isSupplementsNode;
@@ -60,4 +60,5 @@ exports.nodeNames = new Map([
60
60
  [schema_1.schema.nodes.pullquote_element, 'Pull Quote'],
61
61
  [schema_1.schema.nodes.box_element, 'Box'],
62
62
  [schema_1.schema.nodes.supplements, 'Supplements'],
63
+ [schema_1.schema.nodes.attachments, 'Main Document'],
63
64
  ]);
@@ -68,8 +68,9 @@ const nodeTitle = (node) => {
68
68
  case nodes.multi_graphic_figure_element:
69
69
  case nodes.image_element:
70
70
  case nodes.hero_image:
71
- return '';
72
71
  case nodes.box_element:
72
+ case nodes.supplements:
73
+ case nodes.attachments:
73
74
  return '';
74
75
  default:
75
76
  return textSnippet(node);
@@ -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 = "4.3.11";
4
+ exports.VERSION = "4.3.13";
@@ -1373,8 +1373,7 @@ export class JATSExporter {
1373
1373
  footNote.setAttribute('fn-type', fnType);
1374
1374
  const title = section.querySelector('title');
1375
1375
  if (title) {
1376
- const footNoteTitle = this.createElement('p');
1377
- footNoteTitle.setAttribute('content-type', 'fn-title');
1376
+ const footNoteTitle = this.createElement('label');
1378
1377
  footNoteTitle.textContent = title.textContent;
1379
1378
  section.removeChild(title);
1380
1379
  footNote.append(footNoteTitle);
@@ -172,7 +172,8 @@ const moveSpecialFootnotes = (doc, group, sectionCategories, createElement) => {
172
172
  const category = sectionCategories.find((category) => category.synonyms.includes(type));
173
173
  if (category) {
174
174
  const section = createElement('sec');
175
- const fnTitle = fn.querySelector('p[content-type="fn-title"]');
175
+ const fnTitle = fn.querySelector('label') ||
176
+ fn.querySelector('p[content-type="fn-title"]');
176
177
  if (fnTitle) {
177
178
  const title = createElement('title');
178
179
  const titleText = fnTitle.textContent?.trim();
@@ -40,3 +40,4 @@ export const supplements = {
40
40
  ];
41
41
  },
42
42
  };
43
+ export const isSupplementsNode = (node) => node.type === node.type.schema.nodes.supplements;
@@ -57,4 +57,5 @@ export const nodeNames = new Map([
57
57
  [schema.nodes.pullquote_element, 'Pull Quote'],
58
58
  [schema.nodes.box_element, 'Box'],
59
59
  [schema.nodes.supplements, 'Supplements'],
60
+ [schema.nodes.attachments, 'Main Document'],
60
61
  ]);
@@ -65,8 +65,9 @@ export const nodeTitle = (node) => {
65
65
  case nodes.multi_graphic_figure_element:
66
66
  case nodes.image_element:
67
67
  case nodes.hero_image:
68
- return '';
69
68
  case nodes.box_element:
69
+ case nodes.supplements:
70
+ case nodes.attachments:
70
71
  return '';
71
72
  default:
72
73
  return textSnippet(node);
@@ -1 +1 @@
1
- export const VERSION = "4.3.11";
1
+ export const VERSION = "4.3.13";
@@ -22,4 +22,5 @@ export interface SupplementsNode extends ManuscriptNode {
22
22
  attrs: Attrs;
23
23
  }
24
24
  export declare const supplements: NodeSpec;
25
+ export declare const isSupplementsNode: (node: ManuscriptNode) => node is SupplementsNode;
25
26
  export {};
@@ -1 +1 @@
1
- export declare const VERSION = "4.3.11";
1
+ export declare const VERSION = "4.3.13";
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": "4.3.11",
4
+ "version": "4.3.13",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-transform",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",