@fiduswriter/document 0.1.0-alpha.4 → 0.1.0-alpha.5
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/bibliography/common.d.ts +9 -91
- package/dist/bibliography/common.d.ts.map +1 -1
- package/dist/bibliography/common.js +3 -2
- package/dist/bibliography/common.js.map +1 -1
- package/dist/bibliography/csl_bib.d.ts +1 -1
- package/dist/bibliography/csl_bib.d.ts.map +1 -1
- package/dist/bibliography/csl_bib.js +7 -7
- package/dist/bibliography/csl_bib.js.map +1 -1
- package/dist/citations/citeproc_sys.d.ts +9 -10
- package/dist/citations/citeproc_sys.d.ts.map +1 -1
- package/dist/citations/citeproc_sys.js +6 -1
- package/dist/citations/citeproc_sys.js.map +1 -1
- package/dist/citations/format.d.ts +33 -16
- package/dist/citations/format.d.ts.map +1 -1
- package/dist/citations/format.js +29 -4
- package/dist/citations/format.js.map +1 -1
- package/dist/editor/e2ee/encryptor.d.ts +35 -35
- package/dist/editor/e2ee/encryptor.d.ts.map +1 -1
- package/dist/editor/e2ee/encryptor.js +31 -31
- package/dist/editor/e2ee/encryptor.js.map +1 -1
- package/dist/exporter/docx/citations.d.ts +27 -17
- package/dist/exporter/docx/citations.d.ts.map +1 -1
- package/dist/exporter/docx/citations.js +24 -7
- package/dist/exporter/docx/citations.js.map +1 -1
- package/dist/exporter/docx/comments.d.ts +15 -11
- package/dist/exporter/docx/comments.d.ts.map +1 -1
- package/dist/exporter/docx/comments.js +47 -14
- package/dist/exporter/docx/comments.js.map +1 -1
- package/dist/exporter/docx/footnotes.d.ts +36 -31
- package/dist/exporter/docx/footnotes.d.ts.map +1 -1
- package/dist/exporter/docx/footnotes.js +46 -12
- package/dist/exporter/docx/footnotes.js.map +1 -1
- package/dist/exporter/docx/images.d.ts +23 -12
- package/dist/exporter/docx/images.d.ts.map +1 -1
- package/dist/exporter/docx/images.js +35 -20
- package/dist/exporter/docx/images.js.map +1 -1
- package/dist/exporter/docx/index.d.ts +11 -17
- package/dist/exporter/docx/index.d.ts.map +1 -1
- package/dist/exporter/docx/index.js +15 -7
- package/dist/exporter/docx/index.js.map +1 -1
- package/dist/exporter/docx/lists.d.ts +27 -22
- package/dist/exporter/docx/lists.d.ts.map +1 -1
- package/dist/exporter/docx/lists.js +77 -30
- package/dist/exporter/docx/lists.js.map +1 -1
- package/dist/exporter/docx/math.d.ts +9 -9
- package/dist/exporter/docx/math.d.ts.map +1 -1
- package/dist/exporter/docx/math.js +22 -5
- package/dist/exporter/docx/math.js.map +1 -1
- package/dist/exporter/docx/metadata.d.ts +12 -9
- package/dist/exporter/docx/metadata.d.ts.map +1 -1
- package/dist/exporter/docx/metadata.js +59 -26
- package/dist/exporter/docx/metadata.js.map +1 -1
- package/dist/exporter/docx/rels.d.ts +14 -12
- package/dist/exporter/docx/rels.d.ts.map +1 -1
- package/dist/exporter/docx/rels.js +37 -22
- package/dist/exporter/docx/rels.js.map +1 -1
- package/dist/exporter/docx/render.d.ts +17 -15
- package/dist/exporter/docx/render.d.ts.map +1 -1
- package/dist/exporter/docx/render.js +37 -31
- package/dist/exporter/docx/render.js.map +1 -1
- package/dist/exporter/docx/richtext.d.ts +8 -8
- package/dist/exporter/docx/richtext.d.ts.map +1 -1
- package/dist/exporter/docx/richtext.js +61 -43
- package/dist/exporter/docx/richtext.js.map +1 -1
- package/dist/exporter/docx/tables.d.ts +11 -9
- package/dist/exporter/docx/tables.d.ts.map +1 -1
- package/dist/exporter/docx/tables.js +16 -10
- package/dist/exporter/docx/tables.js.map +1 -1
- package/dist/exporter/docx/tools.d.ts +3 -2
- package/dist/exporter/docx/tools.d.ts.map +1 -1
- package/dist/exporter/docx/tools.js +3 -3
- package/dist/exporter/docx/tools.js.map +1 -1
- package/dist/exporter/epub/index.d.ts +11 -3
- package/dist/exporter/epub/index.d.ts.map +1 -1
- package/dist/exporter/epub/index.js +10 -3
- package/dist/exporter/epub/index.js.map +1 -1
- package/dist/exporter/epub/templates.d.ts +62 -31
- package/dist/exporter/epub/templates.d.ts.map +1 -1
- package/dist/exporter/epub/templates.js +1 -1
- package/dist/exporter/epub/templates.js.map +1 -1
- package/dist/exporter/epub/tools.d.ts +12 -4
- package/dist/exporter/epub/tools.d.ts.map +1 -1
- package/dist/exporter/epub/tools.js +14 -13
- package/dist/exporter/epub/tools.js.map +1 -1
- package/dist/exporter/html/citations.d.ts +17 -15
- package/dist/exporter/html/citations.d.ts.map +1 -1
- package/dist/exporter/html/citations.js +37 -18
- package/dist/exporter/html/citations.js.map +1 -1
- package/dist/exporter/html/convert.d.ts +20 -70
- package/dist/exporter/html/convert.d.ts.map +1 -1
- package/dist/exporter/html/convert.js +74 -42
- package/dist/exporter/html/convert.js.map +1 -1
- package/dist/exporter/html/index.d.ts +55 -52
- package/dist/exporter/html/index.d.ts.map +1 -1
- package/dist/exporter/html/index.js +23 -3
- package/dist/exporter/html/index.js.map +1 -1
- package/dist/exporter/html/templates.d.ts +23 -9
- package/dist/exporter/html/templates.d.ts.map +1 -1
- package/dist/exporter/html/templates.js +1 -1
- package/dist/exporter/html/templates.js.map +1 -1
- package/dist/exporter/html/tools.d.ts +1 -1
- package/dist/exporter/html/tools.d.ts.map +1 -1
- package/dist/exporter/html/tools.js +2 -2
- package/dist/exporter/html/tools.js.map +1 -1
- package/dist/exporter/jats/bibliography.d.ts +2 -1
- package/dist/exporter/jats/bibliography.d.ts.map +1 -1
- package/dist/exporter/jats/bibliography.js +57 -52
- package/dist/exporter/jats/bibliography.js.map +1 -1
- package/dist/exporter/jats/citations.d.ts +13 -11
- package/dist/exporter/jats/citations.d.ts.map +1 -1
- package/dist/exporter/jats/citations.js +28 -6
- package/dist/exporter/jats/citations.js.map +1 -1
- package/dist/exporter/jats/convert.d.ts +24 -28
- package/dist/exporter/jats/convert.d.ts.map +1 -1
- package/dist/exporter/jats/convert.js +53 -36
- package/dist/exporter/jats/convert.js.map +1 -1
- package/dist/exporter/jats/index.d.ts +21 -15
- package/dist/exporter/jats/index.d.ts.map +1 -1
- package/dist/exporter/jats/index.js +21 -5
- package/dist/exporter/jats/index.js.map +1 -1
- package/dist/exporter/jats/templates.d.ts +17 -15
- package/dist/exporter/jats/templates.d.ts.map +1 -1
- package/dist/exporter/jats/templates.js.map +1 -1
- package/dist/exporter/jats/text.d.ts +3 -2
- package/dist/exporter/jats/text.d.ts.map +1 -1
- package/dist/exporter/jats/text.js +4 -4
- package/dist/exporter/jats/text.js.map +1 -1
- package/dist/exporter/latex/convert.d.ts +12 -15
- package/dist/exporter/latex/convert.d.ts.map +1 -1
- package/dist/exporter/latex/convert.js +70 -54
- package/dist/exporter/latex/convert.js.map +1 -1
- package/dist/exporter/latex/escape_latex.d.ts +1 -1
- package/dist/exporter/latex/escape_latex.d.ts.map +1 -1
- package/dist/exporter/latex/escape_latex.js +1 -1
- package/dist/exporter/latex/escape_latex.js.map +1 -1
- package/dist/exporter/latex/index.d.ts +20 -19
- package/dist/exporter/latex/index.d.ts.map +1 -1
- package/dist/exporter/latex/index.js +15 -5
- package/dist/exporter/latex/index.js.map +1 -1
- package/dist/exporter/latex/readme.d.ts +1 -1
- package/dist/exporter/latex/readme.d.ts.map +1 -1
- package/dist/exporter/latex/readme.js +2 -2
- package/dist/exporter/latex/readme.js.map +1 -1
- package/dist/exporter/native/copy.d.ts +30 -0
- package/dist/exporter/native/copy.d.ts.map +1 -0
- package/dist/exporter/native/copy.js +151 -0
- package/dist/exporter/native/copy.js.map +1 -0
- package/dist/exporter/native/file.d.ts +12 -0
- package/dist/exporter/native/file.d.ts.map +1 -0
- package/dist/exporter/native/file.js +38 -0
- package/dist/exporter/native/file.js.map +1 -0
- package/dist/exporter/native/index.d.ts +5 -0
- package/dist/exporter/native/index.d.ts.map +1 -0
- package/dist/exporter/native/index.js +5 -0
- package/dist/exporter/native/index.js.map +1 -0
- package/dist/exporter/native/revision.d.ts +18 -0
- package/dist/exporter/native/revision.d.ts.map +1 -0
- package/dist/exporter/native/revision.js +39 -0
- package/dist/exporter/native/revision.js.map +1 -0
- package/dist/exporter/native/shrink.d.ts +29 -14
- package/dist/exporter/native/shrink.d.ts.map +1 -1
- package/dist/exporter/native/shrink.js +27 -18
- package/dist/exporter/native/shrink.js.map +1 -1
- package/dist/exporter/native/zip.d.ts +25 -0
- package/dist/exporter/native/zip.d.ts.map +1 -0
- package/dist/exporter/native/zip.js +56 -0
- package/dist/exporter/native/zip.js.map +1 -0
- package/dist/exporter/odt/citations.d.ts +18 -15
- package/dist/exporter/odt/citations.d.ts.map +1 -1
- package/dist/exporter/odt/citations.js +21 -4
- package/dist/exporter/odt/citations.js.map +1 -1
- package/dist/exporter/odt/footnotes.d.ts +25 -19
- package/dist/exporter/odt/footnotes.d.ts.map +1 -1
- package/dist/exporter/odt/footnotes.js +23 -6
- package/dist/exporter/odt/footnotes.js.map +1 -1
- package/dist/exporter/odt/images.d.ts +23 -11
- package/dist/exporter/odt/images.d.ts.map +1 -1
- package/dist/exporter/odt/images.js +34 -26
- package/dist/exporter/odt/images.js.map +1 -1
- package/dist/exporter/odt/index.d.ts +12 -18
- package/dist/exporter/odt/index.d.ts.map +1 -1
- package/dist/exporter/odt/index.js +16 -7
- package/dist/exporter/odt/index.js.map +1 -1
- package/dist/exporter/odt/math.d.ts +10 -8
- package/dist/exporter/odt/math.d.ts.map +1 -1
- package/dist/exporter/odt/math.js +27 -4
- package/dist/exporter/odt/math.js.map +1 -1
- package/dist/exporter/odt/metadata.d.ts +13 -9
- package/dist/exporter/odt/metadata.d.ts.map +1 -1
- package/dist/exporter/odt/metadata.js +36 -15
- package/dist/exporter/odt/metadata.js.map +1 -1
- package/dist/exporter/odt/render.d.ts +17 -15
- package/dist/exporter/odt/render.d.ts.map +1 -1
- package/dist/exporter/odt/render.js +25 -18
- package/dist/exporter/odt/render.js.map +1 -1
- package/dist/exporter/odt/richtext.d.ts +9 -9
- package/dist/exporter/odt/richtext.d.ts.map +1 -1
- package/dist/exporter/odt/richtext.js +55 -40
- package/dist/exporter/odt/richtext.js.map +1 -1
- package/dist/exporter/odt/styles.d.ts +29 -21
- package/dist/exporter/odt/styles.d.ts.map +1 -1
- package/dist/exporter/odt/styles.js +44 -22
- package/dist/exporter/odt/styles.js.map +1 -1
- package/dist/exporter/odt/track.d.ts +14 -7
- package/dist/exporter/odt/track.d.ts.map +1 -1
- package/dist/exporter/odt/track.js +7 -0
- package/dist/exporter/odt/track.js.map +1 -1
- package/dist/exporter/pandoc/citations.d.ts +20 -14
- package/dist/exporter/pandoc/citations.d.ts.map +1 -1
- package/dist/exporter/pandoc/citations.js +18 -4
- package/dist/exporter/pandoc/citations.js.map +1 -1
- package/dist/exporter/pandoc/convert.d.ts +10 -29
- package/dist/exporter/pandoc/convert.d.ts.map +1 -1
- package/dist/exporter/pandoc/convert.js +45 -40
- package/dist/exporter/pandoc/convert.js.map +1 -1
- package/dist/exporter/pandoc/index.d.ts +20 -33
- package/dist/exporter/pandoc/index.d.ts.map +1 -1
- package/dist/exporter/pandoc/index.js +20 -8
- package/dist/exporter/pandoc/index.js.map +1 -1
- package/dist/exporter/pandoc/readme.d.ts +1 -1
- package/dist/exporter/pandoc/readme.d.ts.map +1 -1
- package/dist/exporter/pandoc/readme.js +0 -1
- package/dist/exporter/pandoc/readme.js.map +1 -1
- package/dist/exporter/pandoc/tools.d.ts +21 -5
- package/dist/exporter/pandoc/tools.d.ts.map +1 -1
- package/dist/exporter/pandoc/tools.js +2 -2
- package/dist/exporter/pandoc/tools.js.map +1 -1
- package/dist/exporter/print/index.d.ts +18 -7
- package/dist/exporter/print/index.d.ts.map +1 -1
- package/dist/exporter/print/index.js +12 -10
- package/dist/exporter/print/index.js.map +1 -1
- package/dist/exporter/tools/doc_content.d.ts +5 -6
- package/dist/exporter/tools/doc_content.d.ts.map +1 -1
- package/dist/exporter/tools/doc_content.js +17 -16
- package/dist/exporter/tools/doc_content.js.map +1 -1
- package/dist/exporter/tools/svg.d.ts +7 -1
- package/dist/exporter/tools/svg.d.ts.map +1 -1
- package/dist/exporter/tools/svg.js.map +1 -1
- package/dist/exporter/tools/xml.d.ts +39 -38
- package/dist/exporter/tools/xml.d.ts.map +1 -1
- package/dist/exporter/tools/xml.js +82 -55
- package/dist/exporter/tools/xml.js.map +1 -1
- package/dist/exporter/tools/xml_zip.d.ts +15 -14
- package/dist/exporter/tools/xml_zip.d.ts.map +1 -1
- package/dist/exporter/tools/xml_zip.js +8 -2
- package/dist/exporter/tools/xml_zip.js.map +1 -1
- package/dist/exporter/tools/zip.d.ts +28 -14
- package/dist/exporter/tools/zip.d.ts.map +1 -1
- package/dist/exporter/tools/zip.js +13 -6
- package/dist/exporter/tools/zip.js.map +1 -1
- package/dist/exporter/tools/zotero_csl.d.ts +19 -6
- package/dist/exporter/tools/zotero_csl.d.ts.map +1 -1
- package/dist/exporter/tools/zotero_csl.js +9 -9
- package/dist/exporter/tools/zotero_csl.js.map +1 -1
- package/dist/importer/citations.d.ts +25 -22
- package/dist/importer/citations.d.ts.map +1 -1
- package/dist/importer/citations.js +1 -49
- package/dist/importer/citations.js.map +1 -1
- package/dist/importer/docx/citations.d.ts +8 -30
- package/dist/importer/docx/citations.d.ts.map +1 -1
- package/dist/importer/docx/citations.js +1 -26
- package/dist/importer/docx/citations.js.map +1 -1
- package/dist/importer/docx/convert.d.ts +38 -116
- package/dist/importer/docx/convert.d.ts.map +1 -1
- package/dist/importer/docx/convert.js +99 -82
- package/dist/importer/docx/convert.js.map +1 -1
- package/dist/importer/docx/helpers.d.ts +1 -1
- package/dist/importer/docx/helpers.d.ts.map +1 -1
- package/dist/importer/docx/helpers.js +1 -1
- package/dist/importer/docx/helpers.js.map +1 -1
- package/dist/importer/docx/index.d.ts +27 -0
- package/dist/importer/docx/index.d.ts.map +1 -0
- package/dist/importer/docx/index.js +77 -0
- package/dist/importer/docx/index.js.map +1 -0
- package/dist/importer/docx/omml2mathml.d.ts +2 -3
- package/dist/importer/docx/omml2mathml.d.ts.map +1 -1
- package/dist/importer/docx/omml2mathml.js +23 -116
- package/dist/importer/docx/omml2mathml.js.map +1 -1
- package/dist/importer/docx/parse.d.ts +22 -131
- package/dist/importer/docx/parse.d.ts.map +1 -1
- package/dist/importer/docx/parse.js +73 -55
- package/dist/importer/docx/parse.js.map +1 -1
- package/dist/importer/native/extract_template.d.ts +6 -0
- package/dist/importer/native/extract_template.d.ts.map +1 -0
- package/dist/importer/native/extract_template.js +80 -0
- package/dist/importer/native/extract_template.js.map +1 -0
- package/dist/importer/native/file.d.ts +37 -0
- package/dist/importer/native/file.d.ts.map +1 -0
- package/dist/importer/native/file.js +162 -0
- package/dist/importer/native/file.js.map +1 -0
- package/dist/importer/native/get_images.d.ts +18 -8
- package/dist/importer/native/get_images.d.ts.map +1 -1
- package/dist/importer/native/get_images.js +39 -45
- package/dist/importer/native/get_images.js.map +1 -1
- package/dist/importer/native/importer.d.ts +41 -0
- package/dist/importer/native/importer.d.ts.map +1 -0
- package/dist/importer/native/importer.js +170 -0
- package/dist/importer/native/importer.js.map +1 -0
- package/dist/importer/native/index.d.ts +7 -0
- package/dist/importer/native/index.d.ts.map +1 -0
- package/dist/importer/native/index.js +7 -0
- package/dist/importer/native/index.js.map +1 -0
- package/dist/importer/native/update.d.ts +5 -4
- package/dist/importer/native/update.d.ts.map +1 -1
- package/dist/importer/native/update.js +4 -3
- package/dist/importer/native/update.js.map +1 -1
- package/dist/importer/native/update_template.d.ts +12 -0
- package/dist/importer/native/update_template.d.ts.map +1 -0
- package/dist/importer/native/update_template.js +19 -0
- package/dist/importer/native/update_template.js.map +1 -0
- package/dist/importer/odt/citations.d.ts +7 -27
- package/dist/importer/odt/citations.d.ts.map +1 -1
- package/dist/importer/odt/citations.js +0 -22
- package/dist/importer/odt/citations.js.map +1 -1
- package/dist/importer/odt/convert.d.ts +53 -237
- package/dist/importer/odt/convert.d.ts.map +1 -1
- package/dist/importer/odt/convert.js +162 -138
- package/dist/importer/odt/convert.js.map +1 -1
- package/dist/importer/odt/index.d.ts +30 -0
- package/dist/importer/odt/index.d.ts.map +1 -0
- package/dist/importer/odt/index.js +124 -0
- package/dist/importer/odt/index.js.map +1 -0
- package/dist/importer/pandoc/convert.d.ts +25 -77
- package/dist/importer/pandoc/convert.d.ts.map +1 -1
- package/dist/importer/pandoc/convert.js +65 -52
- package/dist/importer/pandoc/convert.js.map +1 -1
- package/dist/importer/pandoc/helpers.d.ts +4 -3
- package/dist/importer/pandoc/helpers.d.ts.map +1 -1
- package/dist/importer/pandoc/helpers.js +24 -26
- package/dist/importer/pandoc/helpers.js.map +1 -1
- package/dist/importer/pandoc/index.d.ts +31 -0
- package/dist/importer/pandoc/index.d.ts.map +1 -0
- package/dist/importer/pandoc/index.js +114 -0
- package/dist/importer/pandoc/index.js.map +1 -0
- package/dist/importer/registry.d.ts +21 -0
- package/dist/importer/registry.d.ts.map +1 -0
- package/dist/importer/registry.js +41 -0
- package/dist/importer/registry.js.map +1 -0
- package/dist/importer/zip_analyzer.d.ts +27 -21
- package/dist/importer/zip_analyzer.d.ts.map +1 -1
- package/dist/importer/zip_analyzer.js +10 -5
- package/dist/importer/zip_analyzer.js.map +1 -1
- package/dist/mathlive/opf_includes.d.ts +1 -1
- package/dist/mathlive/opf_includes.d.ts.map +1 -1
- package/dist/mathlive/opf_includes.js.map +1 -1
- package/dist/schema/common/annotate.d.ts +37 -49
- package/dist/schema/common/annotate.d.ts.map +1 -1
- package/dist/schema/common/annotate.js +2 -2
- package/dist/schema/common/annotate.js.map +1 -1
- package/dist/schema/common/base.d.ts +63 -81
- package/dist/schema/common/base.d.ts.map +1 -1
- package/dist/schema/common/base.js.map +1 -1
- package/dist/schema/common/citation.d.ts +23 -22
- package/dist/schema/common/citation.d.ts.map +1 -1
- package/dist/schema/common/citation.js +4 -5
- package/dist/schema/common/citation.js.map +1 -1
- package/dist/schema/common/equation.d.ts +13 -14
- package/dist/schema/common/equation.d.ts.map +1 -1
- package/dist/schema/common/equation.js +1 -1
- package/dist/schema/common/equation.js.map +1 -1
- package/dist/schema/common/figure.d.ts +72 -93
- package/dist/schema/common/figure.d.ts.map +1 -1
- package/dist/schema/common/figure.js +11 -9
- package/dist/schema/common/figure.js.map +1 -1
- package/dist/schema/common/heading.d.ts +8 -32
- package/dist/schema/common/heading.d.ts.map +1 -1
- package/dist/schema/common/heading.js +2 -2
- package/dist/schema/common/heading.js.map +1 -1
- package/dist/schema/common/index.d.ts +2 -2
- package/dist/schema/common/index.d.ts.map +1 -1
- package/dist/schema/common/index.js.map +1 -1
- package/dist/schema/common/list.d.ts +52 -72
- package/dist/schema/common/list.d.ts.map +1 -1
- package/dist/schema/common/list.js +3 -3
- package/dist/schema/common/list.js.map +1 -1
- package/dist/schema/common/reference.d.ts +51 -59
- package/dist/schema/common/reference.d.ts.map +1 -1
- package/dist/schema/common/reference.js +5 -5
- package/dist/schema/common/reference.js.map +1 -1
- package/dist/schema/common/table.d.ts +59 -75
- package/dist/schema/common/table.d.ts.map +1 -1
- package/dist/schema/common/table.js +3 -2
- package/dist/schema/common/table.js.map +1 -1
- package/dist/schema/common/track.d.ts +83 -97
- package/dist/schema/common/track.d.ts.map +1 -1
- package/dist/schema/common/track.js +18 -17
- package/dist/schema/common/track.js.map +1 -1
- package/dist/schema/convert.d.ts +2 -2
- package/dist/schema/convert.d.ts.map +1 -1
- package/dist/schema/convert.js +2 -2
- package/dist/schema/convert.js.map +1 -1
- package/dist/schema/document/content.d.ts +95 -122
- package/dist/schema/document/content.d.ts.map +1 -1
- package/dist/schema/document/content.js +9 -9
- package/dist/schema/document/content.js.map +1 -1
- package/dist/schema/document/index.d.ts +173 -257
- package/dist/schema/document/index.d.ts.map +1 -1
- package/dist/schema/document/index.js.map +1 -1
- package/dist/schema/document/structure.d.ts +149 -258
- package/dist/schema/document/structure.d.ts.map +1 -1
- package/dist/schema/document/structure.js +2 -2
- package/dist/schema/document/structure.js.map +1 -1
- package/dist/schema/export.d.ts +4 -877
- package/dist/schema/export.d.ts.map +1 -1
- package/dist/schema/export.js +1 -0
- package/dist/schema/export.js.map +1 -1
- package/dist/schema/footnotes.d.ts +110 -155
- package/dist/schema/footnotes.d.ts.map +1 -1
- package/dist/schema/footnotes.js +4 -2
- package/dist/schema/footnotes.js.map +1 -1
- package/dist/schema/footnotes_convert.d.ts +3 -3
- package/dist/schema/footnotes_convert.d.ts.map +1 -1
- package/dist/schema/footnotes_convert.js +10 -6
- package/dist/schema/footnotes_convert.js.map +1 -1
- package/dist/schema/i18n.d.ts +3 -534
- package/dist/schema/i18n.d.ts.map +1 -1
- package/dist/schema/i18n.js +1 -0
- package/dist/schema/i18n.js.map +1 -1
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/mini_json.d.ts +3 -4
- package/dist/schema/mini_json.d.ts.map +1 -1
- package/dist/schema/mini_json.js +2 -0
- package/dist/schema/mini_json.js.map +1 -1
- package/dist/schema/text.d.ts +2 -1
- package/dist/schema/text.d.ts.map +1 -1
- package/dist/schema/text.js +1 -1
- package/dist/schema/text.js.map +1 -1
- package/dist/types.d.ts +167 -8
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -1
- package/src/bibliography/{common.js → common.ts} +15 -12
- package/src/bibliography/{csl_bib.js → csl_bib.ts} +16 -15
- package/src/citations/{citeproc_sys.js → citeproc_sys.ts} +26 -6
- package/src/citations/{format.js → format.ts} +80 -24
- package/src/editor/e2ee/{encryptor.js → encryptor.ts} +76 -44
- package/src/exporter/docx/{citations.js → citations.ts} +51 -23
- package/src/exporter/docx/{comments.js → comments.ts} +69 -26
- package/src/exporter/docx/{footnotes.js → footnotes.ts} +81 -42
- package/src/exporter/docx/images.ts +128 -0
- package/src/exporter/docx/{index.js → index.ts} +48 -25
- package/src/exporter/docx/{lists.js → lists.ts} +89 -46
- package/src/exporter/docx/{math.js → math.ts} +29 -9
- package/src/exporter/docx/{metadata.js → metadata.ts} +78 -42
- package/src/exporter/docx/{rels.js → rels.ts} +71 -50
- package/src/exporter/docx/{render.js → render.ts} +124 -87
- package/src/exporter/docx/{richtext.js → richtext.ts} +107 -84
- package/src/exporter/docx/{tables.js → tables.ts} +33 -23
- package/src/exporter/docx/{tools.js → tools.ts} +4 -3
- package/src/exporter/epub/{index.js → index.ts} +44 -15
- package/src/exporter/epub/{templates.js → templates.ts} +71 -7
- package/src/exporter/epub/{tools.js → tools.ts} +31 -25
- package/src/exporter/html/{citations.js → citations.ts} +79 -31
- package/src/exporter/html/{convert.js → convert.ts} +118 -71
- package/src/exporter/html/{index.js → index.ts} +63 -29
- package/src/exporter/html/{templates.js → templates.ts} +22 -2
- package/src/exporter/html/{tools.js → tools.ts} +9 -6
- package/src/exporter/jats/bibliography.ts +199 -0
- package/src/exporter/jats/{citations.js → citations.ts} +56 -20
- package/src/exporter/jats/{convert.js → convert.ts} +72 -53
- package/src/exporter/jats/index.ts +132 -0
- package/src/exporter/jats/{templates.js → templates.ts} +19 -3
- package/src/exporter/jats/{text.js → text.ts} +8 -6
- package/src/exporter/latex/{convert.js → convert.ts} +160 -125
- package/src/exporter/latex/{escape_latex.js → escape_latex.ts} +1 -1
- package/src/exporter/latex/{index.js → index.ts} +27 -12
- package/src/exporter/latex/{readme.js → readme.ts} +2 -2
- package/src/exporter/native/copy.ts +231 -0
- package/src/exporter/native/file.ts +65 -0
- package/src/exporter/native/index.ts +4 -0
- package/src/exporter/native/revision.ts +76 -0
- package/src/exporter/native/{shrink.js → shrink.ts} +64 -29
- package/src/exporter/native/zip.ts +85 -0
- package/src/exporter/odt/{citations.js → citations.ts} +35 -15
- package/src/exporter/odt/{footnotes.js → footnotes.ts} +53 -30
- package/src/exporter/odt/images.ts +135 -0
- package/src/exporter/odt/{index.js → index.ts} +49 -27
- package/src/exporter/odt/{math.js → math.ts} +38 -9
- package/src/exporter/odt/{metadata.js → metadata.ts} +54 -29
- package/src/exporter/odt/{render.js → render.ts} +89 -60
- package/src/exporter/odt/{richtext.js → richtext.ts} +102 -72
- package/src/exporter/odt/{styles.js → styles.ts} +98 -66
- package/src/exporter/odt/{track.js → track.ts} +22 -6
- package/src/exporter/pandoc/{citations.js → citations.ts} +31 -15
- package/src/exporter/pandoc/{convert.js → convert.ts} +98 -79
- package/src/exporter/pandoc/{index.js → index.ts} +36 -13
- package/src/exporter/pandoc/{readme.js → readme.ts} +0 -1
- package/src/exporter/pandoc/{tools.js → tools.ts} +28 -5
- package/src/exporter/print/{index.js → index.ts} +38 -19
- package/src/exporter/tools/{doc_content.js → doc_content.ts} +34 -24
- package/src/exporter/tools/{svg.js → svg.ts} +9 -3
- package/src/exporter/tools/{xml.js → xml.ts} +187 -138
- package/src/exporter/tools/{xml_zip.js → xml_zip.ts} +19 -11
- package/src/exporter/tools/{zip.js → zip.ts} +35 -11
- package/src/exporter/tools/{zotero_csl.js → zotero_csl.ts} +35 -18
- package/src/global.d.ts +2 -0
- package/src/importer/citations.ts +116 -0
- package/src/importer/docx/{citations.js → citations.ts} +22 -37
- package/src/importer/docx/{convert.js → convert.ts} +176 -141
- package/src/importer/docx/{helpers.js → helpers.ts} +1 -1
- package/src/importer/docx/index.ts +124 -0
- package/src/importer/docx/{omml2mathml.js → omml2mathml.ts} +154 -176
- package/src/importer/docx/{parse.js → parse.ts} +103 -81
- package/src/importer/native/extract_template.ts +83 -0
- package/src/importer/native/file.ts +282 -0
- package/src/importer/native/get_images.ts +82 -0
- package/src/importer/native/importer.ts +244 -0
- package/src/importer/native/index.ts +6 -0
- package/src/importer/native/{update.js → update.ts} +13 -5
- package/src/importer/native/update_template.ts +32 -0
- package/src/importer/odt/{citations.js → citations.ts} +17 -29
- package/src/importer/odt/{convert.js → convert.ts} +261 -237
- package/src/importer/odt/index.ts +202 -0
- package/src/importer/pandoc/{convert.js → convert.ts} +116 -94
- package/src/importer/pandoc/{helpers.js → helpers.ts} +24 -12
- package/src/importer/pandoc/index.ts +171 -0
- package/src/importer/registry.ts +69 -0
- package/src/importer/{zip_analyzer.js → zip_analyzer.ts} +44 -18
- package/src/mathlive/{opf_includes.js → opf_includes.ts} +1 -1
- package/src/modules.d.ts +40 -0
- package/src/schema/common/{annotate.js → annotate.ts} +10 -8
- package/src/schema/common/{base.js → base.ts} +12 -10
- package/src/schema/common/{citation.js → citation.ts} +17 -8
- package/src/schema/common/{equation.js → equation.ts} +6 -4
- package/src/schema/common/{figure.js → figure.ts} +43 -23
- package/src/schema/common/{heading.js → heading.ts} +7 -5
- package/src/schema/common/{list.js → list.ts} +15 -13
- package/src/schema/common/{reference.js → reference.ts} +14 -12
- package/src/schema/common/{table.js → table.ts} +16 -14
- package/src/schema/common/{track.js → track.ts} +42 -31
- package/src/schema/{convert.js → convert.ts} +6 -2
- package/src/schema/document/{content.js → content.ts} +22 -20
- package/src/schema/document/{structure.js → structure.ts} +15 -9
- package/src/schema/{export.js → export.ts} +4 -2
- package/src/schema/{footnotes.js → footnotes.ts} +11 -8
- package/src/schema/{footnotes_convert.js → footnotes_convert.ts} +11 -8
- package/src/schema/{i18n.js → i18n.ts} +7 -1
- package/src/schema/{mini_json.js → mini_json.ts} +11 -12
- package/src/schema/{text.js → text.ts} +6 -2
- package/src/types.ts +185 -7
- package/src/exporter/docx/images.js +0 -101
- package/src/exporter/jats/bibliography.js +0 -183
- package/src/exporter/jats/index.js +0 -92
- package/src/exporter/odt/images.js +0 -115
- package/src/importer/citations.js +0 -129
- package/src/importer/native/get_images.js +0 -76
- /package/src/schema/common/{index.js → index.ts} +0 -0
- /package/src/schema/document/{index.js → index.ts} +0 -0
- /package/src/schema/{index.js → index.ts} +0 -0
|
@@ -18,9 +18,9 @@ function generateCitationId() {
|
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Convert bibliography entries to CSL-JSON format.
|
|
21
|
-
* @param
|
|
22
|
-
* @param
|
|
23
|
-
* @returns
|
|
21
|
+
* @param bibDB - The bibliography database
|
|
22
|
+
* @param ids - Array of entry IDs to convert
|
|
23
|
+
* @returns Object mapping IDs to CSL-JSON entries
|
|
24
24
|
*/
|
|
25
25
|
function convertToCSL(bibDB, ids) {
|
|
26
26
|
const exporter = new CSLExporter(bibDB.db, ids);
|
|
@@ -28,11 +28,11 @@ function convertToCSL(bibDB, ids) {
|
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Create a Zotero citation JSON object.
|
|
31
|
-
* @param
|
|
32
|
-
* @param
|
|
33
|
-
* @param
|
|
34
|
-
* @param
|
|
35
|
-
* @returns
|
|
31
|
+
* @param references - Array of {id, prefix?, locator?} from citation node
|
|
32
|
+
* @param bibDB - Bibliography database
|
|
33
|
+
* @param formattedCitation - Pre-formatted citation text from citeproc
|
|
34
|
+
* @param citationId - Optional citation ID (generated if not provided)
|
|
35
|
+
* @returns Zotero citation JSON object
|
|
36
36
|
*/
|
|
37
37
|
export function createZoteroCitation(references, bibDB, formattedCitation, citationId = null) {
|
|
38
38
|
const citationID = citationId || generateCitationId();
|
|
@@ -63,7 +63,7 @@ export function createZoteroCitation(references, bibDB, formattedCitation, citat
|
|
|
63
63
|
}
|
|
64
64
|
return item;
|
|
65
65
|
})
|
|
66
|
-
.filter(item => item !== null);
|
|
66
|
+
.filter((item) => item !== null);
|
|
67
67
|
return {
|
|
68
68
|
citationID,
|
|
69
69
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zotero_csl.js","sourceRoot":"","sources":["../../../src/exporter/tools/zotero_csl.
|
|
1
|
+
{"version":3,"file":"zotero_csl.js","sourceRoot":"","sources":["../../../src/exporter/tools/zotero_csl.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAA;AAmBlD;;;GAGG;AACH,SAAS,kBAAkB;IACvB,MAAM,KAAK,GAAG,sCAAsC,CAAA;IACpD,IAAI,EAAE,GAAG,EAAE,CAAA;IACX,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACzB,EAAE,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI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,OAAO,CAAA;QAC9B,CAAC;QAED,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;YACb,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;QAC5B,CAAC;QAED,OAAO,IAAI,CAAA;IACf,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,IAAI,EAA8B,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,CAAA;IAEhE,OAAO;QACH,UAAU;QACV,UAAU,EAAE;YACR,iBAAiB;YACjB,aAAa,EAAE,iBAAiB;YAChC,SAAS,EAAE,CAAC;SACf;QACD,aAAa;QACb,MAAM,EAAE,gFAAgF;KAC3F,CAAA;AACL,CAAC"}
|
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* OdtCitationsParser call into a Fidus Writer citation node.
|
|
4
|
-
*
|
|
5
|
-
* The `bibliography` object is mutated in place to include any new entries.
|
|
6
|
-
*
|
|
7
|
-
* Each item in `metadata` (when `retrieveMetadata` was true) may carry:
|
|
8
|
-
* - id : entry_key string identifying which entry this item refers to
|
|
9
|
-
* - prefix : citation prefix text
|
|
10
|
-
* - suffix : citation suffix / locator text (used as `locator`)
|
|
11
|
-
* - locator : explicit locator string (preferred over suffix when present)
|
|
12
|
-
* - authorOnly : boolean – render author name only (maps to "textcite")
|
|
13
|
-
* - suppressAuthor : boolean – suppress author name (ignored, maps to default)
|
|
14
|
-
* - authorYear : boolean – render author name and year (maps to "textcite")
|
|
15
|
-
*
|
|
16
|
-
* `format` on the returned citation node matches the Fidus Writer citation schema:
|
|
17
|
-
* - "textcite" when authorOnly or authorYear is set on the (single) item (biblatex \textcite)
|
|
18
|
-
* - "autocite" otherwise, including when suppressAuthor is set (biblatex \autocite)
|
|
19
|
-
*
|
|
20
|
-
* @param {Object} result CitationResult from a static parser method
|
|
21
|
-
* @param {Object} bibliography Fidus Writer bibliography (mutated in place)
|
|
22
|
-
* @returns {Object|null} ProseMirror citation node or null
|
|
2
|
+
* Shared citation utilities for DOCX and ODT importers.
|
|
23
3
|
*/
|
|
24
|
-
|
|
4
|
+
import type { BibDB, FidusNode } from "../types.js";
|
|
5
|
+
interface CitationEntry {
|
|
6
|
+
entry_key: string;
|
|
7
|
+
fields: Record<string, unknown>;
|
|
8
|
+
bib_type?: string;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
interface CitationMetadata {
|
|
12
|
+
entry_key: string;
|
|
13
|
+
prefix?: string;
|
|
14
|
+
suffix?: string;
|
|
15
|
+
locator?: string;
|
|
16
|
+
authorOnly?: boolean;
|
|
17
|
+
authorYear?: boolean;
|
|
18
|
+
suppressAuthor?: boolean;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
}
|
|
21
|
+
interface CitationResult {
|
|
22
|
+
isCitation: boolean;
|
|
23
|
+
entries: Record<string, CitationEntry>;
|
|
24
|
+
metadata?: CitationMetadata[];
|
|
25
|
+
}
|
|
26
|
+
export declare function citationResultToNode(result: CitationResult, bibliography: Record<string, any>, bibDB?: BibDB | false): FidusNode | null;
|
|
27
|
+
export {};
|
|
25
28
|
//# sourceMappingURL=citations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"citations.d.ts","sourceRoot":"","sources":["../../src/importer/citations.
|
|
1
|
+
{"version":3,"file":"citations.d.ts","sourceRoot":"","sources":["../../src/importer/citations.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAC,KAAK,EAAE,SAAS,EAAC,MAAM,aAAa,CAAA;AAEjD,UAAU,aAAa;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACzB;AAED,UAAU,gBAAgB;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACzB;AAED,UAAU,cAAc;IACpB,UAAU,EAAE,OAAO,CAAA;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IACtC,QAAQ,CAAC,EAAE,gBAAgB,EAAE,CAAA;CAChC;AA4CD,wBAAgB,oBAAoB,CAChC,MAAM,EAAE,cAAc,EACtB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjC,KAAK,GAAE,KAAK,GAAG,KAAa,GAC7B,SAAS,GAAG,IAAI,CAuClB"}
|
|
@@ -1,21 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared citation utilities for DOCX and ODT importers.
|
|
3
|
-
*
|
|
4
|
-
* Converts a CitationResult (from DocxCitationsParser or OdtCitationsParser
|
|
5
|
-
* static methods) plus a BibDB (entries) into a Fidus Writer citation node,
|
|
6
|
-
* and merges the new BibDB entries into the document bibliography.
|
|
7
|
-
*
|
|
8
|
-
* The `bibliography` object passed in is mutated in place: new entries are
|
|
9
|
-
* appended with sequential numeric string keys ("1", "2", …).
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Given a BibDB returned by a static Citations parser call and the current
|
|
13
|
-
* document bibliography, add every entry that is not yet present (matched by
|
|
14
|
-
* entry_key) and return a mapping from entry_key → bibliography key string.
|
|
15
|
-
*
|
|
16
|
-
* @param {Object} entries BibDB (Record<number, EntryObject>) from parser
|
|
17
|
-
* @param {Object} bibliography Fidus Writer bibliography (mutated in place)
|
|
18
|
-
* @returns {Object} Map of entry_key → bibKey string
|
|
19
3
|
*/
|
|
20
4
|
function mergeBibEntries(entries, bibliography, bibDB) {
|
|
21
5
|
const keyMap = {};
|
|
@@ -47,29 +31,6 @@ function mergeBibEntries(entries, bibliography, bibDB) {
|
|
|
47
31
|
}
|
|
48
32
|
return keyMap;
|
|
49
33
|
}
|
|
50
|
-
/**
|
|
51
|
-
* Convert a CitationResult from a static DocxCitationsParser or
|
|
52
|
-
* OdtCitationsParser call into a Fidus Writer citation node.
|
|
53
|
-
*
|
|
54
|
-
* The `bibliography` object is mutated in place to include any new entries.
|
|
55
|
-
*
|
|
56
|
-
* Each item in `metadata` (when `retrieveMetadata` was true) may carry:
|
|
57
|
-
* - id : entry_key string identifying which entry this item refers to
|
|
58
|
-
* - prefix : citation prefix text
|
|
59
|
-
* - suffix : citation suffix / locator text (used as `locator`)
|
|
60
|
-
* - locator : explicit locator string (preferred over suffix when present)
|
|
61
|
-
* - authorOnly : boolean – render author name only (maps to "textcite")
|
|
62
|
-
* - suppressAuthor : boolean – suppress author name (ignored, maps to default)
|
|
63
|
-
* - authorYear : boolean – render author name and year (maps to "textcite")
|
|
64
|
-
*
|
|
65
|
-
* `format` on the returned citation node matches the Fidus Writer citation schema:
|
|
66
|
-
* - "textcite" when authorOnly or authorYear is set on the (single) item (biblatex \textcite)
|
|
67
|
-
* - "autocite" otherwise, including when suppressAuthor is set (biblatex \autocite)
|
|
68
|
-
*
|
|
69
|
-
* @param {Object} result CitationResult from a static parser method
|
|
70
|
-
* @param {Object} bibliography Fidus Writer bibliography (mutated in place)
|
|
71
|
-
* @returns {Object|null} ProseMirror citation node or null
|
|
72
|
-
*/
|
|
73
34
|
export function citationResultToNode(result, bibliography, bibDB = false) {
|
|
74
35
|
if (!result || !result.isCitation || !result.entries) {
|
|
75
36
|
return null;
|
|
@@ -80,9 +41,7 @@ export function citationResultToNode(result, bibliography, bibDB = false) {
|
|
|
80
41
|
return null;
|
|
81
42
|
}
|
|
82
43
|
const keyMap = mergeBibEntries(entries, bibliography, bibDB);
|
|
83
|
-
|
|
84
|
-
//
|
|
85
|
-
const references = Object.entries(entries).map(([_entryId, entry]) => {
|
|
44
|
+
const references = Object.entries(entries).map(([, entry]) => {
|
|
86
45
|
const entryKey = entry.entry_key;
|
|
87
46
|
const entryMetadata = metadata.find(meta => meta.entry_key === entryKey);
|
|
88
47
|
return {
|
|
@@ -94,13 +53,6 @@ export function citationResultToNode(result, bibliography, bibDB = false) {
|
|
|
94
53
|
if (references.length === 0) {
|
|
95
54
|
return null;
|
|
96
55
|
}
|
|
97
|
-
// Determine citation format from the first item's metadata flags.
|
|
98
|
-
// "textcite" corresponds to biblatex's \textcite (author-in-text / authorYear).
|
|
99
|
-
// Even authorOnly comes through as "textcite" since it's a similar concept.
|
|
100
|
-
// Everything else, including suppressAuthor, falls back to "autocite".
|
|
101
|
-
// TODO: When an authorOnly citation is followed directly by a suppressAuthor
|
|
102
|
-
// citation, this would display the same as a single authorYear citation and
|
|
103
|
-
// should be treated as such.
|
|
104
56
|
const format = metadata.length === 1 &&
|
|
105
57
|
(metadata[0].authorOnly || metadata[0].authorYear)
|
|
106
58
|
? "textcite"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"citations.js","sourceRoot":"","sources":["../../src/importer/citations.
|
|
1
|
+
{"version":3,"file":"citations.js","sourceRoot":"","sources":["../../src/importer/citations.ts"],"names":[],"mappings":"AAAA;;GAEG;AA4BH,SAAS,eAAe,CACpB,OAAsC,EACtC,YAA2C,EAC3C,KAAoB;IAEpB,MAAM,MAAM,GAA2B,EAAE,CAAA;IAEzC,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;QACzC,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;YAC7B,SAAQ;QACZ,CAAC;QACD,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAA;QAEhC,+DAA+D;QAC/D,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,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,UAAU;SACb;KACJ,CAAA;AACL,CAAC"}
|
|
@@ -1,39 +1,29 @@
|
|
|
1
|
+
import type { FidusNode } from "../../types.js";
|
|
2
|
+
import type { XMLElement } from "../../exporter/tools/xml.js";
|
|
1
3
|
/**
|
|
2
4
|
* Check whether a field instruction string belongs to a citation.
|
|
3
5
|
* Uses DocxCitationsParser.fieldCitation() with retrieve=false so no BibDB
|
|
4
6
|
* is allocated for the check.
|
|
5
|
-
*
|
|
6
|
-
* @param {string} instrText - Concatenated w:instrText content
|
|
7
|
-
* @returns {boolean}
|
|
8
7
|
*/
|
|
9
|
-
export function isDocxCitationField(instrText: string): boolean;
|
|
8
|
+
export declare function isDocxCitationField(instrText: string): boolean;
|
|
10
9
|
/**
|
|
11
10
|
* Check whether a field instruction string belongs to a bibliography region
|
|
12
11
|
* (Zotero ZOTERO_BIBL, Word native BIBLIOGRAPHY, EN.REFLIST, etc.).
|
|
13
12
|
* Uses DocxCitationsParser.fieldBibliography() with the accumulated
|
|
14
13
|
* instruction text between begin and separate markers.
|
|
15
|
-
*
|
|
16
|
-
* @param {string} instrText - Concatenated w:instrText content
|
|
17
|
-
* @returns {boolean}
|
|
18
14
|
*/
|
|
19
|
-
export function isDocxBibliographyField(instrText: string): boolean;
|
|
15
|
+
export declare function isDocxBibliographyField(instrText: string): boolean;
|
|
20
16
|
/**
|
|
21
17
|
* Check whether a w:sdt node contains a citation (Mendeley v3, Citavi).
|
|
22
18
|
* Uses DocxCitationsParser.sdtCitation() with retrieve=false.
|
|
23
|
-
*
|
|
24
|
-
* @param {Object} sdtNode - The parsed w:sdt XMLElement node
|
|
25
|
-
* @returns {boolean}
|
|
26
19
|
*/
|
|
27
|
-
export function isDocxSdtCitation(sdtNode:
|
|
20
|
+
export declare function isDocxSdtCitation(sdtNode: XMLElement | null | undefined): boolean;
|
|
28
21
|
/**
|
|
29
22
|
* Check whether a w:sdt node is a bibliography rendering region
|
|
30
23
|
* (Mendeley v3 bibliography, Citavi bibliography).
|
|
31
24
|
* Uses DocxCitationsParser.sdtBibliography().
|
|
32
|
-
*
|
|
33
|
-
* @param {Object} sdtNode - The parsed w:sdt XMLElement node
|
|
34
|
-
* @returns {boolean}
|
|
35
25
|
*/
|
|
36
|
-
export function isDocxSdtBibliography(sdtNode:
|
|
26
|
+
export declare function isDocxSdtBibliography(sdtNode: XMLElement | null | undefined): boolean;
|
|
37
27
|
/**
|
|
38
28
|
* Parse a citation from a DOCX field instruction and add any new bibliography
|
|
39
29
|
* entries into `bibliography`.
|
|
@@ -41,25 +31,13 @@ export function isDocxSdtBibliography(sdtNode: Object): boolean;
|
|
|
41
31
|
* Handles all field-based citation managers: Zotero, Mendeley Desktop
|
|
42
32
|
* (legacy), EndNote (both inline and fldData forms), Citavi (older ADDIN
|
|
43
33
|
* form), and Word native (requires sourcesXml).
|
|
44
|
-
*
|
|
45
|
-
* @param {string} instrText - Concatenated w:instrText for this field
|
|
46
|
-
* @param {string|null} fldData - Base64 content of w:fldData (EndNote),
|
|
47
|
-
* or null/undefined if absent
|
|
48
|
-
* @param {string|null} sourcesXml - Content of customXml/item1.xml (required
|
|
49
|
-
* only for Word-native citations)
|
|
50
|
-
* @param {Object} bibliography - Fidus Writer bibliography (mutated)
|
|
51
|
-
* @returns {Object|null} ProseMirror citation node or null
|
|
52
34
|
*/
|
|
53
|
-
export function parseDocxFieldCitation(instrText: string, fldData: string | null, sourcesXml: string | null, bibliography:
|
|
35
|
+
export declare function parseDocxFieldCitation(instrText: string, fldData: string | null | undefined, sourcesXml: string | null | undefined, bibliography: Record<string, any>): FidusNode | null;
|
|
54
36
|
/**
|
|
55
37
|
* Parse a citation from a DOCX structured document tag (w:sdt) and add any
|
|
56
38
|
* new bibliography entries into `bibliography`.
|
|
57
39
|
*
|
|
58
40
|
* Handles Mendeley Cite v3 and Citavi (modern SDT form).
|
|
59
|
-
*
|
|
60
|
-
* @param {Object} sdtNode - The parsed w:sdt XMLElement node
|
|
61
|
-
* @param {Object} bibliography - Fidus Writer bibliography (mutated)
|
|
62
|
-
* @returns {Object|null} ProseMirror citation node or null
|
|
63
41
|
*/
|
|
64
|
-
export function parseDocxSdtCitation(sdtNode:
|
|
42
|
+
export declare function parseDocxSdtCitation(sdtNode: XMLElement | null | undefined, bibliography: Record<string, any>): FidusNode | null;
|
|
65
43
|
//# sourceMappingURL=citations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"citations.d.ts","sourceRoot":"","sources":["../../../src/importer/docx/citations.
|
|
1
|
+
{"version":3,"file":"citations.d.ts","sourceRoot":"","sources":["../../../src/importer/docx/citations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAQ,SAAS,EAAC,MAAM,gBAAgB,CAAA;AACpD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAA;AAE3D;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAK9D;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAMlE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC7B,OAAO,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GACvC,OAAO,CAKT;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACjC,OAAO,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GACvC,OAAO,CAKT;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAClC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAClC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACrC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAClC,SAAS,GAAG,IAAI,CAclB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAChC,OAAO,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,EACtC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAClC,SAAS,GAAG,IAAI,CAUlB"}
|
|
@@ -4,9 +4,6 @@ import { citationResultToNode } from "../citations.js";
|
|
|
4
4
|
* Check whether a field instruction string belongs to a citation.
|
|
5
5
|
* Uses DocxCitationsParser.fieldCitation() with retrieve=false so no BibDB
|
|
6
6
|
* is allocated for the check.
|
|
7
|
-
*
|
|
8
|
-
* @param {string} instrText - Concatenated w:instrText content
|
|
9
|
-
* @returns {boolean}
|
|
10
7
|
*/
|
|
11
8
|
export function isDocxCitationField(instrText) {
|
|
12
9
|
if (!instrText) {
|
|
@@ -19,9 +16,6 @@ export function isDocxCitationField(instrText) {
|
|
|
19
16
|
* (Zotero ZOTERO_BIBL, Word native BIBLIOGRAPHY, EN.REFLIST, etc.).
|
|
20
17
|
* Uses DocxCitationsParser.fieldBibliography() with the accumulated
|
|
21
18
|
* instruction text between begin and separate markers.
|
|
22
|
-
*
|
|
23
|
-
* @param {string} instrText - Concatenated w:instrText content
|
|
24
|
-
* @returns {boolean}
|
|
25
19
|
*/
|
|
26
20
|
export function isDocxBibliographyField(instrText) {
|
|
27
21
|
if (!instrText) {
|
|
@@ -32,9 +26,6 @@ export function isDocxBibliographyField(instrText) {
|
|
|
32
26
|
/**
|
|
33
27
|
* Check whether a w:sdt node contains a citation (Mendeley v3, Citavi).
|
|
34
28
|
* Uses DocxCitationsParser.sdtCitation() with retrieve=false.
|
|
35
|
-
*
|
|
36
|
-
* @param {Object} sdtNode - The parsed w:sdt XMLElement node
|
|
37
|
-
* @returns {boolean}
|
|
38
29
|
*/
|
|
39
30
|
export function isDocxSdtCitation(sdtNode) {
|
|
40
31
|
if (!sdtNode) {
|
|
@@ -46,9 +37,6 @@ export function isDocxSdtCitation(sdtNode) {
|
|
|
46
37
|
* Check whether a w:sdt node is a bibliography rendering region
|
|
47
38
|
* (Mendeley v3 bibliography, Citavi bibliography).
|
|
48
39
|
* Uses DocxCitationsParser.sdtBibliography().
|
|
49
|
-
*
|
|
50
|
-
* @param {Object} sdtNode - The parsed w:sdt XMLElement node
|
|
51
|
-
* @returns {boolean}
|
|
52
40
|
*/
|
|
53
41
|
export function isDocxSdtBibliography(sdtNode) {
|
|
54
42
|
if (!sdtNode) {
|
|
@@ -63,14 +51,6 @@ export function isDocxSdtBibliography(sdtNode) {
|
|
|
63
51
|
* Handles all field-based citation managers: Zotero, Mendeley Desktop
|
|
64
52
|
* (legacy), EndNote (both inline and fldData forms), Citavi (older ADDIN
|
|
65
53
|
* form), and Word native (requires sourcesXml).
|
|
66
|
-
*
|
|
67
|
-
* @param {string} instrText - Concatenated w:instrText for this field
|
|
68
|
-
* @param {string|null} fldData - Base64 content of w:fldData (EndNote),
|
|
69
|
-
* or null/undefined if absent
|
|
70
|
-
* @param {string|null} sourcesXml - Content of customXml/item1.xml (required
|
|
71
|
-
* only for Word-native citations)
|
|
72
|
-
* @param {Object} bibliography - Fidus Writer bibliography (mutated)
|
|
73
|
-
* @returns {Object|null} ProseMirror citation node or null
|
|
74
54
|
*/
|
|
75
55
|
export function parseDocxFieldCitation(instrText, fldData, sourcesXml, bibliography) {
|
|
76
56
|
if (!instrText) {
|
|
@@ -81,18 +61,13 @@ export function parseDocxFieldCitation(instrText, fldData, sourcesXml, bibliogra
|
|
|
81
61
|
true, // retrieveMetadata
|
|
82
62
|
true, // extractWordNative
|
|
83
63
|
fldData || undefined, options);
|
|
84
|
-
|
|
85
|
-
return node;
|
|
64
|
+
return citationResultToNode(result, bibliography);
|
|
86
65
|
}
|
|
87
66
|
/**
|
|
88
67
|
* Parse a citation from a DOCX structured document tag (w:sdt) and add any
|
|
89
68
|
* new bibliography entries into `bibliography`.
|
|
90
69
|
*
|
|
91
70
|
* Handles Mendeley Cite v3 and Citavi (modern SDT form).
|
|
92
|
-
*
|
|
93
|
-
* @param {Object} sdtNode - The parsed w:sdt XMLElement node
|
|
94
|
-
* @param {Object} bibliography - Fidus Writer bibliography (mutated)
|
|
95
|
-
* @returns {Object|null} ProseMirror citation node or null
|
|
96
71
|
*/
|
|
97
72
|
export function parseDocxSdtCitation(sdtNode, bibliography) {
|
|
98
73
|
if (!sdtNode) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"citations.js","sourceRoot":"","sources":["../../../src/importer/docx/citations.
|
|
1
|
+
{"version":3,"file":"citations.js","sourceRoot":"","sources":["../../../src/importer/docx/citations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,wBAAwB,CAAA;AAE1D,OAAO,EAAC,oBAAoB,EAAC,MAAM,iBAAiB,CAAA;AAIpD;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAAiB;IACjD,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,OAAO,KAAK,CAAA;IAChB,CAAC;IACD,OAAO,mBAAmB,CAAC,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,UAAU,CAAA;AACzE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAAC,SAAiB;IACrD,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,OAAO,KAAK,CAAA;IAChB,CAAC;IAED,OAAO,mBAAmB,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,cAAc,CAAA;AAC1E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAC7B,OAAsC;IAEtC,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,OAAO,KAAK,CAAA;IAChB,CAAC;IACD,OAAO,mBAAmB,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,UAAU,CAAA;AAC9E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACjC,OAAsC;IAEtC,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,OAAO,KAAK,CAAA;IAChB,CAAC;IACD,OAAO,mBAAmB,CAAC,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,cAAc,CAAA;AAC/E,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAClC,SAAiB,EACjB,OAAkC,EAClC,UAAqC,EACrC,YAAiC;IAEjC,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,OAAO,IAAI,CAAA;IACf,CAAC;IACD,MAAM,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,EAAC,UAAU,EAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAC9C,MAAM,MAAM,GAAG,mBAAmB,CAAC,aAAa,CAC5C,SAAS,EACT,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,oBAAoB;IAC1B,OAAO,IAAI,SAAS,EACpB,OAAO,CACV,CAAA;IACD,OAAO,oBAAoB,CAAC,MAAa,EAAE,YAAY,CAAC,CAAA;AAC5D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAChC,OAAsC,EACtC,YAAiC;IAEjC,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,OAAO,IAAI,CAAA;IACf,CAAC;IACD,MAAM,MAAM,GAAG,mBAAmB,CAAC,WAAW,CAC1C,OAAO,CAAC,QAAQ,EAChB,IAAI,EAAE,WAAW;IACjB,IAAI,CAAC,mBAAmB;KAC3B,CAAA;IACD,OAAO,oBAAoB,CAAC,MAAa,EAAE,YAAY,CAAC,CAAA;AAC5D,CAAC"}
|
|
@@ -1,58 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { DocxParser } from "./parse.js";
|
|
2
|
+
import type { FidusDoc, ImageDBEntry } from "../../types.js";
|
|
3
|
+
export declare class DocxConvert {
|
|
3
4
|
zip: any;
|
|
4
|
-
importId:
|
|
5
|
-
template:
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
importId: string;
|
|
6
|
+
template: {
|
|
7
|
+
content: FidusDoc;
|
|
8
|
+
};
|
|
9
|
+
bibliography: Record<string, any>;
|
|
10
|
+
images: Record<number, ImageDBEntry>;
|
|
8
11
|
parser: DocxParser;
|
|
9
|
-
tracks:
|
|
12
|
+
tracks: Record<string, any>;
|
|
10
13
|
currentTracks: any[];
|
|
11
14
|
currentFields: any[];
|
|
12
|
-
currentCommentIds:
|
|
13
|
-
sourcesXml:
|
|
15
|
+
currentCommentIds: string[];
|
|
16
|
+
sourcesXml: string | null;
|
|
17
|
+
referenceTargets: Record<string, {
|
|
18
|
+
id: string;
|
|
19
|
+
type: string;
|
|
20
|
+
text?: string;
|
|
21
|
+
}>;
|
|
22
|
+
constructor(zip: any, importId: string, template: {
|
|
23
|
+
content: FidusDoc;
|
|
24
|
+
}, bibliography: Record<string, any>);
|
|
14
25
|
init(): Promise<{
|
|
15
|
-
content:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
settings: {
|
|
20
|
-
import_id: any;
|
|
21
|
-
tracked: boolean;
|
|
22
|
-
language: string;
|
|
23
|
-
};
|
|
24
|
-
comments: {};
|
|
25
|
-
} | {
|
|
26
|
-
content: {
|
|
27
|
-
type: string;
|
|
28
|
-
attrs: {
|
|
29
|
-
import_id: any;
|
|
30
|
-
};
|
|
31
|
-
content: never[];
|
|
32
|
-
};
|
|
33
|
-
settings: {
|
|
34
|
-
import_id: any;
|
|
35
|
-
tracked: boolean;
|
|
36
|
-
language: any;
|
|
37
|
-
};
|
|
38
|
-
comments: {};
|
|
26
|
+
content: FidusDoc;
|
|
27
|
+
settings: Record<string, any>;
|
|
28
|
+
comments: Record<string, any>;
|
|
39
29
|
}>;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
attrs: {
|
|
44
|
-
import_id: any;
|
|
45
|
-
};
|
|
46
|
-
content: never[];
|
|
47
|
-
};
|
|
48
|
-
extractMetadata(body: any): {
|
|
49
|
-
type: string;
|
|
50
|
-
content: {
|
|
51
|
-
content: any;
|
|
52
|
-
containerNodes: any;
|
|
53
|
-
};
|
|
54
|
-
}[];
|
|
55
|
-
extractContributorsFromCustomProps(): {};
|
|
30
|
+
convertDocument(body: any): FidusDoc;
|
|
31
|
+
extractMetadata(body: any): any[];
|
|
32
|
+
extractContributorsFromCustomProps(): Record<string, any>;
|
|
56
33
|
extractAuthors(body: any): {
|
|
57
34
|
content: any[];
|
|
58
35
|
containerNodes: any;
|
|
@@ -65,31 +42,23 @@ export class DocxConvert {
|
|
|
65
42
|
content: any;
|
|
66
43
|
containerNodes: any;
|
|
67
44
|
};
|
|
68
|
-
extractPartOnTitle(body: any, titleWords: any, maxPars?:
|
|
45
|
+
extractPartOnTitle(body: any, titleWords: any, maxPars?: any): {
|
|
69
46
|
header: any;
|
|
70
47
|
content: any[];
|
|
71
48
|
};
|
|
72
|
-
groupContentIntoSections(body: any):
|
|
73
|
-
title: null;
|
|
74
|
-
content: never[];
|
|
75
|
-
}[];
|
|
49
|
+
groupContentIntoSections(body: any): any[];
|
|
76
50
|
getSectionTitle(node: any, style: any): any;
|
|
77
51
|
findMatchingTemplatePart(sectionTitle: any, templateParts: any): any;
|
|
78
|
-
isSimilarTitle(title1: any, title2: any):
|
|
52
|
+
isSimilarTitle(title1: any, title2: any): boolean;
|
|
79
53
|
getTextContent(node: any): any;
|
|
80
54
|
extractTitle(body: any): {
|
|
81
55
|
content: any[];
|
|
82
56
|
containerNodes: any[];
|
|
83
57
|
};
|
|
84
58
|
inBibliography(node: any): boolean;
|
|
85
|
-
convertBlock(node: any, skippedBlocks?: any
|
|
59
|
+
convertBlock(node: any, skippedBlocks?: any): any;
|
|
86
60
|
wrapTrackChanges(node: any, content: any): any;
|
|
87
|
-
getTracksFromNode(node: any):
|
|
88
|
-
type: string;
|
|
89
|
-
user: number;
|
|
90
|
-
username: any;
|
|
91
|
-
date: number;
|
|
92
|
-
}[] | null;
|
|
61
|
+
getTracksFromNode(node: any): any[] | null;
|
|
93
62
|
getParaStyle(node: any): any;
|
|
94
63
|
convertParagraph(node: any): {
|
|
95
64
|
type: string;
|
|
@@ -140,7 +109,7 @@ export class DocxConvert {
|
|
|
140
109
|
})[];
|
|
141
110
|
}[];
|
|
142
111
|
};
|
|
143
|
-
convertFigure(node: any, captionNode?:
|
|
112
|
+
convertFigure(node: any, captionNode?: any): {
|
|
144
113
|
type: string;
|
|
145
114
|
attrs: {
|
|
146
115
|
id: string;
|
|
@@ -148,19 +117,11 @@ export class DocxConvert {
|
|
|
148
117
|
width: number;
|
|
149
118
|
caption: boolean;
|
|
150
119
|
};
|
|
151
|
-
content:
|
|
152
|
-
type: string;
|
|
153
|
-
content: any[];
|
|
154
|
-
} | {
|
|
155
|
-
type: string;
|
|
156
|
-
attrs: {
|
|
157
|
-
image: number;
|
|
158
|
-
};
|
|
159
|
-
})[];
|
|
120
|
+
content: Record<string, any>[];
|
|
160
121
|
} | null;
|
|
161
122
|
convertInline(node: any): any[];
|
|
162
|
-
findReferenceTargets(document: any):
|
|
163
|
-
convertFootnote(id: any, isEndnote?:
|
|
123
|
+
findReferenceTargets(document: any): Record<string, any>;
|
|
124
|
+
convertFootnote(id: any, isEndnote?: any): {
|
|
164
125
|
type: string;
|
|
165
126
|
attrs: {
|
|
166
127
|
footnote: any[];
|
|
@@ -181,48 +142,9 @@ export class DocxConvert {
|
|
|
181
142
|
title: any;
|
|
182
143
|
};
|
|
183
144
|
};
|
|
184
|
-
createMarksFromFormatting(formatting: any, insertion?:
|
|
185
|
-
|
|
186
|
-
attrs?: undefined;
|
|
187
|
-
} | {
|
|
188
|
-
type: string;
|
|
189
|
-
attrs: {
|
|
190
|
-
user: number;
|
|
191
|
-
username: any;
|
|
192
|
-
date: number;
|
|
193
|
-
approved: boolean;
|
|
194
|
-
};
|
|
195
|
-
} | {
|
|
196
|
-
type: string;
|
|
197
|
-
attrs: {
|
|
198
|
-
user: number;
|
|
199
|
-
username: any;
|
|
200
|
-
date: number;
|
|
201
|
-
approved?: undefined;
|
|
202
|
-
};
|
|
203
|
-
})[];
|
|
204
|
-
getCurrentMarks(formatting: any, insertion: any, deletion: any): ({
|
|
205
|
-
type: string;
|
|
206
|
-
attrs?: undefined;
|
|
207
|
-
} | {
|
|
208
|
-
type: string;
|
|
209
|
-
attrs: {
|
|
210
|
-
user: number;
|
|
211
|
-
username: any;
|
|
212
|
-
date: number;
|
|
213
|
-
approved: boolean;
|
|
214
|
-
};
|
|
215
|
-
} | {
|
|
216
|
-
type: string;
|
|
217
|
-
attrs: {
|
|
218
|
-
user: number;
|
|
219
|
-
username: any;
|
|
220
|
-
date: number;
|
|
221
|
-
approved?: undefined;
|
|
222
|
-
};
|
|
223
|
-
})[];
|
|
145
|
+
createMarksFromFormatting(formatting: any, insertion?: any, deletion?: any): any[];
|
|
146
|
+
getCurrentMarks(formatting: any, insertion?: any, deletion?: any): any[];
|
|
224
147
|
hasTrackedChanges(doc: any): boolean;
|
|
225
|
-
detectLanguage(doc: any):
|
|
148
|
+
detectLanguage(doc: any): string;
|
|
226
149
|
}
|
|
227
|
-
import { DocxParser } from "./parse.js";
|
|
228
150
|
//# sourceMappingURL=convert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../src/importer/docx/convert.
|
|
1
|
+
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../src/importer/docx/convert.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAA;AAErC,OAAO,KAAK,EAAQ,QAAQ,EAAa,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAS5E,qBAAa,WAAW;IACpB,GAAG,EAAE,GAAG,CAAA;IACR,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE;QAAC,OAAO,EAAE,QAAQ,CAAA;KAAC,CAAA;IAC7B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IACpC,MAAM,EAAE,UAAU,CAAA;IAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GA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