@fiduswriter/document 0.1.0-alpha.2 → 0.1.0-alpha.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.
Files changed (410) hide show
  1. package/README.md +22 -1
  2. package/dist/bibliography/common.d.ts +92 -0
  3. package/dist/bibliography/common.d.ts.map +1 -0
  4. package/dist/bibliography/common.js +85 -0
  5. package/dist/bibliography/common.js.map +1 -0
  6. package/dist/bibliography/csl_bib.d.ts +3 -0
  7. package/dist/bibliography/csl_bib.d.ts.map +1 -0
  8. package/dist/bibliography/csl_bib.js +131 -0
  9. package/dist/bibliography/csl_bib.js.map +1 -0
  10. package/dist/citations/citeproc_sys.d.ts +13 -0
  11. package/dist/citations/citeproc_sys.d.ts.map +1 -0
  12. package/dist/citations/citeproc_sys.js +43 -0
  13. package/dist/citations/citeproc_sys.js.map +1 -0
  14. package/dist/citations/format.d.ts +23 -0
  15. package/dist/citations/format.d.ts.map +1 -0
  16. package/dist/citations/format.js +161 -0
  17. package/dist/citations/format.js.map +1 -0
  18. package/dist/editor/e2ee/encryptor.d.ts +123 -0
  19. package/dist/editor/e2ee/encryptor.d.ts.map +1 -0
  20. package/dist/editor/e2ee/encryptor.js +201 -0
  21. package/dist/editor/e2ee/encryptor.js.map +1 -0
  22. package/dist/exporter/docx/citations.d.ts +21 -0
  23. package/dist/exporter/docx/citations.d.ts.map +1 -0
  24. package/dist/exporter/docx/citations.js +154 -0
  25. package/dist/exporter/docx/citations.js.map +1 -0
  26. package/dist/exporter/docx/comments.d.ts +18 -0
  27. package/dist/exporter/docx/comments.d.ts.map +1 -0
  28. package/dist/exporter/docx/comments.js +137 -0
  29. package/dist/exporter/docx/comments.js.map +1 -0
  30. package/dist/exporter/docx/footnotes.d.ts +42 -0
  31. package/dist/exporter/docx/footnotes.d.ts.map +1 -0
  32. package/dist/exporter/docx/footnotes.js +182 -0
  33. package/dist/exporter/docx/footnotes.js.map +1 -0
  34. package/dist/exporter/docx/images.d.ts +14 -0
  35. package/dist/exporter/docx/images.d.ts.map +1 -0
  36. package/dist/exporter/docx/images.js +86 -0
  37. package/dist/exporter/docx/images.js.map +1 -0
  38. package/dist/exporter/docx/index.d.ts +22 -0
  39. package/dist/exporter/docx/index.d.ts.map +1 -0
  40. package/dist/exporter/docx/index.js +107 -0
  41. package/dist/exporter/docx/index.js.map +1 -0
  42. package/dist/exporter/docx/lists.d.ts +33 -0
  43. package/dist/exporter/docx/lists.d.ts.map +1 -0
  44. package/dist/exporter/docx/lists.js +229 -0
  45. package/dist/exporter/docx/lists.js.map +1 -0
  46. package/dist/exporter/docx/math.d.ts +13 -0
  47. package/dist/exporter/docx/math.d.ts.map +1 -0
  48. package/dist/exporter/docx/math.js +42 -0
  49. package/dist/exporter/docx/math.js.map +1 -0
  50. package/dist/exporter/docx/metadata.d.ts +14 -0
  51. package/dist/exporter/docx/metadata.d.ts.map +1 -0
  52. package/dist/exporter/docx/metadata.js +239 -0
  53. package/dist/exporter/docx/metadata.js.map +1 -0
  54. package/dist/exporter/docx/rels.d.ts +25 -0
  55. package/dist/exporter/docx/rels.d.ts.map +1 -0
  56. package/dist/exporter/docx/rels.js +168 -0
  57. package/dist/exporter/docx/rels.js.map +1 -0
  58. package/dist/exporter/docx/render.d.ts +20 -0
  59. package/dist/exporter/docx/render.d.ts.map +1 -0
  60. package/dist/exporter/docx/render.js +774 -0
  61. package/dist/exporter/docx/render.js.map +1 -0
  62. package/dist/exporter/docx/richtext.d.ts +25 -0
  63. package/dist/exporter/docx/richtext.d.ts.map +1 -0
  64. package/dist/exporter/docx/richtext.js +1052 -0
  65. package/dist/exporter/docx/richtext.js.map +1 -0
  66. package/dist/exporter/docx/tables.d.ts +14 -0
  67. package/dist/exporter/docx/tables.d.ts.map +1 -0
  68. package/dist/exporter/docx/tables.js +109 -0
  69. package/dist/exporter/docx/tables.js.map +1 -0
  70. package/dist/exporter/docx/tools.d.ts +3 -0
  71. package/dist/exporter/docx/tools.d.ts.map +1 -0
  72. package/dist/exporter/docx/tools.js +48 -0
  73. package/dist/exporter/docx/tools.js.map +1 -0
  74. package/dist/exporter/epub/index.d.ts +11 -0
  75. package/dist/exporter/epub/index.d.ts.map +1 -0
  76. package/dist/exporter/epub/index.js +102 -0
  77. package/dist/exporter/epub/index.js.map +1 -0
  78. package/dist/exporter/epub/templates.d.ts +32 -0
  79. package/dist/exporter/epub/templates.d.ts.map +1 -0
  80. package/dist/exporter/epub/templates.js +95 -0
  81. package/dist/exporter/epub/templates.js.map +1 -0
  82. package/dist/exporter/epub/tools.d.ts +5 -0
  83. package/dist/exporter/epub/tools.d.ts.map +1 -0
  84. package/dist/exporter/epub/tools.js +81 -0
  85. package/dist/exporter/epub/tools.js.map +1 -0
  86. package/dist/exporter/html/citations.d.ts +27 -0
  87. package/dist/exporter/html/citations.d.ts.map +1 -0
  88. package/dist/exporter/html/citations.js +91 -0
  89. package/dist/exporter/html/citations.js.map +1 -0
  90. package/dist/exporter/html/convert.d.ts +100 -0
  91. package/dist/exporter/html/convert.d.ts.map +1 -0
  92. package/dist/exporter/html/convert.js +718 -0
  93. package/dist/exporter/html/convert.js.map +1 -0
  94. package/dist/exporter/html/index.d.ts +61 -0
  95. package/dist/exporter/html/index.d.ts.map +1 -0
  96. package/dist/exporter/html/index.js +134 -0
  97. package/dist/exporter/html/index.js.map +1 -0
  98. package/dist/exporter/html/templates.d.ts +10 -0
  99. package/dist/exporter/html/templates.d.ts.map +1 -0
  100. package/dist/exporter/html/templates.js +21 -0
  101. package/dist/exporter/html/templates.js.map +1 -0
  102. package/dist/exporter/html/tools.d.ts +2 -0
  103. package/dist/exporter/html/tools.d.ts.map +1 -0
  104. package/dist/exporter/html/tools.js +49 -0
  105. package/dist/exporter/html/tools.js.map +1 -0
  106. package/dist/exporter/jats/bibliography.d.ts +2 -0
  107. package/dist/exporter/jats/bibliography.d.ts.map +1 -0
  108. package/dist/exporter/jats/bibliography.js +153 -0
  109. package/dist/exporter/jats/bibliography.js.map +1 -0
  110. package/dist/exporter/jats/citations.d.ts +14 -0
  111. package/dist/exporter/jats/citations.d.ts.map +1 -0
  112. package/dist/exporter/jats/citations.js +83 -0
  113. package/dist/exporter/jats/citations.js.map +1 -0
  114. package/dist/exporter/jats/convert.d.ts +45 -0
  115. package/dist/exporter/jats/convert.d.ts.map +1 -0
  116. package/dist/exporter/jats/convert.js +799 -0
  117. package/dist/exporter/jats/convert.js.map +1 -0
  118. package/dist/exporter/jats/index.d.ts +19 -0
  119. package/dist/exporter/jats/index.d.ts.map +1 -0
  120. package/dist/exporter/jats/index.js +66 -0
  121. package/dist/exporter/jats/index.js.map +1 -0
  122. package/dist/exporter/jats/templates.d.ts +16 -0
  123. package/dist/exporter/jats/templates.d.ts.map +1 -0
  124. package/dist/exporter/jats/templates.js +25 -0
  125. package/dist/exporter/jats/templates.js.map +1 -0
  126. package/dist/exporter/jats/text.d.ts +3 -0
  127. package/dist/exporter/jats/text.d.ts.map +1 -0
  128. package/dist/exporter/jats/text.js +72 -0
  129. package/dist/exporter/jats/text.js.map +1 -0
  130. package/dist/exporter/latex/convert.d.ts +27 -0
  131. package/dist/exporter/latex/convert.d.ts.map +1 -0
  132. package/dist/exporter/latex/convert.js +865 -0
  133. package/dist/exporter/latex/convert.js.map +1 -0
  134. package/dist/exporter/latex/escape_latex.d.ts +2 -0
  135. package/dist/exporter/latex/escape_latex.d.ts.map +1 -0
  136. package/dist/exporter/latex/escape_latex.js +20 -0
  137. package/dist/exporter/latex/escape_latex.js.map +1 -0
  138. package/dist/exporter/latex/index.d.ts +23 -0
  139. package/dist/exporter/latex/index.d.ts.map +1 -0
  140. package/dist/exporter/latex/index.js +57 -0
  141. package/dist/exporter/latex/index.js.map +1 -0
  142. package/dist/exporter/latex/readme.d.ts +2 -0
  143. package/dist/exporter/latex/readme.d.ts.map +1 -0
  144. package/dist/exporter/latex/readme.js +23 -0
  145. package/dist/exporter/latex/readme.js.map +1 -0
  146. package/dist/exporter/native/shrink.d.ts +21 -0
  147. package/dist/exporter/native/shrink.d.ts.map +1 -0
  148. package/dist/exporter/native/shrink.js +115 -0
  149. package/dist/exporter/native/shrink.js.map +1 -0
  150. package/dist/exporter/odt/citations.d.ts +18 -0
  151. package/dist/exporter/odt/citations.d.ts.map +1 -0
  152. package/dist/exporter/odt/citations.js +87 -0
  153. package/dist/exporter/odt/citations.js.map +1 -0
  154. package/dist/exporter/odt/footnotes.d.ts +25 -0
  155. package/dist/exporter/odt/footnotes.d.ts.map +1 -0
  156. package/dist/exporter/odt/footnotes.js +112 -0
  157. package/dist/exporter/odt/footnotes.js.map +1 -0
  158. package/dist/exporter/odt/images.d.ts +13 -0
  159. package/dist/exporter/odt/images.d.ts.map +1 -0
  160. package/dist/exporter/odt/images.js +98 -0
  161. package/dist/exporter/odt/images.js.map +1 -0
  162. package/dist/exporter/odt/index.d.ts +23 -0
  163. package/dist/exporter/odt/index.d.ts.map +1 -0
  164. package/dist/exporter/odt/index.js +99 -0
  165. package/dist/exporter/odt/index.js.map +1 -0
  166. package/dist/exporter/odt/math.d.ts +13 -0
  167. package/dist/exporter/odt/math.d.ts.map +1 -0
  168. package/dist/exporter/odt/math.js +48 -0
  169. package/dist/exporter/odt/math.js.map +1 -0
  170. package/dist/exporter/odt/metadata.d.ts +14 -0
  171. package/dist/exporter/odt/metadata.d.ts.map +1 -0
  172. package/dist/exporter/odt/metadata.js +203 -0
  173. package/dist/exporter/odt/metadata.js.map +1 -0
  174. package/dist/exporter/odt/render.d.ts +24 -0
  175. package/dist/exporter/odt/render.d.ts.map +1 -0
  176. package/dist/exporter/odt/render.js +644 -0
  177. package/dist/exporter/odt/render.js.map +1 -0
  178. package/dist/exporter/odt/richtext.d.ts +22 -0
  179. package/dist/exporter/odt/richtext.d.ts.map +1 -0
  180. package/dist/exporter/odt/richtext.js +728 -0
  181. package/dist/exporter/odt/richtext.js.map +1 -0
  182. package/dist/exporter/odt/styles.d.ts +33 -0
  183. package/dist/exporter/odt/styles.d.ts.map +1 -0
  184. package/dist/exporter/odt/styles.js +348 -0
  185. package/dist/exporter/odt/styles.js.map +1 -0
  186. package/dist/exporter/odt/track.d.ts +11 -0
  187. package/dist/exporter/odt/track.d.ts.map +1 -0
  188. package/dist/exporter/odt/track.js +59 -0
  189. package/dist/exporter/odt/track.js.map +1 -0
  190. package/dist/exporter/pandoc/citations.d.ts +17 -0
  191. package/dist/exporter/pandoc/citations.d.ts.map +1 -0
  192. package/dist/exporter/pandoc/citations.js +85 -0
  193. package/dist/exporter/pandoc/citations.js.map +1 -0
  194. package/dist/exporter/pandoc/convert.d.ts +38 -0
  195. package/dist/exporter/pandoc/convert.d.ts.map +1 -0
  196. package/dist/exporter/pandoc/convert.js +881 -0
  197. package/dist/exporter/pandoc/convert.js.map +1 -0
  198. package/dist/exporter/pandoc/index.d.ts +38 -0
  199. package/dist/exporter/pandoc/index.d.ts.map +1 -0
  200. package/dist/exporter/pandoc/index.js +67 -0
  201. package/dist/exporter/pandoc/index.js.map +1 -0
  202. package/dist/exporter/pandoc/readme.d.ts +2 -0
  203. package/dist/exporter/pandoc/readme.d.ts.map +1 -0
  204. package/dist/exporter/pandoc/readme.js +9 -0
  205. package/dist/exporter/pandoc/readme.js.map +1 -0
  206. package/dist/exporter/pandoc/tools.d.ts +6 -0
  207. package/dist/exporter/pandoc/tools.d.ts.map +1 -0
  208. package/dist/exporter/pandoc/tools.js +52 -0
  209. package/dist/exporter/pandoc/tools.js.map +1 -0
  210. package/dist/exporter/print/index.d.ts +9 -0
  211. package/dist/exporter/print/index.d.ts.map +1 -0
  212. package/dist/exporter/print/index.js +140 -0
  213. package/dist/exporter/print/index.js.map +1 -0
  214. package/dist/exporter/tools/doc_content.d.ts +7 -0
  215. package/dist/exporter/tools/doc_content.d.ts.map +1 -0
  216. package/dist/exporter/tools/doc_content.js +129 -0
  217. package/dist/exporter/tools/doc_content.js.map +1 -0
  218. package/dist/exporter/tools/file.d.ts +2 -0
  219. package/dist/exporter/tools/file.d.ts.map +1 -0
  220. package/dist/exporter/tools/file.js +10 -0
  221. package/dist/exporter/tools/file.js.map +1 -0
  222. package/dist/exporter/tools/json.d.ts +7 -0
  223. package/dist/exporter/tools/json.d.ts.map +1 -0
  224. package/dist/exporter/tools/json.js +82 -0
  225. package/dist/exporter/tools/json.js.map +1 -0
  226. package/dist/exporter/tools/svg.d.ts +2 -0
  227. package/dist/exporter/tools/svg.d.ts.map +1 -0
  228. package/dist/exporter/tools/svg.js +26 -0
  229. package/dist/exporter/tools/svg.js.map +1 -0
  230. package/dist/exporter/tools/xml.d.ts +41 -0
  231. package/dist/exporter/tools/xml.d.ts.map +1 -0
  232. package/dist/exporter/tools/xml.js +440 -0
  233. package/dist/exporter/tools/xml.js.map +1 -0
  234. package/dist/exporter/tools/xml_zip.d.ts +20 -0
  235. package/dist/exporter/tools/xml_zip.d.ts.map +1 -0
  236. package/dist/exporter/tools/xml_zip.js +86 -0
  237. package/dist/exporter/tools/xml_zip.js.map +1 -0
  238. package/dist/exporter/tools/zip.d.ts +21 -0
  239. package/dist/exporter/tools/zip.d.ts.map +1 -0
  240. package/dist/exporter/tools/zip.js +71 -0
  241. package/dist/exporter/tools/zip.js.map +1 -0
  242. package/dist/exporter/tools/zotero_csl.d.ts +10 -0
  243. package/dist/exporter/tools/zotero_csl.d.ts.map +1 -0
  244. package/dist/exporter/tools/zotero_csl.js +78 -0
  245. package/dist/exporter/tools/zotero_csl.js.map +1 -0
  246. package/dist/importer/citations.d.ts +25 -0
  247. package/dist/importer/citations.d.ts.map +1 -0
  248. package/dist/importer/citations.js +116 -0
  249. package/dist/importer/citations.js.map +1 -0
  250. package/dist/importer/docx/citations.d.ts +65 -0
  251. package/dist/importer/docx/citations.d.ts.map +1 -0
  252. package/dist/importer/docx/citations.js +106 -0
  253. package/dist/importer/docx/citations.js.map +1 -0
  254. package/dist/importer/docx/convert.d.ts +228 -0
  255. package/dist/importer/docx/convert.d.ts.map +1 -0
  256. package/dist/importer/docx/convert.js +1226 -0
  257. package/dist/importer/docx/convert.js.map +1 -0
  258. package/dist/importer/docx/helpers.d.ts +2 -0
  259. package/dist/importer/docx/helpers.d.ts.map +1 -0
  260. package/dist/importer/docx/helpers.js +10 -0
  261. package/dist/importer/docx/helpers.js.map +1 -0
  262. package/dist/importer/docx/omml2mathml.d.ts +7 -0
  263. package/dist/importer/docx/omml2mathml.d.ts.map +1 -0
  264. package/dist/importer/docx/omml2mathml.js +1239 -0
  265. package/dist/importer/docx/omml2mathml.js.map +1 -0
  266. package/dist/importer/docx/parse.d.ts +205 -0
  267. package/dist/importer/docx/parse.d.ts.map +1 -0
  268. package/dist/importer/docx/parse.js +663 -0
  269. package/dist/importer/docx/parse.js.map +1 -0
  270. package/dist/importer/native/get_images.d.ts +11 -0
  271. package/dist/importer/native/get_images.d.ts.map +1 -0
  272. package/dist/importer/native/get_images.js +64 -0
  273. package/dist/importer/native/get_images.js.map +1 -0
  274. package/dist/importer/native/update.d.ts +6 -0
  275. package/dist/importer/native/update.d.ts.map +1 -0
  276. package/dist/importer/native/update.js +26 -0
  277. package/dist/importer/native/update.js.map +1 -0
  278. package/dist/importer/odt/citations.d.ts +47 -0
  279. package/dist/importer/odt/citations.d.ts.map +1 -0
  280. package/dist/importer/odt/citations.js +79 -0
  281. package/dist/importer/odt/citations.js.map +1 -0
  282. package/dist/importer/odt/convert.d.ts +330 -0
  283. package/dist/importer/odt/convert.d.ts.map +1 -0
  284. package/dist/importer/odt/convert.js +1506 -0
  285. package/dist/importer/odt/convert.js.map +1 -0
  286. package/dist/importer/pandoc/convert.d.ts +84 -0
  287. package/dist/importer/pandoc/convert.d.ts.map +1 -0
  288. package/dist/importer/pandoc/convert.js +777 -0
  289. package/dist/importer/pandoc/convert.js.map +1 -0
  290. package/dist/importer/pandoc/helpers.d.ts +4 -0
  291. package/dist/importer/pandoc/helpers.d.ts.map +1 -0
  292. package/dist/importer/pandoc/helpers.js +75 -0
  293. package/dist/importer/pandoc/helpers.js.map +1 -0
  294. package/dist/importer/zip_analyzer.d.ts +25 -0
  295. package/dist/importer/zip_analyzer.d.ts.map +1 -0
  296. package/dist/importer/zip_analyzer.js +84 -0
  297. package/dist/importer/zip_analyzer.js.map +1 -0
  298. package/dist/index.d.ts +2 -0
  299. package/dist/index.d.ts.map +1 -0
  300. package/dist/index.js +2 -0
  301. package/dist/index.js.map +1 -0
  302. package/dist/mathlive/opf_includes.d.ts +2 -0
  303. package/dist/mathlive/opf_includes.d.ts.map +1 -0
  304. package/dist/mathlive/opf_includes.js +25 -0
  305. package/dist/mathlive/opf_includes.js.map +1 -0
  306. package/dist/schema/common/annotate.d.ts +59 -0
  307. package/dist/schema/common/annotate.d.ts.map +1 -0
  308. package/dist/schema/common/annotate.js +75 -0
  309. package/dist/schema/common/annotate.js.map +1 -0
  310. package/dist/schema/common/base.d.ts +109 -0
  311. package/dist/schema/common/base.d.ts.map +1 -0
  312. package/dist/schema/common/base.js +109 -0
  313. package/dist/schema/common/base.js.map +1 -0
  314. package/dist/schema/common/citation.d.ts +29 -0
  315. package/dist/schema/common/citation.d.ts.map +1 -0
  316. package/dist/schema/common/citation.js +62 -0
  317. package/dist/schema/common/citation.js.map +1 -0
  318. package/dist/schema/common/equation.d.ts +18 -0
  319. package/dist/schema/common/equation.d.ts.map +1 -0
  320. package/dist/schema/common/equation.js +32 -0
  321. package/dist/schema/common/equation.js.map +1 -0
  322. package/dist/schema/common/figure.d.ts +108 -0
  323. package/dist/schema/common/figure.d.ts.map +1 -0
  324. package/dist/schema/common/figure.js +176 -0
  325. package/dist/schema/common/figure.js.map +1 -0
  326. package/dist/schema/common/heading.d.ts +33 -0
  327. package/dist/schema/common/heading.d.ts.map +1 -0
  328. package/dist/schema/common/heading.js +41 -0
  329. package/dist/schema/common/heading.js.map +1 -0
  330. package/dist/schema/common/index.d.ts +11 -0
  331. package/dist/schema/common/index.d.ts.map +1 -0
  332. package/dist/schema/common/index.js +11 -0
  333. package/dist/schema/common/index.js.map +1 -0
  334. package/dist/schema/common/list.d.ts +83 -0
  335. package/dist/schema/common/list.d.ts.map +1 -0
  336. package/dist/schema/common/list.js +92 -0
  337. package/dist/schema/common/list.js.map +1 -0
  338. package/dist/schema/common/reference.d.ts +78 -0
  339. package/dist/schema/common/reference.d.ts.map +1 -0
  340. package/dist/schema/common/reference.js +97 -0
  341. package/dist/schema/common/reference.js.map +1 -0
  342. package/dist/schema/common/table.d.ts +92 -0
  343. package/dist/schema/common/table.d.ts.map +1 -0
  344. package/dist/schema/common/table.js +85 -0
  345. package/dist/schema/common/table.js.map +1 -0
  346. package/dist/schema/common/track.d.ts +131 -0
  347. package/dist/schema/common/track.d.ts.map +1 -0
  348. package/dist/schema/common/track.js +184 -0
  349. package/dist/schema/common/track.js.map +1 -0
  350. package/dist/schema/const.d.ts +3 -0
  351. package/dist/schema/const.d.ts.map +1 -0
  352. package/{src → dist}/schema/const.js +3 -3
  353. package/dist/schema/const.js.map +1 -0
  354. package/dist/schema/convert.d.ts +3 -0
  355. package/dist/schema/convert.d.ts.map +1 -0
  356. package/dist/schema/convert.js +1215 -0
  357. package/dist/schema/convert.js.map +1 -0
  358. package/dist/schema/document/content.d.ts +137 -0
  359. package/dist/schema/document/content.d.ts.map +1 -0
  360. package/dist/schema/document/content.js +177 -0
  361. package/dist/schema/document/content.js.map +1 -0
  362. package/dist/schema/document/index.d.ts +879 -0
  363. package/dist/schema/document/index.d.ts.map +1 -0
  364. package/dist/schema/document/index.js +68 -0
  365. package/dist/schema/document/index.js.map +1 -0
  366. package/dist/schema/document/structure.d.ts +273 -0
  367. package/dist/schema/document/structure.d.ts.map +1 -0
  368. package/dist/schema/document/structure.js +445 -0
  369. package/dist/schema/document/structure.js.map +1 -0
  370. package/dist/schema/export.d.ts +880 -0
  371. package/dist/schema/export.d.ts.map +1 -0
  372. package/dist/schema/export.js +16 -0
  373. package/dist/schema/export.js.map +1 -0
  374. package/dist/schema/footnotes.d.ts +499 -0
  375. package/dist/schema/footnotes.d.ts.map +1 -0
  376. package/dist/schema/footnotes.js +88 -0
  377. package/dist/schema/footnotes.js.map +1 -0
  378. package/dist/schema/footnotes_convert.d.ts +5 -0
  379. package/dist/schema/footnotes_convert.d.ts.map +1 -0
  380. package/dist/schema/footnotes_convert.js +26 -0
  381. package/dist/schema/footnotes_convert.js.map +1 -0
  382. package/dist/schema/i18n.d.ts +586 -0
  383. package/dist/schema/i18n.d.ts.map +1 -0
  384. package/dist/schema/i18n.js +585 -0
  385. package/dist/schema/i18n.js.map +1 -0
  386. package/dist/schema/index.d.ts +6 -0
  387. package/dist/schema/index.d.ts.map +1 -0
  388. package/dist/schema/index.js +6 -0
  389. package/dist/schema/index.js.map +1 -0
  390. package/dist/schema/mini_json.d.ts +5 -0
  391. package/dist/schema/mini_json.d.ts.map +1 -0
  392. package/dist/schema/mini_json.js +50 -0
  393. package/dist/schema/mini_json.js.map +1 -0
  394. package/dist/schema/text.d.ts +2 -0
  395. package/dist/schema/text.d.ts.map +1 -0
  396. package/dist/schema/text.js +23 -0
  397. package/dist/schema/text.js.map +1 -0
  398. package/dist/types.d.ts +122 -0
  399. package/dist/types.d.ts.map +1 -0
  400. package/dist/types.js +9 -0
  401. package/dist/types.js.map +1 -0
  402. package/package.json +48 -16
  403. package/scripts/export-schema.js +1 -1
  404. package/src/exporter/tools/{file.js → file.ts} +1 -1
  405. package/src/exporter/tools/{json.js → json.ts} +30 -19
  406. package/src/global.d.ts +11 -0
  407. package/src/schema/const.ts +58 -0
  408. package/src/types.ts +136 -0
  409. package/jest.config.js +0 -24
  410. /package/src/{index.js → index.ts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/schema/export.js"],"names":[],"mappings":"AAEA;IAEQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAAuB;IAG3B,eAYC;CACJ"}
@@ -0,0 +1,16 @@
1
+ import { docSchema } from "./document/index.js";
2
+ export class SchemaExport {
3
+ constructor() {
4
+ this.schema = docSchema;
5
+ }
6
+ init() {
7
+ const spec = {
8
+ nodes: {},
9
+ marks: {}
10
+ };
11
+ this.schema.spec.nodes.forEach((key, value) => (spec.nodes[key] = value));
12
+ this.schema.spec.marks.forEach((key, value) => (spec.marks[key] = value));
13
+ return JSON.stringify(spec);
14
+ }
15
+ }
16
+ //# sourceMappingURL=export.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/schema/export.js"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAA;AAE7C,MAAM,OAAO,YAAY;IACrB;QACI,IAAI,CAAC,MAAM,GAAG,SAAS,CAAA;IAC3B,CAAC;IAED,IAAI;QACA,MAAM,IAAI,GAAG;YACT,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,EAAE;SACZ,CAAA;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAC1B,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAC5C,CAAA;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAC1B,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAC5C,CAAA;QACD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAC/B,CAAC;CACJ"}
@@ -0,0 +1,499 @@
1
+ export const fnSchema: Schema<keyof OrderedMap<import("prosemirror-model").NodeSpec | {
2
+ group: string;
3
+ content: string;
4
+ attrs: {
5
+ track: {
6
+ default: never[];
7
+ };
8
+ };
9
+ parseDOM: {
10
+ tag: string;
11
+ getAttrs(dom: any): {
12
+ track: any[];
13
+ };
14
+ }[];
15
+ toDOM(node: any): (string | number | {
16
+ "data-track": string;
17
+ } | {
18
+ "data-track"?: undefined;
19
+ })[];
20
+ } | {
21
+ content: string;
22
+ group: string;
23
+ attrs: {
24
+ track: {
25
+ default: never[];
26
+ };
27
+ };
28
+ marks: string;
29
+ defining: boolean;
30
+ parseDOM: {
31
+ tag: string;
32
+ getAttrs(dom: any): {
33
+ track: any[];
34
+ };
35
+ }[];
36
+ toDOM(node: any): (string | number | {
37
+ "data-track": string;
38
+ } | {
39
+ "data-track"?: undefined;
40
+ })[];
41
+ } | {
42
+ group: string;
43
+ attrs: {
44
+ track: {
45
+ default: never[];
46
+ };
47
+ };
48
+ parseDOM: {
49
+ tag: string;
50
+ getAttrs(dom: any): {
51
+ track: any[];
52
+ };
53
+ }[];
54
+ toDOM(node: any): (string | {
55
+ "data-track": string;
56
+ } | {
57
+ "data-track"?: undefined;
58
+ })[];
59
+ } | {
60
+ inline: boolean;
61
+ group: string;
62
+ attrs: {
63
+ format: {
64
+ default: string;
65
+ };
66
+ references: {
67
+ default: never[];
68
+ };
69
+ };
70
+ parseDOM: {
71
+ tag: string;
72
+ getAttrs(dom: any): {
73
+ format: any;
74
+ references: {
75
+ id: any;
76
+ }[];
77
+ };
78
+ }[];
79
+ toDOM(node: any): (string | {
80
+ class: string;
81
+ "data-format": any;
82
+ "data-references": string;
83
+ })[];
84
+ } | {
85
+ inline: boolean;
86
+ group: string;
87
+ attrs: {
88
+ equation: {
89
+ default: string;
90
+ };
91
+ };
92
+ parseDOM: {
93
+ tag: string;
94
+ getAttrs(dom: any): {
95
+ equation: any;
96
+ };
97
+ }[];
98
+ toDOM(node: any): HTMLSpanElement;
99
+ } | {
100
+ inline: boolean;
101
+ allowGapCursor: boolean;
102
+ selectable: boolean;
103
+ group: string;
104
+ attrs: {
105
+ category: {
106
+ default: string;
107
+ };
108
+ caption: {
109
+ default: boolean;
110
+ };
111
+ id: {
112
+ default: boolean;
113
+ };
114
+ track: {
115
+ default: never[];
116
+ };
117
+ aligned: {
118
+ default: string;
119
+ };
120
+ width: {
121
+ default: string;
122
+ };
123
+ };
124
+ content: string;
125
+ parseDOM: {
126
+ tag: string;
127
+ getAttrs(dom: any): {
128
+ category: any;
129
+ caption: boolean;
130
+ id: any;
131
+ track: any[];
132
+ aligned: any;
133
+ width: any;
134
+ diff: any;
135
+ };
136
+ }[];
137
+ toDOM(node: any): (string | number | {
138
+ id: any;
139
+ class: string;
140
+ "data-aligned": any;
141
+ "data-width": any;
142
+ "data-category": any;
143
+ })[];
144
+ } | {
145
+ selectable: boolean;
146
+ draggable: boolean;
147
+ attrs: {
148
+ image: {
149
+ default: boolean;
150
+ };
151
+ };
152
+ parseDOM: {
153
+ tag: string;
154
+ getAttrs(dom: any): {
155
+ image: number | boolean;
156
+ };
157
+ }[];
158
+ toDOM(node: any): HTMLImageElement;
159
+ } | {
160
+ selectable: boolean;
161
+ draggable: boolean;
162
+ attrs: {
163
+ equation: {
164
+ default: boolean;
165
+ };
166
+ };
167
+ parseDOM: {
168
+ tag: string;
169
+ getAttrs(dom: any): {
170
+ equation: any;
171
+ };
172
+ }[];
173
+ toDOM(node: any): HTMLDivElement;
174
+ } | {
175
+ isolating: boolean;
176
+ defining: boolean;
177
+ content: string;
178
+ parseDOM: {
179
+ tag: string;
180
+ }[];
181
+ toDOM(): (string | (string | number | {
182
+ class: string;
183
+ })[])[];
184
+ } | {
185
+ group: string;
186
+ content: string;
187
+ marks: string;
188
+ defining: boolean;
189
+ attrs: {
190
+ id: {
191
+ default: boolean;
192
+ };
193
+ track: {
194
+ default: never[];
195
+ };
196
+ };
197
+ parseDOM: {
198
+ tag: string;
199
+ getAttrs(dom: any): {
200
+ id: any;
201
+ track: any[];
202
+ };
203
+ }[];
204
+ toDOM(node: any): (string | number | {
205
+ id: any;
206
+ })[];
207
+ } | {
208
+ group: string;
209
+ content: string;
210
+ attrs: {
211
+ id: {
212
+ default: boolean;
213
+ };
214
+ order: {
215
+ default: number;
216
+ };
217
+ track: {
218
+ default: never[];
219
+ };
220
+ };
221
+ parseDOM: {
222
+ tag: string;
223
+ getAttrs(dom: any): {
224
+ id: any;
225
+ order: number;
226
+ track: any[];
227
+ };
228
+ }[];
229
+ toDOM(node: any): (string | number | {
230
+ id: any;
231
+ })[];
232
+ } | {
233
+ group: string;
234
+ content: string;
235
+ attrs: {
236
+ id: {
237
+ default: boolean;
238
+ };
239
+ track: {
240
+ default: never[];
241
+ };
242
+ };
243
+ parseDOM: {
244
+ tag: string;
245
+ getAttrs(dom: any): {
246
+ id: any;
247
+ track: any[];
248
+ };
249
+ }[];
250
+ toDOM(node: any): (string | number | {
251
+ id: any;
252
+ })[];
253
+ } | {
254
+ content: string;
255
+ marks: string;
256
+ attrs: {
257
+ track: {
258
+ default: never[];
259
+ };
260
+ };
261
+ parseDOM: {
262
+ tag: string;
263
+ getAttrs(dom: any): {
264
+ track: any[];
265
+ };
266
+ }[];
267
+ toDOM(node: any): {}[];
268
+ defining: boolean;
269
+ } | {
270
+ inline: boolean;
271
+ group: string;
272
+ attrs: {
273
+ id: {
274
+ default: boolean;
275
+ };
276
+ title: {
277
+ default: null;
278
+ };
279
+ };
280
+ parseDOM: {
281
+ tag: string;
282
+ getAttrs(dom: any): {
283
+ id: any;
284
+ title: any;
285
+ };
286
+ }[];
287
+ toDOM(node: any): any[];
288
+ } | {
289
+ content: string;
290
+ selectable: boolean;
291
+ } | {
292
+ group: string;
293
+ selectable: boolean;
294
+ content: string;
295
+ marks: string;
296
+ parseDOM: {
297
+ tag: string;
298
+ }[];
299
+ toDOM(_node: any): (string | number | {
300
+ class: string;
301
+ })[];
302
+ }>, keyof OrderedMap<import("prosemirror-model").MarkSpec | {
303
+ attrs: {
304
+ type: {
305
+ default: string;
306
+ };
307
+ key: {
308
+ default: string;
309
+ };
310
+ value: {
311
+ default: string;
312
+ };
313
+ };
314
+ inclusive: boolean;
315
+ excludes: string;
316
+ group: string;
317
+ parseDOM: {
318
+ tag: string;
319
+ getAttrs(dom: any): {
320
+ type: any;
321
+ key: any;
322
+ value: any;
323
+ };
324
+ }[];
325
+ toDOM(node: any): (string | {
326
+ class: string;
327
+ "data-type": any;
328
+ })[];
329
+ } | {
330
+ attrs: {
331
+ id: {
332
+ default: boolean;
333
+ };
334
+ };
335
+ inclusive: boolean;
336
+ excludes: string;
337
+ group: string;
338
+ parseDOM: {
339
+ tag: string;
340
+ getAttrs(dom: any): {
341
+ id: number;
342
+ };
343
+ }[];
344
+ toDOM(node: any): (string | {
345
+ class: string;
346
+ "data-id": any;
347
+ })[];
348
+ } | {
349
+ attrs: {
350
+ user: {
351
+ default: number;
352
+ };
353
+ username: {
354
+ default: string;
355
+ };
356
+ date: {
357
+ default: number;
358
+ };
359
+ };
360
+ inclusive: boolean;
361
+ group: string;
362
+ parseDOM: {
363
+ tag: string;
364
+ getAttrs(dom: any): {
365
+ user: number;
366
+ username: any;
367
+ date: number;
368
+ };
369
+ }[];
370
+ toDOM(node: any): (string | {
371
+ class: string;
372
+ "data-user": any;
373
+ "data-username": any;
374
+ "data-date": any;
375
+ })[];
376
+ } | {
377
+ attrs: {
378
+ user: {
379
+ default: number;
380
+ };
381
+ username: {
382
+ default: string;
383
+ };
384
+ date: {
385
+ default: number;
386
+ };
387
+ before: {
388
+ default: never[];
389
+ };
390
+ after: {
391
+ default: never[];
392
+ };
393
+ };
394
+ inclusive: boolean;
395
+ group: string;
396
+ parseDOM: {
397
+ tag: string;
398
+ getAttrs(dom: any): {
399
+ user: number;
400
+ username: any;
401
+ date: number;
402
+ before: string[];
403
+ after: string[];
404
+ };
405
+ }[];
406
+ toDOM(node: any): (string | {
407
+ class: string;
408
+ "data-user": any;
409
+ "data-username": any;
410
+ "data-date": any;
411
+ "data-before": string;
412
+ "data-after": string;
413
+ })[];
414
+ } | {
415
+ attrs: {
416
+ user: {
417
+ default: number;
418
+ };
419
+ username: {
420
+ default: string;
421
+ };
422
+ date: {
423
+ default: number;
424
+ };
425
+ approved: {
426
+ default: boolean;
427
+ };
428
+ };
429
+ inclusive: boolean;
430
+ group: string;
431
+ parseDOM: {
432
+ tag: string;
433
+ getAttrs(dom: any): {
434
+ user: number;
435
+ username: any;
436
+ date: number;
437
+ inline: boolean;
438
+ approved: boolean;
439
+ };
440
+ }[];
441
+ toDOM(node: any): (string | {
442
+ class: string;
443
+ "data-user": any;
444
+ "data-username": any;
445
+ "data-date": any;
446
+ })[];
447
+ } | {
448
+ parseDOM: {
449
+ tag: string;
450
+ }[];
451
+ toDOM(): (string | number | {
452
+ class: string;
453
+ })[];
454
+ } | {
455
+ attrs: {
456
+ href: {};
457
+ title: {
458
+ default: string;
459
+ };
460
+ };
461
+ inclusive: boolean;
462
+ parseDOM: {
463
+ tag: string;
464
+ getAttrs(dom: any): {
465
+ href: any;
466
+ title: any;
467
+ };
468
+ }[];
469
+ toDOM(node: any): (string | number | {
470
+ href: any;
471
+ title: any;
472
+ class?: undefined;
473
+ } | {
474
+ href: any;
475
+ title: string;
476
+ class: string;
477
+ })[];
478
+ } | {
479
+ attrs: {
480
+ id: {
481
+ default: boolean;
482
+ };
483
+ };
484
+ inclusive: boolean;
485
+ group: string;
486
+ parseDOM: {
487
+ tag: string;
488
+ getAttrs(dom: any): {
489
+ id: any;
490
+ };
491
+ }[];
492
+ toDOM(node: any): (string | {
493
+ class: string;
494
+ "data-id": any;
495
+ })[];
496
+ }>>;
497
+ import OrderedMap from "orderedmap";
498
+ import { Schema } from "prosemirror-model";
499
+ //# sourceMappingURL=footnotes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"footnotes.d.ts","sourceRoot":"","sources":["../../src/schema/footnotes.js"],"names":[],"mappings":"AA6HA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAwC;uBA7HjB,YAAY;uBACd,mBAAmB"}
@@ -0,0 +1,88 @@
1
+ import OrderedMap from "orderedmap";
2
+ import { Schema } from "prosemirror-model";
3
+ import { marks, nodes } from "prosemirror-schema-basic";
4
+ import { tableNodes } from "prosemirror-tables";
5
+ import { anchor, annotation_tag, blockquote, bullet_list, citation, comment, cross_reference, deletion, equation, figure, figure_caption, figure_equation, format_change, heading1, heading2, heading3, heading4, heading5, heading6, horizontal_rule, image, insertion, link, list_item, ordered_list, paragraph, underline } from "./common/index.js";
6
+ const footnotecontainer = {
7
+ group: "part",
8
+ selectable: false,
9
+ content: "(block|table_block)+",
10
+ marks: "annotation",
11
+ parseDOM: [{ tag: "div.footnote-container" }],
12
+ toDOM(_node) {
13
+ return ["div", { class: "footnote-container" }, 0];
14
+ }
15
+ };
16
+ const doc = {
17
+ content: "part*",
18
+ selectable: false
19
+ };
20
+ const spec = {
21
+ nodes: OrderedMap.from({
22
+ doc,
23
+ footnotecontainer,
24
+ paragraph,
25
+ heading1,
26
+ heading2,
27
+ heading3,
28
+ heading4,
29
+ heading5,
30
+ heading6,
31
+ blockquote,
32
+ horizontal_rule,
33
+ figure,
34
+ image,
35
+ figure_equation,
36
+ figure_caption,
37
+ text: nodes.text,
38
+ hard_break: nodes.hard_break,
39
+ citation,
40
+ equation,
41
+ cross_reference,
42
+ ordered_list,
43
+ bullet_list,
44
+ list_item
45
+ }),
46
+ marks: OrderedMap.from({
47
+ em: marks.em,
48
+ strong: marks.strong,
49
+ link,
50
+ underline,
51
+ anchor,
52
+ comment,
53
+ annotation_tag,
54
+ deletion,
55
+ insertion,
56
+ format_change
57
+ })
58
+ };
59
+ spec.nodes = spec.nodes.append(tableNodes({
60
+ tableGroup: "table_block",
61
+ cellContent: "block+"
62
+ }));
63
+ spec.nodes = spec.nodes.update("table", Object.assign({}, spec.nodes.get("table"), {
64
+ attrs: {
65
+ track: { default: [] }
66
+ },
67
+ parseDOM: [
68
+ {
69
+ tag: "table",
70
+ getAttrs(dom) {
71
+ return {
72
+ track: dom.dataset.track
73
+ ? JSON.parse(dom.dataset.track)
74
+ : []
75
+ };
76
+ }
77
+ }
78
+ ],
79
+ toDOM(node) {
80
+ const attrs = {};
81
+ if (node.attrs.track.length) {
82
+ attrs["data-track"] = JSON.stringify(node.attrs.track);
83
+ }
84
+ return ["table", attrs, ["tbody", 0]];
85
+ }
86
+ }));
87
+ export const fnSchema = new Schema(spec);
88
+ //# sourceMappingURL=footnotes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"footnotes.js","sourceRoot":"","sources":["../../src/schema/footnotes.js"],"names":[],"mappings":"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"}
@@ -0,0 +1,5 @@
1
+ export function htmlToFnNode(content: any): any;
2
+ export function fnNodeToPmNode(fnContents: any): Node;
3
+ export function fnNodeToHtml(jsonString: any): any;
4
+ import { Node } from "prosemirror-model";
5
+ //# sourceMappingURL=footnotes_convert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"footnotes_convert.d.ts","sourceRoot":"","sources":["../../src/schema/footnotes_convert.js"],"names":[],"mappings":"AAKO,gDAWN;AAEM,sDAMN;AAEM,mDAIN;qBA9B4C,mBAAmB"}
@@ -0,0 +1,26 @@
1
+ import { DOMParser, DOMSerializer, Node } from "prosemirror-model";
2
+ import { fnSchema } from "./footnotes.js";
3
+ // Convert the footnote HTML stored with the marker to a PM node representation of the footnote.
4
+ export const htmlToFnNode = content => {
5
+ const footnoteDOM = document.createElement("div");
6
+ footnoteDOM.classList.add("footnote-container");
7
+ footnoteDOM.innerHTML = content;
8
+ const node = DOMParser.fromSchema(fnSchema).parse(footnoteDOM, {
9
+ preserveWhitespace: true,
10
+ topNode: false
11
+ });
12
+ const json = node.firstChild.toJSON().content;
13
+ return json;
14
+ };
15
+ export const fnNodeToPmNode = fnContents => {
16
+ const footnote = {
17
+ type: "footnotecontainer",
18
+ content: fnContents
19
+ };
20
+ return Node.fromJSON(fnSchema, footnote);
21
+ };
22
+ export const fnNodeToHtml = jsonString => {
23
+ const pmNode = fnNodeToPmNode(jsonString), serializer = DOMSerializer.fromSchema(fnSchema);
24
+ return serializer.serializeNode(pmNode).innerHTML;
25
+ };
26
+ //# sourceMappingURL=footnotes_convert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"footnotes_convert.js","sourceRoot":"","sources":["../../src/schema/footnotes_convert.js"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,aAAa,EAAE,IAAI,EAAC,MAAM,mBAAmB,CAAA;AAEhE,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAA;AAEvC,gGAAgG;AAChG,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC,EAAE;IAClC,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;IACjD,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;IAC/C,WAAW,CAAC,SAAS,GAAG,OAAO,CAAA;IAC/B,MAAM,IAAI,GAAG,SAAS,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE;QAC3D,kBAAkB,EAAE,IAAI;QACxB,OAAO,EAAE,KAAK;KACjB,CAAC,CAAA;IACF,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,OAAO,CAAA;IAE7C,OAAO,IAAI,CAAA;AACf,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC,EAAE;IACvC,MAAM,QAAQ,GAAG;QACb,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,UAAU;KACtB,CAAA;IACD,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;AAC5C,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC,EAAE;IACrC,MAAM,MAAM,GAAG,cAAc,CAAC,UAAU,CAAC,EACrC,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;IACnD,OAAO,UAAU,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,SAAS,CAAA;AACrD,CAAC,CAAA"}