@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.
- package/README.md +22 -1
- package/dist/bibliography/common.d.ts +92 -0
- package/dist/bibliography/common.d.ts.map +1 -0
- package/dist/bibliography/common.js +85 -0
- package/dist/bibliography/common.js.map +1 -0
- package/dist/bibliography/csl_bib.d.ts +3 -0
- package/dist/bibliography/csl_bib.d.ts.map +1 -0
- package/dist/bibliography/csl_bib.js +131 -0
- package/dist/bibliography/csl_bib.js.map +1 -0
- package/dist/citations/citeproc_sys.d.ts +13 -0
- package/dist/citations/citeproc_sys.d.ts.map +1 -0
- package/dist/citations/citeproc_sys.js +43 -0
- package/dist/citations/citeproc_sys.js.map +1 -0
- package/dist/citations/format.d.ts +23 -0
- package/dist/citations/format.d.ts.map +1 -0
- package/dist/citations/format.js +161 -0
- package/dist/citations/format.js.map +1 -0
- package/dist/editor/e2ee/encryptor.d.ts +123 -0
- package/dist/editor/e2ee/encryptor.d.ts.map +1 -0
- package/dist/editor/e2ee/encryptor.js +201 -0
- package/dist/editor/e2ee/encryptor.js.map +1 -0
- package/dist/exporter/docx/citations.d.ts +21 -0
- package/dist/exporter/docx/citations.d.ts.map +1 -0
- package/dist/exporter/docx/citations.js +154 -0
- package/dist/exporter/docx/citations.js.map +1 -0
- package/dist/exporter/docx/comments.d.ts +18 -0
- package/dist/exporter/docx/comments.d.ts.map +1 -0
- package/dist/exporter/docx/comments.js +137 -0
- package/dist/exporter/docx/comments.js.map +1 -0
- package/dist/exporter/docx/footnotes.d.ts +42 -0
- package/dist/exporter/docx/footnotes.d.ts.map +1 -0
- package/dist/exporter/docx/footnotes.js +182 -0
- package/dist/exporter/docx/footnotes.js.map +1 -0
- package/dist/exporter/docx/images.d.ts +14 -0
- package/dist/exporter/docx/images.d.ts.map +1 -0
- package/dist/exporter/docx/images.js +86 -0
- package/dist/exporter/docx/images.js.map +1 -0
- package/dist/exporter/docx/index.d.ts +22 -0
- package/dist/exporter/docx/index.d.ts.map +1 -0
- package/dist/exporter/docx/index.js +107 -0
- package/dist/exporter/docx/index.js.map +1 -0
- package/dist/exporter/docx/lists.d.ts +33 -0
- package/dist/exporter/docx/lists.d.ts.map +1 -0
- package/dist/exporter/docx/lists.js +229 -0
- package/dist/exporter/docx/lists.js.map +1 -0
- package/dist/exporter/docx/math.d.ts +13 -0
- package/dist/exporter/docx/math.d.ts.map +1 -0
- package/dist/exporter/docx/math.js +42 -0
- package/dist/exporter/docx/math.js.map +1 -0
- package/dist/exporter/docx/metadata.d.ts +14 -0
- package/dist/exporter/docx/metadata.d.ts.map +1 -0
- package/dist/exporter/docx/metadata.js +239 -0
- package/dist/exporter/docx/metadata.js.map +1 -0
- package/dist/exporter/docx/rels.d.ts +25 -0
- package/dist/exporter/docx/rels.d.ts.map +1 -0
- package/dist/exporter/docx/rels.js +168 -0
- package/dist/exporter/docx/rels.js.map +1 -0
- package/dist/exporter/docx/render.d.ts +20 -0
- package/dist/exporter/docx/render.d.ts.map +1 -0
- package/dist/exporter/docx/render.js +774 -0
- package/dist/exporter/docx/render.js.map +1 -0
- package/dist/exporter/docx/richtext.d.ts +25 -0
- package/dist/exporter/docx/richtext.d.ts.map +1 -0
- package/dist/exporter/docx/richtext.js +1052 -0
- package/dist/exporter/docx/richtext.js.map +1 -0
- package/dist/exporter/docx/tables.d.ts +14 -0
- package/dist/exporter/docx/tables.d.ts.map +1 -0
- package/dist/exporter/docx/tables.js +109 -0
- package/dist/exporter/docx/tables.js.map +1 -0
- package/dist/exporter/docx/tools.d.ts +3 -0
- package/dist/exporter/docx/tools.d.ts.map +1 -0
- package/dist/exporter/docx/tools.js +48 -0
- package/dist/exporter/docx/tools.js.map +1 -0
- package/dist/exporter/epub/index.d.ts +11 -0
- package/dist/exporter/epub/index.d.ts.map +1 -0
- package/dist/exporter/epub/index.js +102 -0
- package/dist/exporter/epub/index.js.map +1 -0
- package/dist/exporter/epub/templates.d.ts +32 -0
- package/dist/exporter/epub/templates.d.ts.map +1 -0
- package/dist/exporter/epub/templates.js +95 -0
- package/dist/exporter/epub/templates.js.map +1 -0
- package/dist/exporter/epub/tools.d.ts +5 -0
- package/dist/exporter/epub/tools.d.ts.map +1 -0
- package/dist/exporter/epub/tools.js +81 -0
- package/dist/exporter/epub/tools.js.map +1 -0
- package/dist/exporter/html/citations.d.ts +27 -0
- package/dist/exporter/html/citations.d.ts.map +1 -0
- package/dist/exporter/html/citations.js +91 -0
- package/dist/exporter/html/citations.js.map +1 -0
- package/dist/exporter/html/convert.d.ts +100 -0
- package/dist/exporter/html/convert.d.ts.map +1 -0
- package/dist/exporter/html/convert.js +718 -0
- package/dist/exporter/html/convert.js.map +1 -0
- package/dist/exporter/html/index.d.ts +61 -0
- package/dist/exporter/html/index.d.ts.map +1 -0
- package/dist/exporter/html/index.js +134 -0
- package/dist/exporter/html/index.js.map +1 -0
- package/dist/exporter/html/templates.d.ts +10 -0
- package/dist/exporter/html/templates.d.ts.map +1 -0
- package/dist/exporter/html/templates.js +21 -0
- package/dist/exporter/html/templates.js.map +1 -0
- package/dist/exporter/html/tools.d.ts +2 -0
- package/dist/exporter/html/tools.d.ts.map +1 -0
- package/dist/exporter/html/tools.js +49 -0
- package/dist/exporter/html/tools.js.map +1 -0
- package/dist/exporter/jats/bibliography.d.ts +2 -0
- package/dist/exporter/jats/bibliography.d.ts.map +1 -0
- package/dist/exporter/jats/bibliography.js +153 -0
- package/dist/exporter/jats/bibliography.js.map +1 -0
- package/dist/exporter/jats/citations.d.ts +14 -0
- package/dist/exporter/jats/citations.d.ts.map +1 -0
- package/dist/exporter/jats/citations.js +83 -0
- package/dist/exporter/jats/citations.js.map +1 -0
- package/dist/exporter/jats/convert.d.ts +45 -0
- package/dist/exporter/jats/convert.d.ts.map +1 -0
- package/dist/exporter/jats/convert.js +799 -0
- package/dist/exporter/jats/convert.js.map +1 -0
- package/dist/exporter/jats/index.d.ts +19 -0
- package/dist/exporter/jats/index.d.ts.map +1 -0
- package/dist/exporter/jats/index.js +66 -0
- package/dist/exporter/jats/index.js.map +1 -0
- package/dist/exporter/jats/templates.d.ts +16 -0
- package/dist/exporter/jats/templates.d.ts.map +1 -0
- package/dist/exporter/jats/templates.js +25 -0
- package/dist/exporter/jats/templates.js.map +1 -0
- package/dist/exporter/jats/text.d.ts +3 -0
- package/dist/exporter/jats/text.d.ts.map +1 -0
- package/dist/exporter/jats/text.js +72 -0
- package/dist/exporter/jats/text.js.map +1 -0
- package/dist/exporter/latex/convert.d.ts +27 -0
- package/dist/exporter/latex/convert.d.ts.map +1 -0
- package/dist/exporter/latex/convert.js +865 -0
- package/dist/exporter/latex/convert.js.map +1 -0
- package/dist/exporter/latex/escape_latex.d.ts +2 -0
- package/dist/exporter/latex/escape_latex.d.ts.map +1 -0
- package/dist/exporter/latex/escape_latex.js +20 -0
- package/dist/exporter/latex/escape_latex.js.map +1 -0
- package/dist/exporter/latex/index.d.ts +23 -0
- package/dist/exporter/latex/index.d.ts.map +1 -0
- package/dist/exporter/latex/index.js +57 -0
- package/dist/exporter/latex/index.js.map +1 -0
- package/dist/exporter/latex/readme.d.ts +2 -0
- package/dist/exporter/latex/readme.d.ts.map +1 -0
- package/dist/exporter/latex/readme.js +23 -0
- package/dist/exporter/latex/readme.js.map +1 -0
- package/dist/exporter/native/shrink.d.ts +21 -0
- package/dist/exporter/native/shrink.d.ts.map +1 -0
- package/dist/exporter/native/shrink.js +115 -0
- package/dist/exporter/native/shrink.js.map +1 -0
- package/dist/exporter/odt/citations.d.ts +18 -0
- package/dist/exporter/odt/citations.d.ts.map +1 -0
- package/dist/exporter/odt/citations.js +87 -0
- package/dist/exporter/odt/citations.js.map +1 -0
- package/dist/exporter/odt/footnotes.d.ts +25 -0
- package/dist/exporter/odt/footnotes.d.ts.map +1 -0
- package/dist/exporter/odt/footnotes.js +112 -0
- package/dist/exporter/odt/footnotes.js.map +1 -0
- package/dist/exporter/odt/images.d.ts +13 -0
- package/dist/exporter/odt/images.d.ts.map +1 -0
- package/dist/exporter/odt/images.js +98 -0
- package/dist/exporter/odt/images.js.map +1 -0
- package/dist/exporter/odt/index.d.ts +23 -0
- package/dist/exporter/odt/index.d.ts.map +1 -0
- package/dist/exporter/odt/index.js +99 -0
- package/dist/exporter/odt/index.js.map +1 -0
- package/dist/exporter/odt/math.d.ts +13 -0
- package/dist/exporter/odt/math.d.ts.map +1 -0
- package/dist/exporter/odt/math.js +48 -0
- package/dist/exporter/odt/math.js.map +1 -0
- package/dist/exporter/odt/metadata.d.ts +14 -0
- package/dist/exporter/odt/metadata.d.ts.map +1 -0
- package/dist/exporter/odt/metadata.js +203 -0
- package/dist/exporter/odt/metadata.js.map +1 -0
- package/dist/exporter/odt/render.d.ts +24 -0
- package/dist/exporter/odt/render.d.ts.map +1 -0
- package/dist/exporter/odt/render.js +644 -0
- package/dist/exporter/odt/render.js.map +1 -0
- package/dist/exporter/odt/richtext.d.ts +22 -0
- package/dist/exporter/odt/richtext.d.ts.map +1 -0
- package/dist/exporter/odt/richtext.js +728 -0
- package/dist/exporter/odt/richtext.js.map +1 -0
- package/dist/exporter/odt/styles.d.ts +33 -0
- package/dist/exporter/odt/styles.d.ts.map +1 -0
- package/dist/exporter/odt/styles.js +348 -0
- package/dist/exporter/odt/styles.js.map +1 -0
- package/dist/exporter/odt/track.d.ts +11 -0
- package/dist/exporter/odt/track.d.ts.map +1 -0
- package/dist/exporter/odt/track.js +59 -0
- package/dist/exporter/odt/track.js.map +1 -0
- package/dist/exporter/pandoc/citations.d.ts +17 -0
- package/dist/exporter/pandoc/citations.d.ts.map +1 -0
- package/dist/exporter/pandoc/citations.js +85 -0
- package/dist/exporter/pandoc/citations.js.map +1 -0
- package/dist/exporter/pandoc/convert.d.ts +38 -0
- package/dist/exporter/pandoc/convert.d.ts.map +1 -0
- package/dist/exporter/pandoc/convert.js +881 -0
- package/dist/exporter/pandoc/convert.js.map +1 -0
- package/dist/exporter/pandoc/index.d.ts +38 -0
- package/dist/exporter/pandoc/index.d.ts.map +1 -0
- package/dist/exporter/pandoc/index.js +67 -0
- package/dist/exporter/pandoc/index.js.map +1 -0
- package/dist/exporter/pandoc/readme.d.ts +2 -0
- package/dist/exporter/pandoc/readme.d.ts.map +1 -0
- package/dist/exporter/pandoc/readme.js +9 -0
- package/dist/exporter/pandoc/readme.js.map +1 -0
- package/dist/exporter/pandoc/tools.d.ts +6 -0
- package/dist/exporter/pandoc/tools.d.ts.map +1 -0
- package/dist/exporter/pandoc/tools.js +52 -0
- package/dist/exporter/pandoc/tools.js.map +1 -0
- package/dist/exporter/print/index.d.ts +9 -0
- package/dist/exporter/print/index.d.ts.map +1 -0
- package/dist/exporter/print/index.js +140 -0
- package/dist/exporter/print/index.js.map +1 -0
- package/dist/exporter/tools/doc_content.d.ts +7 -0
- package/dist/exporter/tools/doc_content.d.ts.map +1 -0
- package/dist/exporter/tools/doc_content.js +129 -0
- package/dist/exporter/tools/doc_content.js.map +1 -0
- package/dist/exporter/tools/file.d.ts +2 -0
- package/dist/exporter/tools/file.d.ts.map +1 -0
- package/dist/exporter/tools/file.js +10 -0
- package/dist/exporter/tools/file.js.map +1 -0
- package/dist/exporter/tools/json.d.ts +7 -0
- package/dist/exporter/tools/json.d.ts.map +1 -0
- package/dist/exporter/tools/json.js +82 -0
- package/dist/exporter/tools/json.js.map +1 -0
- package/dist/exporter/tools/svg.d.ts +2 -0
- package/dist/exporter/tools/svg.d.ts.map +1 -0
- package/dist/exporter/tools/svg.js +26 -0
- package/dist/exporter/tools/svg.js.map +1 -0
- package/dist/exporter/tools/xml.d.ts +41 -0
- package/dist/exporter/tools/xml.d.ts.map +1 -0
- package/dist/exporter/tools/xml.js +440 -0
- package/dist/exporter/tools/xml.js.map +1 -0
- package/dist/exporter/tools/xml_zip.d.ts +20 -0
- package/dist/exporter/tools/xml_zip.d.ts.map +1 -0
- package/dist/exporter/tools/xml_zip.js +86 -0
- package/dist/exporter/tools/xml_zip.js.map +1 -0
- package/dist/exporter/tools/zip.d.ts +21 -0
- package/dist/exporter/tools/zip.d.ts.map +1 -0
- package/dist/exporter/tools/zip.js +71 -0
- package/dist/exporter/tools/zip.js.map +1 -0
- package/dist/exporter/tools/zotero_csl.d.ts +10 -0
- package/dist/exporter/tools/zotero_csl.d.ts.map +1 -0
- package/dist/exporter/tools/zotero_csl.js +78 -0
- package/dist/exporter/tools/zotero_csl.js.map +1 -0
- package/dist/importer/citations.d.ts +25 -0
- package/dist/importer/citations.d.ts.map +1 -0
- package/dist/importer/citations.js +116 -0
- package/dist/importer/citations.js.map +1 -0
- package/dist/importer/docx/citations.d.ts +65 -0
- package/dist/importer/docx/citations.d.ts.map +1 -0
- package/dist/importer/docx/citations.js +106 -0
- package/dist/importer/docx/citations.js.map +1 -0
- package/dist/importer/docx/convert.d.ts +228 -0
- package/dist/importer/docx/convert.d.ts.map +1 -0
- package/dist/importer/docx/convert.js +1226 -0
- package/dist/importer/docx/convert.js.map +1 -0
- package/dist/importer/docx/helpers.d.ts +2 -0
- package/dist/importer/docx/helpers.d.ts.map +1 -0
- package/dist/importer/docx/helpers.js +10 -0
- package/dist/importer/docx/helpers.js.map +1 -0
- package/dist/importer/docx/omml2mathml.d.ts +7 -0
- package/dist/importer/docx/omml2mathml.d.ts.map +1 -0
- package/dist/importer/docx/omml2mathml.js +1239 -0
- package/dist/importer/docx/omml2mathml.js.map +1 -0
- package/dist/importer/docx/parse.d.ts +205 -0
- package/dist/importer/docx/parse.d.ts.map +1 -0
- package/dist/importer/docx/parse.js +663 -0
- package/dist/importer/docx/parse.js.map +1 -0
- package/dist/importer/native/get_images.d.ts +11 -0
- package/dist/importer/native/get_images.d.ts.map +1 -0
- package/dist/importer/native/get_images.js +64 -0
- package/dist/importer/native/get_images.js.map +1 -0
- package/dist/importer/native/update.d.ts +6 -0
- package/dist/importer/native/update.d.ts.map +1 -0
- package/dist/importer/native/update.js +26 -0
- package/dist/importer/native/update.js.map +1 -0
- package/dist/importer/odt/citations.d.ts +47 -0
- package/dist/importer/odt/citations.d.ts.map +1 -0
- package/dist/importer/odt/citations.js +79 -0
- package/dist/importer/odt/citations.js.map +1 -0
- package/dist/importer/odt/convert.d.ts +330 -0
- package/dist/importer/odt/convert.d.ts.map +1 -0
- package/dist/importer/odt/convert.js +1506 -0
- package/dist/importer/odt/convert.js.map +1 -0
- package/dist/importer/pandoc/convert.d.ts +84 -0
- package/dist/importer/pandoc/convert.d.ts.map +1 -0
- package/dist/importer/pandoc/convert.js +777 -0
- package/dist/importer/pandoc/convert.js.map +1 -0
- package/dist/importer/pandoc/helpers.d.ts +4 -0
- package/dist/importer/pandoc/helpers.d.ts.map +1 -0
- package/dist/importer/pandoc/helpers.js +75 -0
- package/dist/importer/pandoc/helpers.js.map +1 -0
- package/dist/importer/zip_analyzer.d.ts +25 -0
- package/dist/importer/zip_analyzer.d.ts.map +1 -0
- package/dist/importer/zip_analyzer.js +84 -0
- package/dist/importer/zip_analyzer.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/mathlive/opf_includes.d.ts +2 -0
- package/dist/mathlive/opf_includes.d.ts.map +1 -0
- package/dist/mathlive/opf_includes.js +25 -0
- package/dist/mathlive/opf_includes.js.map +1 -0
- package/dist/schema/common/annotate.d.ts +59 -0
- package/dist/schema/common/annotate.d.ts.map +1 -0
- package/dist/schema/common/annotate.js +75 -0
- package/dist/schema/common/annotate.js.map +1 -0
- package/dist/schema/common/base.d.ts +109 -0
- package/dist/schema/common/base.d.ts.map +1 -0
- package/dist/schema/common/base.js +109 -0
- package/dist/schema/common/base.js.map +1 -0
- package/dist/schema/common/citation.d.ts +29 -0
- package/dist/schema/common/citation.d.ts.map +1 -0
- package/dist/schema/common/citation.js +62 -0
- package/dist/schema/common/citation.js.map +1 -0
- package/dist/schema/common/equation.d.ts +18 -0
- package/dist/schema/common/equation.d.ts.map +1 -0
- package/dist/schema/common/equation.js +32 -0
- package/dist/schema/common/equation.js.map +1 -0
- package/dist/schema/common/figure.d.ts +108 -0
- package/dist/schema/common/figure.d.ts.map +1 -0
- package/dist/schema/common/figure.js +176 -0
- package/dist/schema/common/figure.js.map +1 -0
- package/dist/schema/common/heading.d.ts +33 -0
- package/dist/schema/common/heading.d.ts.map +1 -0
- package/dist/schema/common/heading.js +41 -0
- package/dist/schema/common/heading.js.map +1 -0
- package/dist/schema/common/index.d.ts +11 -0
- package/dist/schema/common/index.d.ts.map +1 -0
- package/dist/schema/common/index.js +11 -0
- package/dist/schema/common/index.js.map +1 -0
- package/dist/schema/common/list.d.ts +83 -0
- package/dist/schema/common/list.d.ts.map +1 -0
- package/dist/schema/common/list.js +92 -0
- package/dist/schema/common/list.js.map +1 -0
- package/dist/schema/common/reference.d.ts +78 -0
- package/dist/schema/common/reference.d.ts.map +1 -0
- package/dist/schema/common/reference.js +97 -0
- package/dist/schema/common/reference.js.map +1 -0
- package/dist/schema/common/table.d.ts +92 -0
- package/dist/schema/common/table.d.ts.map +1 -0
- package/dist/schema/common/table.js +85 -0
- package/dist/schema/common/table.js.map +1 -0
- package/dist/schema/common/track.d.ts +131 -0
- package/dist/schema/common/track.d.ts.map +1 -0
- package/dist/schema/common/track.js +184 -0
- package/dist/schema/common/track.js.map +1 -0
- package/dist/schema/const.d.ts +3 -0
- package/dist/schema/const.d.ts.map +1 -0
- package/{src → dist}/schema/const.js +3 -3
- package/dist/schema/const.js.map +1 -0
- package/dist/schema/convert.d.ts +3 -0
- package/dist/schema/convert.d.ts.map +1 -0
- package/dist/schema/convert.js +1215 -0
- package/dist/schema/convert.js.map +1 -0
- package/dist/schema/document/content.d.ts +137 -0
- package/dist/schema/document/content.d.ts.map +1 -0
- package/dist/schema/document/content.js +177 -0
- package/dist/schema/document/content.js.map +1 -0
- package/dist/schema/document/index.d.ts +879 -0
- package/dist/schema/document/index.d.ts.map +1 -0
- package/dist/schema/document/index.js +68 -0
- package/dist/schema/document/index.js.map +1 -0
- package/dist/schema/document/structure.d.ts +273 -0
- package/dist/schema/document/structure.d.ts.map +1 -0
- package/dist/schema/document/structure.js +445 -0
- package/dist/schema/document/structure.js.map +1 -0
- package/dist/schema/export.d.ts +880 -0
- package/dist/schema/export.d.ts.map +1 -0
- package/dist/schema/export.js +16 -0
- package/dist/schema/export.js.map +1 -0
- package/dist/schema/footnotes.d.ts +499 -0
- package/dist/schema/footnotes.d.ts.map +1 -0
- package/dist/schema/footnotes.js +88 -0
- package/dist/schema/footnotes.js.map +1 -0
- package/dist/schema/footnotes_convert.d.ts +5 -0
- package/dist/schema/footnotes_convert.d.ts.map +1 -0
- package/dist/schema/footnotes_convert.js +26 -0
- package/dist/schema/footnotes_convert.js.map +1 -0
- package/dist/schema/i18n.d.ts +586 -0
- package/dist/schema/i18n.d.ts.map +1 -0
- package/dist/schema/i18n.js +585 -0
- package/dist/schema/i18n.js.map +1 -0
- package/dist/schema/index.d.ts +6 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +6 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/mini_json.d.ts +5 -0
- package/dist/schema/mini_json.d.ts.map +1 -0
- package/dist/schema/mini_json.js +50 -0
- package/dist/schema/mini_json.js.map +1 -0
- package/dist/schema/text.d.ts +2 -0
- package/dist/schema/text.d.ts.map +1 -0
- package/dist/schema/text.js +23 -0
- package/dist/schema/text.js.map +1 -0
- package/dist/types.d.ts +122 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +9 -0
- package/dist/types.js.map +1 -0
- package/package.json +48 -16
- package/scripts/export-schema.js +1 -1
- package/src/exporter/tools/{file.js → file.ts} +1 -1
- package/src/exporter/tools/{json.js → json.ts} +30 -19
- package/src/global.d.ts +11 -0
- package/src/schema/const.ts +58 -0
- package/src/types.ts +136 -0
- package/jest.config.js +0 -24
- /package/src/{index.js → index.ts} +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { annotation_tag, comment, randomCommentId } from "./annotate.js";
|
|
2
|
+
export { paragraph, blockquote, horizontal_rule, underline, sup, sub, code } from "./base.js";
|
|
3
|
+
export { citation } from "./citation.js";
|
|
4
|
+
export { equation } from "./equation.js";
|
|
5
|
+
export { figure, image, figure_equation, figure_caption, randomFigureId } from "./figure.js";
|
|
6
|
+
export { heading1, heading2, heading3, heading4, heading5, heading6, randomHeadingId } from "./heading.js";
|
|
7
|
+
export { ordered_list, bullet_list, list_item, randomListId } from "./list.js";
|
|
8
|
+
export { cross_reference, anchor, link, randomAnchorId } from "./reference.js";
|
|
9
|
+
export { table, table_caption, table_body, table_row, table_cell, table_header, randomTableId } from "./table.js";
|
|
10
|
+
export { deletion, insertion, format_change, parseTracks } from "./track.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/common/index.js"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,OAAO,EAAE,eAAe,EAAC,MAAM,eAAe,CAAA;AACtE,OAAO,EACH,SAAS,EACT,UAAU,EACV,eAAe,EACf,SAAS,EACT,GAAG,EACH,GAAG,EACH,IAAI,EACP,MAAM,WAAW,CAAA;AAClB,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAA;AACtC,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAA;AACtC,OAAO,EACH,MAAM,EACN,KAAK,EACL,eAAe,EACf,cAAc,EACd,cAAc,EACjB,MAAM,aAAa,CAAA;AACpB,OAAO,EACH,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,eAAe,EAClB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAC,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAC,MAAM,WAAW,CAAA;AAC5E,OAAO,EAAC,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAC,MAAM,gBAAgB,CAAA;AAC5E,OAAO,EACH,KAAK,EACL,aAAa,EACb,UAAU,EACV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,aAAa,EAChB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAC,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export function randomListId(): string;
|
|
2
|
+
export namespace ordered_list {
|
|
3
|
+
let group: string;
|
|
4
|
+
let content: string;
|
|
5
|
+
namespace attrs {
|
|
6
|
+
namespace id {
|
|
7
|
+
let _default: boolean;
|
|
8
|
+
export { _default as default };
|
|
9
|
+
}
|
|
10
|
+
namespace order {
|
|
11
|
+
let _default_1: number;
|
|
12
|
+
export { _default_1 as default };
|
|
13
|
+
}
|
|
14
|
+
namespace track {
|
|
15
|
+
let _default_2: never[];
|
|
16
|
+
export { _default_2 as default };
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
let parseDOM: {
|
|
20
|
+
tag: string;
|
|
21
|
+
getAttrs(dom: any): {
|
|
22
|
+
id: any;
|
|
23
|
+
order: number;
|
|
24
|
+
track: any[];
|
|
25
|
+
};
|
|
26
|
+
}[];
|
|
27
|
+
function toDOM(node: any): (string | number | {
|
|
28
|
+
id: any;
|
|
29
|
+
})[];
|
|
30
|
+
}
|
|
31
|
+
export namespace bullet_list {
|
|
32
|
+
let group_1: string;
|
|
33
|
+
export { group_1 as group };
|
|
34
|
+
let content_1: string;
|
|
35
|
+
export { content_1 as content };
|
|
36
|
+
export namespace attrs_1 {
|
|
37
|
+
export namespace id_1 {
|
|
38
|
+
let _default_3: boolean;
|
|
39
|
+
export { _default_3 as default };
|
|
40
|
+
}
|
|
41
|
+
export { id_1 as id };
|
|
42
|
+
export namespace track_1 {
|
|
43
|
+
let _default_4: never[];
|
|
44
|
+
export { _default_4 as default };
|
|
45
|
+
}
|
|
46
|
+
export { track_1 as track };
|
|
47
|
+
}
|
|
48
|
+
export { attrs_1 as attrs };
|
|
49
|
+
let parseDOM_1: {
|
|
50
|
+
tag: string;
|
|
51
|
+
getAttrs(dom: any): {
|
|
52
|
+
id: any;
|
|
53
|
+
track: any[];
|
|
54
|
+
};
|
|
55
|
+
}[];
|
|
56
|
+
export { parseDOM_1 as parseDOM };
|
|
57
|
+
export function toDOM(node: any): (string | number | {
|
|
58
|
+
id: any;
|
|
59
|
+
})[];
|
|
60
|
+
}
|
|
61
|
+
export namespace list_item {
|
|
62
|
+
let content_2: string;
|
|
63
|
+
export { content_2 as content };
|
|
64
|
+
export let marks: string;
|
|
65
|
+
export namespace attrs_2 {
|
|
66
|
+
export namespace track_2 {
|
|
67
|
+
let _default_5: never[];
|
|
68
|
+
export { _default_5 as default };
|
|
69
|
+
}
|
|
70
|
+
export { track_2 as track };
|
|
71
|
+
}
|
|
72
|
+
export { attrs_2 as attrs };
|
|
73
|
+
let parseDOM_2: {
|
|
74
|
+
tag: string;
|
|
75
|
+
getAttrs(dom: any): {
|
|
76
|
+
track: any[];
|
|
77
|
+
};
|
|
78
|
+
}[];
|
|
79
|
+
export { parseDOM_2 as parseDOM };
|
|
80
|
+
export function toDOM(node: any): {}[];
|
|
81
|
+
export let defining: boolean;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/schema/common/list.js"],"names":[],"mappings":"AAuCA,uCAEC;;;;;;;;;;;;;;;;;;;;;;;;;;IAZG;;SAOC;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2BD;;SAIC;;;;;;;;;;;;;;;;;;;;;IAqBD,uCAIC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { addTracks, parseTracks } from "./track.js";
|
|
2
|
+
// :: NodeSpec
|
|
3
|
+
// An ordered list [node spec](#model.NodeSpec). Has a single
|
|
4
|
+
// attribute, `order`, which determines the number at which the list
|
|
5
|
+
// starts counting, and defaults to 1. Represented as an `<ol>`
|
|
6
|
+
// element.
|
|
7
|
+
export const ordered_list = {
|
|
8
|
+
group: "block",
|
|
9
|
+
content: "list_item+",
|
|
10
|
+
attrs: {
|
|
11
|
+
id: { default: false },
|
|
12
|
+
order: { default: 1 },
|
|
13
|
+
track: { default: [] }
|
|
14
|
+
},
|
|
15
|
+
parseDOM: [
|
|
16
|
+
{
|
|
17
|
+
tag: "ol",
|
|
18
|
+
getAttrs(dom) {
|
|
19
|
+
return {
|
|
20
|
+
id: dom.id,
|
|
21
|
+
order: dom.hasAttribute("start")
|
|
22
|
+
? +dom.getAttribute("start")
|
|
23
|
+
: 1,
|
|
24
|
+
track: parseTracks(dom.dataset.track)
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
toDOM(node) {
|
|
30
|
+
const attrs = { id: node.attrs.id };
|
|
31
|
+
if (node.attrs.order !== 1) {
|
|
32
|
+
attrs.start = node.attrs.order;
|
|
33
|
+
}
|
|
34
|
+
addTracks(node, attrs);
|
|
35
|
+
return ["ol", attrs, 0];
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
export function randomListId() {
|
|
39
|
+
return "L" + Math.round(Math.random() * 10000000) + 1;
|
|
40
|
+
}
|
|
41
|
+
// :: NodeSpec
|
|
42
|
+
// A bullet list node spec, represented in the DOM as `<ul>`.
|
|
43
|
+
export const bullet_list = {
|
|
44
|
+
group: "block",
|
|
45
|
+
content: "list_item+",
|
|
46
|
+
attrs: {
|
|
47
|
+
id: { default: false },
|
|
48
|
+
track: { default: [] }
|
|
49
|
+
},
|
|
50
|
+
parseDOM: [
|
|
51
|
+
{
|
|
52
|
+
tag: "ul",
|
|
53
|
+
getAttrs(dom) {
|
|
54
|
+
return {
|
|
55
|
+
id: dom.id,
|
|
56
|
+
track: parseTracks(dom.dataset.track)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
toDOM(node) {
|
|
62
|
+
const attrs = { id: node.attrs.id };
|
|
63
|
+
addTracks(node, attrs);
|
|
64
|
+
return ["ul", attrs, 0];
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
// :: NodeSpec
|
|
68
|
+
// A list item (`<li>`) spec.
|
|
69
|
+
export const list_item = {
|
|
70
|
+
content: "block+",
|
|
71
|
+
marks: "annotation",
|
|
72
|
+
attrs: {
|
|
73
|
+
track: { default: [] }
|
|
74
|
+
},
|
|
75
|
+
parseDOM: [
|
|
76
|
+
{
|
|
77
|
+
tag: "li",
|
|
78
|
+
getAttrs(dom) {
|
|
79
|
+
return {
|
|
80
|
+
track: parseTracks(dom.dataset.track)
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
toDOM(node) {
|
|
86
|
+
const attrs = {};
|
|
87
|
+
addTracks(node, attrs);
|
|
88
|
+
return ["li", attrs, 0];
|
|
89
|
+
},
|
|
90
|
+
defining: true
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/schema/common/list.js"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,WAAW,EAAC,MAAM,YAAY,CAAA;AAEjD,cAAc;AACd,6DAA6D;AAC7D,oEAAoE;AACpE,+DAA+D;AAC/D,WAAW;AACX,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE;QACH,EAAE,EAAE,EAAC,OAAO,EAAE,KAAK,EAAC;QACpB,KAAK,EAAE,EAAC,OAAO,EAAE,CAAC,EAAC;QACnB,KAAK,EAAE,EAAC,OAAO,EAAE,EAAE,EAAC;KACvB;IACD,QAAQ,EAAE;QACN;YACI,GAAG,EAAE,IAAI;YACT,QAAQ,CAAC,GAAG;gBACR,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,CAAA;YACL,CAAC;SACJ;KACJ;IACD,KAAK,CAAC,IAAI;QACN,MAAM,KAAK,GAAG,EAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,EAAC,CAAA;QACjC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACtB,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAA;IAC3B,CAAC;CACJ,CAAA;AAED,cAAc;AACd,6BAA6B;AAC7B,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,OAAO,EAAE,QAAQ;IACjB,KAAK,EAAE,YAAY;IACnB,KAAK,EAAE;QACH,KAAK,EAAE,EAAC,OAAO,EAAE,EAAE,EAAC;KACvB;IACD,QAAQ,EAAE;QACN;YACI,GAAG,EAAE,IAAI;YACT,QAAQ,CAAC,GAAG;gBACR,OAAO;oBACH,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC;iBACxC,CAAA;YACL,CAAC;SACJ;KACJ;IACD,KAAK,CAAC,IAAI;QACN,MAAM,KAAK,GAAG,EAAE,CAAA;QAChB,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACtB,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAA;IAC3B,CAAC;IACD,QAAQ,EAAE,IAAI;CACjB,CAAA"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export namespace cross_reference {
|
|
2
|
+
let inline: boolean;
|
|
3
|
+
let group: string;
|
|
4
|
+
namespace attrs {
|
|
5
|
+
namespace id {
|
|
6
|
+
let _default: boolean;
|
|
7
|
+
export { _default as default };
|
|
8
|
+
}
|
|
9
|
+
namespace title {
|
|
10
|
+
let _default_1: null;
|
|
11
|
+
export { _default_1 as default };
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
let parseDOM: {
|
|
15
|
+
tag: string;
|
|
16
|
+
getAttrs(dom: any): {
|
|
17
|
+
id: any;
|
|
18
|
+
title: any;
|
|
19
|
+
};
|
|
20
|
+
}[];
|
|
21
|
+
function toDOM(node: any): any[];
|
|
22
|
+
}
|
|
23
|
+
export namespace link {
|
|
24
|
+
export namespace attrs_1 {
|
|
25
|
+
export let href: {};
|
|
26
|
+
export namespace title_1 {
|
|
27
|
+
let _default_2: string;
|
|
28
|
+
export { _default_2 as default };
|
|
29
|
+
}
|
|
30
|
+
export { title_1 as title };
|
|
31
|
+
}
|
|
32
|
+
export { attrs_1 as attrs };
|
|
33
|
+
export let inclusive: boolean;
|
|
34
|
+
let parseDOM_1: {
|
|
35
|
+
tag: string;
|
|
36
|
+
getAttrs(dom: any): {
|
|
37
|
+
href: any;
|
|
38
|
+
title: any;
|
|
39
|
+
};
|
|
40
|
+
}[];
|
|
41
|
+
export { parseDOM_1 as parseDOM };
|
|
42
|
+
export function toDOM(node: any): (string | number | {
|
|
43
|
+
href: any;
|
|
44
|
+
title: any;
|
|
45
|
+
class?: undefined;
|
|
46
|
+
} | {
|
|
47
|
+
href: any;
|
|
48
|
+
title: string;
|
|
49
|
+
class: string;
|
|
50
|
+
})[];
|
|
51
|
+
}
|
|
52
|
+
export function randomAnchorId(): string;
|
|
53
|
+
export namespace anchor {
|
|
54
|
+
export namespace attrs_2 {
|
|
55
|
+
export namespace id_1 {
|
|
56
|
+
let _default_3: boolean;
|
|
57
|
+
export { _default_3 as default };
|
|
58
|
+
}
|
|
59
|
+
export { id_1 as id };
|
|
60
|
+
}
|
|
61
|
+
export { attrs_2 as attrs };
|
|
62
|
+
let inclusive_1: boolean;
|
|
63
|
+
export { inclusive_1 as inclusive };
|
|
64
|
+
let group_1: string;
|
|
65
|
+
export { group_1 as group };
|
|
66
|
+
let parseDOM_2: {
|
|
67
|
+
tag: string;
|
|
68
|
+
getAttrs(dom: any): {
|
|
69
|
+
id: any;
|
|
70
|
+
};
|
|
71
|
+
}[];
|
|
72
|
+
export { parseDOM_2 as parseDOM };
|
|
73
|
+
export function toDOM(node: any): (string | {
|
|
74
|
+
class: string;
|
|
75
|
+
"data-id": any;
|
|
76
|
+
})[];
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=reference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/schema/common/reference.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;IAsBI,iCAUC;;;;;;;;;;;;;;;;;;;;;IAsBD;;;;;;;;SAWC;;AAGE,yCAEN;;;;;;;;;;;;;;;;;;;;;IAoBG;;;SAQC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export const cross_reference = {
|
|
2
|
+
inline: true,
|
|
3
|
+
group: "inline",
|
|
4
|
+
attrs: {
|
|
5
|
+
id: {
|
|
6
|
+
default: false
|
|
7
|
+
},
|
|
8
|
+
title: {
|
|
9
|
+
default: null // title === null means that the target is gone
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
parseDOM: [
|
|
13
|
+
{
|
|
14
|
+
tag: "span.cross-reference[data-id][data-title]",
|
|
15
|
+
getAttrs(dom) {
|
|
16
|
+
return {
|
|
17
|
+
id: dom.dataset.id,
|
|
18
|
+
title: dom.dataset.title
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
toDOM(node) {
|
|
24
|
+
return [
|
|
25
|
+
"span",
|
|
26
|
+
{
|
|
27
|
+
class: `cross-reference${node.attrs.title ? "" : " missing-target"}`,
|
|
28
|
+
"data-id": node.attrs.id,
|
|
29
|
+
"data-title": node.attrs.title
|
|
30
|
+
},
|
|
31
|
+
node.attrs.title ? node.attrs.title : gettext("Missing Target")
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export const link = {
|
|
36
|
+
attrs: {
|
|
37
|
+
href: {},
|
|
38
|
+
title: {
|
|
39
|
+
default: ""
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
inclusive: false,
|
|
43
|
+
parseDOM: [
|
|
44
|
+
{
|
|
45
|
+
tag: "a[href]",
|
|
46
|
+
getAttrs(dom) {
|
|
47
|
+
return {
|
|
48
|
+
href: dom.getAttribute("href"),
|
|
49
|
+
title: dom.getAttribute("title")
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
toDOM(node) {
|
|
55
|
+
const { href, title } = node.attrs;
|
|
56
|
+
const attrs = title || href.charAt(0) !== "#"
|
|
57
|
+
? { href, title }
|
|
58
|
+
: {
|
|
59
|
+
href,
|
|
60
|
+
title: gettext("Missing target"),
|
|
61
|
+
class: "missing-target"
|
|
62
|
+
};
|
|
63
|
+
return ["a", attrs, 0];
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
export const randomAnchorId = () => {
|
|
67
|
+
return `A${Math.round(Math.random() * 10000000) + 1}`;
|
|
68
|
+
};
|
|
69
|
+
export const anchor = {
|
|
70
|
+
attrs: {
|
|
71
|
+
id: {
|
|
72
|
+
default: false
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
inclusive: false,
|
|
76
|
+
group: "annotation",
|
|
77
|
+
parseDOM: [
|
|
78
|
+
{
|
|
79
|
+
tag: "span.anchor[data-id]",
|
|
80
|
+
getAttrs(dom) {
|
|
81
|
+
return {
|
|
82
|
+
id: dom.dataset.id
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
toDOM(node) {
|
|
88
|
+
return [
|
|
89
|
+
"span",
|
|
90
|
+
{
|
|
91
|
+
class: "anchor",
|
|
92
|
+
"data-id": node.attrs.id
|
|
93
|
+
}
|
|
94
|
+
];
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=reference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../../src/schema/common/reference.js"],"names":[],"mappings":"AAAA,MAAM,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IACD,KAAK,CAAC,IAAI;QACN,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,IAAI,CAAC,KAAK,CAAA;QAChC,MAAM,KAAK,GACP,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG;YAC3B,CAAC,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC;YACf,CAAC,CAAC;gBACI,IAAI;gBACJ,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC;gBAChC,KAAK,EAAE,gBAAgB;aAC1B,CAAA;QACX,OAAO,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,CAAA;IAC1B,CAAC;CACJ,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IAC/B,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAA;AACzD,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,KAAK,EAAE;QACH,EAAE,EAAE;YACA,OAAO,EAAE,KAAK;SACjB;KACJ;IACD,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,YAAY;IACnB,QAAQ,EAAE;QACN;YACI,GAAG,EAAE,sBAAsB;YAC3B,QAAQ,CAAC,GAAG;gBACR,OAAO;oBACH,EAAE,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE;iBACrB,CAAA;YACL,CAAC;SACJ;KACJ;IACD,KAAK,CAAC,IAAI;QACN,OAAO;YACH,MAAM;YACN;gBACI,KAAK,EAAE,QAAQ;gBACf,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE;aAC3B;SACJ,CAAA;IACL,CAAC;CACJ,CAAA"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export function randomTableId(): string;
|
|
2
|
+
export namespace table {
|
|
3
|
+
let inline: boolean;
|
|
4
|
+
let group: string;
|
|
5
|
+
let tableRole: string;
|
|
6
|
+
namespace attrs {
|
|
7
|
+
namespace id {
|
|
8
|
+
let _default: boolean;
|
|
9
|
+
export { _default as default };
|
|
10
|
+
}
|
|
11
|
+
namespace track {
|
|
12
|
+
let _default_1: never[];
|
|
13
|
+
export { _default_1 as default };
|
|
14
|
+
}
|
|
15
|
+
namespace width {
|
|
16
|
+
let _default_2: string;
|
|
17
|
+
export { _default_2 as default };
|
|
18
|
+
}
|
|
19
|
+
namespace aligned {
|
|
20
|
+
let _default_3: string;
|
|
21
|
+
export { _default_3 as default };
|
|
22
|
+
}
|
|
23
|
+
namespace layout {
|
|
24
|
+
let _default_4: string;
|
|
25
|
+
export { _default_4 as default };
|
|
26
|
+
}
|
|
27
|
+
namespace category {
|
|
28
|
+
let _default_5: string;
|
|
29
|
+
export { _default_5 as default };
|
|
30
|
+
}
|
|
31
|
+
namespace caption {
|
|
32
|
+
let _default_6: boolean;
|
|
33
|
+
export { _default_6 as default };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
let content: string;
|
|
37
|
+
let parseDOM: {
|
|
38
|
+
tag: string;
|
|
39
|
+
getAttrs(dom: any): {
|
|
40
|
+
track: any[];
|
|
41
|
+
width: any;
|
|
42
|
+
aligned: any;
|
|
43
|
+
layout: any;
|
|
44
|
+
id: any;
|
|
45
|
+
category: any;
|
|
46
|
+
caption: boolean;
|
|
47
|
+
};
|
|
48
|
+
}[];
|
|
49
|
+
function toDOM(node: any): (string | number | {
|
|
50
|
+
id: any;
|
|
51
|
+
class: string;
|
|
52
|
+
"data-width": any;
|
|
53
|
+
"data-aligned": any;
|
|
54
|
+
"data-layout": any;
|
|
55
|
+
"data-category": any;
|
|
56
|
+
})[];
|
|
57
|
+
}
|
|
58
|
+
export namespace table_caption {
|
|
59
|
+
let content_1: string;
|
|
60
|
+
export { content_1 as content };
|
|
61
|
+
let parseDOM_1: {
|
|
62
|
+
tag: string;
|
|
63
|
+
}[];
|
|
64
|
+
export { parseDOM_1 as parseDOM };
|
|
65
|
+
export function toDOM(): (string | (string | number | {
|
|
66
|
+
class: string;
|
|
67
|
+
})[])[];
|
|
68
|
+
}
|
|
69
|
+
export const table_body: import("prosemirror-model").NodeSpec & {
|
|
70
|
+
parseDOM: {
|
|
71
|
+
tag: string;
|
|
72
|
+
}[];
|
|
73
|
+
toDOM(): (string | number)[];
|
|
74
|
+
};
|
|
75
|
+
export namespace table_row {
|
|
76
|
+
let content_2: string;
|
|
77
|
+
export { content_2 as content };
|
|
78
|
+
let tableRole_1: string;
|
|
79
|
+
export { tableRole_1 as tableRole };
|
|
80
|
+
let parseDOM_2: {
|
|
81
|
+
tag: string;
|
|
82
|
+
}[];
|
|
83
|
+
export { parseDOM_2 as parseDOM };
|
|
84
|
+
export function toDOM(): (string | number)[];
|
|
85
|
+
}
|
|
86
|
+
export const table_header: {
|
|
87
|
+
marks: string;
|
|
88
|
+
} & import("prosemirror-model").NodeSpec;
|
|
89
|
+
export const table_cell: {
|
|
90
|
+
marks: string;
|
|
91
|
+
} & import("prosemirror-model").NodeSpec;
|
|
92
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/schema/common/table.js"],"names":[],"mappings":"AAoGA,wCAEC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA/DG;;;;;;;SAgBC;;;;;;;;;IAMD;;YAMC;;AAOL;;;;;EAKE;;;;;;;;;;IAME,6CAEC;;AAGL;;yCAGC;AAED;;yCAGC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { tableNodes } from "prosemirror-tables";
|
|
2
|
+
import { parseTracks } from "./track.js";
|
|
3
|
+
export const table = {
|
|
4
|
+
inline: false,
|
|
5
|
+
group: "block",
|
|
6
|
+
tableRole: "table",
|
|
7
|
+
attrs: {
|
|
8
|
+
id: { default: false },
|
|
9
|
+
track: { default: [] },
|
|
10
|
+
width: { default: "100" },
|
|
11
|
+
aligned: { default: "center" },
|
|
12
|
+
layout: { default: "fixed" },
|
|
13
|
+
category: { default: "none" },
|
|
14
|
+
caption: { default: false }
|
|
15
|
+
},
|
|
16
|
+
content: "table_caption table_body",
|
|
17
|
+
parseDOM: [
|
|
18
|
+
{
|
|
19
|
+
tag: "table",
|
|
20
|
+
getAttrs(dom) {
|
|
21
|
+
const track = parseTracks(dom.dataset.track), width = dom.dataset.width, aligned = width === "100" ? "center" : dom.dataset.aligned, layout = dom.dataset.layout, id = dom.id || dom.dataset.id;
|
|
22
|
+
return {
|
|
23
|
+
track,
|
|
24
|
+
width,
|
|
25
|
+
aligned,
|
|
26
|
+
layout,
|
|
27
|
+
id,
|
|
28
|
+
category: dom.dataset.category,
|
|
29
|
+
caption: !!dom.dataset.captionHidden
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
toDOM(node) {
|
|
35
|
+
const attrs = {
|
|
36
|
+
id: node.attrs.id,
|
|
37
|
+
class: `table-${node.attrs.width} table-${node.attrs.aligned} table-${node.attrs.layout}`,
|
|
38
|
+
"data-width": node.attrs.width,
|
|
39
|
+
"data-aligned": node.attrs.aligned,
|
|
40
|
+
"data-layout": node.attrs.layout,
|
|
41
|
+
"data-category": node.attrs.category
|
|
42
|
+
};
|
|
43
|
+
if (node.attrs.track.length) {
|
|
44
|
+
attrs["data-track"] = JSON.stringify(node.attrs.track);
|
|
45
|
+
}
|
|
46
|
+
if (!node.attrs.caption) {
|
|
47
|
+
attrs["data-caption-hidden"] = true;
|
|
48
|
+
}
|
|
49
|
+
return ["table", attrs, 0];
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
export const table_caption = {
|
|
53
|
+
content: "inline*",
|
|
54
|
+
parseDOM: [{ tag: "caption span.text" }],
|
|
55
|
+
toDOM() {
|
|
56
|
+
return [
|
|
57
|
+
"caption",
|
|
58
|
+
["span", { class: "label" }],
|
|
59
|
+
["span", { class: "text" }, 0]
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const origTableNodes = tableNodes({
|
|
64
|
+
cellContent: "block+"
|
|
65
|
+
});
|
|
66
|
+
export const table_body = Object.assign({}, origTableNodes["table"], {
|
|
67
|
+
parseDOM: [{ tag: "tbody" }],
|
|
68
|
+
toDOM() {
|
|
69
|
+
return ["tbody", 0];
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
export const table_row = {
|
|
73
|
+
content: "(table_cell | table_header)+",
|
|
74
|
+
tableRole: "row",
|
|
75
|
+
parseDOM: [{ tag: "tr" }],
|
|
76
|
+
toDOM() {
|
|
77
|
+
return ["tr", 0];
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
export const table_header = Object.assign({ marks: "annotation" }, origTableNodes["table_header"]);
|
|
81
|
+
export const table_cell = Object.assign({ marks: "annotation" }, origTableNodes["table_cell"]);
|
|
82
|
+
export function randomTableId() {
|
|
83
|
+
return "T" + Math.round(Math.random() * 10000000) + 1;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../../src/schema/common/table.js"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAA;AAE7C,OAAO,EAAC,WAAW,EAAC,MAAM,YAAY,CAAA;AAEtC,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,OAAO;IAClB,KAAK,EAAE;QACH,EAAE,EAAE,EAAC,OAAO,EAAE,KAAK,EAAC;QACpB,KAAK,EAAE,EAAC,OAAO,EAAE,EAAE,EAAC;QACpB,KAAK,EAAE,EAAC,OAAO,EAAE,KAAK,EAAC;QACvB,OAAO,EAAE,EAAC,OAAO,EAAE,QAAQ,EAAC;QAC5B,MAAM,EAAE,EAAC,OAAO,EA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