@manuscripts/transform 3.0.4-LEAN-4011.0 → 3.0.4
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/jats/exporter/jats-exporter.js +14 -67
- package/dist/cjs/jats/importer/jats-body-transformations.js +326 -0
- package/dist/cjs/jats/importer/jats-dom-parser.js +5 -43
- package/dist/cjs/lib/utils.js +1 -14
- package/dist/cjs/schema/nodes/bibliography_element.js +0 -1
- package/dist/cjs/schema/nodes/bibliography_item.js +0 -1
- package/dist/cjs/schema/nodes/blockquote_element.js +0 -3
- package/dist/cjs/schema/nodes/citation.js +0 -2
- package/dist/cjs/schema/nodes/cross_reference.js +1 -13
- package/dist/cjs/schema/nodes/equation_element.js +0 -1
- package/dist/cjs/schema/nodes/figure.js +0 -1
- package/dist/cjs/schema/nodes/figure_element.js +1 -28
- package/dist/cjs/schema/nodes/footnote.js +1 -5
- package/dist/cjs/schema/nodes/footnotes_element.js +1 -5
- package/dist/cjs/schema/nodes/graphical_abstract_section.js +0 -1
- package/dist/cjs/schema/nodes/keywords_element.js +0 -2
- package/dist/cjs/schema/nodes/list.js +0 -3
- package/dist/cjs/schema/nodes/listing_element.js +0 -2
- package/dist/cjs/schema/nodes/manuscript.js +0 -6
- package/dist/cjs/schema/nodes/missing_figure.js +0 -1
- package/dist/cjs/schema/nodes/paragraph.js +0 -3
- package/dist/cjs/schema/nodes/pullquote_element.js +1 -6
- package/dist/cjs/schema/nodes/section.js +2 -44
- package/dist/cjs/schema/nodes/table_element.js +0 -11
- package/dist/cjs/schema/nodes/toc_element.js +0 -1
- package/dist/cjs/version.js +1 -1
- package/dist/es/jats/exporter/jats-exporter.js +14 -67
- package/dist/es/jats/importer/jats-body-transformations.js +323 -0
- package/dist/es/jats/importer/jats-dom-parser.js +6 -44
- package/dist/es/lib/utils.js +0 -12
- package/dist/es/schema/nodes/bibliography_element.js +0 -1
- package/dist/es/schema/nodes/bibliography_item.js +0 -1
- package/dist/es/schema/nodes/blockquote_element.js +0 -3
- package/dist/es/schema/nodes/citation.js +0 -2
- package/dist/es/schema/nodes/cross_reference.js +1 -13
- package/dist/es/schema/nodes/equation_element.js +0 -1
- package/dist/es/schema/nodes/figure.js +0 -1
- package/dist/es/schema/nodes/figure_element.js +1 -28
- package/dist/es/schema/nodes/footnote.js +1 -5
- package/dist/es/schema/nodes/footnotes_element.js +1 -5
- package/dist/es/schema/nodes/graphical_abstract_section.js +0 -1
- package/dist/es/schema/nodes/keywords_element.js +0 -2
- package/dist/es/schema/nodes/list.js +0 -3
- package/dist/es/schema/nodes/listing_element.js +0 -2
- package/dist/es/schema/nodes/manuscript.js +0 -6
- package/dist/es/schema/nodes/missing_figure.js +0 -1
- package/dist/es/schema/nodes/paragraph.js +0 -3
- package/dist/es/schema/nodes/pullquote_element.js +1 -6
- package/dist/es/schema/nodes/section.js +1 -43
- package/dist/es/schema/nodes/table_element.js +0 -11
- package/dist/es/schema/nodes/toc_element.js +0 -1
- package/dist/es/version.js +1 -1
- package/dist/types/jats/exporter/jats-exporter.d.ts +1 -1
- package/dist/types/jats/importer/jats-body-transformations.d.ts +40 -0
- package/dist/types/lib/utils.d.ts +0 -1
- package/dist/types/schema/nodes/bibliography_element.d.ts +0 -1
- package/dist/types/schema/nodes/bibliography_item.d.ts +0 -1
- package/dist/types/schema/nodes/blockquote_element.d.ts +0 -1
- package/dist/types/schema/nodes/citation.d.ts +0 -1
- package/dist/types/schema/nodes/cross_reference.d.ts +0 -1
- package/dist/types/schema/nodes/equation_element.d.ts +0 -1
- package/dist/types/schema/nodes/figure_element.d.ts +0 -14
- package/dist/types/schema/nodes/footnote.d.ts +0 -1
- package/dist/types/schema/nodes/footnotes_element.d.ts +0 -1
- package/dist/types/schema/nodes/keywords_element.d.ts +1 -2
- package/dist/types/schema/nodes/list.d.ts +0 -1
- package/dist/types/schema/nodes/listing_element.d.ts +0 -2
- package/dist/types/schema/nodes/manuscript.d.ts +0 -6
- package/dist/types/schema/nodes/paragraph.d.ts +0 -1
- package/dist/types/schema/nodes/pullquote_element.d.ts +0 -1
- package/dist/types/schema/nodes/section.d.ts +1 -8
- package/dist/types/schema/nodes/table_element.d.ts +0 -8
- package/dist/types/schema/nodes/toc_element.d.ts +0 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/lib/attributes.js +0 -26
- package/dist/es/lib/attributes.js +0 -22
- package/dist/types/lib/attributes.d.ts +0 -20
|
@@ -17,8 +17,6 @@ export const listingElement = {
|
|
|
17
17
|
content: '(listing | placeholder) figcaption',
|
|
18
18
|
attrs: {
|
|
19
19
|
id: { default: '' },
|
|
20
|
-
suppressCaption: { default: true },
|
|
21
|
-
suppressTitle: { default: undefined },
|
|
22
20
|
dataTracked: { default: null },
|
|
23
21
|
},
|
|
24
22
|
group: 'block element',
|
|
@@ -21,12 +21,6 @@ export const manuscript = {
|
|
|
21
21
|
prototype: { default: '' },
|
|
22
22
|
primaryLanguageCode: { default: '' },
|
|
23
23
|
articleType: { default: '' },
|
|
24
|
-
acceptanceDate: { default: undefined },
|
|
25
|
-
correctionDate: { default: undefined },
|
|
26
|
-
retractionDate: { default: undefined },
|
|
27
|
-
revisionRequestDate: { default: undefined },
|
|
28
|
-
revisionReceiveDate: { default: undefined },
|
|
29
|
-
receiveDate: { default: undefined },
|
|
30
24
|
},
|
|
31
25
|
group: 'block',
|
|
32
26
|
parseDOM: [
|
|
@@ -14,12 +14,10 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { ObjectTypes } from '@manuscripts/json-schema';
|
|
17
|
-
import { buildElementClass } from '../../lib/attributes';
|
|
18
17
|
export const paragraph = {
|
|
19
18
|
content: 'inline*',
|
|
20
19
|
attrs: {
|
|
21
20
|
id: { default: '' },
|
|
22
|
-
paragraphStyle: { default: '' },
|
|
23
21
|
placeholder: { default: '' },
|
|
24
22
|
dataTracked: { default: null },
|
|
25
23
|
},
|
|
@@ -47,7 +45,6 @@ export const paragraph = {
|
|
|
47
45
|
if (paragraphNode.attrs.id) {
|
|
48
46
|
attrs.id = paragraphNode.attrs.id;
|
|
49
47
|
}
|
|
50
|
-
attrs.class = buildElementClass(paragraphNode.attrs);
|
|
51
48
|
attrs['data-object-type'] = ObjectTypes.ParagraphElement;
|
|
52
49
|
if (paragraphNode.attrs.placeholder) {
|
|
53
50
|
attrs['data-placeholder-text'] = paragraphNode.attrs.placeholder;
|
|
@@ -14,12 +14,10 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { ObjectTypes } from '@manuscripts/json-schema';
|
|
17
|
-
import { buildElementClass } from '../../lib/attributes';
|
|
18
17
|
export const pullquoteElement = {
|
|
19
18
|
content: 'paragraph+ attribution',
|
|
20
19
|
attrs: {
|
|
21
20
|
id: { default: '' },
|
|
22
|
-
paragraphStyle: { default: '' },
|
|
23
21
|
placeholder: { default: '' },
|
|
24
22
|
dataTracked: { default: null },
|
|
25
23
|
},
|
|
@@ -47,10 +45,7 @@ export const pullquoteElement = {
|
|
|
47
45
|
if (pullquoteElementNode.attrs.id) {
|
|
48
46
|
attrs.id = pullquoteElementNode.attrs.id;
|
|
49
47
|
}
|
|
50
|
-
attrs.class =
|
|
51
|
-
'pullquote',
|
|
52
|
-
buildElementClass(pullquoteElementNode.attrs),
|
|
53
|
-
].join(' ');
|
|
48
|
+
attrs.class = 'pullquote';
|
|
54
49
|
attrs['data-object-type'] = ObjectTypes.QuoteElement;
|
|
55
50
|
if (pullquoteElementNode.attrs.placeholder) {
|
|
56
51
|
attrs['data-placeholder-text'] = pullquoteElementNode.attrs.placeholder;
|
|
@@ -13,32 +13,11 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export const PAGE_BREAK_NONE = 0;
|
|
17
|
-
export const PAGE_BREAK_BEFORE = 1;
|
|
18
|
-
export const PAGE_BREAK_AFTER = 2;
|
|
19
|
-
export const PAGE_BREAK_BEFORE_AND_AFTER = 4;
|
|
20
|
-
const choosePageBreakStyle = (element) => {
|
|
21
|
-
const pageBreakAfter = element.classList.contains('page-break-after');
|
|
22
|
-
const pageBreakBefore = element.classList.contains('page-break-before');
|
|
23
|
-
if (pageBreakBefore && pageBreakAfter) {
|
|
24
|
-
return PAGE_BREAK_BEFORE_AND_AFTER;
|
|
25
|
-
}
|
|
26
|
-
if (pageBreakBefore) {
|
|
27
|
-
return PAGE_BREAK_BEFORE;
|
|
28
|
-
}
|
|
29
|
-
if (pageBreakAfter) {
|
|
30
|
-
return PAGE_BREAK_AFTER;
|
|
31
|
-
}
|
|
32
|
-
return PAGE_BREAK_NONE;
|
|
33
|
-
};
|
|
34
16
|
export const section = {
|
|
35
17
|
content: 'section_label? section_title (paragraph | element)* sections*',
|
|
36
18
|
attrs: {
|
|
37
19
|
id: { default: '' },
|
|
38
20
|
category: { default: '' },
|
|
39
|
-
titleSuppressed: { default: false },
|
|
40
|
-
generatedLabel: { default: undefined },
|
|
41
|
-
pageBreakStyle: { default: undefined },
|
|
42
21
|
dataTracked: { default: null },
|
|
43
22
|
},
|
|
44
23
|
group: 'block sections',
|
|
@@ -51,35 +30,14 @@ export const section = {
|
|
|
51
30
|
return {
|
|
52
31
|
id: element.getAttribute('id') || '',
|
|
53
32
|
category: element.getAttribute('data-category') || '',
|
|
54
|
-
titleSuppressed: element.classList.contains('title-suppressed'),
|
|
55
|
-
generatedLabel: element.classList.contains('generated-label'),
|
|
56
|
-
pageBreakStyle: choosePageBreakStyle(element) || undefined,
|
|
57
33
|
};
|
|
58
34
|
},
|
|
59
35
|
},
|
|
60
36
|
],
|
|
61
37
|
toDOM: (node) => {
|
|
62
38
|
const sectionNode = node;
|
|
63
|
-
const { id, category
|
|
64
|
-
const classnames = [];
|
|
65
|
-
if (titleSuppressed) {
|
|
66
|
-
classnames.push('title-suppressed');
|
|
67
|
-
}
|
|
68
|
-
if (typeof generatedLabel === 'undefined' || generatedLabel) {
|
|
69
|
-
classnames.push('generated-label');
|
|
70
|
-
}
|
|
71
|
-
if (pageBreakStyle === PAGE_BREAK_BEFORE ||
|
|
72
|
-
pageBreakStyle === PAGE_BREAK_BEFORE_AND_AFTER) {
|
|
73
|
-
classnames.push('page-break-before');
|
|
74
|
-
}
|
|
75
|
-
if (pageBreakStyle === PAGE_BREAK_AFTER ||
|
|
76
|
-
pageBreakStyle === PAGE_BREAK_BEFORE_AND_AFTER) {
|
|
77
|
-
classnames.push('page-break-after');
|
|
78
|
-
}
|
|
39
|
+
const { id, category } = sectionNode.attrs;
|
|
79
40
|
const attrs = { id };
|
|
80
|
-
if (classnames.length) {
|
|
81
|
-
attrs['class'] = classnames.join(' ');
|
|
82
|
-
}
|
|
83
41
|
if (category) {
|
|
84
42
|
attrs['data-category'] = node.attrs.category;
|
|
85
43
|
}
|
|
@@ -17,14 +17,7 @@ export const tableElement = {
|
|
|
17
17
|
content: ' figcaption? (table | placeholder) table_colgroup? table_element_footer? (listing | placeholder)',
|
|
18
18
|
attrs: {
|
|
19
19
|
id: { default: '' },
|
|
20
|
-
paragraphStyle: { default: '' },
|
|
21
|
-
tableStyle: { default: '' },
|
|
22
20
|
label: { default: '' },
|
|
23
|
-
suppressCaption: { default: false },
|
|
24
|
-
suppressTitle: { default: undefined },
|
|
25
|
-
suppressFooter: { default: false },
|
|
26
|
-
suppressHeader: { default: false },
|
|
27
|
-
expandListing: { default: false },
|
|
28
21
|
dataTracked: { default: null },
|
|
29
22
|
},
|
|
30
23
|
selectable: false,
|
|
@@ -36,8 +29,6 @@ export const tableElement = {
|
|
|
36
29
|
const element = dom;
|
|
37
30
|
return {
|
|
38
31
|
id: element.getAttribute('id'),
|
|
39
|
-
paragraphStyle: element.getAttribute('data-paragraph-style') || '',
|
|
40
|
-
tableStyle: element.getAttribute('data-table-style') || '',
|
|
41
32
|
};
|
|
42
33
|
},
|
|
43
34
|
},
|
|
@@ -49,8 +40,6 @@ export const tableElement = {
|
|
|
49
40
|
{
|
|
50
41
|
class: 'table',
|
|
51
42
|
id: tableElementNode.attrs.id,
|
|
52
|
-
'data-paragraph-style': tableElementNode.attrs.paragraphStyle,
|
|
53
|
-
'data-table-style': tableElementNode.attrs.tableStyle,
|
|
54
43
|
},
|
|
55
44
|
0,
|
|
56
45
|
];
|
package/dist/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "3.0.4
|
|
1
|
+
export const VERSION = "3.0.4";
|
|
@@ -44,7 +44,7 @@ export declare const buildCitations: (citations: CitationNode[]) => {
|
|
|
44
44
|
export declare class JATSExporter {
|
|
45
45
|
protected document: Document;
|
|
46
46
|
protected serializer: DOMSerializer;
|
|
47
|
-
protected labelTargets
|
|
47
|
+
protected labelTargets: Map<string, Target>;
|
|
48
48
|
protected citationTexts: Map<string, string>;
|
|
49
49
|
protected citationProvider: CitationProvider;
|
|
50
50
|
protected manuscriptNode: ManuscriptNode;
|
|
@@ -0,0 +1,40 @@
|
|
|
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 declare const jatsBodyTransformations: {
|
|
17
|
+
ensureSection(body: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
18
|
+
createAbstractSection(abstractNode: Element, createElement: (tagName: string) => HTMLElement): HTMLElement;
|
|
19
|
+
createAcknowledgmentsSection(ackNode: Element, createElement: (tagName: string) => HTMLElement): HTMLElement;
|
|
20
|
+
createFootnotesSection(footnoteGroups: Element[], createElement: (tagName: string) => HTMLElement): HTMLElement;
|
|
21
|
+
createAppendixSection(app: Element, createElement: (tagName: string) => HTMLElement): HTMLElement;
|
|
22
|
+
createFloatsGroupSection(group: Element, createElement: (tagName: string) => HTMLElement): HTMLElement;
|
|
23
|
+
moveAbstracts(doc: Document, group: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
24
|
+
wrapBodySections(doc: Document, group: Element): void;
|
|
25
|
+
moveBackSections(doc: Document, group: Element): void;
|
|
26
|
+
moveAcknowledgments(doc: Document, group: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
27
|
+
moveAppendices(doc: Document, group: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
28
|
+
createBoxedElementSection(doc: Document, body: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
29
|
+
createBody(doc: Document, body: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
30
|
+
createAbstracts(doc: Document, body: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
31
|
+
createBackmatter(doc: Document, body: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
32
|
+
moveSpecialFootnotes(doc: Document, group: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
33
|
+
moveFootnotes(doc: Document, group: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
34
|
+
moveCaptionsToEnd(body: Element): void;
|
|
35
|
+
fixTables(body: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
36
|
+
orderTableFootnote(doc: Document, body: Element): void;
|
|
37
|
+
moveFloatsGroupToBody(doc: Document, body: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
38
|
+
createKeywords(document: Document, body: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
39
|
+
createSuppleMaterials(document: Document, body: Element, createElement: (tagName: string) => HTMLElement): void;
|
|
40
|
+
};
|
|
@@ -27,4 +27,3 @@ export declare const findParentNodeClosestToPos: ($pos: ResolvedPos, predicate:
|
|
|
27
27
|
} | undefined;
|
|
28
28
|
export declare const getTrimmedTextContent: (node: Element | Document | null, querySelector: string) => string | null | undefined;
|
|
29
29
|
export declare const timestamp: () => number;
|
|
30
|
-
export declare const dateToTimestamp: (dateElement: Element) => number | undefined;
|
|
@@ -17,22 +17,8 @@ import { NodeSpec } from 'prosemirror-model';
|
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
18
|
import { AttributionNode } from './attribution';
|
|
19
19
|
interface Attrs {
|
|
20
|
-
columns: number;
|
|
21
|
-
figureLayout: string;
|
|
22
|
-
figureStyle: string;
|
|
23
20
|
id: string;
|
|
24
|
-
label: string;
|
|
25
|
-
rows: number;
|
|
26
|
-
alignment?: string;
|
|
27
|
-
sizeFraction: number;
|
|
28
|
-
suppressCaption: boolean;
|
|
29
|
-
suppressTitle?: boolean;
|
|
30
|
-
expandListing: boolean;
|
|
31
21
|
attribution?: AttributionNode;
|
|
32
|
-
alternatives?: {
|
|
33
|
-
src: string;
|
|
34
|
-
type?: string;
|
|
35
|
-
}[];
|
|
36
22
|
}
|
|
37
23
|
export interface FigureElementNode extends ManuscriptNode {
|
|
38
24
|
attrs: Attrs;
|
|
@@ -16,9 +16,8 @@
|
|
|
16
16
|
import { NodeSpec } from 'prosemirror-model';
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
18
|
interface Attrs {
|
|
19
|
-
contents: string;
|
|
20
19
|
id: string;
|
|
21
|
-
|
|
20
|
+
contents: string;
|
|
22
21
|
}
|
|
23
22
|
export interface KeywordsElementNode extends ManuscriptNode {
|
|
24
23
|
attrs: Attrs;
|
|
@@ -17,8 +17,6 @@ import { NodeSpec } from 'prosemirror-model';
|
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
18
|
interface Attrs {
|
|
19
19
|
id: string;
|
|
20
|
-
suppressCaption: boolean;
|
|
21
|
-
suppressTitle?: boolean;
|
|
22
20
|
}
|
|
23
21
|
export interface ListingElementNode extends ManuscriptNode {
|
|
24
22
|
attrs: Attrs;
|
|
@@ -24,12 +24,6 @@ export interface ManuscriptAttrs {
|
|
|
24
24
|
articleType: string;
|
|
25
25
|
prototype: string;
|
|
26
26
|
primaryLanguageCode: string;
|
|
27
|
-
acceptanceDate?: number;
|
|
28
|
-
correctionDate?: number;
|
|
29
|
-
retractionDate?: number;
|
|
30
|
-
revisionRequestDate?: number;
|
|
31
|
-
revisionReceiveDate?: number;
|
|
32
|
-
receiveDate?: number;
|
|
33
27
|
}
|
|
34
28
|
export declare const manuscript: NodeSpec;
|
|
35
29
|
export declare const isManuscriptNode: (node: ManuscriptNode) => node is import("prosemirror-model").Node;
|
|
@@ -17,18 +17,11 @@ import { NodeSpec } from 'prosemirror-model';
|
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
18
|
interface Attrs {
|
|
19
19
|
id: string;
|
|
20
|
-
category
|
|
21
|
-
titleSuppressed: boolean;
|
|
22
|
-
generatedLabel: boolean;
|
|
23
|
-
pageBreakStyle?: number;
|
|
20
|
+
category: string;
|
|
24
21
|
}
|
|
25
22
|
export interface SectionNode extends ManuscriptNode {
|
|
26
23
|
attrs: Attrs;
|
|
27
24
|
}
|
|
28
|
-
export declare const PAGE_BREAK_NONE = 0;
|
|
29
|
-
export declare const PAGE_BREAK_BEFORE = 1;
|
|
30
|
-
export declare const PAGE_BREAK_AFTER = 2;
|
|
31
|
-
export declare const PAGE_BREAK_BEFORE_AND_AFTER = 4;
|
|
32
25
|
export declare const section: NodeSpec;
|
|
33
26
|
export declare const isSectionNode: (node: ManuscriptNode) => node is SectionNode;
|
|
34
27
|
export {};
|
|
@@ -17,14 +17,6 @@ import { NodeSpec } from 'prosemirror-model';
|
|
|
17
17
|
import { ManuscriptNode } from '../types';
|
|
18
18
|
interface Attrs {
|
|
19
19
|
id: string;
|
|
20
|
-
paragraphStyle: string;
|
|
21
|
-
tableStyle: string;
|
|
22
|
-
label: string;
|
|
23
|
-
suppressCaption: boolean;
|
|
24
|
-
suppressTitle?: boolean;
|
|
25
|
-
suppressFooter: boolean;
|
|
26
|
-
suppressHeader: boolean;
|
|
27
|
-
expandListing: boolean;
|
|
28
20
|
}
|
|
29
21
|
export interface TableElementNode extends ManuscriptNode {
|
|
30
22
|
attrs: Attrs;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.0.4
|
|
1
|
+
export declare const VERSION = "3.0.4";
|
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": "3.0.4
|
|
4
|
+
"version": "3.0.4",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* © 2019 Atypon Systems LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.buildElementClass = void 0;
|
|
19
|
-
const buildElementClass = (attrs) => {
|
|
20
|
-
const classes = ['MPElement'];
|
|
21
|
-
if (attrs.paragraphStyle) {
|
|
22
|
-
classes.push(attrs.paragraphStyle.replace(/:/g, '_'));
|
|
23
|
-
}
|
|
24
|
-
return classes.join(' ');
|
|
25
|
-
};
|
|
26
|
-
exports.buildElementClass = buildElementClass;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2019 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 const buildElementClass = (attrs) => {
|
|
17
|
-
const classes = ['MPElement'];
|
|
18
|
-
if (attrs.paragraphStyle) {
|
|
19
|
-
classes.push(attrs.paragraphStyle.replace(/:/g, '_'));
|
|
20
|
-
}
|
|
21
|
-
return classes.join(' ');
|
|
22
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2019 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
|
-
interface StyledNodeAttrs {
|
|
17
|
-
paragraphStyle?: string;
|
|
18
|
-
}
|
|
19
|
-
export declare const buildElementClass: (attrs: StyledNodeAttrs) => string;
|
|
20
|
-
export {};
|