@manuscripts/transform 2.6.0 → 2.6.1-LEAN-3911.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/index.js +6 -6
- package/dist/cjs/jats/{jats-exporter.js → exporter/jats-exporter.js} +267 -414
- package/dist/cjs/jats/{jats-versions.js → exporter/jats-versions.js} +1 -3
- package/dist/cjs/{transformer → jats/exporter}/labels.js +4 -4
- package/dist/cjs/{transformer/filename.js → jats/importer/create-article-node.js} +10 -9
- package/dist/cjs/jats/importer/jats-comments.js +32 -111
- package/dist/cjs/jats/importer/{jats-body-dom-parser.js → jats-dom-parser.js} +330 -10
- package/dist/cjs/jats/importer/jats-journal-meta-parser.js +11 -1
- package/dist/cjs/jats/importer/jats-parser-utils.js +67 -4
- package/dist/cjs/jats/importer/jats-transformations.js +389 -0
- package/dist/cjs/jats/importer/parse-jats-article.js +43 -101
- package/dist/cjs/jats/index.js +7 -7
- package/dist/cjs/{transformer/models.js → lib/deafults.js} +3 -1
- package/dist/cjs/lib/utils.js +3 -1
- package/dist/cjs/schema/nodes/highlight_marker.js +0 -4
- package/dist/cjs/transformer/id.js +1 -5
- package/dist/cjs/transformer/index.js +0 -18
- package/dist/cjs/version.js +1 -1
- package/dist/es/index.js +5 -5
- package/dist/es/jats/{jats-exporter.js → exporter/jats-exporter.js} +262 -409
- package/dist/es/jats/{jats-versions.js → exporter/jats-versions.js} +0 -1
- package/dist/es/{transformer → jats/exporter}/labels.js +4 -4
- package/dist/{cjs/transformer/model-map.js → es/jats/importer/create-article-node.js} +8 -10
- package/dist/es/jats/importer/jats-comments.js +32 -107
- package/dist/es/jats/importer/{jats-body-dom-parser.js → jats-dom-parser.js} +330 -10
- package/dist/es/jats/importer/jats-journal-meta-parser.js +9 -0
- package/dist/es/jats/importer/jats-parser-utils.js +69 -6
- package/dist/es/jats/importer/jats-transformations.js +370 -0
- package/dist/es/jats/importer/parse-jats-article.js +43 -99
- package/dist/es/jats/index.js +5 -3
- package/dist/{types/transformer/timestamp.d.ts → es/lib/deafults.js} +2 -2
- package/dist/es/lib/utils.js +1 -0
- package/dist/es/schema/nodes/highlight_marker.js +0 -4
- package/dist/es/transformer/id.js +0 -3
- package/dist/es/transformer/index.js +0 -16
- package/dist/es/version.js +1 -1
- package/dist/types/index.d.ts +6 -6
- package/dist/types/jats/{jats-exporter.d.ts → exporter/jats-exporter.d.ts} +15 -29
- package/dist/types/jats/{jats-versions.d.ts → exporter/jats-versions.d.ts} +0 -1
- package/dist/types/{transformer → jats/exporter}/labels.d.ts +2 -2
- package/dist/{es/transformer/footnote-category.js → types/jats/importer/create-article-node.d.ts} +3 -2
- package/dist/types/jats/importer/jats-comments.d.ts +2 -15
- package/dist/types/jats/importer/{jats-body-dom-parser.d.ts → jats-dom-parser.d.ts} +1 -1
- package/dist/types/jats/importer/jats-journal-meta-parser.d.ts +9 -0
- package/dist/types/jats/importer/jats-parser-utils.d.ts +2 -2
- package/dist/types/jats/importer/jats-transformations.d.ts +32 -0
- package/dist/types/jats/importer/parse-jats-article.d.ts +12 -5
- package/dist/types/jats/index.d.ts +5 -3
- package/dist/types/jats/types.d.ts +1 -0
- package/dist/{es/transformer/models.js → types/lib/deafults.d.ts} +2 -2
- package/dist/types/lib/utils.d.ts +1 -0
- package/dist/types/schema/nodes/bibliography_item.d.ts +3 -3
- package/dist/types/schema/nodes/contributor.d.ts +10 -0
- package/dist/types/schema/nodes/highlight_marker.d.ts +0 -2
- package/dist/types/schema/nodes/keyword_group.d.ts +1 -0
- package/dist/types/schema/nodes/manuscript.d.ts +8 -7
- package/dist/types/schema/nodes/title.d.ts +0 -3
- package/dist/types/transformer/id.d.ts +0 -3
- package/dist/types/transformer/index.d.ts +0 -16
- package/dist/types/version.d.ts +1 -1
- package/package.json +2 -1
- package/dist/cjs/__tests__/data/project-dump.json +0 -825
- package/dist/cjs/jats/importer/index.js +0 -22
- package/dist/cjs/jats/importer/jats-front-parser.js +0 -321
- package/dist/cjs/jats/importer/jats-reference-parser.js +0 -130
- package/dist/cjs/jats/importer/jats-references.js +0 -34
- package/dist/cjs/transformer/__tests__/__helpers__/doc.js +0 -37
- package/dist/cjs/transformer/builders.js +0 -219
- package/dist/cjs/transformer/decode.js +0 -898
- package/dist/cjs/transformer/document-object-types.js +0 -31
- package/dist/cjs/transformer/encode.js +0 -674
- package/dist/cjs/transformer/footnote-category.js +0 -20
- package/dist/cjs/transformer/footnotes-order.js +0 -60
- package/dist/cjs/transformer/highlight-markers.js +0 -138
- package/dist/cjs/transformer/html.js +0 -400
- package/dist/cjs/transformer/manuscript-dependencies.js +0 -21
- package/dist/cjs/transformer/object-types.js +0 -57
- package/dist/cjs/transformer/project-bundle.js +0 -94
- package/dist/cjs/transformer/serializer.js +0 -23
- package/dist/cjs/transformer/timestamp.js +0 -20
- package/dist/cjs/transformer/update-identifiers.js +0 -93
- package/dist/es/__tests__/data/project-dump.json +0 -825
- package/dist/es/jats/importer/index.js +0 -16
- package/dist/es/jats/importer/jats-front-parser.js +0 -315
- package/dist/es/jats/importer/jats-reference-parser.js +0 -127
- package/dist/es/jats/importer/jats-references.js +0 -30
- package/dist/es/transformer/__tests__/__helpers__/doc.js +0 -29
- package/dist/es/transformer/builders.js +0 -186
- package/dist/es/transformer/decode.js +0 -888
- package/dist/es/transformer/document-object-types.js +0 -28
- package/dist/es/transformer/encode.js +0 -664
- package/dist/es/transformer/filename.js +0 -23
- package/dist/es/transformer/footnotes-order.js +0 -55
- package/dist/es/transformer/highlight-markers.js +0 -132
- package/dist/es/transformer/html.js +0 -393
- package/dist/es/transformer/manuscript-dependencies.js +0 -17
- package/dist/es/transformer/model-map.js +0 -22
- package/dist/es/transformer/object-types.js +0 -52
- package/dist/es/transformer/project-bundle.js +0 -85
- package/dist/es/transformer/serializer.js +0 -17
- package/dist/es/transformer/timestamp.js +0 -16
- package/dist/es/transformer/update-identifiers.js +0 -87
- package/dist/types/jats/importer/index.d.ts +0 -16
- package/dist/types/jats/importer/jats-front-parser.d.ts +0 -84
- package/dist/types/jats/importer/jats-reference-parser.d.ts +0 -19
- package/dist/types/jats/importer/jats-references.d.ts +0 -12
- package/dist/types/transformer/__tests__/__helpers__/doc.d.ts +0 -18
- package/dist/types/transformer/builders.d.ts +0 -61
- package/dist/types/transformer/decode.d.ts +0 -52
- package/dist/types/transformer/document-object-types.d.ts +0 -17
- package/dist/types/transformer/encode.d.ts +0 -29
- package/dist/types/transformer/filename.d.ts +0 -16
- package/dist/types/transformer/footnote-category.d.ts +0 -17
- package/dist/types/transformer/footnotes-order.d.ts +0 -22
- package/dist/types/transformer/highlight-markers.d.ts +0 -31
- package/dist/types/transformer/html.d.ts +0 -36
- package/dist/types/transformer/manuscript-dependencies.d.ts +0 -4
- package/dist/types/transformer/model-map.d.ts +0 -19
- package/dist/types/transformer/models.d.ts +0 -48
- package/dist/types/transformer/object-types.d.ts +0 -30
- package/dist/types/transformer/project-bundle.d.ts +0 -30
- package/dist/types/transformer/serializer.d.ts +0 -19
- package/dist/types/transformer/update-identifiers.d.ts +0 -23
- package/dist/types/types.d.ts +0 -2
- /package/dist/cjs/{types.js → jats/types.js} +0 -0
- /package/dist/es/{types.js → jats/types.js} +0 -0
|
@@ -19,9 +19,7 @@ export const highlightMarker = {
|
|
|
19
19
|
atom: true,
|
|
20
20
|
attrs: {
|
|
21
21
|
id: { default: '' },
|
|
22
|
-
tid: { default: '' },
|
|
23
22
|
position: { default: '' },
|
|
24
|
-
dataTracked: { default: null },
|
|
25
23
|
},
|
|
26
24
|
parseDOM: [
|
|
27
25
|
{
|
|
@@ -30,7 +28,6 @@ export const highlightMarker = {
|
|
|
30
28
|
const dom = p;
|
|
31
29
|
return {
|
|
32
30
|
id: dom.getAttribute('id'),
|
|
33
|
-
tid: dom.getAttribute('data-target-id'),
|
|
34
31
|
position: dom.getAttribute('data-position'),
|
|
35
32
|
};
|
|
36
33
|
},
|
|
@@ -41,7 +38,6 @@ export const highlightMarker = {
|
|
|
41
38
|
const dom = document.createElement('span');
|
|
42
39
|
dom.className = 'highlight-marker';
|
|
43
40
|
dom.setAttribute('id', highlightMarkerNode.attrs.id);
|
|
44
|
-
dom.setAttribute('data-target-id', highlightMarkerNode.attrs.tid);
|
|
45
41
|
dom.setAttribute('data-position', highlightMarkerNode.attrs.position);
|
|
46
42
|
return dom;
|
|
47
43
|
},
|
|
@@ -13,24 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export * from './builders';
|
|
17
|
-
export * from './decode';
|
|
18
|
-
export * from './document-object-types';
|
|
19
|
-
export * from './encode';
|
|
20
|
-
export * from './filename';
|
|
21
|
-
export * from './highlight-markers';
|
|
22
|
-
export * from './html';
|
|
23
16
|
export * from './id';
|
|
24
|
-
export * from './labels';
|
|
25
|
-
export * from './manuscript-dependencies';
|
|
26
|
-
export * from './models';
|
|
27
17
|
export * from './node-names';
|
|
28
18
|
export * from './node-title';
|
|
29
19
|
export * from './node-types';
|
|
30
|
-
export * from './object-types';
|
|
31
|
-
export * from './project-bundle';
|
|
32
20
|
export * from './section-category';
|
|
33
|
-
export * from './serializer';
|
|
34
|
-
export * from './timestamp';
|
|
35
|
-
export * from './update-identifiers';
|
|
36
|
-
export { createTestDoc } from './__tests__/__helpers__/doc';
|
package/dist/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "2.6.0";
|
|
1
|
+
export const VERSION = "2.6.1-LEAN-3911.0";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
export * from './errors';
|
|
2
|
+
export { getVersion } from './getVersion';
|
|
3
|
+
export * from './jats';
|
|
4
|
+
export * from './jats/types';
|
|
1
5
|
export * from './lib/section-group-type';
|
|
2
6
|
export * from './lib/table-cell-styles';
|
|
3
7
|
export * from './lib/utils';
|
|
4
8
|
export * from './schema';
|
|
5
|
-
export
|
|
6
|
-
export * from './jats';
|
|
7
|
-
export * from './types';
|
|
8
|
-
export * from './errors';
|
|
9
|
-
export { getVersion } from './getVersion';
|
|
10
|
-
export { migrateFor, JSONNode } from './schema/migration/migrate';
|
|
9
|
+
export { JSONNode, migrateFor } from './schema/migration/migrate';
|
|
11
10
|
export { isSectionLabelNode } from './schema/nodes/section_label';
|
|
11
|
+
export * from './transformer';
|
|
@@ -13,18 +13,13 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
16
|
+
import { BibliographyItem, Journal } from '@manuscripts/json-schema';
|
|
17
17
|
import { CitationProvider } from '@manuscripts/library';
|
|
18
18
|
import { DOMSerializer } from 'prosemirror-model';
|
|
19
|
-
import { CitationNode,
|
|
20
|
-
import {
|
|
21
|
-
import { IDGenerator, MediaPathGenerator } from '../types';
|
|
19
|
+
import { CitationNode, ManuscriptNode } from '../../schema';
|
|
20
|
+
import { IDGenerator } from '../types';
|
|
22
21
|
import { Version } from './jats-versions';
|
|
23
|
-
|
|
24
|
-
self?: {
|
|
25
|
-
[key: string]: string;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
22
|
+
import { Target } from './labels';
|
|
28
23
|
export declare const createCounter: () => {
|
|
29
24
|
increment: (field: string) => number;
|
|
30
25
|
};
|
|
@@ -32,17 +27,11 @@ export type CSLOptions = {
|
|
|
32
27
|
style: string;
|
|
33
28
|
locale: string;
|
|
34
29
|
};
|
|
35
|
-
export
|
|
36
|
-
csl: CSLOptions;
|
|
30
|
+
export type ExportOptions = {
|
|
37
31
|
version?: Version;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
links?: Links;
|
|
42
|
-
citationType?: 'element' | 'mixed';
|
|
43
|
-
idGenerator?: IDGenerator;
|
|
44
|
-
mediaPathGenerator?: MediaPathGenerator;
|
|
45
|
-
}
|
|
32
|
+
journal?: Journal;
|
|
33
|
+
csl: CSLOptions;
|
|
34
|
+
};
|
|
46
35
|
export declare const buildCitations: (citations: CitationNode[]) => {
|
|
47
36
|
citationID: string;
|
|
48
37
|
citationItems: {
|
|
@@ -54,13 +43,12 @@ export declare const buildCitations: (citations: CitationNode[]) => {
|
|
|
54
43
|
}[];
|
|
55
44
|
export declare class JATSExporter {
|
|
56
45
|
protected document: Document;
|
|
57
|
-
protected modelMap: Map<string, Model>;
|
|
58
|
-
protected models: Model[];
|
|
59
46
|
protected serializer: DOMSerializer;
|
|
60
47
|
protected labelTargets?: Map<string, Target>;
|
|
61
48
|
protected citationTexts: Map<string, string>;
|
|
62
49
|
protected citationProvider: CitationProvider;
|
|
63
|
-
protected
|
|
50
|
+
protected manuscriptNode: ManuscriptNode;
|
|
51
|
+
protected generateCitations(): {
|
|
64
52
|
citationID: string;
|
|
65
53
|
citationItems: {
|
|
66
54
|
id: string;
|
|
@@ -69,20 +57,19 @@ export declare class JATSExporter {
|
|
|
69
57
|
noteIndex: number;
|
|
70
58
|
};
|
|
71
59
|
}[];
|
|
72
|
-
protected
|
|
73
|
-
|
|
60
|
+
protected getLibraryItem: (manuscriptID: string) => (id: string) => BibliographyItem | undefined;
|
|
61
|
+
protected generateCitationTexts(csl: CSLOptions, manuscriptID: string): void;
|
|
62
|
+
serializeToJATS: (manuscriptNode: ManuscriptNode, options: ExportOptions) => Promise<string>;
|
|
74
63
|
private nodeFromJATS;
|
|
75
|
-
protected rewriteMediaPaths: (generator: MediaPathGenerator) => Promise<void>;
|
|
76
64
|
protected rewriteIDs: (generator?: IDGenerator) => Promise<void>;
|
|
77
65
|
protected setTitleContent: (element: HTMLElement, title: string) => void;
|
|
78
|
-
protected buildFront: (
|
|
66
|
+
protected buildFront: (journal?: Journal) => HTMLElement;
|
|
79
67
|
protected buildDateElement: (timestamp: number, type: string) => HTMLElement;
|
|
80
68
|
protected buildCountingElement: (tagName: string, count: number | undefined) => HTMLElement | undefined;
|
|
81
|
-
protected buildBody: (
|
|
69
|
+
protected buildBody: () => HTMLBodyElement;
|
|
82
70
|
protected buildBack: (body: HTMLElement) => HTMLElement;
|
|
83
71
|
protected createSerializer: () => void;
|
|
84
72
|
private createEquation;
|
|
85
|
-
protected serializeFragment: (fragment: ManuscriptFragment) => HTMLElement | DocumentFragment;
|
|
86
73
|
protected serializeNode: (node: ManuscriptNode) => Node;
|
|
87
74
|
private validateContributor;
|
|
88
75
|
private buildContributors;
|
|
@@ -109,4 +96,3 @@ export declare class JATSExporter {
|
|
|
109
96
|
private fillEmptyFootnotes;
|
|
110
97
|
private fillEmptyTableFooters;
|
|
111
98
|
}
|
|
112
|
-
export {};
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ManuscriptFragment } from '
|
|
16
|
+
import { ManuscriptFragment, ManuscriptNode } from '../../schema';
|
|
17
17
|
export interface Target {
|
|
18
18
|
type: string;
|
|
19
19
|
id: string;
|
|
20
20
|
label: string;
|
|
21
21
|
caption: string;
|
|
22
22
|
}
|
|
23
|
-
export declare const buildTargets: (
|
|
23
|
+
export declare const buildTargets: (node: ManuscriptNode | ManuscriptFragment) => Map<string, Target>;
|
package/dist/{es/transformer/footnote-category.js → types/jats/importer/create-article-node.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ©
|
|
2
|
+
* © 2024 Atypon Systems LLC
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -13,4 +13,5 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
import { ManuscriptAttrs } from '../../schema';
|
|
17
|
+
export declare const createArticleNode: (attrs: Partial<ManuscriptAttrs>) => import("prosemirror-model").Node;
|
|
@@ -13,18 +13,5 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export type JATSComment = {
|
|
19
|
-
id: string;
|
|
20
|
-
text: string;
|
|
21
|
-
};
|
|
22
|
-
export type JATSCommentMark = {
|
|
23
|
-
token: string;
|
|
24
|
-
comment: JATSComment;
|
|
25
|
-
};
|
|
26
|
-
export declare const isJATSComment: (node: Node) => boolean;
|
|
27
|
-
export declare const parseJATSComment: (node: Node) => JATSComment | undefined;
|
|
28
|
-
export declare const markComments: (doc: Document) => JATSCommentMark[];
|
|
29
|
-
export declare const createComments: (models: Model[], marks: JATSCommentMark[]) => CommentAnnotation[];
|
|
30
|
-
export declare const createReferenceComments: (references: References) => CommentAnnotation[];
|
|
16
|
+
export declare const DEFAULT_PROFILE_ID = "MPUserProfile:0000000000000000000000000000000000000001";
|
|
17
|
+
export declare const markComments: (doc: Document) => void;
|
|
@@ -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 { ObjectTypes } from '@manuscripts/json-schema';
|
|
16
17
|
export type ISSN = {
|
|
17
18
|
ISSN: string;
|
|
18
19
|
publicationType?: string;
|
|
@@ -35,3 +36,11 @@ export declare const parseJournalMeta: (element: Element | null) => {
|
|
|
35
36
|
publisherName: string | undefined;
|
|
36
37
|
title: string | undefined;
|
|
37
38
|
};
|
|
39
|
+
export declare const parseJournal: (doc: Document) => {
|
|
40
|
+
objectType: ObjectTypes;
|
|
41
|
+
abbreviatedTitles: AbbreviatedTitle[];
|
|
42
|
+
journalIdentifiers: JournalIdentifier[];
|
|
43
|
+
ISSNs: ISSN[];
|
|
44
|
+
publisherName: string | undefined;
|
|
45
|
+
title: string | undefined;
|
|
46
|
+
} | undefined;
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { ManuscriptNode } from '../../schema';
|
|
17
|
-
export declare const updateDocumentIDs: (node: ManuscriptNode
|
|
18
|
-
export declare const htmlFromJatsNode: (element: Element | undefined | null, createElement
|
|
17
|
+
export declare const updateDocumentIDs: (node: ManuscriptNode) => string[];
|
|
18
|
+
export declare const htmlFromJatsNode: (element: Element | undefined | null, createElement?: ((tagName: string) => HTMLElement) | undefined) => string | undefined;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2020 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export type CreateElement = (tagName: string) => HTMLElement;
|
|
17
|
+
export declare const ensureSection: (body: Element, createElement: CreateElement) => void;
|
|
18
|
+
export declare const moveTitle: (front: Element, createElement: CreateElement) => void;
|
|
19
|
+
export declare const moveAuthorNotes: (front: Element, createElement: CreateElement) => void;
|
|
20
|
+
export declare const moveContributors: (front: Element, createElement: CreateElement) => void;
|
|
21
|
+
export declare const moveAffiliations: (front: Element, createElement: CreateElement) => void;
|
|
22
|
+
export declare const moveAbstracts: (doc: Document, group: Element, createElement: CreateElement) => void;
|
|
23
|
+
export declare const createBoxedElementSection: (body: Element, createElement: (tagName: string) => HTMLElement) => void;
|
|
24
|
+
export declare const createBody: (doc: Document, body: Element, createElement: CreateElement) => void;
|
|
25
|
+
export declare const createAbstracts: (doc: Document, body: Element, createElement: CreateElement) => void;
|
|
26
|
+
export declare const createBackmatter: (doc: Document, body: Element, createElement: CreateElement) => void;
|
|
27
|
+
export declare const moveCaptionsToEnd: (body: Element) => void;
|
|
28
|
+
export declare const createKeywordsSection: (document: Document, body: Element, createElement: CreateElement) => void;
|
|
29
|
+
export declare const createSupplementaryMaterialsSection: (document: Document, body: Element, createElement: CreateElement) => void;
|
|
30
|
+
export declare const moveReferencesToBackmatter: (body: Element, back: Element, createElement: CreateElement) => void;
|
|
31
|
+
export declare const orderTableFootnote: (doc: Document, body: Element) => void;
|
|
32
|
+
export declare const fixTables: (doc: Document, body: Element, createElement: CreateElement) => void;
|
|
@@ -13,8 +13,15 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
import { ActualManuscriptNode } from '../../schema';
|
|
17
|
+
export declare const parseJATSArticle: (doc: Document, template?: string) => {
|
|
18
|
+
node: ActualManuscriptNode;
|
|
19
|
+
journal: {
|
|
20
|
+
objectType: import("@manuscripts/json-schema/dist/types").ObjectTypes;
|
|
21
|
+
abbreviatedTitles: import("./jats-journal-meta-parser").AbbreviatedTitle[];
|
|
22
|
+
journalIdentifiers: import("./jats-journal-meta-parser").JournalIdentifier[];
|
|
23
|
+
ISSNs: import("./jats-journal-meta-parser").ISSN[];
|
|
24
|
+
publisherName: string | undefined;
|
|
25
|
+
title: string | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
};
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
17
|
-
export * from './jats-
|
|
18
|
-
export * from './
|
|
16
|
+
export * from './exporter/jats-exporter';
|
|
17
|
+
export * from './exporter/jats-versions';
|
|
18
|
+
export * from './exporter/labels';
|
|
19
|
+
export * from './importer/create-article-node';
|
|
20
|
+
export { parseJATSArticle } from './importer/parse-jats-article';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type IDGenerator = (element: Element) => Promise<string | null>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ©
|
|
2
|
+
* © 2024 Atypon Systems LLC
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export declare const defaultTitle = "Untitled Manuscript";
|
|
@@ -26,3 +26,4 @@ export declare const findParentNodeClosestToPos: ($pos: ResolvedPos, predicate:
|
|
|
26
26
|
node: ProsemirrorNode;
|
|
27
27
|
} | undefined;
|
|
28
28
|
export declare const getTrimmedTextContent: (node: Element | Document | null, querySelector: string) => string | null | undefined;
|
|
29
|
+
export declare const timestamp: () => number;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import { BibliographicDate, BibliographicName } from '@manuscripts/json-schema';
|
|
17
17
|
import { NodeSpec } from 'prosemirror-model';
|
|
18
18
|
import { ManuscriptNode } from '../types';
|
|
19
|
-
interface
|
|
19
|
+
export interface BibliographyItemAttrs {
|
|
20
20
|
id: string;
|
|
21
21
|
type: string;
|
|
22
22
|
author?: BibliographicName[];
|
|
@@ -29,9 +29,9 @@ interface Attrs {
|
|
|
29
29
|
page?: string;
|
|
30
30
|
title?: string;
|
|
31
31
|
literal?: string;
|
|
32
|
+
paragraphStyle?: string;
|
|
32
33
|
}
|
|
33
34
|
export interface BibliographyItemNode extends ManuscriptNode {
|
|
34
|
-
attrs:
|
|
35
|
+
attrs: BibliographyItemAttrs;
|
|
35
36
|
}
|
|
36
37
|
export declare const bibliographyItem: NodeSpec;
|
|
37
|
-
export {};
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { BibliographicName } from '@manuscripts/json-schema';
|
|
2
2
|
import { NodeSpec } from 'prosemirror-model';
|
|
3
3
|
import { ManuscriptNode } from '../types';
|
|
4
|
+
export type ContributorCorresp = {
|
|
5
|
+
correspID: string;
|
|
6
|
+
correspLabel: string;
|
|
7
|
+
};
|
|
8
|
+
export type ContributorFootnote = {
|
|
9
|
+
noteID: string;
|
|
10
|
+
noteLabel: string;
|
|
11
|
+
};
|
|
4
12
|
interface Attrs {
|
|
5
13
|
id: string;
|
|
6
14
|
role: string;
|
|
15
|
+
corresp: ContributorCorresp[];
|
|
7
16
|
affiliations: string[];
|
|
8
17
|
bibliographicName: BibliographicName;
|
|
9
18
|
userID: string;
|
|
@@ -13,6 +22,7 @@ interface Attrs {
|
|
|
13
22
|
ORCIDIdentifier: string;
|
|
14
23
|
priority: number;
|
|
15
24
|
isJointContributor: boolean;
|
|
25
|
+
footnote: ContributorFootnote[];
|
|
16
26
|
}
|
|
17
27
|
export interface ContributorNode extends ManuscriptNode {
|
|
18
28
|
attrs: Attrs;
|
|
@@ -17,9 +17,7 @@ import { NodeSpec } from 'prosemirror-model';
|
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
18
|
interface Attrs {
|
|
19
19
|
id: string;
|
|
20
|
-
tid: string;
|
|
21
20
|
position: string;
|
|
22
|
-
text: string;
|
|
23
21
|
}
|
|
24
22
|
export interface HighlightMarkerNode extends ManuscriptNode {
|
|
25
23
|
attrs: Attrs;
|
|
@@ -16,13 +16,14 @@
|
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
18
|
export interface ActualManuscriptNode extends ManuscriptNode {
|
|
19
|
-
attrs:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
attrs: ManuscriptAttrs;
|
|
20
|
+
}
|
|
21
|
+
export interface ManuscriptAttrs {
|
|
22
|
+
id: string;
|
|
23
|
+
doi: string;
|
|
24
|
+
articleType: string;
|
|
25
|
+
prototype: string;
|
|
26
|
+
primaryLanguageCode: string;
|
|
26
27
|
}
|
|
27
28
|
export declare const manuscript: NodeSpec;
|
|
28
29
|
export declare const isManuscriptNode: (node: ManuscriptNode) => node is import("prosemirror-model").Node;
|
|
@@ -17,9 +17,6 @@ import { NodeSpec } from 'prosemirror-model';
|
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
18
|
interface Attrs {
|
|
19
19
|
id: string;
|
|
20
|
-
title: string;
|
|
21
|
-
subtitle: string;
|
|
22
|
-
runningTitle: string;
|
|
23
20
|
placeholder: string;
|
|
24
21
|
}
|
|
25
22
|
export interface TitleNode extends ManuscriptNode {
|
|
@@ -13,8 +13,5 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ObjectTypes } from '@manuscripts/json-schema';
|
|
17
16
|
import { ManuscriptNodeType } from '../schema';
|
|
18
|
-
import { ExtraObjectTypes } from './object-types';
|
|
19
17
|
export declare const generateNodeID: (type: ManuscriptNodeType) => string;
|
|
20
|
-
export declare const generateID: (objectType: ObjectTypes | ExtraObjectTypes) => string;
|
|
@@ -13,24 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export * from './builders';
|
|
17
|
-
export * from './decode';
|
|
18
|
-
export * from './document-object-types';
|
|
19
|
-
export * from './encode';
|
|
20
|
-
export * from './filename';
|
|
21
|
-
export * from './highlight-markers';
|
|
22
|
-
export * from './html';
|
|
23
16
|
export * from './id';
|
|
24
|
-
export * from './labels';
|
|
25
|
-
export * from './manuscript-dependencies';
|
|
26
|
-
export * from './models';
|
|
27
17
|
export * from './node-names';
|
|
28
18
|
export * from './node-title';
|
|
29
19
|
export * from './node-types';
|
|
30
|
-
export * from './object-types';
|
|
31
|
-
export * from './project-bundle';
|
|
32
20
|
export * from './section-category';
|
|
33
|
-
export * from './serializer';
|
|
34
|
-
export * from './timestamp';
|
|
35
|
-
export * from './update-identifiers';
|
|
36
|
-
export { createTestDoc } from './__tests__/__helpers__/doc';
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "2.6.0";
|
|
1
|
+
export declare const VERSION = "2.6.1-LEAN-3911.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.6.0",
|
|
4
|
+
"version": "2.6.1-LEAN-3911.0",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"mime": "^3.0.0",
|
|
39
39
|
"prosemirror-model": "^1.18.3",
|
|
40
40
|
"prosemirror-tables": "^1.3.5",
|
|
41
|
+
"prosemirror-utils": "^1.2.2",
|
|
41
42
|
"semver": "^7.6.2",
|
|
42
43
|
"uuid": "^9.0.0",
|
|
43
44
|
"w3c-xmlserializer": "^4.0.0"
|