@manuscripts/transform 1.0.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.
Files changed (315) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +193 -0
  3. package/dist/cjs/errors.js +17 -0
  4. package/dist/cjs/index.js +27 -0
  5. package/dist/cjs/jats/importer/index.js +24 -0
  6. package/dist/cjs/jats/importer/jats-body-dom-parser.js +650 -0
  7. package/dist/cjs/jats/importer/jats-body-transformations.js +269 -0
  8. package/dist/cjs/jats/importer/jats-comments.js +131 -0
  9. package/dist/cjs/jats/importer/jats-front-parser.js +341 -0
  10. package/dist/cjs/jats/importer/jats-journal-meta-parser.js +77 -0
  11. package/dist/cjs/jats/importer/jats-parser-utils.js +145 -0
  12. package/dist/cjs/jats/importer/jats-reference-parser.js +180 -0
  13. package/dist/cjs/jats/importer/parse-jats-article.js +237 -0
  14. package/dist/cjs/jats/index.js +40 -0
  15. package/dist/cjs/jats/jats-exporter.js +1569 -0
  16. package/dist/cjs/jats/jats-versions.js +41 -0
  17. package/dist/cjs/lib/attributes.js +26 -0
  18. package/dist/cjs/lib/html.js +48 -0
  19. package/dist/cjs/lib/styled-content.js +28 -0
  20. package/dist/cjs/lib/table-cell-styles.js +52 -0
  21. package/dist/cjs/lib/utils.js +66 -0
  22. package/dist/cjs/mathjax/index.js +41 -0
  23. package/dist/cjs/mathjax/mathjax-packages.js +20 -0
  24. package/dist/cjs/mathjax/mathml-to-svg.js +56 -0
  25. package/dist/cjs/mathjax/tex-to-mathml.js +49 -0
  26. package/dist/cjs/mathjax/tex-to-svg.js +59 -0
  27. package/dist/cjs/schema/groups.js +31 -0
  28. package/dist/cjs/schema/index.js +195 -0
  29. package/dist/cjs/schema/marks.js +159 -0
  30. package/dist/cjs/schema/nodes/attribution.js +32 -0
  31. package/dist/cjs/schema/nodes/bibliography_element.js +44 -0
  32. package/dist/cjs/schema/nodes/bibliography_item.js +101 -0
  33. package/dist/cjs/schema/nodes/bibliography_section.js +46 -0
  34. package/dist/cjs/schema/nodes/blockquote_element.js +62 -0
  35. package/dist/cjs/schema/nodes/caption.js +52 -0
  36. package/dist/cjs/schema/nodes/caption_title.js +51 -0
  37. package/dist/cjs/schema/nodes/citation.js +52 -0
  38. package/dist/cjs/schema/nodes/comment.js +26 -0
  39. package/dist/cjs/schema/nodes/cross_reference.js +58 -0
  40. package/dist/cjs/schema/nodes/doc.js +21 -0
  41. package/dist/cjs/schema/nodes/equation.js +55 -0
  42. package/dist/cjs/schema/nodes/equation_element.js +52 -0
  43. package/dist/cjs/schema/nodes/figcaption.js +31 -0
  44. package/dist/cjs/schema/nodes/figure.js +52 -0
  45. package/dist/cjs/schema/nodes/figure_element.js +78 -0
  46. package/dist/cjs/schema/nodes/footnote.js +67 -0
  47. package/dist/cjs/schema/nodes/footnotes_element.js +54 -0
  48. package/dist/cjs/schema/nodes/footnotes_section.js +45 -0
  49. package/dist/cjs/schema/nodes/graphical_abstract_section.js +46 -0
  50. package/dist/cjs/schema/nodes/hard_break.js +30 -0
  51. package/dist/cjs/schema/nodes/highlight_marker.js +53 -0
  52. package/dist/cjs/schema/nodes/inline_equation.js +58 -0
  53. package/dist/cjs/schema/nodes/inline_footnote.js +51 -0
  54. package/dist/cjs/schema/nodes/keywords_element.js +52 -0
  55. package/dist/cjs/schema/nodes/keywords_section.js +46 -0
  56. package/dist/cjs/schema/nodes/link.js +61 -0
  57. package/dist/cjs/schema/nodes/list.js +121 -0
  58. package/dist/cjs/schema/nodes/listing.js +73 -0
  59. package/dist/cjs/schema/nodes/listing_element.js +52 -0
  60. package/dist/cjs/schema/nodes/manuscript.js +46 -0
  61. package/dist/cjs/schema/nodes/missing_figure.js +50 -0
  62. package/dist/cjs/schema/nodes/paragraph.js +63 -0
  63. package/dist/cjs/schema/nodes/placeholder.js +49 -0
  64. package/dist/cjs/schema/nodes/placeholder_element.js +48 -0
  65. package/dist/cjs/schema/nodes/pullquote_element.js +65 -0
  66. package/dist/cjs/schema/nodes/section.js +94 -0
  67. package/dist/cjs/schema/nodes/section_label.js +30 -0
  68. package/dist/cjs/schema/nodes/section_title.js +48 -0
  69. package/dist/cjs/schema/nodes/table.js +70 -0
  70. package/dist/cjs/schema/nodes/table_col.js +57 -0
  71. package/dist/cjs/schema/nodes/table_element.js +62 -0
  72. package/dist/cjs/schema/nodes/table_row.js +123 -0
  73. package/dist/cjs/schema/nodes/text.js +21 -0
  74. package/dist/cjs/schema/nodes/toc_element.js +52 -0
  75. package/dist/cjs/schema/nodes/toc_section.js +46 -0
  76. package/dist/cjs/schema/types.js +17 -0
  77. package/dist/cjs/tests.js +30 -0
  78. package/dist/cjs/transformer/builders.js +305 -0
  79. package/dist/cjs/transformer/bundles-data.js +36 -0
  80. package/dist/cjs/transformer/bundles.js +32 -0
  81. package/dist/cjs/transformer/decode.js +619 -0
  82. package/dist/cjs/transformer/document-object-types.js +31 -0
  83. package/dist/cjs/transformer/encode.js +545 -0
  84. package/dist/cjs/transformer/filename.js +27 -0
  85. package/dist/cjs/transformer/footnote-category.js +20 -0
  86. package/dist/cjs/transformer/footnotes-order.js +59 -0
  87. package/dist/cjs/transformer/highlight-markers.js +126 -0
  88. package/dist/cjs/transformer/html.js +414 -0
  89. package/dist/cjs/transformer/id.js +28 -0
  90. package/dist/cjs/transformer/index.js +54 -0
  91. package/dist/cjs/transformer/labels.js +85 -0
  92. package/dist/cjs/transformer/manuscript-dependencies.js +74 -0
  93. package/dist/cjs/transformer/model-map.js +26 -0
  94. package/dist/cjs/transformer/models.js +17 -0
  95. package/dist/cjs/transformer/node-names.js +42 -0
  96. package/dist/cjs/transformer/node-title.js +87 -0
  97. package/dist/cjs/transformer/node-types.js +62 -0
  98. package/dist/cjs/transformer/object-types.js +57 -0
  99. package/dist/cjs/transformer/project-bundle.js +86 -0
  100. package/dist/cjs/transformer/section-category.js +222 -0
  101. package/dist/cjs/transformer/serializer.js +23 -0
  102. package/dist/cjs/transformer/shared-data.js +31 -0
  103. package/dist/cjs/transformer/tei-grobid-importer.js +121 -0
  104. package/dist/cjs/transformer/timestamp.js +20 -0
  105. package/dist/cjs/transformer/update-identifiers.js +93 -0
  106. package/dist/cjs/types.js +2 -0
  107. package/dist/es/errors.js +12 -0
  108. package/dist/es/index.js +9 -0
  109. package/dist/es/jats/importer/index.js +16 -0
  110. package/dist/es/jats/importer/jats-body-dom-parser.js +644 -0
  111. package/dist/es/jats/importer/jats-body-transformations.js +266 -0
  112. package/dist/es/jats/importer/jats-comments.js +124 -0
  113. package/dist/es/jats/importer/jats-front-parser.js +335 -0
  114. package/dist/es/jats/importer/jats-journal-meta-parser.js +70 -0
  115. package/dist/es/jats/importer/jats-parser-utils.js +139 -0
  116. package/dist/es/jats/importer/jats-reference-parser.js +177 -0
  117. package/dist/es/jats/importer/parse-jats-article.js +229 -0
  118. package/dist/es/jats/index.js +18 -0
  119. package/dist/es/jats/jats-exporter.js +1561 -0
  120. package/dist/es/jats/jats-versions.js +36 -0
  121. package/dist/es/lib/attributes.js +22 -0
  122. package/dist/es/lib/html.js +43 -0
  123. package/dist/es/lib/styled-content.js +23 -0
  124. package/dist/es/lib/table-cell-styles.js +47 -0
  125. package/dist/es/lib/utils.js +59 -0
  126. package/dist/es/mathjax/index.js +12 -0
  127. package/dist/es/mathjax/mathjax-packages.js +17 -0
  128. package/dist/es/mathjax/mathml-to-svg.js +52 -0
  129. package/dist/es/mathjax/tex-to-mathml.js +45 -0
  130. package/dist/es/mathjax/tex-to-svg.js +55 -0
  131. package/dist/es/schema/groups.js +27 -0
  132. package/dist/es/schema/index.js +178 -0
  133. package/dist/es/schema/marks.js +156 -0
  134. package/dist/es/schema/nodes/attribution.js +29 -0
  135. package/dist/es/schema/nodes/bibliography_element.js +41 -0
  136. package/dist/es/schema/nodes/bibliography_item.js +98 -0
  137. package/dist/es/schema/nodes/bibliography_section.js +42 -0
  138. package/dist/es/schema/nodes/blockquote_element.js +58 -0
  139. package/dist/es/schema/nodes/caption.js +49 -0
  140. package/dist/es/schema/nodes/caption_title.js +48 -0
  141. package/dist/es/schema/nodes/citation.js +48 -0
  142. package/dist/es/schema/nodes/comment.js +23 -0
  143. package/dist/es/schema/nodes/cross_reference.js +55 -0
  144. package/dist/es/schema/nodes/doc.js +18 -0
  145. package/dist/es/schema/nodes/equation.js +52 -0
  146. package/dist/es/schema/nodes/equation_element.js +49 -0
  147. package/dist/es/schema/nodes/figcaption.js +28 -0
  148. package/dist/es/schema/nodes/figure.js +49 -0
  149. package/dist/es/schema/nodes/figure_element.js +74 -0
  150. package/dist/es/schema/nodes/footnote.js +63 -0
  151. package/dist/es/schema/nodes/footnotes_element.js +50 -0
  152. package/dist/es/schema/nodes/footnotes_section.js +41 -0
  153. package/dist/es/schema/nodes/graphical_abstract_section.js +42 -0
  154. package/dist/es/schema/nodes/hard_break.js +27 -0
  155. package/dist/es/schema/nodes/highlight_marker.js +49 -0
  156. package/dist/es/schema/nodes/inline_equation.js +55 -0
  157. package/dist/es/schema/nodes/inline_footnote.js +47 -0
  158. package/dist/es/schema/nodes/keywords_element.js +49 -0
  159. package/dist/es/schema/nodes/keywords_section.js +42 -0
  160. package/dist/es/schema/nodes/link.js +58 -0
  161. package/dist/es/schema/nodes/list.js +117 -0
  162. package/dist/es/schema/nodes/listing.js +69 -0
  163. package/dist/es/schema/nodes/listing_element.js +49 -0
  164. package/dist/es/schema/nodes/manuscript.js +43 -0
  165. package/dist/es/schema/nodes/missing_figure.js +47 -0
  166. package/dist/es/schema/nodes/paragraph.js +59 -0
  167. package/dist/es/schema/nodes/placeholder.js +46 -0
  168. package/dist/es/schema/nodes/placeholder_element.js +45 -0
  169. package/dist/es/schema/nodes/pullquote_element.js +61 -0
  170. package/dist/es/schema/nodes/section.js +90 -0
  171. package/dist/es/schema/nodes/section_label.js +26 -0
  172. package/dist/es/schema/nodes/section_title.js +44 -0
  173. package/dist/es/schema/nodes/table.js +67 -0
  174. package/dist/es/schema/nodes/table_col.js +54 -0
  175. package/dist/es/schema/nodes/table_element.js +59 -0
  176. package/dist/es/schema/nodes/table_row.js +120 -0
  177. package/dist/es/schema/nodes/text.js +18 -0
  178. package/dist/es/schema/nodes/toc_element.js +49 -0
  179. package/dist/es/schema/nodes/toc_section.js +42 -0
  180. package/dist/es/schema/types.js +16 -0
  181. package/dist/es/tests.js +28 -0
  182. package/dist/es/transformer/builders.js +261 -0
  183. package/dist/es/transformer/bundles-data.js +8 -0
  184. package/dist/es/transformer/bundles.js +27 -0
  185. package/dist/es/transformer/decode.js +608 -0
  186. package/dist/es/transformer/document-object-types.js +28 -0
  187. package/dist/es/transformer/encode.js +535 -0
  188. package/dist/es/transformer/filename.js +23 -0
  189. package/dist/es/transformer/footnote-category.js +16 -0
  190. package/dist/es/transformer/footnotes-order.js +53 -0
  191. package/dist/es/transformer/highlight-markers.js +120 -0
  192. package/dist/es/transformer/html.js +407 -0
  193. package/dist/es/transformer/id.js +23 -0
  194. package/dist/es/transformer/index.js +38 -0
  195. package/dist/es/transformer/labels.js +81 -0
  196. package/dist/es/transformer/manuscript-dependencies.js +64 -0
  197. package/dist/es/transformer/model-map.js +22 -0
  198. package/dist/es/transformer/models.js +16 -0
  199. package/dist/es/transformer/node-names.js +39 -0
  200. package/dist/es/transformer/node-title.js +82 -0
  201. package/dist/es/transformer/node-types.js +55 -0
  202. package/dist/es/transformer/object-types.js +52 -0
  203. package/dist/es/transformer/project-bundle.js +77 -0
  204. package/dist/es/transformer/section-category.js +210 -0
  205. package/dist/es/transformer/serializer.js +17 -0
  206. package/dist/es/transformer/shared-data.js +1 -0
  207. package/dist/es/transformer/tei-grobid-importer.js +115 -0
  208. package/dist/es/transformer/timestamp.js +16 -0
  209. package/dist/es/transformer/update-identifiers.js +87 -0
  210. package/dist/es/types.js +1 -0
  211. package/dist/types/errors.d.ts +6 -0
  212. package/dist/types/index.d.ts +9 -0
  213. package/dist/types/jats/importer/index.d.ts +16 -0
  214. package/dist/types/jats/importer/jats-body-dom-parser.d.ts +24 -0
  215. package/dist/types/jats/importer/jats-body-transformations.d.ts +31 -0
  216. package/dist/types/jats/importer/jats-comments.d.ts +26 -0
  217. package/dist/types/jats/importer/jats-front-parser.d.ts +62 -0
  218. package/dist/types/jats/importer/jats-journal-meta-parser.d.ts +37 -0
  219. package/dist/types/jats/importer/jats-parser-utils.d.ts +23 -0
  220. package/dist/types/jats/importer/jats-reference-parser.d.ts +23 -0
  221. package/dist/types/jats/importer/parse-jats-article.d.ts +30 -0
  222. package/dist/types/jats/index.d.ts +18 -0
  223. package/dist/types/jats/jats-exporter.d.ts +72 -0
  224. package/dist/types/jats/jats-versions.d.ts +23 -0
  225. package/dist/types/lib/attributes.d.ts +20 -0
  226. package/dist/types/lib/html.d.ts +17 -0
  227. package/dist/types/lib/styled-content.d.ts +22 -0
  228. package/dist/types/lib/table-cell-styles.d.ts +27 -0
  229. package/dist/types/lib/utils.d.ts +26 -0
  230. package/dist/types/mathjax/index.d.ts +3 -0
  231. package/dist/types/mathjax/mathjax-packages.d.ts +16 -0
  232. package/dist/types/mathjax/mathml-to-svg.d.ts +17 -0
  233. package/dist/types/mathjax/tex-to-mathml.d.ts +17 -0
  234. package/dist/types/mathjax/tex-to-svg.d.ts +17 -0
  235. package/dist/types/schema/groups.d.ts +22 -0
  236. package/dist/types/schema/index.d.ts +65 -0
  237. package/dist/types/schema/marks.d.ts +27 -0
  238. package/dist/types/schema/nodes/attribution.d.ts +21 -0
  239. package/dist/types/schema/nodes/bibliography_element.d.ts +26 -0
  240. package/dist/types/schema/nodes/bibliography_item.d.ts +36 -0
  241. package/dist/types/schema/nodes/bibliography_section.d.ts +26 -0
  242. package/dist/types/schema/nodes/blockquote_element.d.ts +28 -0
  243. package/dist/types/schema/nodes/caption.d.ts +25 -0
  244. package/dist/types/schema/nodes/caption_title.d.ts +25 -0
  245. package/dist/types/schema/nodes/citation.d.ts +27 -0
  246. package/dist/types/schema/nodes/comment.d.ts +31 -0
  247. package/dist/types/schema/nodes/cross_reference.d.ts +26 -0
  248. package/dist/types/schema/nodes/doc.d.ts +17 -0
  249. package/dist/types/schema/nodes/equation.d.ts +28 -0
  250. package/dist/types/schema/nodes/equation_element.d.ts +29 -0
  251. package/dist/types/schema/nodes/figcaption.d.ts +21 -0
  252. package/dist/types/schema/nodes/figure.d.ts +25 -0
  253. package/dist/types/schema/nodes/figure_element.d.ts +44 -0
  254. package/dist/types/schema/nodes/footnote.d.ts +32 -0
  255. package/dist/types/schema/nodes/footnotes_element.d.ts +28 -0
  256. package/dist/types/schema/nodes/footnotes_section.d.ts +26 -0
  257. package/dist/types/schema/nodes/graphical_abstract_section.d.ts +26 -0
  258. package/dist/types/schema/nodes/hard_break.d.ts +21 -0
  259. package/dist/types/schema/nodes/highlight_marker.d.ts +29 -0
  260. package/dist/types/schema/nodes/inline_equation.d.ts +28 -0
  261. package/dist/types/schema/nodes/inline_footnote.d.ts +27 -0
  262. package/dist/types/schema/nodes/keywords_element.d.ts +27 -0
  263. package/dist/types/schema/nodes/keywords_section.d.ts +26 -0
  264. package/dist/types/schema/nodes/link.d.ts +26 -0
  265. package/dist/types/schema/nodes/list.d.ts +39 -0
  266. package/dist/types/schema/nodes/listing.d.ts +33 -0
  267. package/dist/types/schema/nodes/listing_element.d.ts +29 -0
  268. package/dist/types/schema/nodes/manuscript.d.ts +23 -0
  269. package/dist/types/schema/nodes/missing_figure.d.ts +23 -0
  270. package/dist/types/schema/nodes/paragraph.d.ts +30 -0
  271. package/dist/types/schema/nodes/placeholder.d.ts +26 -0
  272. package/dist/types/schema/nodes/placeholder_element.d.ts +25 -0
  273. package/dist/types/schema/nodes/pullquote_element.d.ts +28 -0
  274. package/dist/types/schema/nodes/section.d.ts +36 -0
  275. package/dist/types/schema/nodes/section_label.d.ts +22 -0
  276. package/dist/types/schema/nodes/section_title.d.ts +22 -0
  277. package/dist/types/schema/nodes/table.d.ts +27 -0
  278. package/dist/types/schema/nodes/table_col.d.ts +24 -0
  279. package/dist/types/schema/nodes/table_element.d.ts +35 -0
  280. package/dist/types/schema/nodes/table_row.d.ts +41 -0
  281. package/dist/types/schema/nodes/text.d.ts +17 -0
  282. package/dist/types/schema/nodes/toc_element.d.ts +27 -0
  283. package/dist/types/schema/nodes/toc_section.d.ts +26 -0
  284. package/dist/types/schema/types.d.ts +45 -0
  285. package/dist/types/tests.d.ts +16 -0
  286. package/dist/types/transformer/builders.d.ts +74 -0
  287. package/dist/types/transformer/bundles-data.d.ts +3 -0
  288. package/dist/types/transformer/bundles.d.ts +3 -0
  289. package/dist/types/transformer/decode.d.ts +38 -0
  290. package/dist/types/transformer/document-object-types.d.ts +17 -0
  291. package/dist/types/transformer/encode.d.ts +29 -0
  292. package/dist/types/transformer/filename.d.ts +16 -0
  293. package/dist/types/transformer/footnote-category.d.ts +17 -0
  294. package/dist/types/transformer/footnotes-order.d.ts +23 -0
  295. package/dist/types/transformer/highlight-markers.d.ts +26 -0
  296. package/dist/types/transformer/html.d.ts +36 -0
  297. package/dist/types/transformer/id.d.ts +20 -0
  298. package/dist/types/transformer/index.d.ts +38 -0
  299. package/dist/types/transformer/labels.d.ts +24 -0
  300. package/dist/types/transformer/manuscript-dependencies.d.ts +12 -0
  301. package/dist/types/transformer/model-map.d.ts +19 -0
  302. package/dist/types/transformer/models.d.ts +48 -0
  303. package/dist/types/transformer/node-names.d.ts +17 -0
  304. package/dist/types/transformer/node-title.d.ts +19 -0
  305. package/dist/types/transformer/node-types.d.ts +22 -0
  306. package/dist/types/transformer/object-types.d.ts +29 -0
  307. package/dist/types/transformer/project-bundle.d.ts +30 -0
  308. package/dist/types/transformer/section-category.d.ts +28 -0
  309. package/dist/types/transformer/serializer.d.ts +19 -0
  310. package/dist/types/transformer/shared-data.d.ts +2 -0
  311. package/dist/types/transformer/tei-grobid-importer.d.ts +20 -0
  312. package/dist/types/transformer/timestamp.d.ts +16 -0
  313. package/dist/types/transformer/update-identifiers.d.ts +23 -0
  314. package/dist/types/types.d.ts +2 -0
  315. package/package.json +89 -0
