@manuscripts/transform 2.3.15 → 2.3.16-LEAN-3753.0
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/equation_element.js +0 -1
- package/dist/cjs/schema/nodes/figure_element.js +0 -1
- package/dist/cjs/schema/nodes/footnote.js +0 -1
- package/dist/cjs/schema/nodes/inline_equation.js +0 -1
- package/dist/cjs/schema/nodes/keyword.js +0 -1
- package/dist/cjs/schema/nodes/listing.js +0 -1
- package/dist/cjs/schema/nodes/listing_element.js +0 -1
- package/dist/cjs/schema/nodes/paragraph.js +0 -1
- package/dist/cjs/schema/nodes/section.js +0 -1
- package/dist/cjs/schema/nodes/table_element.js +0 -1
- package/dist/cjs/transformer/decode.js +0 -13
- package/dist/cjs/version.js +1 -1
- package/dist/es/jats/importer/jats-body-dom-parser.js +1 -1
- package/dist/es/schema/nodes/equation_element.js +0 -1
- package/dist/es/schema/nodes/figure_element.js +0 -1
- package/dist/es/schema/nodes/footnote.js +0 -1
- package/dist/es/schema/nodes/inline_equation.js +0 -1
- package/dist/es/schema/nodes/keyword.js +0 -1
- package/dist/es/schema/nodes/listing.js +0 -1
- package/dist/es/schema/nodes/listing_element.js +0 -1
- package/dist/es/schema/nodes/paragraph.js +0 -1
- package/dist/es/schema/nodes/section.js +0 -1
- package/dist/es/schema/nodes/table_element.js +0 -1
- package/dist/es/transformer/decode.js +0 -13
- package/dist/es/version.js +1 -1
- package/dist/types/schema/nodes/equation_element.d.ts +0 -2
- package/dist/types/schema/nodes/figure_element.d.ts +0 -2
- package/dist/types/schema/nodes/footnote.d.ts +0 -2
- package/dist/types/schema/nodes/inline_equation.d.ts +0 -2
- package/dist/types/schema/nodes/keyword.d.ts +0 -2
- package/dist/types/schema/nodes/listing.d.ts +0 -2
- package/dist/types/schema/nodes/listing_element.d.ts +0 -2
- package/dist/types/schema/nodes/paragraph.d.ts +0 -2
- package/dist/types/schema/nodes/section.d.ts +0 -2
- package/dist/types/schema/nodes/table_element.d.ts +0 -2
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -220,7 +220,6 @@ class Decoder {
|
|
|
220
220
|
page: model.page,
|
|
221
221
|
title: model.title,
|
|
222
222
|
literal: model.literal,
|
|
223
|
-
comments: comments.map((c) => c.attrs.id),
|
|
224
223
|
});
|
|
225
224
|
},
|
|
226
225
|
[object_types_1.ExtraObjectTypes.PlaceholderElement]: (data) => {
|
|
@@ -238,7 +237,6 @@ class Decoder {
|
|
|
238
237
|
contentType: model.contentType,
|
|
239
238
|
src: model.src,
|
|
240
239
|
position: model.position,
|
|
241
|
-
comments: comments.map((c) => c.attrs.id),
|
|
242
240
|
});
|
|
243
241
|
},
|
|
244
242
|
[json_schema_1.ObjectTypes.FigureElement]: (data) => {
|
|
@@ -289,7 +287,6 @@ class Decoder {
|
|
|
289
287
|
suppressTitle: Boolean(model.suppressTitle === undefined ? true : model.suppressTitle),
|
|
290
288
|
attribution: model.attribution,
|
|
291
289
|
alternatives: model.alternatives,
|
|
292
|
-
comments: comments.map((c) => c.attrs.id),
|
|
293
290
|
}, content);
|
|
294
291
|
},
|
|
295
292
|
[json_schema_1.ObjectTypes.Equation]: (data) => {
|
|
@@ -336,7 +333,6 @@ class Decoder {
|
|
|
336
333
|
topNode: schema_1.schema.nodes.footnote.create({
|
|
337
334
|
id: model._id,
|
|
338
335
|
kind: model.kind,
|
|
339
|
-
comments: comments.map((c) => c.attrs.id),
|
|
340
336
|
}),
|
|
341
337
|
});
|
|
342
338
|
footnotesOfKind.push(footnote);
|
|
@@ -357,7 +353,6 @@ class Decoder {
|
|
|
357
353
|
topNode: schema_1.schema.nodes.footnote.create({
|
|
358
354
|
id: footnoteModel._id,
|
|
359
355
|
kind: footnoteModel.kind,
|
|
360
|
-
comments: comments.map((c) => c.attrs.id),
|
|
361
356
|
}),
|
|
362
357
|
});
|
|
363
358
|
},
|
|
@@ -379,7 +374,6 @@ class Decoder {
|
|
|
379
374
|
return schema_1.schema.nodes.keyword_group.create({
|
|
380
375
|
id: keywordGroup._id,
|
|
381
376
|
type: keywordGroup.type,
|
|
382
|
-
comments: comments.map((c) => c.attrs.id),
|
|
383
377
|
}, keywords);
|
|
384
378
|
},
|
|
385
379
|
[json_schema_1.ObjectTypes.Keyword]: (data) => {
|
|
@@ -389,7 +383,6 @@ class Decoder {
|
|
|
389
383
|
return schema_1.schema.nodes.keyword.create({
|
|
390
384
|
id: keyword._id,
|
|
391
385
|
contents: keyword.name,
|
|
392
|
-
comments: comments.map((c) => c.attrs.id),
|
|
393
386
|
}, schema_1.schema.text(keyword.name));
|
|
394
387
|
},
|
|
395
388
|
[json_schema_1.ObjectTypes.ListElement]: (data) => {
|
|
@@ -403,7 +396,6 @@ class Decoder {
|
|
|
403
396
|
id: model._id,
|
|
404
397
|
listStyleType: model.listStyleType || 'order',
|
|
405
398
|
paragraphStyle: model.paragraphStyle,
|
|
406
|
-
comments: comments.map((c) => c.attrs.id),
|
|
407
399
|
}),
|
|
408
400
|
});
|
|
409
401
|
case 'ul':
|
|
@@ -427,7 +419,6 @@ class Decoder {
|
|
|
427
419
|
contents: model.contents,
|
|
428
420
|
language: model.language,
|
|
429
421
|
languageKey: model.languageKey,
|
|
430
|
-
comments: comments.map((c) => c.attrs.id),
|
|
431
422
|
});
|
|
432
423
|
},
|
|
433
424
|
[json_schema_1.ObjectTypes.ListingElement]: (data) => {
|
|
@@ -453,7 +444,6 @@ class Decoder {
|
|
|
453
444
|
id: model._id,
|
|
454
445
|
suppressCaption: model.suppressCaption,
|
|
455
446
|
suppressTitle: Boolean(model.suppressTitle === undefined ? true : model.suppressTitle),
|
|
456
|
-
comments: comments.map((c) => c.attrs.id),
|
|
457
447
|
}, [listing, figcaption]);
|
|
458
448
|
},
|
|
459
449
|
[json_schema_1.ObjectTypes.MissingFigure]: (data) => {
|
|
@@ -472,7 +462,6 @@ class Decoder {
|
|
|
472
462
|
id: model._id,
|
|
473
463
|
paragraphStyle: model.paragraphStyle,
|
|
474
464
|
placeholder: model.placeholderInnerHTML,
|
|
475
|
-
comments: comments.map((c) => c.attrs.id),
|
|
476
465
|
}),
|
|
477
466
|
});
|
|
478
467
|
},
|
|
@@ -598,7 +587,6 @@ class Decoder {
|
|
|
598
587
|
titleSuppressed: model.titleSuppressed,
|
|
599
588
|
pageBreakStyle: model.pageBreakStyle,
|
|
600
589
|
generatedLabel: model.generatedLabel,
|
|
601
|
-
comments: comments.map((c) => c.attrs.id),
|
|
602
590
|
}, content);
|
|
603
591
|
if (!sectionNode) {
|
|
604
592
|
console.error(model);
|
|
@@ -643,7 +631,6 @@ class Decoder {
|
|
|
643
631
|
suppressHeader: model.suppressHeader,
|
|
644
632
|
tableStyle: model.tableStyle,
|
|
645
633
|
paragraphStyle: model.paragraphStyle,
|
|
646
|
-
comments: comments.map((c) => c.attrs.id),
|
|
647
634
|
}, content);
|
|
648
635
|
},
|
|
649
636
|
[json_schema_1.ObjectTypes.TOCElement]: (data) => {
|
package/dist/cjs/version.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import mime from 'mime';
|
|
17
17
|
import { DOMParser, Fragment } from 'prosemirror-model';
|
|
18
|
-
import { schema
|
|
18
|
+
import { schema } from '../../schema';
|
|
19
19
|
import { chooseSectionCategory } from '../../transformer';
|
|
20
20
|
const XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink';
|
|
21
21
|
const chooseContentType = (graphicNode) => {
|
|
@@ -211,7 +211,6 @@ export class Decoder {
|
|
|
211
211
|
page: model.page,
|
|
212
212
|
title: model.title,
|
|
213
213
|
literal: model.literal,
|
|
214
|
-
comments: comments.map((c) => c.attrs.id),
|
|
215
214
|
});
|
|
216
215
|
},
|
|
217
216
|
[ExtraObjectTypes.PlaceholderElement]: (data) => {
|
|
@@ -229,7 +228,6 @@ export class Decoder {
|
|
|
229
228
|
contentType: model.contentType,
|
|
230
229
|
src: model.src,
|
|
231
230
|
position: model.position,
|
|
232
|
-
comments: comments.map((c) => c.attrs.id),
|
|
233
231
|
});
|
|
234
232
|
},
|
|
235
233
|
[ObjectTypes.FigureElement]: (data) => {
|
|
@@ -280,7 +278,6 @@ export class Decoder {
|
|
|
280
278
|
suppressTitle: Boolean(model.suppressTitle === undefined ? true : model.suppressTitle),
|
|
281
279
|
attribution: model.attribution,
|
|
282
280
|
alternatives: model.alternatives,
|
|
283
|
-
comments: comments.map((c) => c.attrs.id),
|
|
284
281
|
}, content);
|
|
285
282
|
},
|
|
286
283
|
[ObjectTypes.Equation]: (data) => {
|
|
@@ -327,7 +324,6 @@ export class Decoder {
|
|
|
327
324
|
topNode: schema.nodes.footnote.create({
|
|
328
325
|
id: model._id,
|
|
329
326
|
kind: model.kind,
|
|
330
|
-
comments: comments.map((c) => c.attrs.id),
|
|
331
327
|
}),
|
|
332
328
|
});
|
|
333
329
|
footnotesOfKind.push(footnote);
|
|
@@ -348,7 +344,6 @@ export class Decoder {
|
|
|
348
344
|
topNode: schema.nodes.footnote.create({
|
|
349
345
|
id: footnoteModel._id,
|
|
350
346
|
kind: footnoteModel.kind,
|
|
351
|
-
comments: comments.map((c) => c.attrs.id),
|
|
352
347
|
}),
|
|
353
348
|
});
|
|
354
349
|
},
|
|
@@ -370,7 +365,6 @@ export class Decoder {
|
|
|
370
365
|
return schema.nodes.keyword_group.create({
|
|
371
366
|
id: keywordGroup._id,
|
|
372
367
|
type: keywordGroup.type,
|
|
373
|
-
comments: comments.map((c) => c.attrs.id),
|
|
374
368
|
}, keywords);
|
|
375
369
|
},
|
|
376
370
|
[ObjectTypes.Keyword]: (data) => {
|
|
@@ -380,7 +374,6 @@ export class Decoder {
|
|
|
380
374
|
return schema.nodes.keyword.create({
|
|
381
375
|
id: keyword._id,
|
|
382
376
|
contents: keyword.name,
|
|
383
|
-
comments: comments.map((c) => c.attrs.id),
|
|
384
377
|
}, schema.text(keyword.name));
|
|
385
378
|
},
|
|
386
379
|
[ObjectTypes.ListElement]: (data) => {
|
|
@@ -394,7 +387,6 @@ export class Decoder {
|
|
|
394
387
|
id: model._id,
|
|
395
388
|
listStyleType: model.listStyleType || 'order',
|
|
396
389
|
paragraphStyle: model.paragraphStyle,
|
|
397
|
-
comments: comments.map((c) => c.attrs.id),
|
|
398
390
|
}),
|
|
399
391
|
});
|
|
400
392
|
case 'ul':
|
|
@@ -418,7 +410,6 @@ export class Decoder {
|
|
|
418
410
|
contents: model.contents,
|
|
419
411
|
language: model.language,
|
|
420
412
|
languageKey: model.languageKey,
|
|
421
|
-
comments: comments.map((c) => c.attrs.id),
|
|
422
413
|
});
|
|
423
414
|
},
|
|
424
415
|
[ObjectTypes.ListingElement]: (data) => {
|
|
@@ -444,7 +435,6 @@ export class Decoder {
|
|
|
444
435
|
id: model._id,
|
|
445
436
|
suppressCaption: model.suppressCaption,
|
|
446
437
|
suppressTitle: Boolean(model.suppressTitle === undefined ? true : model.suppressTitle),
|
|
447
|
-
comments: comments.map((c) => c.attrs.id),
|
|
448
438
|
}, [listing, figcaption]);
|
|
449
439
|
},
|
|
450
440
|
[ObjectTypes.MissingFigure]: (data) => {
|
|
@@ -463,7 +453,6 @@ export class Decoder {
|
|
|
463
453
|
id: model._id,
|
|
464
454
|
paragraphStyle: model.paragraphStyle,
|
|
465
455
|
placeholder: model.placeholderInnerHTML,
|
|
466
|
-
comments: comments.map((c) => c.attrs.id),
|
|
467
456
|
}),
|
|
468
457
|
});
|
|
469
458
|
},
|
|
@@ -589,7 +578,6 @@ export class Decoder {
|
|
|
589
578
|
titleSuppressed: model.titleSuppressed,
|
|
590
579
|
pageBreakStyle: model.pageBreakStyle,
|
|
591
580
|
generatedLabel: model.generatedLabel,
|
|
592
|
-
comments: comments.map((c) => c.attrs.id),
|
|
593
581
|
}, content);
|
|
594
582
|
if (!sectionNode) {
|
|
595
583
|
console.error(model);
|
|
@@ -634,7 +622,6 @@ export class Decoder {
|
|
|
634
622
|
suppressHeader: model.suppressHeader,
|
|
635
623
|
tableStyle: model.tableStyle,
|
|
636
624
|
paragraphStyle: model.paragraphStyle,
|
|
637
|
-
comments: comments.map((c) => c.attrs.id),
|
|
638
625
|
}, content);
|
|
639
626
|
},
|
|
640
627
|
[ObjectTypes.TOCElement]: (data) => {
|
package/dist/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "2.3.
|
|
1
|
+
export const VERSION = "2.3.16-LEAN-3753.0";
|
|
@@ -15,11 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
id: string;
|
|
21
20
|
label: string;
|
|
22
|
-
comments?: CommentNode[];
|
|
23
21
|
}
|
|
24
22
|
export interface EquationElementNode extends ManuscriptNode {
|
|
25
23
|
attrs: Attrs;
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
18
|
import { AttributionNode } from './attribution';
|
|
19
|
-
import { CommentNode } from './comment';
|
|
20
19
|
interface Attrs {
|
|
21
20
|
columns: number;
|
|
22
21
|
figureLayout: string;
|
|
@@ -34,7 +33,6 @@ interface Attrs {
|
|
|
34
33
|
src: string;
|
|
35
34
|
type?: string;
|
|
36
35
|
}[];
|
|
37
|
-
comments?: CommentNode[];
|
|
38
36
|
}
|
|
39
37
|
export interface FigureElementNode extends ManuscriptNode {
|
|
40
38
|
attrs: Attrs;
|
|
@@ -15,14 +15,12 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
type Kind = 'footnote' | 'endnote';
|
|
20
19
|
interface Attrs {
|
|
21
20
|
id: string;
|
|
22
21
|
kind: Kind;
|
|
23
22
|
paragraphStyle?: string;
|
|
24
23
|
placeholder?: string;
|
|
25
|
-
comments?: CommentNode[];
|
|
26
24
|
}
|
|
27
25
|
export interface FootnoteNode extends ManuscriptNode {
|
|
28
26
|
attrs: Attrs;
|
|
@@ -15,12 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
id: string;
|
|
21
20
|
contents: string;
|
|
22
21
|
format: string;
|
|
23
|
-
comments?: CommentNode[];
|
|
24
22
|
}
|
|
25
23
|
export interface InlineEquationNode extends ManuscriptNode {
|
|
26
24
|
attrs: Attrs;
|
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
id: string;
|
|
21
|
-
comments?: CommentNode[];
|
|
22
20
|
}
|
|
23
21
|
export interface KeywordNode extends ManuscriptNode {
|
|
24
22
|
attrs: Attrs;
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
id: string;
|
|
21
20
|
contents: string;
|
|
@@ -23,7 +22,6 @@ interface Attrs {
|
|
|
23
22
|
languageKey: string;
|
|
24
23
|
isExpanded: boolean;
|
|
25
24
|
isExecuting: boolean;
|
|
26
|
-
comments?: CommentNode[];
|
|
27
25
|
}
|
|
28
26
|
export interface ListingNode extends ManuscriptNode {
|
|
29
27
|
attrs: Attrs;
|
|
@@ -15,12 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
id: string;
|
|
21
20
|
suppressCaption: boolean;
|
|
22
21
|
suppressTitle?: boolean;
|
|
23
|
-
comments?: CommentNode[];
|
|
24
22
|
}
|
|
25
23
|
export interface ListingElementNode extends ManuscriptNode {
|
|
26
24
|
attrs: Attrs;
|
|
@@ -15,12 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
id: string;
|
|
21
20
|
paragraphStyle: string;
|
|
22
21
|
placeholder: string;
|
|
23
|
-
comments?: CommentNode[];
|
|
24
22
|
}
|
|
25
23
|
export interface ParagraphNode extends ManuscriptNode {
|
|
26
24
|
attrs: Attrs;
|
|
@@ -15,14 +15,12 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
id: string;
|
|
21
20
|
category?: string;
|
|
22
21
|
titleSuppressed: boolean;
|
|
23
22
|
generatedLabel: boolean;
|
|
24
23
|
pageBreakStyle?: number;
|
|
25
|
-
comments?: CommentNode[];
|
|
26
24
|
}
|
|
27
25
|
export interface SectionNode extends ManuscriptNode {
|
|
28
26
|
attrs: Attrs;
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
|
-
import { CommentNode } from './comment';
|
|
19
18
|
interface Attrs {
|
|
20
19
|
id: string;
|
|
21
20
|
paragraphStyle: string;
|
|
@@ -26,7 +25,6 @@ interface Attrs {
|
|
|
26
25
|
suppressFooter: boolean;
|
|
27
26
|
suppressHeader: boolean;
|
|
28
27
|
expandListing: boolean;
|
|
29
|
-
comments?: CommentNode[];
|
|
30
28
|
}
|
|
31
29
|
export interface TableElementNode extends ManuscriptNode {
|
|
32
30
|
attrs: Attrs;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "2.3.
|
|
1
|
+
export declare const VERSION = "2.3.16-LEAN-3753.0";
|
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": "2.3.
|
|
4
|
+
"version": "2.3.16-LEAN-3753.0",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|