@manuscripts/transform 4.2.0 → 4.2.2

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.
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isAffiliationNode = exports.affiliation = void 0;
4
4
  exports.affiliation = {
5
5
  content: 'inline*',
6
+ atom: true,
6
7
  attrs: {
7
8
  id: { default: '' },
8
9
  institution: { default: '' },
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isContributorNode = exports.contributor = void 0;
4
4
  exports.contributor = {
5
5
  content: 'inline*',
6
+ atom: true,
6
7
  attrs: {
7
8
  id: { default: '' },
8
9
  role: { default: '' },
@@ -51,6 +51,7 @@ exports.listItem = {
51
51
  defining: true,
52
52
  attrs: {
53
53
  placeholder: { default: 'List item' },
54
+ id: { default: '' },
54
55
  dataTracked: { default: null },
55
56
  },
56
57
  parseDOM: [
@@ -60,6 +61,7 @@ exports.listItem = {
60
61
  const dom = p;
61
62
  return {
62
63
  placeholder: dom.getAttribute('data-placeholder-text') || '',
64
+ id: dom.getAttribute('id') || '',
63
65
  };
64
66
  },
65
67
  },
@@ -70,6 +72,9 @@ exports.listItem = {
70
72
  if (listItemNode.attrs.placeholder) {
71
73
  attrs['data-placeholder-text'] = listItemNode.attrs.placeholder;
72
74
  }
75
+ if (listItemNode.attrs.id) {
76
+ attrs['id'] = listItemNode.attrs.id;
77
+ }
73
78
  return ['li', attrs, 0];
74
79
  },
75
80
  };
@@ -89,13 +89,25 @@ exports.table = {
89
89
  };
90
90
  exports.tableRow = {
91
91
  ...tableNodes.table_row,
92
- attrs: { ...tableNodes.table_row.attrs, dataTracked: { default: null } },
92
+ attrs: {
93
+ ...tableNodes.table_row.attrs,
94
+ id: { default: '' },
95
+ dataTracked: { default: null }
96
+ },
93
97
  };
94
98
  exports.tableCell = {
95
99
  ...tableNodes.table_cell,
96
- attrs: { ...tableNodes.table_cell.attrs, dataTracked: { default: null } },
100
+ attrs: {
101
+ ...tableNodes.table_cell.attrs,
102
+ id: { default: '' },
103
+ dataTracked: { default: null }
104
+ },
97
105
  };
98
106
  exports.tableHeader = {
99
107
  ...tableNodes.table_header,
100
- attrs: { ...tableNodes.table_header.attrs, dataTracked: { default: null } },
108
+ attrs: {
109
+ ...tableNodes.table_header.attrs,
110
+ id: { default: '' },
111
+ dataTracked: { default: null }
112
+ },
101
113
  };
@@ -31,6 +31,7 @@ exports.tableColGroup = {
31
31
  exports.tableCol = {
32
32
  attrs: {
33
33
  width: { default: '' },
34
+ id: { default: '' },
34
35
  },
35
36
  group: 'block',
36
37
  parseDOM: [
@@ -40,6 +41,7 @@ exports.tableCol = {
40
41
  const dom = p;
41
42
  return {
42
43
  width: dom.getAttribute('width'),
44
+ id: dom.getAttribute('id'),
43
45
  };
44
46
  },
45
47
  },
@@ -50,6 +52,9 @@ exports.tableCol = {
50
52
  if (tableColNode.attrs.width) {
51
53
  attrs['width'] = tableColNode.attrs.width;
52
54
  }
55
+ if (tableColNode.attrs.id) {
56
+ attrs['id'] = tableColNode.attrs.id;
57
+ }
53
58
  return ['col', attrs];
54
59
  },
55
60
  };
@@ -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.2.0";
4
+ exports.VERSION = "4.2.2";
@@ -1,5 +1,6 @@
1
1
  export const affiliation = {
2
2
  content: 'inline*',
3
+ atom: true,
3
4
  attrs: {
4
5
  id: { default: '' },
5
6
  institution: { default: '' },
@@ -1,5 +1,6 @@
1
1
  export const contributor = {
2
2
  content: 'inline*',
3
+ atom: true,
3
4
  attrs: {
4
5
  id: { default: '' },
5
6
  role: { default: '' },
@@ -48,6 +48,7 @@ export const listItem = {
48
48
  defining: true,
49
49
  attrs: {
50
50
  placeholder: { default: 'List item' },
51
+ id: { default: '' },
51
52
  dataTracked: { default: null },
52
53
  },
53
54
  parseDOM: [
@@ -57,6 +58,7 @@ export const listItem = {
57
58
  const dom = p;
58
59
  return {
59
60
  placeholder: dom.getAttribute('data-placeholder-text') || '',
61
+ id: dom.getAttribute('id') || '',
60
62
  };
61
63
  },
62
64
  },
@@ -67,6 +69,9 @@ export const listItem = {
67
69
  if (listItemNode.attrs.placeholder) {
68
70
  attrs['data-placeholder-text'] = listItemNode.attrs.placeholder;
69
71
  }
72
+ if (listItemNode.attrs.id) {
73
+ attrs['id'] = listItemNode.attrs.id;
74
+ }
70
75
  return ['li', attrs, 0];
71
76
  },
72
77
  };
@@ -86,13 +86,25 @@ export const table = {
86
86
  };
87
87
  export const tableRow = {
88
88
  ...tableNodes.table_row,
89
- attrs: { ...tableNodes.table_row.attrs, dataTracked: { default: null } },
89
+ attrs: {
90
+ ...tableNodes.table_row.attrs,
91
+ id: { default: '' },
92
+ dataTracked: { default: null }
93
+ },
90
94
  };
91
95
  export const tableCell = {
92
96
  ...tableNodes.table_cell,
93
- attrs: { ...tableNodes.table_cell.attrs, dataTracked: { default: null } },
97
+ attrs: {
98
+ ...tableNodes.table_cell.attrs,
99
+ id: { default: '' },
100
+ dataTracked: { default: null }
101
+ },
94
102
  };
95
103
  export const tableHeader = {
96
104
  ...tableNodes.table_header,
97
- attrs: { ...tableNodes.table_header.attrs, dataTracked: { default: null } },
105
+ attrs: {
106
+ ...tableNodes.table_header.attrs,
107
+ id: { default: '' },
108
+ dataTracked: { default: null }
109
+ },
98
110
  };
@@ -28,6 +28,7 @@ export const tableColGroup = {
28
28
  export const tableCol = {
29
29
  attrs: {
30
30
  width: { default: '' },
31
+ id: { default: '' },
31
32
  },
32
33
  group: 'block',
33
34
  parseDOM: [
@@ -37,6 +38,7 @@ export const tableCol = {
37
38
  const dom = p;
38
39
  return {
39
40
  width: dom.getAttribute('width'),
41
+ id: dom.getAttribute('id'),
40
42
  };
41
43
  },
42
44
  },
@@ -47,6 +49,9 @@ export const tableCol = {
47
49
  if (tableColNode.attrs.width) {
48
50
  attrs['width'] = tableColNode.attrs.width;
49
51
  }
52
+ if (tableColNode.attrs.id) {
53
+ attrs['id'] = tableColNode.attrs.id;
54
+ }
50
55
  return ['col', attrs];
51
56
  },
52
57
  };
@@ -1 +1 @@
1
- export const VERSION = "4.2.0";
1
+ export const VERSION = "4.2.2";
@@ -12,6 +12,7 @@ export declare const list: NodeSpec;
12
12
  export interface ListItemNode extends ManuscriptNode {
13
13
  attrs: {
14
14
  placeholder: string;
15
+ id: string;
15
16
  };
16
17
  }
17
18
  export declare const listItem: NodeSpec;
@@ -18,6 +18,7 @@ import { ManuscriptNode } from '../types';
18
18
  export interface TableColNode extends ManuscriptNode {
19
19
  attrs: {
20
20
  width: string;
21
+ id: string;
21
22
  };
22
23
  }
23
24
  export declare const tableColGroup: NodeSpec;
@@ -1 +1 @@
1
- export declare const VERSION = "4.2.0";
1
+ export declare const VERSION = "4.2.2";
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.2.0",
4
+ "version": "4.2.2",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-transform",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",
@@ -33,7 +33,7 @@
33
33
  "citeproc": "2.4.63",
34
34
  "jszip": "3.10.1",
35
35
  "lodash": "4.17.21",
36
- "prosemirror-model": "1.25.0",
36
+ "prosemirror-model": "1.25.1",
37
37
  "prosemirror-tables": "1.7.1",
38
38
  "prosemirror-utils": "1.2.2",
39
39
  "semver": "7.7.2",