@manuscripts/transform 1.1.2-LEAN-2320 → 1.1.3
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/comment.js +4 -1
- package/dist/cjs/transformer/decode.js +3 -0
- package/dist/cjs/transformer/encode.js +3 -0
- package/dist/es/schema/nodes/comment.js +4 -1
- package/dist/es/transformer/decode.js +3 -0
- package/dist/es/transformer/encode.js +3 -0
- package/dist/types/schema/nodes/comment.d.ts +4 -0
- package/package.json +1 -1
|
@@ -21,6 +21,9 @@ exports.comment = {
|
|
|
21
21
|
id: { default: '' },
|
|
22
22
|
contents: { default: '' },
|
|
23
23
|
target: { default: '' },
|
|
24
|
-
selector: { default:
|
|
24
|
+
selector: { default: null },
|
|
25
|
+
resolved: { default: false },
|
|
26
|
+
contributions: { default: [] },
|
|
27
|
+
originalText: { default: '' },
|
|
25
28
|
},
|
|
26
29
|
};
|
|
@@ -362,6 +362,9 @@ const encoders = {
|
|
|
362
362
|
selector: node.attrs.selector,
|
|
363
363
|
target: node.attrs.target,
|
|
364
364
|
contents: node.attrs.contents,
|
|
365
|
+
resolved: node.attrs.resolved,
|
|
366
|
+
contributions: node.attrs.contributions,
|
|
367
|
+
originalText: node.attrs.originalText,
|
|
365
368
|
}),
|
|
366
369
|
footnote: (node, parent) => ({
|
|
367
370
|
containingObject: parent.attrs.id,
|
|
@@ -18,6 +18,9 @@ export const comment = {
|
|
|
18
18
|
id: { default: '' },
|
|
19
19
|
contents: { default: '' },
|
|
20
20
|
target: { default: '' },
|
|
21
|
-
selector: { default:
|
|
21
|
+
selector: { default: null },
|
|
22
|
+
resolved: { default: false },
|
|
23
|
+
contributions: { default: [] },
|
|
24
|
+
originalText: { default: '' },
|
|
22
25
|
},
|
|
23
26
|
};
|
|
@@ -354,6 +354,9 @@ const encoders = {
|
|
|
354
354
|
selector: node.attrs.selector,
|
|
355
355
|
target: node.attrs.target,
|
|
356
356
|
contents: node.attrs.contents,
|
|
357
|
+
resolved: node.attrs.resolved,
|
|
358
|
+
contributions: node.attrs.contributions,
|
|
359
|
+
originalText: node.attrs.originalText,
|
|
357
360
|
}),
|
|
358
361
|
footnote: (node, parent) => ({
|
|
359
362
|
containingObject: parent.attrs.id,
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { Contribution } from '@manuscripts/json-schema';
|
|
16
17
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
18
|
import { ManuscriptNode } from '../types';
|
|
18
19
|
interface Attrs {
|
|
@@ -23,6 +24,9 @@ interface Attrs {
|
|
|
23
24
|
from: number;
|
|
24
25
|
to: number;
|
|
25
26
|
};
|
|
27
|
+
resolved?: boolean;
|
|
28
|
+
contributions?: Contribution[];
|
|
29
|
+
originalText?: string;
|
|
26
30
|
}
|
|
27
31
|
export interface CommentNode extends ManuscriptNode {
|
|
28
32
|
attrs: Attrs;
|
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": "1.1.
|
|
4
|
+
"version": "1.1.3",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|