@manuscripts/transform 4.2.0 → 4.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.
- package/dist/cjs/schema/nodes/affiliation.js +1 -0
- package/dist/cjs/schema/nodes/contributor.js +1 -0
- package/dist/cjs/schema/nodes/list.js +5 -0
- package/dist/cjs/schema/nodes/table.js +15 -3
- package/dist/cjs/schema/nodes/table_col.js +5 -0
- package/dist/cjs/version.js +1 -1
- package/dist/es/schema/nodes/affiliation.js +1 -0
- package/dist/es/schema/nodes/contributor.js +1 -0
- package/dist/es/schema/nodes/list.js +5 -0
- package/dist/es/schema/nodes/table.js +15 -3
- package/dist/es/schema/nodes/table_col.js +5 -0
- package/dist/es/version.js +1 -1
- package/dist/types/schema/nodes/list.d.ts +1 -0
- package/dist/types/schema/nodes/table_col.d.ts +1 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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: {
|
|
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: {
|
|
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: {
|
|
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
|
};
|
package/dist/cjs/version.js
CHANGED
|
@@ -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: {
|
|
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: {
|
|
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: {
|
|
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
|
};
|
package/dist/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "4.2.
|
|
1
|
+
export const VERSION = "4.2.1";
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.2.
|
|
1
|
+
export declare const VERSION = "4.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": "4.2.
|
|
4
|
+
"version": "4.2.1",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|