@manuscripts/transform 1.0.0 → 1.0.1-LEAN-2105
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/importer/jats-parser-utils.js +2 -2
- package/dist/cjs/jats/jats-exporter.js +17 -16
- package/dist/cjs/schema/index.js +2 -0
- package/dist/cjs/schema/nodes/blockquote_element.js +2 -2
- package/dist/{types/transformer/tei-grobid-importer.d.ts → cjs/schema/nodes/comment_list.js} +10 -6
- package/dist/cjs/schema/nodes/equation.js +3 -3
- package/dist/cjs/schema/nodes/inline_equation.js +3 -3
- package/dist/cjs/schema/nodes/list.js +3 -3
- package/dist/cjs/schema/nodes/listing.js +3 -3
- package/dist/cjs/schema/nodes/manuscript.js +1 -1
- package/dist/cjs/schema/nodes/paragraph.js +2 -2
- package/dist/cjs/schema/nodes/pullquote_element.js +2 -2
- package/dist/cjs/transformer/builders.js +73 -73
- package/dist/cjs/transformer/decode.js +67 -37
- package/dist/cjs/transformer/document-object-types.js +11 -11
- package/dist/cjs/transformer/encode.js +11 -10
- package/dist/cjs/transformer/html.js +2 -2
- package/dist/cjs/transformer/index.js +0 -1
- package/dist/cjs/transformer/labels.js +1 -2
- package/dist/cjs/transformer/manuscript-dependencies.js +3 -3
- package/dist/cjs/transformer/node-types.js +34 -33
- package/dist/cjs/transformer/object-types.js +23 -23
- package/dist/cjs/transformer/project-bundle.js +4 -4
- package/dist/cjs/transformer/section-category.js +5 -5
- package/dist/es/jats/importer/jats-parser-utils.js +1 -1
- package/dist/es/jats/jats-exporter.js +2 -1
- package/dist/es/schema/index.js +2 -0
- package/dist/es/schema/nodes/blockquote_element.js +1 -1
- package/dist/es/schema/nodes/comment_list.js +21 -0
- package/dist/es/schema/nodes/equation.js +1 -1
- package/dist/es/schema/nodes/inline_equation.js +1 -1
- package/dist/es/schema/nodes/list.js +1 -1
- package/dist/es/schema/nodes/listing.js +1 -1
- package/dist/es/schema/nodes/manuscript.js +1 -1
- package/dist/es/schema/nodes/paragraph.js +1 -1
- package/dist/es/schema/nodes/pullquote_element.js +1 -1
- package/dist/es/transformer/builders.js +1 -1
- package/dist/es/transformer/decode.js +43 -13
- package/dist/es/transformer/document-object-types.js +1 -1
- package/dist/es/transformer/encode.js +12 -11
- package/dist/es/transformer/html.js +1 -1
- package/dist/es/transformer/index.js +0 -1
- package/dist/es/transformer/labels.js +1 -2
- package/dist/es/transformer/manuscript-dependencies.js +1 -1
- package/dist/es/transformer/node-types.js +2 -1
- package/dist/es/transformer/object-types.js +1 -1
- package/dist/es/transformer/project-bundle.js +1 -1
- package/dist/es/transformer/section-category.js +1 -1
- package/dist/types/jats/importer/jats-body-transformations.d.ts +1 -1
- package/dist/types/jats/importer/jats-comments.d.ts +1 -1
- package/dist/types/jats/importer/jats-front-parser.d.ts +6 -6
- package/dist/types/jats/importer/jats-parser-utils.d.ts +1 -1
- package/dist/types/jats/importer/jats-reference-parser.d.ts +2 -2
- package/dist/types/jats/importer/parse-jats-article.d.ts +2 -2
- package/dist/types/jats/jats-exporter.d.ts +1 -1
- package/dist/types/lib/styled-content.d.ts +1 -1
- package/dist/types/schema/nodes/comment_list.d.ts +25 -0
- package/dist/types/schema/types.d.ts +1 -1
- package/dist/types/transformer/builders.d.ts +1 -1
- package/dist/types/transformer/bundles-data.d.ts +1 -1
- package/dist/types/transformer/bundles.d.ts +1 -1
- package/dist/types/transformer/decode.d.ts +2 -1
- package/dist/types/transformer/document-object-types.d.ts +1 -1
- package/dist/types/transformer/encode.d.ts +1 -1
- package/dist/types/transformer/footnotes-order.d.ts +1 -1
- package/dist/types/transformer/highlight-markers.d.ts +1 -1
- package/dist/types/transformer/html.d.ts +1 -1
- package/dist/types/transformer/id.d.ts +1 -1
- package/dist/types/transformer/index.d.ts +0 -1
- package/dist/types/transformer/labels.d.ts +1 -1
- package/dist/types/transformer/manuscript-dependencies.d.ts +1 -1
- package/dist/types/transformer/model-map.d.ts +1 -1
- package/dist/types/transformer/models.d.ts +1 -1
- package/dist/types/transformer/node-types.d.ts +1 -1
- package/dist/types/transformer/object-types.d.ts +1 -1
- package/dist/types/transformer/project-bundle.d.ts +1 -1
- package/dist/types/transformer/section-category.d.ts +1 -1
- package/dist/types/transformer/shared-data.d.ts +1 -1
- package/dist/types/transformer/update-identifiers.d.ts +1 -1
- package/package.json +2 -2
- package/dist/cjs/transformer/tei-grobid-importer.js +0 -121
- package/dist/es/transformer/tei-grobid-importer.js +0 -115
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.htmlFromJatsNode = exports.fixBodyPMNode = exports.flatten = void 0;
|
|
19
|
-
const
|
|
19
|
+
const json_schema_1 = require("@manuscripts/json-schema");
|
|
20
20
|
const transformer_1 = require("../../transformer");
|
|
21
|
-
const isAuxiliaryObjectReference = (0, transformer_1.hasObjectType)(
|
|
21
|
+
const isAuxiliaryObjectReference = (0, transformer_1.hasObjectType)(json_schema_1.ObjectTypes.AuxiliaryObjectReference);
|
|
22
22
|
function flatten(arrays) {
|
|
23
23
|
return [].concat(...arrays);
|
|
24
24
|
}
|
|
@@ -19,7 +19,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.JATSExporter = exports.createCounter = void 0;
|
|
22
|
-
const
|
|
22
|
+
const json_schema_1 = require("@manuscripts/json-schema");
|
|
23
23
|
const debug_1 = __importDefault(require("debug"));
|
|
24
24
|
const prosemirror_model_1 = require("prosemirror-model");
|
|
25
25
|
const w3c_xmlserializer_1 = __importDefault(require("w3c-xmlserializer"));
|
|
@@ -45,7 +45,7 @@ const findChildNodeOfType = (node, nodeType) => {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
const isContributor = (0, object_types_1.hasObjectType)(
|
|
48
|
+
const isContributor = (0, object_types_1.hasObjectType)(json_schema_1.ObjectTypes.Contributor);
|
|
49
49
|
const CREDIT_VOCAB_IDENTIFIER = 'https://dictionary.casrai.org/Contributor_Roles';
|
|
50
50
|
const chooseRoleVocabAttributes = (role) => {
|
|
51
51
|
if (role.uri && role.uri.startsWith(CREDIT_VOCAB_IDENTIFIER)) {
|
|
@@ -99,18 +99,18 @@ const createDefaultIdGenerator = () => {
|
|
|
99
99
|
};
|
|
100
100
|
const chooseRefType = (objectType) => {
|
|
101
101
|
switch (objectType) {
|
|
102
|
-
case
|
|
103
|
-
case
|
|
102
|
+
case json_schema_1.ObjectTypes.Figure:
|
|
103
|
+
case json_schema_1.ObjectTypes.FigureElement:
|
|
104
104
|
return 'fig';
|
|
105
|
-
case
|
|
105
|
+
case json_schema_1.ObjectTypes.Footnote:
|
|
106
106
|
return 'fn';
|
|
107
|
-
case
|
|
108
|
-
case
|
|
107
|
+
case json_schema_1.ObjectTypes.Table:
|
|
108
|
+
case json_schema_1.ObjectTypes.TableElement:
|
|
109
109
|
return 'table';
|
|
110
|
-
case
|
|
110
|
+
case json_schema_1.ObjectTypes.Section:
|
|
111
111
|
return 'sec';
|
|
112
|
-
case
|
|
113
|
-
case
|
|
112
|
+
case json_schema_1.ObjectTypes.Equation:
|
|
113
|
+
case json_schema_1.ObjectTypes.EquationElement:
|
|
114
114
|
return 'disp-formula';
|
|
115
115
|
}
|
|
116
116
|
};
|
|
@@ -240,7 +240,7 @@ class JATSExporter {
|
|
|
240
240
|
front.appendChild(journalMeta);
|
|
241
241
|
const articleMeta = this.document.createElement('article-meta');
|
|
242
242
|
front.appendChild(articleMeta);
|
|
243
|
-
const journal = [...this.modelMap.values()].find((model) => model.objectType ===
|
|
243
|
+
const journal = [...this.modelMap.values()].find((model) => model.objectType === json_schema_1.ObjectTypes.Journal);
|
|
244
244
|
if (journal) {
|
|
245
245
|
if (journal.journalIdentifiers) {
|
|
246
246
|
for (const item of journal.journalIdentifiers) {
|
|
@@ -351,7 +351,7 @@ class JATSExporter {
|
|
|
351
351
|
this.setTitleContent(element, manuscript.runningTitle);
|
|
352
352
|
titleGroup.appendChild(element);
|
|
353
353
|
}
|
|
354
|
-
const supplements = [...this.modelMap.values()].filter((model) => model.objectType ===
|
|
354
|
+
const supplements = [...this.modelMap.values()].filter((model) => model.objectType === json_schema_1.ObjectTypes.Supplement);
|
|
355
355
|
if (supplements && supplements.length > 0) {
|
|
356
356
|
for (const supplement of supplements) {
|
|
357
357
|
const supplementaryMaterial = this.document.createElement('supplementary-material');
|
|
@@ -481,7 +481,7 @@ class JATSExporter {
|
|
|
481
481
|
refList = this.document.createElement('ref-list');
|
|
482
482
|
}
|
|
483
483
|
back.appendChild(refList);
|
|
484
|
-
const bibliographyItems = this.models.filter((0, object_types_1.hasObjectType)(
|
|
484
|
+
const bibliographyItems = this.models.filter((0, object_types_1.hasObjectType)(json_schema_1.ObjectTypes.BibliographyItem));
|
|
485
485
|
for (const bibliographyItem of bibliographyItems) {
|
|
486
486
|
const ref = this.document.createElement('ref');
|
|
487
487
|
ref.setAttribute('id', normalizeID(bibliographyItem._id));
|
|
@@ -623,6 +623,7 @@ class JATSExporter {
|
|
|
623
623
|
attribution: () => ['attrib', 0],
|
|
624
624
|
bibliography_element: () => '',
|
|
625
625
|
bibliography_item: () => '',
|
|
626
|
+
comment_list: () => '',
|
|
626
627
|
bibliography_section: (node) => [
|
|
627
628
|
'ref-list',
|
|
628
629
|
{ id: normalizeID(node.attrs.id) },
|
|
@@ -1182,7 +1183,7 @@ class JATSExporter {
|
|
|
1182
1183
|
affiliationRIDs.push(...contributor.affiliations);
|
|
1183
1184
|
}
|
|
1184
1185
|
}
|
|
1185
|
-
const affiliations = this.models.filter((0, object_types_1.hasObjectType)(
|
|
1186
|
+
const affiliations = this.models.filter((0, object_types_1.hasObjectType)(json_schema_1.ObjectTypes.Affiliation));
|
|
1186
1187
|
if (affiliations) {
|
|
1187
1188
|
const usedAffiliations = affiliations.filter((affiliation) => affiliationRIDs.includes(affiliation._id));
|
|
1188
1189
|
usedAffiliations.sort((a, b) => affiliationRIDs.indexOf(a._id) - affiliationRIDs.indexOf(b._id));
|
|
@@ -1257,9 +1258,9 @@ class JATSExporter {
|
|
|
1257
1258
|
}
|
|
1258
1259
|
}
|
|
1259
1260
|
const footnotes = [];
|
|
1260
|
-
footnotes.push(...this.models.filter((0, object_types_1.hasObjectType)(
|
|
1261
|
+
footnotes.push(...this.models.filter((0, object_types_1.hasObjectType)(json_schema_1.ObjectTypes.Footnote)));
|
|
1261
1262
|
const correspodings = [];
|
|
1262
|
-
correspodings.push(...this.models.filter((0, object_types_1.hasObjectType)(
|
|
1263
|
+
correspodings.push(...this.models.filter((0, object_types_1.hasObjectType)(json_schema_1.ObjectTypes.Corresponding)));
|
|
1263
1264
|
if (footnotes || correspodings) {
|
|
1264
1265
|
const authorNotesEl = this.document.createElement('author-notes');
|
|
1265
1266
|
const usedFootnotes = footnotes.filter((footnote) => {
|
package/dist/cjs/schema/index.js
CHANGED
|
@@ -41,6 +41,7 @@ const caption_1 = require("./nodes/caption");
|
|
|
41
41
|
const caption_title_1 = require("./nodes/caption_title");
|
|
42
42
|
const citation_1 = require("./nodes/citation");
|
|
43
43
|
const comment_1 = require("./nodes/comment");
|
|
44
|
+
const comment_list_1 = require("./nodes/comment_list");
|
|
44
45
|
const cross_reference_1 = require("./nodes/cross_reference");
|
|
45
46
|
const doc_1 = require("./nodes/doc");
|
|
46
47
|
const equation_1 = require("./nodes/equation");
|
|
@@ -141,6 +142,7 @@ exports.schema = new prosemirror_model_1.Schema({
|
|
|
141
142
|
},
|
|
142
143
|
nodes: {
|
|
143
144
|
comment: comment_1.comment,
|
|
145
|
+
comment_list: comment_list_1.commentList,
|
|
144
146
|
attribution: attribution_1.attribution,
|
|
145
147
|
bibliography_item: bibliography_item_1.bibliographyItem,
|
|
146
148
|
bibliography_element: bibliography_element_1.bibliographyElement,
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.isBlockquoteElement = exports.blockquoteElement = void 0;
|
|
19
|
-
const
|
|
19
|
+
const json_schema_1 = require("@manuscripts/json-schema");
|
|
20
20
|
const attributes_1 = require("../../lib/attributes");
|
|
21
21
|
exports.blockquoteElement = {
|
|
22
22
|
content: 'paragraph+ attribution',
|
|
@@ -51,7 +51,7 @@ exports.blockquoteElement = {
|
|
|
51
51
|
attrs.id = blockquoteElementNode.attrs.id;
|
|
52
52
|
}
|
|
53
53
|
attrs.class = (0, attributes_1.buildElementClass)(blockquoteElementNode.attrs);
|
|
54
|
-
attrs['data-object-type'] =
|
|
54
|
+
attrs['data-object-type'] = json_schema_1.ObjectTypes.QuoteElement;
|
|
55
55
|
if (blockquoteElementNode.attrs.placeholder) {
|
|
56
56
|
attrs['data-placeholder-text'] = blockquoteElementNode.attrs.placeholder;
|
|
57
57
|
}
|
package/dist/{types/transformer/tei-grobid-importer.d.ts → cjs/schema/nodes/comment_list.js}
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/*!
|
|
2
|
-
* ©
|
|
3
|
+
* © 2019 Atypon Systems LLC
|
|
3
4
|
*
|
|
4
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -13,8 +14,11 @@
|
|
|
13
14
|
* See the License for the specific language governing permissions and
|
|
14
15
|
* limitations under the License.
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.commentList = void 0;
|
|
19
|
+
exports.commentList = {
|
|
20
|
+
content: 'comment*',
|
|
21
|
+
attrs: {
|
|
22
|
+
id: { default: '' },
|
|
23
|
+
},
|
|
24
|
+
};
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.equation = void 0;
|
|
19
|
-
const
|
|
19
|
+
const json_schema_1 = require("@manuscripts/json-schema");
|
|
20
20
|
exports.equation = {
|
|
21
21
|
attrs: {
|
|
22
22
|
id: { default: '' },
|
|
@@ -28,7 +28,7 @@ exports.equation = {
|
|
|
28
28
|
group: 'block',
|
|
29
29
|
parseDOM: [
|
|
30
30
|
{
|
|
31
|
-
tag: `div.${
|
|
31
|
+
tag: `div.${json_schema_1.ObjectTypes.Equation}`,
|
|
32
32
|
getAttrs: (p) => {
|
|
33
33
|
const dom = p;
|
|
34
34
|
return {
|
|
@@ -44,7 +44,7 @@ exports.equation = {
|
|
|
44
44
|
const equationNode = node;
|
|
45
45
|
const dom = document.createElement('div');
|
|
46
46
|
dom.setAttribute('id', equationNode.attrs.id);
|
|
47
|
-
dom.classList.add(
|
|
47
|
+
dom.classList.add(json_schema_1.ObjectTypes.Equation);
|
|
48
48
|
if (equationNode.attrs.MathMLStringRepresentation) {
|
|
49
49
|
dom.setAttribute('data-mathml-string-representation', equationNode.attrs.MathMLStringRepresentation);
|
|
50
50
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.inlineEquation = void 0;
|
|
19
|
-
const
|
|
19
|
+
const json_schema_1 = require("@manuscripts/json-schema");
|
|
20
20
|
exports.inlineEquation = {
|
|
21
21
|
attrs: {
|
|
22
22
|
id: { default: '' },
|
|
@@ -31,7 +31,7 @@ exports.inlineEquation = {
|
|
|
31
31
|
group: 'inline',
|
|
32
32
|
parseDOM: [
|
|
33
33
|
{
|
|
34
|
-
tag: `span.${
|
|
34
|
+
tag: `span.${json_schema_1.ObjectTypes.InlineMathFragment}`,
|
|
35
35
|
getAttrs: (p) => {
|
|
36
36
|
const dom = p;
|
|
37
37
|
return {
|
|
@@ -46,7 +46,7 @@ exports.inlineEquation = {
|
|
|
46
46
|
toDOM: (node) => {
|
|
47
47
|
const inlineEquationNode = node;
|
|
48
48
|
const dom = document.createElement('span');
|
|
49
|
-
dom.classList.add(
|
|
49
|
+
dom.classList.add(json_schema_1.ObjectTypes.InlineMathFragment);
|
|
50
50
|
dom.setAttribute('id', inlineEquationNode.attrs.id);
|
|
51
51
|
dom.setAttribute('data-tex-representation', inlineEquationNode.attrs.TeXRepresentation);
|
|
52
52
|
if (inlineEquationNode.attrs.MathMLRepresentation) {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.isListNode = exports.listItem = exports.orderedList = exports.bulletList = void 0;
|
|
19
|
-
const
|
|
19
|
+
const json_schema_1 = require("@manuscripts/json-schema");
|
|
20
20
|
const attributes_1 = require("../../lib/attributes");
|
|
21
21
|
exports.bulletList = {
|
|
22
22
|
content: 'list_item+',
|
|
@@ -45,7 +45,7 @@ exports.bulletList = {
|
|
|
45
45
|
{
|
|
46
46
|
id: bulletListNode.attrs.id,
|
|
47
47
|
class: (0, attributes_1.buildElementClass)(bulletListNode.attrs),
|
|
48
|
-
'data-object-type':
|
|
48
|
+
'data-object-type': json_schema_1.ObjectTypes.ListElement,
|
|
49
49
|
},
|
|
50
50
|
0,
|
|
51
51
|
]
|
|
@@ -79,7 +79,7 @@ exports.orderedList = {
|
|
|
79
79
|
{
|
|
80
80
|
id: orderedListNode.attrs.id,
|
|
81
81
|
class: (0, attributes_1.buildElementClass)(orderedListNode.attrs),
|
|
82
|
-
'data-object-type':
|
|
82
|
+
'data-object-type': json_schema_1.ObjectTypes.ListElement,
|
|
83
83
|
},
|
|
84
84
|
0,
|
|
85
85
|
]
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.isListingNode = exports.listing = void 0;
|
|
19
|
-
const
|
|
19
|
+
const json_schema_1 = require("@manuscripts/json-schema");
|
|
20
20
|
exports.listing = {
|
|
21
21
|
attrs: {
|
|
22
22
|
id: { default: '' },
|
|
@@ -33,7 +33,7 @@ exports.listing = {
|
|
|
33
33
|
group: 'block',
|
|
34
34
|
parseDOM: [
|
|
35
35
|
{
|
|
36
|
-
tag: `pre.${
|
|
36
|
+
tag: `pre.${json_schema_1.ObjectTypes.Listing}`,
|
|
37
37
|
preserveWhitespace: 'full',
|
|
38
38
|
getAttrs: (p) => {
|
|
39
39
|
const node = p;
|
|
@@ -62,7 +62,7 @@ exports.listing = {
|
|
|
62
62
|
const listingNode = node;
|
|
63
63
|
const dom = document.createElement('div');
|
|
64
64
|
dom.setAttribute('id', listingNode.attrs.id);
|
|
65
|
-
dom.classList.add(
|
|
65
|
+
dom.classList.add(json_schema_1.ObjectTypes.Listing);
|
|
66
66
|
dom.setAttribute('data-language', listingNode.attrs.language);
|
|
67
67
|
dom.setAttribute('data-languageKey', listingNode.attrs.languageKey);
|
|
68
68
|
dom.textContent = listingNode.attrs.contents;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.isParagraphNode = exports.paragraph = void 0;
|
|
19
|
-
const
|
|
19
|
+
const json_schema_1 = require("@manuscripts/json-schema");
|
|
20
20
|
const attributes_1 = require("../../lib/attributes");
|
|
21
21
|
exports.paragraph = {
|
|
22
22
|
content: 'inline*',
|
|
@@ -52,7 +52,7 @@ exports.paragraph = {
|
|
|
52
52
|
attrs.id = paragraphNode.attrs.id;
|
|
53
53
|
}
|
|
54
54
|
attrs.class = (0, attributes_1.buildElementClass)(paragraphNode.attrs);
|
|
55
|
-
attrs['data-object-type'] =
|
|
55
|
+
attrs['data-object-type'] = json_schema_1.ObjectTypes.ParagraphElement;
|
|
56
56
|
if (paragraphNode.attrs.placeholder) {
|
|
57
57
|
attrs['data-placeholder-text'] = paragraphNode.attrs.placeholder;
|
|
58
58
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.isPullquoteElement = exports.pullquoteElement = void 0;
|
|
19
|
-
const
|
|
19
|
+
const json_schema_1 = require("@manuscripts/json-schema");
|
|
20
20
|
const attributes_1 = require("../../lib/attributes");
|
|
21
21
|
exports.pullquoteElement = {
|
|
22
22
|
content: 'paragraph+ attribution',
|
|
@@ -54,7 +54,7 @@ exports.pullquoteElement = {
|
|
|
54
54
|
'pullquote',
|
|
55
55
|
(0, attributes_1.buildElementClass)(pullquoteElementNode.attrs),
|
|
56
56
|
].join(' ');
|
|
57
|
-
attrs['data-object-type'] =
|
|
57
|
+
attrs['data-object-type'] = json_schema_1.ObjectTypes.QuoteElement;
|
|
58
58
|
if (pullquoteElementNode.attrs.placeholder) {
|
|
59
59
|
attrs['data-placeholder-text'] = pullquoteElementNode.attrs.placeholder;
|
|
60
60
|
}
|