@@ -0,0 +1,195 @@
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
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
29
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.schema = void 0;
33
+ const prosemirror_model_1 = require("prosemirror-model");
34
+ const marks_1 = require("./marks");
35
+ const attribution_1 = require("./nodes/attribution");
36
+ const bibliography_element_1 = require("./nodes/bibliography_element");
37
+ const bibliography_item_1 = require("./nodes/bibliography_item");
38
+ const bibliography_section_1 = require("./nodes/bibliography_section");
39
+ const blockquote_element_1 = require("./nodes/blockquote_element");
40
+ const caption_1 = require("./nodes/caption");
41
+ const caption_title_1 = require("./nodes/caption_title");
42
+ const citation_1 = require("./nodes/citation");
43
+ const comment_1 = require("./nodes/comment");
44
+ const cross_reference_1 = require("./nodes/cross_reference");
45
+ const doc_1 = require("./nodes/doc");
46
+ const equation_1 = require("./nodes/equation");
47
+ const equation_element_1 = require("./nodes/equation_element");
48
+ const figcaption_1 = require("./nodes/figcaption");
49
+ const figure_1 = require("./nodes/figure");
50
+ const figure_element_1 = require("./nodes/figure_element");
51
+ const footnote_1 = require("./nodes/footnote");
52
+ const footnotes_element_1 = require("./nodes/footnotes_element");
53
+ const footnotes_section_1 = require("./nodes/footnotes_section");
54
+ const graphical_abstract_section_1 = require("./nodes/graphical_abstract_section");
55
+ const hard_break_1 = require("./nodes/hard_break");
56
+ const highlight_marker_1 = require("./nodes/highlight_marker");
57
+ const inline_equation_1 = require("./nodes/inline_equation");
58
+ const inline_footnote_1 = require("./nodes/inline_footnote");
59
+ const keywords_element_1 = require("./nodes/keywords_element");
60
+ const keywords_section_1 = require("./nodes/keywords_section");
61
+ const link_1 = require("./nodes/link");
62
+ const list_1 = require("./nodes/list");
63
+ const listing_1 = require("./nodes/listing");
64
+ const listing_element_1 = require("./nodes/listing_element");
65
+ const manuscript_1 = require("./nodes/manuscript");
66
+ const missing_figure_1 = require("./nodes/missing_figure");
67
+ const paragraph_1 = require("./nodes/paragraph");
68
+ const placeholder_1 = require("./nodes/placeholder");
69
+ const placeholder_element_1 = require("./nodes/placeholder_element");
70
+ const pullquote_element_1 = require("./nodes/pullquote_element");
71
+ const section_1 = require("./nodes/section");
72
+ const section_label_1 = require("./nodes/section_label");
73
+ const section_title_1 = require("./nodes/section_title");
74
+ const table_1 = require("./nodes/table");
75
+ const table_col_1 = require("./nodes/table_col");
76
+ const table_element_1 = require("./nodes/table_element");
77
+ const table_row_1 = require("./nodes/table_row");
78
+ const text_1 = require("./nodes/text");
79
+ const toc_element_1 = require("./nodes/toc_element");
80
+ const toc_section_1 = require("./nodes/toc_section");
81
+ __exportStar(require("./groups"), exports);
82
+ __exportStar(require("./types"), exports);
83
+ __exportStar(require("./nodes/comment"), exports);
84
+ __exportStar(require("./nodes/attribution"), exports);
85
+ __exportStar(require("./nodes/bibliography_item"), exports);
86
+ __exportStar(require("./nodes/bibliography_element"), exports);
87
+ __exportStar(require("./nodes/bibliography_section"), exports);
88
+ __exportStar(require("./nodes/blockquote_element"), exports);
89
+ __exportStar(require("./nodes/caption"), exports);
90
+ __exportStar(require("./nodes/caption_title"), exports);
91
+ __exportStar(require("./nodes/citation"), exports);
92
+ __exportStar(require("./nodes/cross_reference"), exports);
93
+ __exportStar(require("./nodes/doc"), exports);
94
+ __exportStar(require("./nodes/equation"), exports);
95
+ __exportStar(require("./nodes/equation_element"), exports);
96
+ __exportStar(require("./nodes/figcaption"), exports);
97
+ __exportStar(require("./nodes/figure"), exports);
98
+ __exportStar(require("./nodes/figure_element"), exports);
99
+ __exportStar(require("./nodes/footnote"), exports);
100
+ __exportStar(require("./nodes/footnotes_element"), exports);
101
+ __exportStar(require("./nodes/footnotes_section"), exports);
102
+ __exportStar(require("./nodes/graphical_abstract_section"), exports);
103
+ __exportStar(require("./nodes/hard_break"), exports);
104
+ __exportStar(require("./nodes/highlight_marker"), exports);
105
+ __exportStar(require("./nodes/inline_equation"), exports);
106
+ __exportStar(require("./nodes/inline_footnote"), exports);
107
+ __exportStar(require("./nodes/keywords_element"), exports);
108
+ __exportStar(require("./nodes/keywords_section"), exports);
109
+ __exportStar(require("./nodes/link"), exports);
110
+ __exportStar(require("./nodes/list"), exports);
111
+ __exportStar(require("./nodes/listing"), exports);
112
+ __exportStar(require("./nodes/listing_element"), exports);
113
+ __exportStar(require("./nodes/manuscript"), exports);
114
+ __exportStar(require("./nodes/missing_figure"), exports);
115
+ __exportStar(require("./nodes/paragraph"), exports);
116
+ __exportStar(require("./nodes/placeholder"), exports);
117
+ __exportStar(require("./nodes/placeholder_element"), exports);
118
+ __exportStar(require("./nodes/pullquote_element"), exports);
119
+ __exportStar(require("./nodes/section"), exports);
120
+ __exportStar(require("./nodes/section_title"), exports);
121
+ __exportStar(require("./nodes/table"), exports);
122
+ __exportStar(require("./nodes/table_col"), exports);
123
+ __exportStar(require("./nodes/table_element"), exports);
124
+ __exportStar(require("./nodes/table_row"), exports);
125
+ __exportStar(require("./nodes/text"), exports);
126
+ __exportStar(require("./nodes/toc_element"), exports);
127
+ __exportStar(require("./nodes/toc_section"), exports);
128
+ exports.schema = new prosemirror_model_1.Schema({
129
+ marks: {
130
+ bold: marks_1.bold,
131
+ code: marks_1.code,
132
+ italic: marks_1.italic,
133
+ smallcaps: marks_1.smallcaps,
134
+ strikethrough: marks_1.strikethrough,
135
+ styled: marks_1.styled,
136
+ subscript: marks_1.subscript,
137
+ superscript: marks_1.superscript,
138
+ underline: marks_1.underline,
139
+ tracked_insert: marks_1.tracked_insert,
140
+ tracked_delete: marks_1.tracked_delete,
141
+ },
142
+ nodes: {
143
+ comment: comment_1.comment,
144
+ attribution: attribution_1.attribution,
145
+ bibliography_item: bibliography_item_1.bibliographyItem,
146
+ bibliography_element: bibliography_element_1.bibliographyElement,
147
+ bibliography_section: bibliography_section_1.bibliographySection,
148
+ blockquote_element: blockquote_element_1.blockquoteElement,
149
+ bullet_list: list_1.bulletList,
150
+ caption: caption_1.caption,
151
+ caption_title: caption_title_1.captionTitle,
152
+ citation: citation_1.citation,
153
+ cross_reference: cross_reference_1.crossReference,
154
+ doc: doc_1.doc,
155
+ equation: equation_1.equation,
156
+ equation_element: equation_element_1.equationElement,
157
+ figcaption: figcaption_1.figcaption,
158
+ figure: figure_1.figure,
159
+ figure_element: figure_element_1.figureElement,
160
+ footnote: footnote_1.footnote,
161
+ footnotes_element: footnotes_element_1.footnotesElement,
162
+ footnotes_section: footnotes_section_1.footnotesSection,
163
+ graphical_abstract_section: graphical_abstract_section_1.graphicalAbstractSection,
164
+ hard_break: hard_break_1.hardBreak,
165
+ highlight_marker: highlight_marker_1.highlightMarker,
166
+ inline_equation: inline_equation_1.inlineEquation,
167
+ inline_footnote: inline_footnote_1.inlineFootnote,
168
+ keywords_element: keywords_element_1.keywordsElement,
169
+ keywords_section: keywords_section_1.keywordsSection,
170
+ link: link_1.link,
171
+ list_item: list_1.listItem,
172
+ listing: listing_1.listing,
173
+ listing_element: listing_element_1.listingElement,
174
+ manuscript: manuscript_1.manuscript,
175
+ missing_figure: missing_figure_1.missingFigure,
176
+ ordered_list: list_1.orderedList,
177
+ paragraph: paragraph_1.paragraph,
178
+ placeholder: placeholder_1.placeholder,
179
+ placeholder_element: placeholder_element_1.placeholderElement,
180
+ pullquote_element: pullquote_element_1.pullquoteElement,
181
+ section: section_1.section,
182
+ section_label: section_label_1.sectionLabel,
183
+ section_title: section_title_1.sectionTitle,
184
+ table: table_1.table,
185
+ table_body: table_1.tableBody,
186
+ table_cell: table_row_1.tableCell,
187
+ table_element: table_element_1.tableElement,
188
+ table_row: table_row_1.tableRow,
189
+ table_col: table_col_1.tableCol,
190
+ table_colgroup: table_col_1.tableColGroup,
191
+ text: text_1.text,
192
+ toc_element: toc_element_1.tocElement,
193
+ toc_section: toc_section_1.tocSection,
194
+ },
195
+ });
@@ -0,0 +1,159 @@
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.tracked_delete = exports.tracked_insert = exports.underline = exports.superscript = exports.subscript = exports.styled = exports.strikethrough = exports.smallcaps = exports.italic = exports.code = exports.bold = void 0;
19
+ exports.bold = {
20
+ parseDOM: [
21
+ {
22
+ getAttrs: (dom) => dom.style.fontWeight !== 'normal' && null,
23
+ tag: 'b',
24
+ },
25
+ { tag: 'strong' },
26
+ {
27
+ tag: 'bold',
28
+ },
29
+ {
30
+ getAttrs: (value) => /^(bold(er)?|[5-9]\d{2,})$/.test(value) && null,
31
+ style: 'font-weight',
32
+ },
33
+ ],
34
+ toDOM: () => ['b'],
35
+ };
36
+ exports.code = {
37
+ parseDOM: [{ tag: 'code' }],
38
+ toDOM: () => ['code'],
39
+ };
40
+ exports.italic = {
41
+ parseDOM: [{ tag: 'i' }, { tag: 'em' }, { style: 'font-style=italic' }],
42
+ toDOM: () => ['i'],
43
+ };
44
+ exports.smallcaps = {
45
+ parseDOM: [
46
+ { style: 'font-variant=small-caps' },
47
+ { style: 'font-variant-caps=small-caps' },
48
+ ],
49
+ toDOM: () => [
50
+ 'span',
51
+ {
52
+ style: 'font-variant:small-caps',
53
+ },
54
+ ],
55
+ };
56
+ exports.strikethrough = {
57
+ parseDOM: [
58
+ { tag: 's' },
59
+ { tag: 'strike' },
60
+ { style: 'text-decoration=line-through' },
61
+ { style: 'text-decoration-line=line-through' },
62
+ ],
63
+ toDOM: () => ['s'],
64
+ };
65
+ exports.styled = {
66
+ attrs: {
67
+ rid: { default: '' },
68
+ },
69
+ spanning: false,
70
+ parseDOM: [
71
+ {
72
+ tag: 'span.styled-content',
73
+ getAttrs: (dom) => {
74
+ const element = dom;
75
+ return {
76
+ rid: element.getAttribute('data-inline-style'),
77
+ };
78
+ },
79
+ },
80
+ ],
81
+ toDOM: (mark) => {
82
+ return [
83
+ 'span',
84
+ { class: 'styled-content', 'data-inline-style': mark.attrs.rid },
85
+ ];
86
+ },
87
+ };
88
+ exports.subscript = {
89
+ excludes: 'superscript',
90
+ group: 'position',
91
+ parseDOM: [{ tag: 'sub' }, { style: 'vertical-align=sub' }],
92
+ toDOM: () => ['sub'],
93
+ };
94
+ exports.superscript = {
95
+ excludes: 'subscript',
96
+ group: 'position',
97
+ parseDOM: [{ tag: 'sup' }, { style: 'vertical-align=super' }],
98
+ toDOM: () => ['sup'],
99
+ };
100
+ exports.underline = {
101
+ parseDOM: [{ tag: 'u' }, { style: 'text-decoration=underline' }],
102
+ toDOM: () => ['u'],
103
+ };
104
+ exports.tracked_insert = {
105
+ excludes: 'tracked_insert tracked_delete',
106
+ attrs: {
107
+ dataTracked: { default: null },
108
+ },
109
+ parseDOM: [
110
+ {
111
+ tag: 'ins',
112
+ getAttrs: (ins) => {
113
+ const dom = ins;
114
+ return {
115
+ dataTracked: {
116
+ id: dom.getAttribute('data-track-id'),
117
+ userID: dom.getAttribute('data-user-id'),
118
+ status: dom.getAttribute('data-track-status'),
119
+ createdAt: parseInt(dom.getAttribute('data-track-created-at') || ''),
120
+ },
121
+ };
122
+ },
123
+ },
124
+ ],
125
+ toDOM: (el) => {
126
+ const dataTracked = el.attrs.dataTracked || {};
127
+ const { status = 'pending', id, userID, createdAt } = dataTracked;
128
+ const attrs = Object.assign(Object.assign(Object.assign({ class: `inserted ${status}`, 'data-track-status': status }, (id && { 'data-track-id': id })), (userID && { 'data-user-id': userID })), (createdAt && { 'data-track-created-at': createdAt.toString() }));
129
+ return ['ins', attrs];
130
+ },
131
+ };
132
+ exports.tracked_delete = {
133
+ excludes: 'tracked_insert tracked_delete',
134
+ attrs: {
135
+ dataTracked: { default: null },
136
+ },
137
+ parseDOM: [
138
+ {
139
+ tag: 'del',
140
+ getAttrs: (del) => {
141
+ const dom = del;
142
+ return {
143
+ dataTracked: {
144
+ id: dom.getAttribute('data-track-id'),
145
+ userID: dom.getAttribute('data-user-id'),
146
+ status: dom.getAttribute('data-track-status'),
147
+ createdAt: parseInt(dom.getAttribute('data-track-created-at') || ''),
148
+ },
149
+ };
150
+ },
151
+ },
152
+ ],
153
+ toDOM: (el) => {
154
+ const dataTracked = el.attrs.dataTracked || {};
155
+ const { status = 'pending', id, userID, createdAt } = dataTracked;
156
+ const attrs = Object.assign(Object.assign(Object.assign({ class: `deleted ${status}`, 'data-track-status': status }, (id && { 'data-track-id': id })), (userID && { 'data-user-id': userID })), (createdAt && { 'data-track-created-at': createdAt.toString() }));
157
+ return ['del', attrs];
158
+ },
159
+ };
@@ -0,0 +1,32 @@
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.attribution = void 0;
19
+ exports.attribution = {
20
+ content: '(text | link | highlight_marker)*',
21
+ attrs: { dataTracked: { default: null } },
22
+ group: 'block',
23
+ isolating: true,
24
+ selectable: false,
25
+ parseDOM: [
26
+ {
27
+ tag: 'footer',
28
+ context: 'blockquote_element/|pullquote_element/',
29
+ },
30
+ ],
31
+ toDOM: () => ['footer', 0],
32
+ };
@@ -0,0 +1,44 @@
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.bibliographyElement = void 0;
19
+ exports.bibliographyElement = {
20
+ content: '(bibliography_item | placeholder)+',
21
+ attrs: {
22
+ id: { default: '' },
23
+ contents: { default: '' },
24
+ paragraphStyle: { default: '' },
25
+ dataTracked: { default: null },
26
+ },
27
+ selectable: false,
28
+ group: 'block element',
29
+ parseDOM: [
30
+ {
31
+ tag: 'div.csl-bib-body',
32
+ getAttrs: () => {
33
+ return {
34
+ contents: '',
35
+ };
36
+ },
37
+ },
38
+ ],
39
+ toDOM: () => {
40
+ const dom = document.createElement('div');
41
+ dom.className = 'csl-bib-body';
42
+ return dom;
43
+ },
44
+ };
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ /*!
3
+ * © 2022 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.bibliographyItem = void 0;
19
+ exports.bibliographyItem = {
20
+ attrs: {
21
+ id: { default: '' },
22
+ type: { default: undefined },
23
+ author: { default: undefined },
24
+ issued: { default: undefined },
25
+ containerTitle: { default: undefined },
26
+ doi: { default: undefined },
27
+ volume: { default: undefined },
28
+ issue: { default: undefined },
29
+ supplement: { default: undefined },
30
+ page: { default: undefined },
31
+ title: { default: undefined },
32
+ literal: { default: undefined },
33
+ paragraphStyle: { default: '' },
34
+ dataTracked: { default: null },
35
+ },
36
+ selectable: false,
37
+ group: 'block',
38
+ parseDOM: [
39
+ {
40
+ tag: 'div.csl-entry',
41
+ getAttrs: (p) => {
42
+ const dom = p;
43
+ return {
44
+ id: dom.getAttribute('id'),
45
+ type: dom.getAttribute('data-type'),
46
+ author: dom.getAttribute('data-author') || undefined,
47
+ issued: dom.getAttribute('data-issued') || undefined,
48
+ containerTitle: dom.getAttribute('data-container-title') || undefined,
49
+ doi: dom.getAttribute('data-doi') || undefined,
50
+ volume: dom.getAttribute('data-volume') || undefined,
51
+ issue: dom.getAttribute('data-issue') || undefined,
52
+ supplement: dom.getAttribute('data-supplement') || undefined,
53
+ page: dom.getAttribute('data-page') || undefined,
54
+ title: dom.getAttribute('data-title') || undefined,
55
+ literal: dom.getAttribute('data-literal') || undefined,
56
+ };
57
+ },
58
+ },
59
+ ],
60
+ toDOM: (node) => {
61
+ const bibliographyItemNode = node;
62
+ const attrs = {};
63
+ attrs.class = 'csl-entry';
64
+ const { id, type, author, issued, containerTitle, doi, volume, issue, supplement, page, title, literal, } = bibliographyItemNode.attrs;
65
+ attrs.id = id;
66
+ if (type) {
67
+ attrs['data-type'] = type;
68
+ }
69
+ if (author) {
70
+ attrs['data-author'] = author.join(',');
71
+ }
72
+ if (issued) {
73
+ attrs['data-issued'] = issued;
74
+ }
75
+ if (containerTitle) {
76
+ attrs['data-container-title'] = containerTitle;
77
+ }
78
+ if (doi) {
79
+ attrs['data-doi'] = doi;
80
+ }
81
+ if (volume) {
82
+ attrs['data-volume'] = volume;
83
+ }
84
+ if (issue) {
85
+ attrs['data-issue'] = issue;
86
+ }
87
+ if (supplement) {
88
+ attrs['data-supplement'] = supplement;
89
+ }
90
+ if (page) {
91
+ attrs['data-page'] = page;
92
+ }
93
+ if (title) {
94
+ attrs['data-title'] = title;
95
+ }
96
+ if (literal) {
97
+ attrs['data-literal'] = literal;
98
+ }
99
+ return ['div', attrs, 0];
100
+ },
101
+ };
@@ -0,0 +1,46 @@
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.isBibliographySectionNode = exports.bibliographySection = void 0;
19
+ exports.bibliographySection = {
20
+ content: 'section_title bibliography_element',
21
+ attrs: {
22
+ id: { default: '' },
23
+ dataTracked: { default: null },
24
+ },
25
+ group: 'block sections',
26
+ selectable: false,
27
+ parseDOM: [
28
+ {
29
+ tag: 'section.bibliography',
30
+ },
31
+ ],
32
+ toDOM: (node) => {
33
+ const bibliographySectionNode = node;
34
+ return [
35
+ 'section',
36
+ {
37
+ id: bibliographySectionNode.attrs.id,
38
+ class: 'bibliography',
39
+ spellcheck: 'false',
40
+ },
41
+ 0,
42
+ ];
43
+ },
44
+ };
45
+ const isBibliographySectionNode = (node) => node.type === node.type.schema.nodes.bibliography_section;
46
+ exports.isBibliographySectionNode = isBibliographySectionNode;
@@ -0,0 +1,62 @@
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.isBlockquoteElement = exports.blockquoteElement = void 0;
19
+ const manuscripts_json_schema_1 = require("@manuscripts/manuscripts-json-schema");
20
+ const attributes_1 = require("../../lib/attributes");
21
+ exports.blockquoteElement = {
22
+ content: 'paragraph+ attribution',
23
+ attrs: {
24
+ id: { default: '' },
25
+ paragraphStyle: { default: '' },
26
+ placeholder: { default: '' },
27
+ dataTracked: { default: null },
28
+ },
29
+ group: 'block element',
30
+ selectable: false,
31
+ parseDOM: [
32
+ {
33
+ tag: 'blockquote',
34
+ getAttrs: (blockquote) => {
35
+ const dom = blockquote;
36
+ const attrs = {
37
+ id: dom.getAttribute('id') || undefined,
38
+ };
39
+ const placeholder = dom.getAttribute('data-placeholder-text');
40
+ if (placeholder) {
41
+ attrs.placeholder = placeholder;
42
+ }
43
+ return attrs;
44
+ },
45
+ },
46
+ ],
47
+ toDOM: (node) => {
48
+ const blockquoteElementNode = node;
49
+ const attrs = {};
50
+ if (blockquoteElementNode.attrs.id) {
51
+ attrs.id = blockquoteElementNode.attrs.id;
52
+ }
53
+ attrs.class = (0, attributes_1.buildElementClass)(blockquoteElementNode.attrs);
54
+ attrs['data-object-type'] = manuscripts_json_schema_1.ObjectTypes.QuoteElement;
55
+ if (blockquoteElementNode.attrs.placeholder) {
56
+ attrs['data-placeholder-text'] = blockquoteElementNode.attrs.placeholder;
57
+ }
58
+ return ['blockquote', attrs, 0];
59
+ },
60
+ };
61
+ const isBlockquoteElement = (node) => node.type === node.type.schema.nodes.blockquote_element;
62
+ exports.isBlockquoteElement = isBlockquoteElement;