documents.js 1.60.3 → 1.62.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/README.md +84 -44
  2. package/dist/{blr-types-CYYC3yYU.d.cts → blr-types-DVgO1DQ9.d.cts} +1 -1
  3. package/dist/{blr-types-CYYC3yYU.d.ts → blr-types-DVgO1DQ9.d.ts} +1 -1
  4. package/dist/convert/capability.cjs +1 -0
  5. package/dist/convert/capability.d.cts +1 -1
  6. package/dist/convert/capability.d.ts +1 -1
  7. package/dist/convert/capability.js +1 -0
  8. package/dist/convert/convert.cjs +29 -27
  9. package/dist/convert/convert.d.cts +9 -3
  10. package/dist/convert/convert.d.ts +9 -3
  11. package/dist/convert/convert.js +29 -27
  12. package/dist/edit/docx/content.cjs +75 -13
  13. package/dist/edit/docx/content.d.cts +8 -2
  14. package/dist/edit/docx/content.d.ts +8 -2
  15. package/dist/edit/docx/content.js +75 -13
  16. package/dist/edit/docx/paragraph.cjs +14 -0
  17. package/dist/edit/docx/paragraph.d.cts +5 -0
  18. package/dist/edit/docx/paragraph.d.ts +5 -0
  19. package/dist/edit/docx/paragraph.js +14 -0
  20. package/dist/edit/docx/run.cjs +1 -1
  21. package/dist/edit/docx/run.js +1 -1
  22. package/dist/edit/docx/table.cjs +41 -0
  23. package/dist/edit/docx/table.d.cts +7 -1
  24. package/dist/edit/docx/table.d.ts +7 -1
  25. package/dist/edit/docx/table.js +42 -1
  26. package/dist/edit/geometry.cjs +38 -0
  27. package/dist/edit/geometry.d.cts +7 -0
  28. package/dist/edit/geometry.d.ts +7 -0
  29. package/dist/edit/geometry.js +36 -0
  30. package/dist/edit/odg/content.cjs +15 -12
  31. package/dist/edit/odg/content.js +15 -12
  32. package/dist/edit/odg/editor.d.cts +1 -1
  33. package/dist/edit/odg/editor.d.ts +1 -1
  34. package/dist/edit/odg/page.d.cts +3 -3
  35. package/dist/edit/odg/page.d.ts +3 -3
  36. package/dist/edit/odg/vector.cjs +22 -13
  37. package/dist/edit/odg/vector.d.cts +1 -1
  38. package/dist/edit/odg/vector.d.ts +1 -1
  39. package/dist/edit/odg/vector.js +23 -14
  40. package/dist/edit/odp/content.cjs +15 -0
  41. package/dist/edit/odp/content.js +16 -1
  42. package/dist/edit/odp/editor.d.cts +1 -1
  43. package/dist/edit/odp/editor.d.ts +1 -1
  44. package/dist/edit/odp/image.d.cts +1 -1
  45. package/dist/edit/odp/image.d.ts +1 -1
  46. package/dist/edit/odp/shape.cjs +11 -30
  47. package/dist/edit/odp/shape.d.cts +2 -2
  48. package/dist/edit/odp/shape.d.ts +2 -2
  49. package/dist/edit/odp/shape.js +13 -33
  50. package/dist/edit/odp/slide.cjs +11 -0
  51. package/dist/edit/odp/slide.d.cts +14 -4
  52. package/dist/edit/odp/slide.d.ts +14 -4
  53. package/dist/edit/odp/slide.js +12 -1
  54. package/dist/edit/odt/content.cjs +56 -16
  55. package/dist/edit/odt/content.d.cts +4 -2
  56. package/dist/edit/odt/content.d.ts +4 -2
  57. package/dist/edit/odt/content.js +56 -17
  58. package/dist/edit/odt/editor.d.cts +1 -1
  59. package/dist/edit/odt/editor.d.ts +1 -1
  60. package/dist/edit/odt/table.cjs +36 -0
  61. package/dist/edit/odt/table.d.cts +1 -36
  62. package/dist/edit/odt/table.d.ts +1 -36
  63. package/dist/edit/odt/table.js +37 -1
  64. package/dist/edit/pptx/content.cjs +71 -3
  65. package/dist/edit/pptx/content.js +71 -3
  66. package/dist/edit/pptx/editor.d.cts +1 -1
  67. package/dist/edit/pptx/editor.d.ts +1 -1
  68. package/dist/edit/pptx/image.d.cts +1 -1
  69. package/dist/edit/pptx/image.d.ts +1 -1
  70. package/dist/edit/pptx/shape.cjs +23 -1
  71. package/dist/edit/pptx/shape.d.cts +2 -2
  72. package/dist/edit/pptx/shape.d.ts +2 -2
  73. package/dist/edit/pptx/shape.js +23 -3
  74. package/dist/edit/pptx/slide.cjs +10 -1
  75. package/dist/edit/pptx/slide.d.cts +11 -4
  76. package/dist/edit/pptx/slide.d.ts +11 -4
  77. package/dist/edit/pptx/slide.js +10 -1
  78. package/dist/edit/pptx/table.cjs +136 -0
  79. package/dist/edit/pptx/table.d.cts +2 -0
  80. package/dist/edit/pptx/table.d.ts +2 -0
  81. package/dist/edit/pptx/table.js +131 -0
  82. package/dist/firebird/backup.d.cts +1 -1
  83. package/dist/firebird/backup.d.ts +1 -1
  84. package/dist/firebird/blr-types.cjs +2 -2
  85. package/dist/firebird/blr-types.d.cts +1 -1
  86. package/dist/firebird/blr-types.d.ts +1 -1
  87. package/dist/firebird/blr-types.js +2 -2
  88. package/dist/firebird/data.cjs +68 -14
  89. package/dist/firebird/data.d.cts +1 -1
  90. package/dist/firebird/data.d.ts +1 -1
  91. package/dist/firebird/data.js +68 -14
  92. package/dist/firebird/schema.cjs +13 -1
  93. package/dist/firebird/schema.d.cts +1 -1
  94. package/dist/firebird/schema.d.ts +1 -1
  95. package/dist/firebird/schema.js +13 -1
  96. package/dist/{geometry-DvwdrIij.d.cts → geometry-DaJr8yQW.d.cts} +2 -2
  97. package/dist/{geometry-DvwdrIij.d.ts → geometry-DaJr8yQW.d.ts} +2 -2
  98. package/dist/hsqldb/binary-script.cjs +154 -0
  99. package/dist/hsqldb/binary-script.d.cts +15 -0
  100. package/dist/hsqldb/binary-script.d.ts +15 -0
  101. package/dist/hsqldb/binary-script.js +151 -0
  102. package/dist/hsqldb/cache.cjs +18 -11
  103. package/dist/hsqldb/cache.d.cts +9 -4
  104. package/dist/hsqldb/cache.d.ts +9 -4
  105. package/dist/hsqldb/cache.js +18 -11
  106. package/dist/hsqldb/rowformat.cjs +60 -16
  107. package/dist/hsqldb/rowformat.d.cts +2 -21
  108. package/dist/hsqldb/rowformat.d.ts +2 -21
  109. package/dist/hsqldb/rowformat.js +60 -17
  110. package/dist/{image-BZDy72Jb.d.cts → image-7snmKIxn.d.cts} +1 -1
  111. package/dist/{image-B-xQWYYS.d.ts → image-Cs8xF753.d.ts} +1 -1
  112. package/dist/{image-CeqwL-Qs.d.ts → image-DHcA9kaK.d.ts} +1 -1
  113. package/dist/{image-DWX6cNOD.d.cts → image-M5SezZVI.d.cts} +1 -1
  114. package/dist/index.cjs +54 -3
  115. package/dist/index.d.cts +28 -20
  116. package/dist/index.d.ts +27 -19
  117. package/dist/index.js +13 -4
  118. package/dist/layout/cell-typing.cjs +209 -0
  119. package/dist/layout/cell-typing.d.cts +22 -0
  120. package/dist/layout/cell-typing.d.ts +22 -0
  121. package/dist/layout/cell-typing.js +208 -0
  122. package/dist/layout/drawing.cjs +193 -17
  123. package/dist/layout/drawing.js +193 -17
  124. package/dist/layout/engine.cjs +46 -29
  125. package/dist/layout/engine.d.cts +0 -2
  126. package/dist/layout/engine.d.ts +0 -2
  127. package/dist/layout/engine.js +47 -30
  128. package/dist/layout/lattice.cjs +139 -0
  129. package/dist/layout/lattice.d.cts +20 -0
  130. package/dist/layout/lattice.d.ts +20 -0
  131. package/dist/layout/lattice.js +135 -0
  132. package/dist/layout/reconstruct.cjs +176 -113
  133. package/dist/layout/reconstruct.d.cts +2 -0
  134. package/dist/layout/reconstruct.d.ts +2 -0
  135. package/dist/layout/reconstruct.js +173 -110
  136. package/dist/layout/shared.cjs +52 -0
  137. package/dist/layout/shared.d.cts +4 -2
  138. package/dist/layout/shared.d.ts +4 -2
  139. package/dist/layout/shared.js +51 -1
  140. package/dist/layout/sheets.cjs +45 -11
  141. package/dist/layout/sheets.js +46 -12
  142. package/dist/layout/slides.cjs +7 -7
  143. package/dist/layout/slides.d.cts +0 -3
  144. package/dist/layout/slides.d.ts +0 -3
  145. package/dist/layout/slides.js +7 -7
  146. package/dist/markdown/write.cjs +19 -6
  147. package/dist/markdown/write.js +19 -6
  148. package/dist/mathml/layout.cjs +43 -9
  149. package/dist/mathml/layout.d.cts +1 -1
  150. package/dist/mathml/layout.d.ts +1 -1
  151. package/dist/mathml/layout.js +43 -9
  152. package/dist/mathml/variant.cjs +48 -5
  153. package/dist/mathml/variant.js +48 -5
  154. package/dist/model/embedded-drawing.cjs +32 -0
  155. package/dist/model/embedded-drawing.d.cts +8 -0
  156. package/dist/model/embedded-drawing.d.ts +8 -0
  157. package/dist/model/embedded-drawing.js +30 -0
  158. package/dist/model/formula.cjs +31 -0
  159. package/dist/model/formula.d.cts +6 -6
  160. package/dist/model/formula.d.ts +6 -6
  161. package/dist/model/formula.js +27 -0
  162. package/dist/model/geometry.d.cts +1 -1
  163. package/dist/model/geometry.d.ts +1 -1
  164. package/dist/model/paint-order.cjs +15 -0
  165. package/dist/model/paint-order.d.cts +14 -0
  166. package/dist/model/paint-order.d.ts +14 -0
  167. package/dist/model/paint-order.js +14 -0
  168. package/dist/odb/components.cjs +12 -0
  169. package/dist/odb/components.d.cts +6 -0
  170. package/dist/odb/components.d.ts +6 -0
  171. package/dist/odb/components.js +10 -0
  172. package/dist/odb/read.cjs +11 -7
  173. package/dist/odb/read.d.cts +3 -2
  174. package/dist/odb/read.d.ts +3 -2
  175. package/dist/odb/read.js +11 -7
  176. package/dist/odf/formula/detect.cjs +86 -18
  177. package/dist/odf/formula/detect.d.cts +10 -6
  178. package/dist/odf/formula/detect.d.ts +10 -6
  179. package/dist/odf/formula/detect.js +86 -19
  180. package/dist/odf/formula/read.cjs +4 -16
  181. package/dist/odf/formula/read.d.cts +4 -8
  182. package/dist/odf/formula/read.d.ts +4 -8
  183. package/dist/odf/formula/read.js +5 -17
  184. package/dist/odf/odp/read.cjs +9 -19
  185. package/dist/odf/odp/read.d.cts +2 -7
  186. package/dist/odf/odp/read.d.ts +2 -7
  187. package/dist/odf/odp/read.js +10 -20
  188. package/dist/odf/odt/read.cjs +63 -23
  189. package/dist/odf/odt/read.d.cts +2 -7
  190. package/dist/odf/odt/read.d.ts +2 -7
  191. package/dist/odf/odt/read.js +64 -24
  192. package/dist/omml/write.cjs +258 -0
  193. package/dist/omml/write.d.cts +2 -0
  194. package/dist/omml/write.d.ts +2 -0
  195. package/dist/omml/write.js +256 -0
  196. package/dist/rowformat-Cl2exlEh.d.cts +25 -0
  197. package/dist/rowformat-Cl2exlEh.d.ts +25 -0
  198. package/dist/{schema-Acco3Ezi.d.cts → schema-BeR_KJ0X.d.cts} +3 -1
  199. package/dist/{schema-VkAA6pF5.d.ts → schema-CSKwSb_v.d.ts} +3 -1
  200. package/dist/{shape-BUfjw5eZ.d.cts → shape-BhkP6HB8.d.cts} +6 -2
  201. package/dist/{shape-CTkl6kt8.d.ts → shape-BkVcwPcf.d.ts} +6 -2
  202. package/dist/{shape-BfN3m52m.d.ts → shape-CVXedeL7.d.ts} +3 -2
  203. package/dist/{shape-CN2ycxOo.d.cts → shape-CXZ6fejV.d.cts} +3 -2
  204. package/dist/table-C3CPZ--2.d.cts +35 -0
  205. package/dist/table-DjYcNOFm.d.cts +44 -0
  206. package/dist/table-DqfqMkVq.d.ts +44 -0
  207. package/dist/table-DvS_7UQS.d.ts +35 -0
  208. package/dist/{vector-ClohqsOe.d.cts → vector-Puuqu_IT.d.cts} +4 -0
  209. package/dist/{vector-ClohqsOe.d.ts → vector-Puuqu_IT.d.ts} +4 -0
  210. package/dist/write-DuyfnbL_.d.cts +16 -0
  211. package/dist/write-Zqwx6pka.d.ts +16 -0
  212. package/package.json +4 -4
  213. package/dist/odf/formula/placeholder.cjs +0 -36
  214. package/dist/odf/formula/placeholder.d.cts +0 -14
  215. package/dist/odf/formula/placeholder.d.ts +0 -14
  216. package/dist/odf/formula/placeholder.js +0 -36
package/dist/index.d.cts CHANGED
@@ -1,74 +1,82 @@
1
- import { DocumentBridgeOptions, DocumentToPdfOptions, OdbToCsvOptions, OdmToPdfOptions, OdmUnresolvedSectionError, PdfToDocumentOptions, docxToMarkdown, docxToOdt, docxToPdf, markdownToDocx, markdownToOdt, markdownToPdf, odbToCsv, odbToXlsx, odfToPdf, odgToPdf, odmToPdf, odpToPdf, odpToPptx, odsToPdf, odsToXlsx, odtToDocx, odtToMarkdown, odtToPdf, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxToOdp, pptxToPdf, xlsxToOds, xlsxToPdf } from "./convert/convert.cjs";
1
+ import { n as HsqldbDecodeOptions, r as HsqldbRowFormatError } from "./rowformat-Cl2exlEh.cjs";
2
+ import { c as firstChildByLocalName, d as textContent, i as MathMlText, l as isMathMlElement, n as MathMlElement, o as elementChildren, r as MathMlNode, s as elementLocalName, t as MathMlAttribute, u as localName } from "./nodes-pArN9ilm.cjs";
3
+ import { a as buildOfficeMathParagraph, i as buildOfficeMath, n as OmmlDiagnosticKind, r as OmmlWriteResult, t as OmmlDiagnostic } from "./write-DuyfnbL_.cjs";
4
+ import { DocumentBridgeOptions, DocumentToPdfOptions, OdbConversionOptions, OdbToCsvOptions, OdmToPdfOptions, OdmUnresolvedSectionError, PdfToDocumentOptions, docxToMarkdown, docxToOdt, docxToPdf, markdownToDocx, markdownToOdt, markdownToPdf, odbToCsv, odbToXlsx, odfToPdf, odgToPdf, odmToPdf, odpToPdf, odpToPptx, odsToPdf, odsToXlsx, odtToDocx, odtToMarkdown, odtToPdf, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxToOdp, pptxToPdf, xlsxToOds, xlsxToPdf } from "./convert/convert.cjs";
2
5
  import { ConversionRequest, ConversionResult, Diagnostic, DocumentConverter, DocumentFormat, DocumentPayload } from "./convert/port.cjs";
3
6
  import { docxPdfCodec, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, odgPdfCodec, odpPdfCodec, odpPptxCodec, odsPdfCodec, odsXlsxCodec, odtDocxCodec, odtPdfCodec, pptxPdfCodec, xlsxPdfCodec } from "./convert/codec.cjs";
4
7
  import { createLocalDocumentConverter } from "./convert/local.cjs";
5
- import { buildDocxPackage } from "./edit/docx/content.cjs";
8
+ import { BuildDocxPackageOptions, buildDocxPackage } from "./edit/docx/content.cjs";
6
9
  import { a as rgbHexToColor, n as LayoutColor, t as COLOR_BLACK } from "./color-71eoF1Up.cjs";
7
10
  import { t as DocxRun } from "./run-B3GNScJH.cjs";
8
11
  import { DocxParagraph } from "./edit/docx/paragraph.cjs";
9
- import { DocxTable, DocxTableCell, DocxTableRow } from "./edit/docx/table.cjs";
12
+ import { DocxTable, DocxTableCell, DocxTableRow, DocxVerticalMerge } from "./edit/docx/table.cjs";
10
13
  import { DocxBody, DocxEditor, createDocx, openDocx } from "./edit/docx/editor.cjs";
14
+ import { a as PAGE_SIZE_A4, d as flipY, l as SLIDE_SIZE_STANDARD, o as PAGE_SIZE_LETTER, r as Margins, s as PageSize, t as Box, u as SLIDE_SIZE_WIDESCREEN } from "./geometry-DaJr8yQW.cjs";
11
15
  import { buildOdgPackage } from "./edit/odg/content.cjs";
12
- import { a as PAGE_SIZE_A4, d as flipY, l as SLIDE_SIZE_STANDARD, o as PAGE_SIZE_LETTER, r as Margins, s as PageSize, t as Box, u as SLIDE_SIZE_WIDESCREEN } from "./geometry-DvwdrIij.cjs";
13
16
  import { i as LayoutFont, r as DEFAULT_LAYOUT_FONT, t as Alignment } from "./style-DkamR3aY.cjs";
14
17
  import { n as RunInit, t as OdtRun } from "./run-F8JN7Vy4.cjs";
15
18
  import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-BXbXKPy3.cjs";
16
19
  import { n as OdtListItem, t as OdtList } from "./list-BuBM9rwQ.cjs";
17
- import { t as OdpShape } from "./shape-CN2ycxOo.cjs";
18
- import { a as OdgLineVector, n as LineVectorInit, o as OdgPathVector, r as OdgBoxVector, s as PathVectorInit, t as BoxVectorInit } from "./vector-ClohqsOe.cjs";
20
+ import { t as OdpShape } from "./shape-CXZ6fejV.cjs";
21
+ import { a as OdgLineVector, n as LineVectorInit, o as OdgPathVector, r as OdgBoxVector, s as PathVectorInit, t as BoxVectorInit } from "./vector-Puuqu_IT.cjs";
19
22
  import { OdgPage, PageImageInit, TextBoxInit } from "./edit/odg/page.cjs";
20
23
  import { OdgEditor, createOdg, openOdg } from "./edit/odg/editor.cjs";
21
24
  import { buildOdpPackage } from "./edit/odp/content.cjs";
22
- import { OdpSlide, SlideImageInit, TextBoxInit as TextBoxInit$1 } from "./edit/odp/slide.cjs";
25
+ import { i as TableInit, n as OdtTableCell, r as OdtTableRow, t as OdtTable } from "./table-DjYcNOFm.cjs";
26
+ import { OdpSlide, SlideImageInit, SlideTableInit, TextBoxInit as TextBoxInit$1 } from "./edit/odp/slide.cjs";
23
27
  import { OdpEditor, createOdp, openOdp } from "./edit/odp/editor.cjs";
24
28
  import { t as OdsCell } from "./cell-CNHPsDEk.cjs";
25
29
  import { buildOdsPackage } from "./edit/ods/content.cjs";
26
30
  import { OdsSheet } from "./edit/ods/sheet.cjs";
27
31
  import { OdsEditor, createOds, openOds } from "./edit/ods/editor.cjs";
28
32
  import { buildOdtPackage } from "./edit/odt/content.cjs";
29
- import { OdtTable, OdtTableCell, OdtTableRow, TableInit } from "./edit/odt/table.cjs";
30
33
  import { OdtBody, OdtEditor, createOdt, openOdt } from "./edit/odt/editor.cjs";
31
34
  import { buildPptxPackage } from "./edit/pptx/content.cjs";
32
- import { n as DrawingRunInit, r as PptxShape, t as DrawingParagraphInit } from "./shape-BUfjw5eZ.cjs";
33
- import { PptxSlide, SlideImageInit as SlideImageInit$1, TextBoxInit as TextBoxInit$2 } from "./edit/pptx/slide.cjs";
35
+ import { n as DrawingRunInit, r as PptxShape, t as DrawingParagraphInit } from "./shape-BhkP6HB8.cjs";
36
+ import { i as PptxTableRow, n as PptxTableCell, r as PptxTableInit, t as PptxTable } from "./table-C3CPZ--2.cjs";
37
+ import { PptxSlide, SlideImageInit as SlideImageInit$1, SlideTableInit as SlideTableInit$1, TextBoxInit as TextBoxInit$2 } from "./edit/pptx/slide.cjs";
34
38
  import { PptxEditor, createPptx, openPptx } from "./edit/pptx/editor.cjs";
35
39
  import { HsqldbColumn, HsqldbScriptParseError, HsqldbTable, displayTextFor, parseHsqldbScript } from "./hsqldb/script.cjs";
36
40
  import { t as FirebirdBackupParseError } from "./reader-DP0Mbaj4.cjs";
37
- import { D as FirebirdUnsupportedFieldTypeError } from "./blr-types-CYYC3yYU.cjs";
38
- import { r as FirebirdSchemaParseError } from "./schema-Acco3Ezi.cjs";
41
+ import { D as FirebirdUnsupportedFieldTypeError } from "./blr-types-DVgO1DQ9.cjs";
42
+ import { r as FirebirdSchemaParseError } from "./schema-BeR_KJ0X.cjs";
39
43
  import { FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError } from "./firebird/data.cjs";
40
44
  import { FirebirdBackupFormatError, FirebirdBackupSummary, ReadFirebirdBackupResult, SUPPORTED_BACKUP_FORMAT_VERSION, readFirebirdBackup } from "./firebird/backup.cjs";
45
+ import { HsqldbBinaryScript, HsqldbBinaryScriptParseError, inflateHsqldbCompressedScript, parseHsqldbBinaryScript } from "./hsqldb/binary-script.cjs";
41
46
  import { decodeHsqldbCachedTables } from "./hsqldb/cache.cjs";
42
- import { HsqldbRowFormatError } from "./hsqldb/rowformat.cjs";
43
47
  import { DocxBytesSchema, MarkdownBytesSchema, OdgBytesSchema, OdpBytesSchema, OdsBytesSchema, OdtBytesSchema, PdfBytesSchema, PptxBytesSchema, XlsxBytesSchema } from "./model/bytes.cjs";
44
48
  import { MathBox, MathColor, MathDiagnostic, MathDiagnosticKind, MathGlyphRun, MathLayoutItem, MathLayoutResult, MathRule, MathStroke } from "./mathml/layout-types.cjs";
45
49
  import { MathFontMetrics, MathGlyphMetrics } from "./mathml/metrics.cjs";
46
- import { c as firstChildByLocalName, d as textContent, i as MathMlText, l as isMathMlElement, n as MathMlElement, o as elementChildren, r as MathMlNode, s as elementLocalName, t as MathMlAttribute, u as localName } from "./nodes-pArN9ilm.cjs";
47
50
  import { MathVariant, applyMathVariant, isMathVariant, mapMathVariant } from "./mathml/variant.cjs";
48
51
  import { LayoutFormulaOptions, layoutFormula } from "./mathml/layout.cjs";
49
52
  import { OperatorProperties, operatorProperties } from "./mathml/operators.cjs";
50
53
  import { readDocxContent } from "./ooxml/docx/read.cjs";
51
54
  import { readPptxContent } from "./ooxml/pptx/read.cjs";
52
- import { EmbeddedFormula } from "./model/formula.cjs";
53
- import { OdtContentResult, readOdtContent } from "./odf/odt/read.cjs";
54
- import { OdpContentResult, readOdpContent } from "./odf/odp/read.cjs";
55
+ import { readOdtContent } from "./odf/odt/read.cjs";
56
+ import { readOdpContent } from "./odf/odp/read.cjs";
55
57
  import { readOdsContent } from "./odf/ods/read.cjs";
56
58
  import { readOdgContent } from "./odf/odg/read.cjs";
57
- import { StandaloneFormulaContent, readOdfEmbeddedFormula, readOdfFormulaContent } from "./odf/formula/read.cjs";
59
+ import { readOdfEmbeddedFormula, readOdfFormulaContent } from "./odf/formula/read.cjs";
58
60
  import { decodeMarkdownText, encodeMarkdownText } from "./markdown/text.cjs";
59
61
  import { readMarkdownContent } from "./markdown/read.cjs";
60
62
  import { buildMarkdownText } from "./markdown/write.cjs";
63
+ import { buildFormulaBlock, formulaDocument, formulaOfBlock, formulaPlaceholderText } from "./model/formula.cjs";
64
+ import { buildDrawingBlock, drawingOfBlock } from "./model/embedded-drawing.cjs";
61
65
  import { EngineLayoutOptions, WordprocessingLayoutResult, convertWordprocessingToLayout } from "./layout/engine.cjs";
62
66
  import { PresentationLayoutResult, SlidesLayoutOptions, convertPresentationToLayout } from "./layout/slides.cjs";
63
67
  import { SheetsLayoutOptions, convertSpreadsheetToLayout } from "./layout/sheets.cjs";
64
68
  import { DrawingLayoutOptions, convertDrawingToLayout } from "./layout/drawing.cjs";
69
+ import { CellTypeDeclineReason, CellTypeInference, CellTypeInferenceResult, CellTypeInferenceSink, CellTypeRule, inferCellValue } from "./layout/cell-typing.cjs";
65
70
  import { ReconstructOptions, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing } from "./layout/reconstruct.cjs";
71
+ import { GridLattice, detectGridLattice } from "./layout/lattice.cjs";
66
72
  import { OdbNoEmbeddedDataSourceError, OdbUnsupportedFormat, OdbUnsupportedFormatError, readOdbTables } from "./odb/read.cjs";
67
73
  import { odbTablesToSpreadsheetDocument } from "./odb/spreadsheet.cjs";
74
+ import { readOdbForms, readOdbReports } from "./odb/components.cjs";
68
75
  import { OdbTableNotFoundError, OdbTableNotSpecifiedError } from "./odb/csv.cjs";
69
76
  import { ClockPort, fixedClock, systemClock } from "./ports/clock.cjs";
70
77
  import { throwIfAborted } from "./ports/abort.cjs";
71
78
  import { CONTENT_FORMAT_VERSION, ContentBlock, ContentBlockSchema, ContentCellValue, ContentCellValueSchema, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DocumentJsonResult, DocumentPackage, DocumentPackageJson, DocumentPackageSchema, DocumentSchemaKind, LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocumentJson, LayoutDocumentSchema, LayoutEllipse, LayoutImage, LayoutImageAsset, LayoutItem, LayoutLine, LayoutLink, LayoutMetadata, LayoutPage, LayoutPath, LayoutPathSegment, LayoutRect, LayoutSubpath, LayoutText, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, layoutDocumentWithSchema, schemaUriFor } from "document-schema.js";
72
- import { LoadedMathFont, MathFont, MathFontDescriptorMetrics, NOOP_DIAGNOSTIC_SINK, PdfDiagnostic, PdfDiagnosticSeverity, PdfDiagnosticSink, PdfEncryptedError, PdfParseError, PositionedFormula, ReadPdfOptions, WinAnsiSubstitution, WritePdfOptions, loadMathFont, pdfCodec, readPdf, writePdf } from "pdf-codec";
79
+ import { OdbComponentInfo, OdbConnectionInfo, OdbForm, OdbFormControl, OdbFormDefinition, OdbInventory, OdbQueryInfo, OdbReport, OdbReportBand, OdbReportElement, OdbReportFunction, OdbReportGroup, readOdbForm, readOdbInventory, readOdbReport, resolveOdbComponent } from "odf.js";
73
80
  import { Attribute, AttributeSchema, BinaryPart, BinaryPartSchema, Comment, CommentSchema, CompactAttrPairs, CompactPackage, CompactPackageSchema, CompactPart, CompactPartSchema, CompactXmlNode, CompactXmlNodeSchema, DefinedName, DefinedNameSchema, Package, PackageSchema, Part, PartSchema, Relationship, XmlCdata, XmlCdataSchema, XmlComment, XmlCommentSchema, XmlDeclaration, XmlDeclarationSchema, XmlElement, XmlElementSchema, XmlNode, XmlNodeSchema, XmlPart, XmlPartSchema, XmlPi, XmlPiSchema, XmlText, XmlTextSchema, attr, base64ToBytes, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, elementsWithTag, encodeCompactPackage, encodePackage, fromCompact, isCompactXmlNode, isXmlNode, packageCodec, parsePackage, parseXml, resolveRelationships, rootElement, serializePackage, textContent as textContent$1, toCompact, unzipPackage, walk, xmlCodec, zipPackage } from "ooxml.js";
74
- export { type Alignment, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, COLOR_BLACK, CONTENT_FORMAT_VERSION, type ClockPort, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ContentBlock, ContentBlockSchema, type ContentCellValue, ContentCellValueSchema, type ContentDocument, type ContentDocumentJson, ContentDocumentSchema, type ContentDrawPage, ContentDrawPageSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentPathPoint, ContentPathPointSchema, type ContentPathSegment, ContentPathSegmentSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStroke, ContentStrokeSchema, type ContentSubpath, ContentSubpathSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type ContentVector, ContentVectorSchema, type ConversionRequest, type ConversionResult, DEFAULT_LAYOUT_FONT, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentBridgeOptions, type DocumentConverter, type DocumentFormat, type DocumentJsonResult, type DocumentPackage, type DocumentPackageJson, DocumentPackageSchema, type DocumentPayload, type DocumentSchemaKind, type DocumentToPdfOptions, type DocxBody, DocxBytesSchema, DocxEditor, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, type DrawingLayoutOptions, type DrawingParagraphInit, type DrawingRunInit, type EmbeddedFormula, type EngineLayoutOptions, SUPPORTED_BACKUP_FORMAT_VERSION as FIREBIRD_SUPPORTED_BACKUP_FORMAT_VERSION, FirebirdBackupFormatError, FirebirdBackupParseError, type FirebirdBackupSummary, FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError, FirebirdSchemaParseError, FirebirdUnsupportedFieldTypeError, type HsqldbColumn, HsqldbRowFormatError, HsqldbScriptParseError, type HsqldbTable, LAYOUT_FORMAT_VERSION, type LayoutColor, type LayoutDocument, type LayoutDocumentJson, LayoutDocumentSchema, type LayoutEllipse, type LayoutFont, type LayoutFormulaOptions, type LayoutImage, type LayoutImageAsset, type LayoutItem, type LayoutLine, type LayoutLink, type LayoutMetadata, type LayoutPage, type LayoutPath, type LayoutPathSegment, type LayoutRect, type LayoutSubpath, type LayoutText, type LoadedMathFont, type Margins, MarkdownBytesSchema, type MathBox, type MathColor, type MathDiagnostic, type MathDiagnosticKind, type MathFont, type MathFontDescriptorMetrics, type MathFontMetrics, type MathGlyphMetrics, type MathGlyphRun, type MathLayoutItem, type MathLayoutResult, type MathMlAttribute, type MathMlElement, type MathMlNode, type MathMlText, type MathRule, type MathStroke, type MathVariant, NOOP_DIAGNOSTIC_SINK, OdbNoEmbeddedDataSourceError, OdbTableNotFoundError, OdbTableNotSpecifiedError, type OdbToCsvOptions, type OdbUnsupportedFormat, OdbUnsupportedFormatError, OdgBoxVector, type BoxVectorInit as OdgBoxVectorInit, OdgBytesSchema, OdgEditor, OdgLineVector, type LineVectorInit as OdgLineVectorInit, OdgPage, type PageImageInit as OdgPageImageInit, OdgPathVector, type PathVectorInit as OdgPathVectorInit, type TextBoxInit as OdgTextBoxInit, type OdmToPdfOptions, OdmUnresolvedSectionError, OdpBytesSchema, type OdpContentResult, OdpEditor, OdpShape, OdpSlide, type SlideImageInit as OdpSlideImageInit, type TextBoxInit$1 as OdpTextBoxInit, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, type OdtBody, OdtBytesSchema, type OdtContentResult, OdtEditor, OdtList, OdtListItem, OdtParagraph, type ParagraphInit as OdtParagraphInit, OdtRun, type RunInit as OdtRunInit, OdtTable, OdtTableCell, type TableInit as OdtTableInit, OdtTableRow, type OperatorProperties, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageSize, type Part, PartSchema, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEncryptedError, PdfParseError, type PdfToDocumentOptions, type PositionedFormula, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, type PresentationLayoutResult, type ReadFirebirdBackupResult, type ReadPdfOptions, type ReconstructOptions, type Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, type SheetsLayoutOptions, type SlideImageInit$1 as SlideImageInit, type SlidesLayoutOptions, type StandaloneFormulaContent, type TextBoxInit$2 as TextBoxInit, UnrecognizedDocumentSchemaError, type WinAnsiSubstitution, type WordprocessingLayoutResult, type WritePdfOptions, XlsxBytesSchema, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildDocxPackage, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildPptxPackage, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocx, createLocalDocumentConverter, createOdg, createOdp, createOds, createOdt, createPptx, decodeCompactPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodePackage, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeMarkdownText, encodePackage, firstChildByLocalName, fixedClock, flipY, fromCompact, displayTextFor as hsqldbCellDisplayText, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, layoutDocumentWithSchema, layoutFormula, loadMathFont, localName, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToDocx, markdownToOdt, markdownToPdf, textContent as mathMlTextContent, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgToPdf, odmToPdf, odpPdfCodec, odpPptxCodec, odpToPdf, odpToPptx, odsPdfCodec, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToPdf, openDocx, openOdg, openOdp, openOds, openOdt, openPptx, operatorProperties, packageCodec, parseHsqldbScript, parsePackage, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToOdp, pptxToPdf, readDocxContent, readFirebirdBackup, readMarkdownContent, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readPdf, readPptxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, resolveRelationships, rgbHexToColor, rootElement, schemaUriFor, serializePackage, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, unzipPackage, walk, writePdf, xlsxPdfCodec, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
81
+ import { LoadedMathFont, MathFont, MathFontDescriptorMetrics, NOOP_DIAGNOSTIC_SINK, PdfDiagnostic, PdfDiagnosticSeverity, PdfDiagnosticSink, PdfEncryptedError, PdfParseError, PositionedFormula, ReadPdfOptions, WinAnsiSubstitution, WritePdfOptions, loadMathFont, pdfCodec, readPdf, writePdf } from "pdf-codec";
82
+ export { type Alignment, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, type BuildDocxPackageOptions, COLOR_BLACK, CONTENT_FORMAT_VERSION, type CellTypeDeclineReason, type CellTypeInference, type CellTypeInferenceResult, type CellTypeInferenceSink, type CellTypeRule, type ClockPort, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ContentBlock, ContentBlockSchema, type ContentCellValue, ContentCellValueSchema, type ContentDocument, type ContentDocumentJson, ContentDocumentSchema, type ContentDrawPage, ContentDrawPageSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentPathPoint, ContentPathPointSchema, type ContentPathSegment, ContentPathSegmentSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStroke, ContentStrokeSchema, type ContentSubpath, ContentSubpathSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type ContentVector, ContentVectorSchema, type ConversionRequest, type ConversionResult, DEFAULT_LAYOUT_FONT, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentBridgeOptions, type DocumentConverter, type DocumentFormat, type DocumentJsonResult, type DocumentPackage, type DocumentPackageJson, DocumentPackageSchema, type DocumentPayload, type DocumentSchemaKind, type DocumentToPdfOptions, type DocxBody, DocxBytesSchema, DocxEditor, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, type DocxVerticalMerge, type DrawingLayoutOptions, type DrawingParagraphInit, type DrawingRunInit, type EngineLayoutOptions, SUPPORTED_BACKUP_FORMAT_VERSION as FIREBIRD_SUPPORTED_BACKUP_FORMAT_VERSION, FirebirdBackupFormatError, FirebirdBackupParseError, type FirebirdBackupSummary, FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError, FirebirdSchemaParseError, FirebirdUnsupportedFieldTypeError, type GridLattice, type HsqldbBinaryScript, HsqldbBinaryScriptParseError, type HsqldbColumn, type HsqldbDecodeOptions, HsqldbRowFormatError, HsqldbScriptParseError, type HsqldbTable, LAYOUT_FORMAT_VERSION, type LayoutColor, type LayoutDocument, type LayoutDocumentJson, LayoutDocumentSchema, type LayoutEllipse, type LayoutFont, type LayoutFormulaOptions, type LayoutImage, type LayoutImageAsset, type LayoutItem, type LayoutLine, type LayoutLink, type LayoutMetadata, type LayoutPage, type LayoutPath, type LayoutPathSegment, type LayoutRect, type LayoutSubpath, type LayoutText, type LoadedMathFont, type Margins, MarkdownBytesSchema, type MathBox, type MathColor, type MathDiagnostic, type MathDiagnosticKind, type MathFont, type MathFontDescriptorMetrics, type MathFontMetrics, type MathGlyphMetrics, type MathGlyphRun, type MathLayoutItem, type MathLayoutResult, type MathMlAttribute, type MathMlElement, type MathMlNode, type MathMlText, type MathRule, type MathStroke, type MathVariant, NOOP_DIAGNOSTIC_SINK, type OdbComponentInfo, type OdbConnectionInfo, type OdbConversionOptions, type OdbForm, type OdbFormControl, type OdbFormDefinition, type OdbInventory, OdbNoEmbeddedDataSourceError, type OdbQueryInfo, type OdbReport, type OdbReportBand, type OdbReportElement, type OdbReportFunction, type OdbReportGroup, OdbTableNotFoundError, OdbTableNotSpecifiedError, type OdbToCsvOptions, type OdbUnsupportedFormat, OdbUnsupportedFormatError, OdgBoxVector, type BoxVectorInit as OdgBoxVectorInit, OdgBytesSchema, OdgEditor, OdgLineVector, type LineVectorInit as OdgLineVectorInit, OdgPage, type PageImageInit as OdgPageImageInit, OdgPathVector, type PathVectorInit as OdgPathVectorInit, type TextBoxInit as OdgTextBoxInit, type OdmToPdfOptions, OdmUnresolvedSectionError, OdpBytesSchema, OdpEditor, OdpShape, OdpSlide, type SlideImageInit as OdpSlideImageInit, type SlideTableInit as OdpSlideTableInit, type TextBoxInit$1 as OdpTextBoxInit, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, type OdtBody, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, type ParagraphInit as OdtParagraphInit, OdtRun, type RunInit as OdtRunInit, OdtTable, OdtTableCell, type TableInit as OdtTableInit, OdtTableRow, type OmmlDiagnostic, type OmmlDiagnosticKind, type OmmlWriteResult, type OperatorProperties, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageSize, type Part, PartSchema, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEncryptedError, PdfParseError, type PdfToDocumentOptions, type PositionedFormula, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, type PptxTableInit, PptxTableRow, type PresentationLayoutResult, type ReadFirebirdBackupResult, type ReadPdfOptions, type ReconstructOptions, type Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, type SheetsLayoutOptions, type SlideImageInit$1 as SlideImageInit, type SlideTableInit$1 as SlideTableInit, type SlidesLayoutOptions, type TextBoxInit$2 as TextBoxInit, UnrecognizedDocumentSchemaError, type WinAnsiSubstitution, type WordprocessingLayoutResult, type WritePdfOptions, XlsxBytesSchema, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocx, createLocalDocumentConverter, createOdg, createOdp, createOds, createOdt, createPptx, decodeCompactPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodePackage, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeMarkdownText, encodePackage, firstChildByLocalName, fixedClock, flipY, formulaDocument, formulaOfBlock, formulaPlaceholderText, fromCompact, displayTextFor as hsqldbCellDisplayText, inferCellValue, inflateHsqldbCompressedScript, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, layoutDocumentWithSchema, layoutFormula, loadMathFont, localName, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToDocx, markdownToOdt, markdownToPdf, textContent as mathMlTextContent, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgToPdf, odmToPdf, odpPdfCodec, odpPptxCodec, odpToPdf, odpToPptx, odsPdfCodec, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToPdf, openDocx, openOdg, openOdp, openOds, openOdt, openPptx, operatorProperties, packageCodec, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToOdp, pptxToPdf, readDocxContent, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readPdf, readPptxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, resolveOdbComponent, resolveRelationships, rgbHexToColor, rootElement, schemaUriFor, serializePackage, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, unzipPackage, walk, writePdf, xlsxPdfCodec, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
package/dist/index.d.ts CHANGED
@@ -1,74 +1,82 @@
1
- import { DocumentBridgeOptions, DocumentToPdfOptions, OdbToCsvOptions, OdmToPdfOptions, OdmUnresolvedSectionError, PdfToDocumentOptions, docxToMarkdown, docxToOdt, docxToPdf, markdownToDocx, markdownToOdt, markdownToPdf, odbToCsv, odbToXlsx, odfToPdf, odgToPdf, odmToPdf, odpToPdf, odpToPptx, odsToPdf, odsToXlsx, odtToDocx, odtToMarkdown, odtToPdf, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxToOdp, pptxToPdf, xlsxToOds, xlsxToPdf } from "./convert/convert.js";
1
+ import { n as HsqldbDecodeOptions, r as HsqldbRowFormatError } from "./rowformat-Cl2exlEh.js";
2
+ import { c as firstChildByLocalName, d as textContent, i as MathMlText, l as isMathMlElement, n as MathMlElement, o as elementChildren, r as MathMlNode, s as elementLocalName, t as MathMlAttribute, u as localName } from "./nodes-pArN9ilm.js";
3
+ import { a as buildOfficeMathParagraph, i as buildOfficeMath, n as OmmlDiagnosticKind, r as OmmlWriteResult, t as OmmlDiagnostic } from "./write-Zqwx6pka.js";
4
+ import { DocumentBridgeOptions, DocumentToPdfOptions, OdbConversionOptions, OdbToCsvOptions, OdmToPdfOptions, OdmUnresolvedSectionError, PdfToDocumentOptions, docxToMarkdown, docxToOdt, docxToPdf, markdownToDocx, markdownToOdt, markdownToPdf, odbToCsv, odbToXlsx, odfToPdf, odgToPdf, odmToPdf, odpToPdf, odpToPptx, odsToPdf, odsToXlsx, odtToDocx, odtToMarkdown, odtToPdf, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxToOdp, pptxToPdf, xlsxToOds, xlsxToPdf } from "./convert/convert.js";
2
5
  import { ConversionRequest, ConversionResult, Diagnostic, DocumentConverter, DocumentFormat, DocumentPayload } from "./convert/port.js";
3
6
  import { docxPdfCodec, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, odgPdfCodec, odpPdfCodec, odpPptxCodec, odsPdfCodec, odsXlsxCodec, odtDocxCodec, odtPdfCodec, pptxPdfCodec, xlsxPdfCodec } from "./convert/codec.js";
4
7
  import { createLocalDocumentConverter } from "./convert/local.js";
5
- import { buildDocxPackage } from "./edit/docx/content.js";
8
+ import { BuildDocxPackageOptions, buildDocxPackage } from "./edit/docx/content.js";
6
9
  import { a as rgbHexToColor, n as LayoutColor, t as COLOR_BLACK } from "./color-Bo228AY2.js";
7
10
  import { t as DocxRun } from "./run-D2rTWHbt.js";
8
11
  import { DocxParagraph } from "./edit/docx/paragraph.js";
9
- import { DocxTable, DocxTableCell, DocxTableRow } from "./edit/docx/table.js";
12
+ import { DocxTable, DocxTableCell, DocxTableRow, DocxVerticalMerge } from "./edit/docx/table.js";
10
13
  import { DocxBody, DocxEditor, createDocx, openDocx } from "./edit/docx/editor.js";
14
+ import { a as PAGE_SIZE_A4, d as flipY, l as SLIDE_SIZE_STANDARD, o as PAGE_SIZE_LETTER, r as Margins, s as PageSize, t as Box, u as SLIDE_SIZE_WIDESCREEN } from "./geometry-DaJr8yQW.js";
11
15
  import { buildOdgPackage } from "./edit/odg/content.js";
12
- import { a as PAGE_SIZE_A4, d as flipY, l as SLIDE_SIZE_STANDARD, o as PAGE_SIZE_LETTER, r as Margins, s as PageSize, t as Box, u as SLIDE_SIZE_WIDESCREEN } from "./geometry-DvwdrIij.js";
13
16
  import { i as LayoutFont, r as DEFAULT_LAYOUT_FONT, t as Alignment } from "./style-DkamR3aY.js";
14
17
  import { n as RunInit, t as OdtRun } from "./run-CJfh8rv3.js";
15
18
  import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-CoUi_88j.js";
16
19
  import { n as OdtListItem, t as OdtList } from "./list-CvKxhy3y.js";
17
- import { t as OdpShape } from "./shape-BfN3m52m.js";
18
- import { a as OdgLineVector, n as LineVectorInit, o as OdgPathVector, r as OdgBoxVector, s as PathVectorInit, t as BoxVectorInit } from "./vector-ClohqsOe.js";
20
+ import { t as OdpShape } from "./shape-CVXedeL7.js";
21
+ import { a as OdgLineVector, n as LineVectorInit, o as OdgPathVector, r as OdgBoxVector, s as PathVectorInit, t as BoxVectorInit } from "./vector-Puuqu_IT.js";
19
22
  import { OdgPage, PageImageInit, TextBoxInit } from "./edit/odg/page.js";
20
23
  import { OdgEditor, createOdg, openOdg } from "./edit/odg/editor.js";
21
24
  import { buildOdpPackage } from "./edit/odp/content.js";
22
- import { OdpSlide, SlideImageInit, TextBoxInit as TextBoxInit$1 } from "./edit/odp/slide.js";
25
+ import { i as TableInit, n as OdtTableCell, r as OdtTableRow, t as OdtTable } from "./table-DqfqMkVq.js";
26
+ import { OdpSlide, SlideImageInit, SlideTableInit, TextBoxInit as TextBoxInit$1 } from "./edit/odp/slide.js";
23
27
  import { OdpEditor, createOdp, openOdp } from "./edit/odp/editor.js";
24
28
  import { t as OdsCell } from "./cell-CNHPsDEk.js";
25
29
  import { buildOdsPackage } from "./edit/ods/content.js";
26
30
  import { OdsSheet } from "./edit/ods/sheet.js";
27
31
  import { OdsEditor, createOds, openOds } from "./edit/ods/editor.js";
28
32
  import { buildOdtPackage } from "./edit/odt/content.js";
29
- import { OdtTable, OdtTableCell, OdtTableRow, TableInit } from "./edit/odt/table.js";
30
33
  import { OdtBody, OdtEditor, createOdt, openOdt } from "./edit/odt/editor.js";
31
34
  import { buildPptxPackage } from "./edit/pptx/content.js";
32
- import { n as DrawingRunInit, r as PptxShape, t as DrawingParagraphInit } from "./shape-CTkl6kt8.js";
33
- import { PptxSlide, SlideImageInit as SlideImageInit$1, TextBoxInit as TextBoxInit$2 } from "./edit/pptx/slide.js";
35
+ import { n as DrawingRunInit, r as PptxShape, t as DrawingParagraphInit } from "./shape-BkVcwPcf.js";
36
+ import { i as PptxTableRow, n as PptxTableCell, r as PptxTableInit, t as PptxTable } from "./table-DvS_7UQS.js";
37
+ import { PptxSlide, SlideImageInit as SlideImageInit$1, SlideTableInit as SlideTableInit$1, TextBoxInit as TextBoxInit$2 } from "./edit/pptx/slide.js";
34
38
  import { PptxEditor, createPptx, openPptx } from "./edit/pptx/editor.js";
35
39
  import { HsqldbColumn, HsqldbScriptParseError, HsqldbTable, displayTextFor, parseHsqldbScript } from "./hsqldb/script.js";
36
40
  import { t as FirebirdBackupParseError } from "./reader-DP0Mbaj4.js";
37
- import { D as FirebirdUnsupportedFieldTypeError } from "./blr-types-CYYC3yYU.js";
38
- import { r as FirebirdSchemaParseError } from "./schema-VkAA6pF5.js";
41
+ import { D as FirebirdUnsupportedFieldTypeError } from "./blr-types-DVgO1DQ9.js";
42
+ import { r as FirebirdSchemaParseError } from "./schema-CSKwSb_v.js";
39
43
  import { FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError } from "./firebird/data.js";
40
44
  import { FirebirdBackupFormatError, FirebirdBackupSummary, ReadFirebirdBackupResult, SUPPORTED_BACKUP_FORMAT_VERSION, readFirebirdBackup } from "./firebird/backup.js";
45
+ import { HsqldbBinaryScript, HsqldbBinaryScriptParseError, inflateHsqldbCompressedScript, parseHsqldbBinaryScript } from "./hsqldb/binary-script.js";
41
46
  import { decodeHsqldbCachedTables } from "./hsqldb/cache.js";
42
- import { HsqldbRowFormatError } from "./hsqldb/rowformat.js";
43
47
  import { DocxBytesSchema, MarkdownBytesSchema, OdgBytesSchema, OdpBytesSchema, OdsBytesSchema, OdtBytesSchema, PdfBytesSchema, PptxBytesSchema, XlsxBytesSchema } from "./model/bytes.js";
44
48
  import { MathBox, MathColor, MathDiagnostic, MathDiagnosticKind, MathGlyphRun, MathLayoutItem, MathLayoutResult, MathRule, MathStroke } from "./mathml/layout-types.js";
45
49
  import { MathFontMetrics, MathGlyphMetrics } from "./mathml/metrics.js";
46
- import { c as firstChildByLocalName, d as textContent, i as MathMlText, l as isMathMlElement, n as MathMlElement, o as elementChildren, r as MathMlNode, s as elementLocalName, t as MathMlAttribute, u as localName } from "./nodes-pArN9ilm.js";
47
50
  import { MathVariant, applyMathVariant, isMathVariant, mapMathVariant } from "./mathml/variant.js";
48
51
  import { LayoutFormulaOptions, layoutFormula } from "./mathml/layout.js";
49
52
  import { OperatorProperties, operatorProperties } from "./mathml/operators.js";
50
53
  import { readDocxContent } from "./ooxml/docx/read.js";
51
54
  import { readPptxContent } from "./ooxml/pptx/read.js";
52
- import { EmbeddedFormula } from "./model/formula.js";
53
- import { OdtContentResult, readOdtContent } from "./odf/odt/read.js";
54
- import { OdpContentResult, readOdpContent } from "./odf/odp/read.js";
55
+ import { readOdtContent } from "./odf/odt/read.js";
56
+ import { readOdpContent } from "./odf/odp/read.js";
55
57
  import { readOdsContent } from "./odf/ods/read.js";
56
58
  import { readOdgContent } from "./odf/odg/read.js";
57
- import { StandaloneFormulaContent, readOdfEmbeddedFormula, readOdfFormulaContent } from "./odf/formula/read.js";
59
+ import { readOdfEmbeddedFormula, readOdfFormulaContent } from "./odf/formula/read.js";
58
60
  import { decodeMarkdownText, encodeMarkdownText } from "./markdown/text.js";
59
61
  import { readMarkdownContent } from "./markdown/read.js";
60
62
  import { buildMarkdownText } from "./markdown/write.js";
63
+ import { buildFormulaBlock, formulaDocument, formulaOfBlock, formulaPlaceholderText } from "./model/formula.js";
64
+ import { buildDrawingBlock, drawingOfBlock } from "./model/embedded-drawing.js";
61
65
  import { EngineLayoutOptions, WordprocessingLayoutResult, convertWordprocessingToLayout } from "./layout/engine.js";
62
66
  import { PresentationLayoutResult, SlidesLayoutOptions, convertPresentationToLayout } from "./layout/slides.js";
63
67
  import { SheetsLayoutOptions, convertSpreadsheetToLayout } from "./layout/sheets.js";
64
68
  import { DrawingLayoutOptions, convertDrawingToLayout } from "./layout/drawing.js";
69
+ import { CellTypeDeclineReason, CellTypeInference, CellTypeInferenceResult, CellTypeInferenceSink, CellTypeRule, inferCellValue } from "./layout/cell-typing.js";
65
70
  import { ReconstructOptions, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing } from "./layout/reconstruct.js";
71
+ import { GridLattice, detectGridLattice } from "./layout/lattice.js";
66
72
  import { OdbNoEmbeddedDataSourceError, OdbUnsupportedFormat, OdbUnsupportedFormatError, readOdbTables } from "./odb/read.js";
67
73
  import { odbTablesToSpreadsheetDocument } from "./odb/spreadsheet.js";
74
+ import { readOdbForms, readOdbReports } from "./odb/components.js";
68
75
  import { OdbTableNotFoundError, OdbTableNotSpecifiedError } from "./odb/csv.js";
69
76
  import { ClockPort, fixedClock, systemClock } from "./ports/clock.js";
70
77
  import { throwIfAborted } from "./ports/abort.js";
71
78
  import { Attribute, AttributeSchema, BinaryPart, BinaryPartSchema, Comment, CommentSchema, CompactAttrPairs, CompactPackage, CompactPackageSchema, CompactPart, CompactPartSchema, CompactXmlNode, CompactXmlNodeSchema, DefinedName, DefinedNameSchema, Package, PackageSchema, Part, PartSchema, Relationship, XmlCdata, XmlCdataSchema, XmlComment, XmlCommentSchema, XmlDeclaration, XmlDeclarationSchema, XmlElement, XmlElementSchema, XmlNode, XmlNodeSchema, XmlPart, XmlPartSchema, XmlPi, XmlPiSchema, XmlText, XmlTextSchema, attr, base64ToBytes, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, elementsWithTag, encodeCompactPackage, encodePackage, fromCompact, isCompactXmlNode, isXmlNode, packageCodec, parsePackage, parseXml, resolveRelationships, rootElement, serializePackage, textContent as textContent$1, toCompact, unzipPackage, walk, xmlCodec, zipPackage } from "ooxml.js";
72
79
  import { CONTENT_FORMAT_VERSION, ContentBlock, ContentBlockSchema, ContentCellValue, ContentCellValueSchema, ContentDocument, ContentDocumentJson, ContentDocumentSchema, ContentDrawPage, ContentDrawPageSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStrokeSchema, ContentSubpath, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DocumentJsonResult, DocumentPackage, DocumentPackageJson, DocumentPackageSchema, DocumentSchemaKind, LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocumentJson, LayoutDocumentSchema, LayoutEllipse, LayoutImage, LayoutImageAsset, LayoutItem, LayoutLine, LayoutLink, LayoutMetadata, LayoutPage, LayoutPath, LayoutPathSegment, LayoutRect, LayoutSubpath, LayoutText, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, layoutDocumentWithSchema, schemaUriFor } from "document-schema.js";
80
+ import { OdbComponentInfo, OdbConnectionInfo, OdbForm, OdbFormControl, OdbFormDefinition, OdbInventory, OdbQueryInfo, OdbReport, OdbReportBand, OdbReportElement, OdbReportFunction, OdbReportGroup, readOdbForm, readOdbInventory, readOdbReport, resolveOdbComponent } from "odf.js";
73
81
  import { LoadedMathFont, MathFont, MathFontDescriptorMetrics, NOOP_DIAGNOSTIC_SINK, PdfDiagnostic, PdfDiagnosticSeverity, PdfDiagnosticSink, PdfEncryptedError, PdfParseError, PositionedFormula, ReadPdfOptions, WinAnsiSubstitution, WritePdfOptions, loadMathFont, pdfCodec, readPdf, writePdf } from "pdf-codec";
74
- export { type Alignment, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, COLOR_BLACK, CONTENT_FORMAT_VERSION, type ClockPort, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ContentBlock, ContentBlockSchema, type ContentCellValue, ContentCellValueSchema, type ContentDocument, type ContentDocumentJson, ContentDocumentSchema, type ContentDrawPage, ContentDrawPageSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentPathPoint, ContentPathPointSchema, type ContentPathSegment, ContentPathSegmentSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStroke, ContentStrokeSchema, type ContentSubpath, ContentSubpathSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type ContentVector, ContentVectorSchema, type ConversionRequest, type ConversionResult, DEFAULT_LAYOUT_FONT, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentBridgeOptions, type DocumentConverter, type DocumentFormat, type DocumentJsonResult, type DocumentPackage, type DocumentPackageJson, DocumentPackageSchema, type DocumentPayload, type DocumentSchemaKind, type DocumentToPdfOptions, type DocxBody, DocxBytesSchema, DocxEditor, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, type DrawingLayoutOptions, type DrawingParagraphInit, type DrawingRunInit, type EmbeddedFormula, type EngineLayoutOptions, SUPPORTED_BACKUP_FORMAT_VERSION as FIREBIRD_SUPPORTED_BACKUP_FORMAT_VERSION, FirebirdBackupFormatError, FirebirdBackupParseError, type FirebirdBackupSummary, FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError, FirebirdSchemaParseError, FirebirdUnsupportedFieldTypeError, type HsqldbColumn, HsqldbRowFormatError, HsqldbScriptParseError, type HsqldbTable, LAYOUT_FORMAT_VERSION, type LayoutColor, type LayoutDocument, type LayoutDocumentJson, LayoutDocumentSchema, type LayoutEllipse, type LayoutFont, type LayoutFormulaOptions, type LayoutImage, type LayoutImageAsset, type LayoutItem, type LayoutLine, type LayoutLink, type LayoutMetadata, type LayoutPage, type LayoutPath, type LayoutPathSegment, type LayoutRect, type LayoutSubpath, type LayoutText, type LoadedMathFont, type Margins, MarkdownBytesSchema, type MathBox, type MathColor, type MathDiagnostic, type MathDiagnosticKind, type MathFont, type MathFontDescriptorMetrics, type MathFontMetrics, type MathGlyphMetrics, type MathGlyphRun, type MathLayoutItem, type MathLayoutResult, type MathMlAttribute, type MathMlElement, type MathMlNode, type MathMlText, type MathRule, type MathStroke, type MathVariant, NOOP_DIAGNOSTIC_SINK, OdbNoEmbeddedDataSourceError, OdbTableNotFoundError, OdbTableNotSpecifiedError, type OdbToCsvOptions, type OdbUnsupportedFormat, OdbUnsupportedFormatError, OdgBoxVector, type BoxVectorInit as OdgBoxVectorInit, OdgBytesSchema, OdgEditor, OdgLineVector, type LineVectorInit as OdgLineVectorInit, OdgPage, type PageImageInit as OdgPageImageInit, OdgPathVector, type PathVectorInit as OdgPathVectorInit, type TextBoxInit as OdgTextBoxInit, type OdmToPdfOptions, OdmUnresolvedSectionError, OdpBytesSchema, type OdpContentResult, OdpEditor, OdpShape, OdpSlide, type SlideImageInit as OdpSlideImageInit, type TextBoxInit$1 as OdpTextBoxInit, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, type OdtBody, OdtBytesSchema, type OdtContentResult, OdtEditor, OdtList, OdtListItem, OdtParagraph, type ParagraphInit as OdtParagraphInit, OdtRun, type RunInit as OdtRunInit, OdtTable, OdtTableCell, type TableInit as OdtTableInit, OdtTableRow, type OperatorProperties, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageSize, type Part, PartSchema, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEncryptedError, PdfParseError, type PdfToDocumentOptions, type PositionedFormula, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, type PresentationLayoutResult, type ReadFirebirdBackupResult, type ReadPdfOptions, type ReconstructOptions, type Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, type SheetsLayoutOptions, type SlideImageInit$1 as SlideImageInit, type SlidesLayoutOptions, type StandaloneFormulaContent, type TextBoxInit$2 as TextBoxInit, UnrecognizedDocumentSchemaError, type WinAnsiSubstitution, type WordprocessingLayoutResult, type WritePdfOptions, XlsxBytesSchema, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildDocxPackage, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildPptxPackage, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocx, createLocalDocumentConverter, createOdg, createOdp, createOds, createOdt, createPptx, decodeCompactPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodePackage, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeMarkdownText, encodePackage, firstChildByLocalName, fixedClock, flipY, fromCompact, displayTextFor as hsqldbCellDisplayText, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, layoutDocumentWithSchema, layoutFormula, loadMathFont, localName, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToDocx, markdownToOdt, markdownToPdf, textContent as mathMlTextContent, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgToPdf, odmToPdf, odpPdfCodec, odpPptxCodec, odpToPdf, odpToPptx, odsPdfCodec, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToPdf, openDocx, openOdg, openOdp, openOds, openOdt, openPptx, operatorProperties, packageCodec, parseHsqldbScript, parsePackage, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToOdp, pptxToPdf, readDocxContent, readFirebirdBackup, readMarkdownContent, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readPdf, readPptxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, resolveRelationships, rgbHexToColor, rootElement, schemaUriFor, serializePackage, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, unzipPackage, walk, writePdf, xlsxPdfCodec, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
82
+ export { type Alignment, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, type BuildDocxPackageOptions, COLOR_BLACK, CONTENT_FORMAT_VERSION, type CellTypeDeclineReason, type CellTypeInference, type CellTypeInferenceResult, type CellTypeInferenceSink, type CellTypeRule, type ClockPort, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ContentBlock, ContentBlockSchema, type ContentCellValue, ContentCellValueSchema, type ContentDocument, type ContentDocumentJson, ContentDocumentSchema, type ContentDrawPage, ContentDrawPageSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentPathPoint, ContentPathPointSchema, type ContentPathSegment, ContentPathSegmentSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStroke, ContentStrokeSchema, type ContentSubpath, ContentSubpathSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type ContentVector, ContentVectorSchema, type ConversionRequest, type ConversionResult, DEFAULT_LAYOUT_FONT, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentBridgeOptions, type DocumentConverter, type DocumentFormat, type DocumentJsonResult, type DocumentPackage, type DocumentPackageJson, DocumentPackageSchema, type DocumentPayload, type DocumentSchemaKind, type DocumentToPdfOptions, type DocxBody, DocxBytesSchema, DocxEditor, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, type DocxVerticalMerge, type DrawingLayoutOptions, type DrawingParagraphInit, type DrawingRunInit, type EngineLayoutOptions, SUPPORTED_BACKUP_FORMAT_VERSION as FIREBIRD_SUPPORTED_BACKUP_FORMAT_VERSION, FirebirdBackupFormatError, FirebirdBackupParseError, type FirebirdBackupSummary, FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError, FirebirdSchemaParseError, FirebirdUnsupportedFieldTypeError, type GridLattice, type HsqldbBinaryScript, HsqldbBinaryScriptParseError, type HsqldbColumn, type HsqldbDecodeOptions, HsqldbRowFormatError, HsqldbScriptParseError, type HsqldbTable, LAYOUT_FORMAT_VERSION, type LayoutColor, type LayoutDocument, type LayoutDocumentJson, LayoutDocumentSchema, type LayoutEllipse, type LayoutFont, type LayoutFormulaOptions, type LayoutImage, type LayoutImageAsset, type LayoutItem, type LayoutLine, type LayoutLink, type LayoutMetadata, type LayoutPage, type LayoutPath, type LayoutPathSegment, type LayoutRect, type LayoutSubpath, type LayoutText, type LoadedMathFont, type Margins, MarkdownBytesSchema, type MathBox, type MathColor, type MathDiagnostic, type MathDiagnosticKind, type MathFont, type MathFontDescriptorMetrics, type MathFontMetrics, type MathGlyphMetrics, type MathGlyphRun, type MathLayoutItem, type MathLayoutResult, type MathMlAttribute, type MathMlElement, type MathMlNode, type MathMlText, type MathRule, type MathStroke, type MathVariant, NOOP_DIAGNOSTIC_SINK, type OdbComponentInfo, type OdbConnectionInfo, type OdbConversionOptions, type OdbForm, type OdbFormControl, type OdbFormDefinition, type OdbInventory, OdbNoEmbeddedDataSourceError, type OdbQueryInfo, type OdbReport, type OdbReportBand, type OdbReportElement, type OdbReportFunction, type OdbReportGroup, OdbTableNotFoundError, OdbTableNotSpecifiedError, type OdbToCsvOptions, type OdbUnsupportedFormat, OdbUnsupportedFormatError, OdgBoxVector, type BoxVectorInit as OdgBoxVectorInit, OdgBytesSchema, OdgEditor, OdgLineVector, type LineVectorInit as OdgLineVectorInit, OdgPage, type PageImageInit as OdgPageImageInit, OdgPathVector, type PathVectorInit as OdgPathVectorInit, type TextBoxInit as OdgTextBoxInit, type OdmToPdfOptions, OdmUnresolvedSectionError, OdpBytesSchema, OdpEditor, OdpShape, OdpSlide, type SlideImageInit as OdpSlideImageInit, type SlideTableInit as OdpSlideTableInit, type TextBoxInit$1 as OdpTextBoxInit, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, type OdtBody, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, type ParagraphInit as OdtParagraphInit, OdtRun, type RunInit as OdtRunInit, OdtTable, OdtTableCell, type TableInit as OdtTableInit, OdtTableRow, type OmmlDiagnostic, type OmmlDiagnosticKind, type OmmlWriteResult, type OperatorProperties, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageSize, type Part, PartSchema, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEncryptedError, PdfParseError, type PdfToDocumentOptions, type PositionedFormula, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, type PptxTableInit, PptxTableRow, type PresentationLayoutResult, type ReadFirebirdBackupResult, type ReadPdfOptions, type ReconstructOptions, type Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, type SheetsLayoutOptions, type SlideImageInit$1 as SlideImageInit, type SlideTableInit$1 as SlideTableInit, type SlidesLayoutOptions, type TextBoxInit$2 as TextBoxInit, UnrecognizedDocumentSchemaError, type WinAnsiSubstitution, type WordprocessingLayoutResult, type WritePdfOptions, XlsxBytesSchema, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocx, createLocalDocumentConverter, createOdg, createOdp, createOds, createOdt, createPptx, decodeCompactPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodePackage, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeMarkdownText, encodePackage, firstChildByLocalName, fixedClock, flipY, formulaDocument, formulaOfBlock, formulaPlaceholderText, fromCompact, displayTextFor as hsqldbCellDisplayText, inferCellValue, inflateHsqldbCompressedScript, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, layoutDocumentWithSchema, layoutFormula, loadMathFont, localName, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToDocx, markdownToOdt, markdownToPdf, textContent as mathMlTextContent, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgToPdf, odmToPdf, odpPdfCodec, odpPptxCodec, odpToPdf, odpToPptx, odsPdfCodec, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToPdf, openDocx, openOdg, openOdp, openOds, openOdt, openPptx, operatorProperties, packageCodec, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToOdp, pptxToPdf, readDocxContent, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readPdf, readPptxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, resolveOdbComponent, resolveRelationships, rgbHexToColor, rootElement, schemaUriFor, serializePackage, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, unzipPackage, walk, writePdf, xlsxPdfCodec, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
package/dist/index.js CHANGED
@@ -2,14 +2,21 @@ import { PAGE_SIZE_A4, PAGE_SIZE_LETTER, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCR
2
2
  import { COLOR_BLACK, rgbHexToColor } from "./model/color.js";
3
3
  import { DEFAULT_LAYOUT_FONT } from "./model/style.js";
4
4
  import { DocxBytesSchema, MarkdownBytesSchema, OdgBytesSchema, OdpBytesSchema, OdsBytesSchema, OdtBytesSchema, PdfBytesSchema, PptxBytesSchema, XlsxBytesSchema } from "./model/bytes.js";
5
+ import { elementChildren, elementLocalName, firstChildByLocalName, isMathMlElement, localName, textContent } from "./mathml/nodes.js";
6
+ import { operatorProperties } from "./mathml/operators.js";
7
+ import { applyMathVariant, isMathVariant, mapMathVariant } from "./mathml/variant.js";
8
+ import { buildOfficeMath, buildOfficeMathParagraph } from "./omml/write.js";
5
9
  import { DocxRun } from "./edit/docx/run.js";
6
10
  import { DocxParagraph } from "./edit/docx/paragraph.js";
7
11
  import { DocxTable, DocxTableCell, DocxTableRow } from "./edit/docx/table.js";
8
12
  import { DocxEditor, createDocx, openDocx } from "./edit/docx/editor.js";
13
+ import { buildFormulaBlock, formulaDocument, formulaOfBlock, formulaPlaceholderText } from "./model/formula.js";
9
14
  import { buildDocxPackage } from "./edit/docx/content.js";
10
15
  import { PptxShape } from "./edit/pptx/shape.js";
16
+ import { PptxTable, PptxTableCell, PptxTableRow } from "./edit/pptx/table.js";
11
17
  import { PptxSlide } from "./edit/pptx/slide.js";
12
18
  import { PptxEditor, createPptx, openPptx } from "./edit/pptx/editor.js";
19
+ import { buildDrawingBlock, drawingOfBlock } from "./model/embedded-drawing.js";
13
20
  import { buildPptxPackage } from "./edit/pptx/content.js";
14
21
  import { OdtRun } from "./edit/odt/run.js";
15
22
  import { OdtParagraph } from "./edit/odt/paragraph.js";
@@ -29,9 +36,6 @@ import { OdgBoxVector, OdgLineVector, OdgPathVector } from "./edit/odg/vector.js
29
36
  import { OdgPage } from "./edit/odg/page.js";
30
37
  import { OdgEditor, createOdg, openOdg } from "./edit/odg/editor.js";
31
38
  import { buildOdgPackage } from "./edit/odg/content.js";
32
- import { elementChildren, elementLocalName, firstChildByLocalName, isMathMlElement, localName, textContent } from "./mathml/nodes.js";
33
- import { operatorProperties } from "./mathml/operators.js";
34
- import { applyMathVariant, isMathVariant, mapMathVariant } from "./mathml/variant.js";
35
39
  import { layoutFormula } from "./mathml/layout.js";
36
40
  import { readDocxContent } from "./ooxml/docx/read.js";
37
41
  import { readPptxContent } from "./ooxml/pptx/read.js";
@@ -48,10 +52,13 @@ import { convertPresentationToLayout } from "./layout/slides.js";
48
52
  import { throwIfAborted } from "./ports/abort.js";
49
53
  import { convertSpreadsheetToLayout } from "./layout/sheets.js";
50
54
  import { convertDrawingToLayout } from "./layout/drawing.js";
55
+ import { inferCellValue } from "./layout/cell-typing.js";
56
+ import { detectGridLattice } from "./layout/lattice.js";
51
57
  import { reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing } from "./layout/reconstruct.js";
52
58
  import { HsqldbScriptParseError, displayTextFor, parseHsqldbScript } from "./hsqldb/script.js";
53
59
  import { OdbTableNotFoundError, OdbTableNotSpecifiedError } from "./odb/csv.js";
54
60
  import { HsqldbRowFormatError } from "./hsqldb/rowformat.js";
61
+ import { HsqldbBinaryScriptParseError, inflateHsqldbCompressedScript, parseHsqldbBinaryScript } from "./hsqldb/binary-script.js";
55
62
  import { decodeHsqldbCachedTables } from "./hsqldb/cache.js";
56
63
  import { FirebirdBackupParseError } from "./firebird/reader.js";
57
64
  import { FirebirdUnsupportedFieldTypeError } from "./firebird/blr-types.js";
@@ -62,9 +69,11 @@ import { OdbNoEmbeddedDataSourceError, OdbUnsupportedFormatError, readOdbTables
62
69
  import { odbTablesToSpreadsheetDocument } from "./odb/spreadsheet.js";
63
70
  import { OdmUnresolvedSectionError, docxToMarkdown, docxToOdt, docxToPdf, markdownToDocx, markdownToOdt, markdownToPdf, odbToCsv, odbToXlsx, odfToPdf, odgToPdf, odmToPdf, odpToPdf, odpToPptx, odsToPdf, odsToXlsx, odtToDocx, odtToMarkdown, odtToPdf, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxToOdp, pptxToPdf, xlsxToOds, xlsxToPdf } from "./convert/convert.js";
64
71
  import { docxPdfCodec, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, odgPdfCodec, odpPdfCodec, odpPptxCodec, odsPdfCodec, odsXlsxCodec, odtDocxCodec, odtPdfCodec, pptxPdfCodec, xlsxPdfCodec } from "./convert/codec.js";
72
+ import { readOdbForms, readOdbReports } from "./odb/components.js";
65
73
  import { createLocalDocumentConverter } from "./convert/local.js";
66
74
  import { fixedClock, systemClock } from "./ports/clock.js";
67
75
  import { AttributeSchema, BinaryPartSchema, CommentSchema, CompactPackageSchema, CompactPartSchema, CompactXmlNodeSchema, DefinedNameSchema, PackageSchema, PartSchema, XmlCdataSchema, XmlCommentSchema, XmlDeclarationSchema, XmlElementSchema, XmlNodeSchema, XmlPartSchema, XmlPiSchema, XmlTextSchema, attr, base64ToBytes, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, elementsWithTag, encodeCompactPackage, encodePackage, fromCompact, isCompactXmlNode, isXmlNode, packageCodec, parsePackage, parseXml, resolveRelationships, rootElement, serializePackage, textContent as textContent$1, toCompact, unzipPackage, walk, xmlCodec, zipPackage } from "ooxml.js";
68
76
  import { CONTENT_FORMAT_VERSION, ContentBlockSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentImageBlockSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, DocumentPackageSchema, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, UnrecognizedDocumentSchemaError, contentDocumentWithSchema, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, isContentBlock, layoutDocumentWithSchema, schemaUriFor } from "document-schema.js";
77
+ import { readOdbForm, readOdbInventory, readOdbReport, resolveOdbComponent } from "odf.js";
69
78
  import { NOOP_DIAGNOSTIC_SINK, PdfEncryptedError, PdfParseError, loadMathFont, pdfCodec, readPdf, writePdf } from "pdf-codec";
70
- export { AttributeSchema, BinaryPartSchema, COLOR_BLACK, CONTENT_FORMAT_VERSION, CommentSchema, CompactPackageSchema, CompactPartSchema, CompactXmlNodeSchema, ContentBlockSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentImageBlockSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DefinedNameSchema, DocumentPackageSchema, DocxBytesSchema, DocxEditor, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, SUPPORTED_BACKUP_FORMAT_VERSION as FIREBIRD_SUPPORTED_BACKUP_FORMAT_VERSION, FirebirdBackupFormatError, FirebirdBackupParseError, FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError, FirebirdSchemaParseError, FirebirdUnsupportedFieldTypeError, HsqldbRowFormatError, HsqldbScriptParseError, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, MarkdownBytesSchema, NOOP_DIAGNOSTIC_SINK, OdbNoEmbeddedDataSourceError, OdbTableNotFoundError, OdbTableNotSpecifiedError, OdbUnsupportedFormatError, OdgBoxVector, OdgBytesSchema, OdgEditor, OdgLineVector, OdgPage, OdgPathVector, OdmUnresolvedSectionError, OdpBytesSchema, OdpEditor, OdpShape, OdpSlide, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, OdtRun, OdtTable, OdtTableCell, OdtTableRow, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageSchema, PartSchema, PdfBytesSchema, PdfEncryptedError, PdfParseError, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, XlsxBytesSchema, XmlCdataSchema, XmlCommentSchema, XmlDeclarationSchema, XmlElementSchema, XmlNodeSchema, XmlPartSchema, XmlPiSchema, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildDocxPackage, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildPptxPackage, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocx, createLocalDocumentConverter, createOdg, createOdp, createOds, createOdt, createPptx, decodeCompactPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodePackage, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeMarkdownText, encodePackage, firstChildByLocalName, fixedClock, flipY, fromCompact, displayTextFor as hsqldbCellDisplayText, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, layoutDocumentWithSchema, layoutFormula, loadMathFont, localName, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToDocx, markdownToOdt, markdownToPdf, textContent as mathMlTextContent, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgToPdf, odmToPdf, odpPdfCodec, odpPptxCodec, odpToPdf, odpToPptx, odsPdfCodec, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToPdf, openDocx, openOdg, openOdp, openOds, openOdt, openPptx, operatorProperties, packageCodec, parseHsqldbScript, parsePackage, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToOdp, pptxToPdf, readDocxContent, readFirebirdBackup, readMarkdownContent, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readPdf, readPptxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, resolveRelationships, rgbHexToColor, rootElement, schemaUriFor, serializePackage, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, unzipPackage, walk, writePdf, xlsxPdfCodec, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
79
+ export { AttributeSchema, BinaryPartSchema, COLOR_BLACK, CONTENT_FORMAT_VERSION, CommentSchema, CompactPackageSchema, CompactPartSchema, CompactXmlNodeSchema, ContentBlockSchema, ContentCellValueSchema, ContentDocumentSchema, ContentDrawPageSchema, ContentImageBlockSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentPathPointSchema, ContentPathSegmentSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeSchema, ContentSubpathSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DefinedNameSchema, DocumentPackageSchema, DocxBytesSchema, DocxEditor, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, SUPPORTED_BACKUP_FORMAT_VERSION as FIREBIRD_SUPPORTED_BACKUP_FORMAT_VERSION, FirebirdBackupFormatError, FirebirdBackupParseError, FirebirdCompositeRecordUnsupportedError, FirebirdDataParseError, FirebirdSchemaParseError, FirebirdUnsupportedFieldTypeError, HsqldbBinaryScriptParseError, HsqldbRowFormatError, HsqldbScriptParseError, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, MarkdownBytesSchema, NOOP_DIAGNOSTIC_SINK, OdbNoEmbeddedDataSourceError, OdbTableNotFoundError, OdbTableNotSpecifiedError, OdbUnsupportedFormatError, OdgBoxVector, OdgBytesSchema, OdgEditor, OdgLineVector, OdgPage, OdgPathVector, OdmUnresolvedSectionError, OdpBytesSchema, OdpEditor, OdpShape, OdpSlide, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, OdtRun, OdtTable, OdtTableCell, OdtTableRow, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageSchema, PartSchema, PdfBytesSchema, PdfEncryptedError, PdfParseError, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, PptxTableRow, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, UnrecognizedDocumentSchemaError, XlsxBytesSchema, XmlCdataSchema, XmlCommentSchema, XmlDeclarationSchema, XmlElementSchema, XmlNodeSchema, XmlPartSchema, XmlPiSchema, XmlTextSchema, applyMathVariant, attr, base64ToBytes, buildDocxPackage, buildDrawingBlock, buildFormulaBlock, buildMarkdownText, buildOdgPackage, buildOdpPackage, buildOdsPackage, buildOdtPackage, buildOfficeMath, buildOfficeMathParagraph, buildPptxPackage, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocx, createLocalDocumentConverter, createOdg, createOdp, createOds, createOdt, createPptx, decodeCompactPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodePackage, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeMarkdownText, encodePackage, firstChildByLocalName, fixedClock, flipY, formulaDocument, formulaOfBlock, formulaPlaceholderText, fromCompact, displayTextFor as hsqldbCellDisplayText, inferCellValue, inflateHsqldbCompressedScript, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, layoutDocumentWithSchema, layoutFormula, loadMathFont, localName, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToDocx, markdownToOdt, markdownToPdf, textContent as mathMlTextContent, odbTablesToSpreadsheetDocument, odbToCsv, odbToXlsx, odfToPdf, odgPdfCodec, odgToPdf, odmToPdf, odpPdfCodec, odpPptxCodec, odpToPdf, odpToPptx, odsPdfCodec, odsToPdf, odsToXlsx, odsXlsxCodec, odtDocxCodec, odtPdfCodec, odtToDocx, odtToMarkdown, odtToPdf, openDocx, openOdg, openOdp, openOds, openOdt, openPptx, operatorProperties, packageCodec, parseHsqldbBinaryScript, parseHsqldbScript, parsePackage, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToOdp, pptxToPdf, readDocxContent, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readPdf, readPptxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, resolveOdbComponent, resolveRelationships, rgbHexToColor, rootElement, schemaUriFor, serializePackage, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, unzipPackage, walk, writePdf, xlsxPdfCodec, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
@@ -0,0 +1,209 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/layout/cell-typing.ts
3
+ const CURRENCY_SYMBOLS = /* @__PURE__ */ new Map([
4
+ ["$", void 0],
5
+ ["¥", void 0],
6
+ ["£", "GBP"],
7
+ ["€", "EUR"],
8
+ ["₹", "INR"],
9
+ ["₩", "KRW"],
10
+ ["₽", "RUB"]
11
+ ]);
12
+ const MONTH_NAMES = new Map([
13
+ "january",
14
+ "february",
15
+ "march",
16
+ "april",
17
+ "may",
18
+ "june",
19
+ "july",
20
+ "august",
21
+ "september",
22
+ "october",
23
+ "november",
24
+ "december"
25
+ ].flatMap((name, index) => [[name, index + 1], [name.slice(0, 3), index + 1]]));
26
+ const BOOLEAN_LITERALS = /* @__PURE__ */ new Map([["true", true], ["false", false]]);
27
+ const AMBIGUOUS_BOOLEAN_WORDS = /* @__PURE__ */ new Set([
28
+ "yes",
29
+ "no",
30
+ "y",
31
+ "n",
32
+ "on",
33
+ "off"
34
+ ]);
35
+ function normalizeWhitespace(text) {
36
+ return text.replace(/[\u00A0\u202F]/gu, " ").trim();
37
+ }
38
+ function exactlyRepresentable(canonicalDecimal) {
39
+ const parsed = Number(canonicalDecimal);
40
+ if (!Number.isFinite(parsed)) return;
41
+ const trimmed = canonicalDecimal.includes(".") ? canonicalDecimal.replace(/0+$/u, "").replace(/\.$/u, "") : canonicalDecimal;
42
+ return String(parsed) === trimmed ? parsed : void 0;
43
+ }
44
+ const PLAIN_NUMBER_PATTERN = /^(?<sign>[-+])?(?<integer>\d+)(?:\.(?<fraction>\d+))?$/u;
45
+ const GROUPED_NUMBER_PATTERN = /^(?<sign>[-+])?(?<lead>\d{1,3})(?<groups>(?:,\d{3})+)(?:\.(?<fraction>\d+))?$/u;
46
+ function parseNumericLiteral(text) {
47
+ const grouped = GROUPED_NUMBER_PATTERN.exec(text);
48
+ if (grouped?.groups !== void 0) {
49
+ const { sign, lead, groups, fraction } = grouped.groups;
50
+ if (lead.length > 1 && lead.startsWith("0")) return { declined: "leading-zero-digits" };
51
+ if (groups.length / 4 === 1 && fraction === void 0) return { declined: "ambiguous-grouping-separator" };
52
+ return {
53
+ canonicalDecimal: `${sign === "-" ? "-" : ""}${lead}${groups.replaceAll(",", "")}${fraction === void 0 ? "" : `.${fraction}`}`,
54
+ grouped: true
55
+ };
56
+ }
57
+ const plain = PLAIN_NUMBER_PATTERN.exec(text);
58
+ if (plain?.groups === void 0) return;
59
+ const { sign, integer, fraction } = plain.groups;
60
+ if (integer.length > 1 && integer.startsWith("0")) return { declined: "leading-zero-digits" };
61
+ return {
62
+ canonicalDecimal: `${sign === "-" ? "-" : ""}${integer}${fraction === void 0 ? "" : `.${fraction}`}`,
63
+ grouped: false
64
+ };
65
+ }
66
+ function isDecline(value) {
67
+ return value !== void 0 && "declined" in value;
68
+ }
69
+ const CURRENCY_PREFIX_PATTERN = /^(?<sign>-)?(?<symbol>[$£€¥₹₩₽])\s?(?<rest>.+)$/u;
70
+ function inferCurrency(text) {
71
+ const match = CURRENCY_PREFIX_PATTERN.exec(text);
72
+ if (match?.groups === void 0) return;
73
+ const { sign, symbol, rest } = match.groups;
74
+ const literal = parseNumericLiteral(rest);
75
+ if (isDecline(literal)) return {
76
+ outcome: "declined",
77
+ reason: literal.declined
78
+ };
79
+ if (literal === void 0) return;
80
+ const magnitude = exactlyRepresentable(literal.canonicalDecimal);
81
+ if (magnitude === void 0) return {
82
+ outcome: "declined",
83
+ reason: "precision-loss"
84
+ };
85
+ return {
86
+ outcome: "retyped",
87
+ value: {
88
+ kind: "currency",
89
+ value: sign === "-" ? -magnitude : magnitude,
90
+ currency: CURRENCY_SYMBOLS.get(symbol)
91
+ },
92
+ rule: "currency"
93
+ };
94
+ }
95
+ const PERCENT_HUNDREDTHS = 100;
96
+ function inferPercentage(text) {
97
+ if (!text.endsWith("%")) return;
98
+ const literal = parseNumericLiteral(text.slice(0, -1).trimEnd());
99
+ if (isDecline(literal)) return {
100
+ outcome: "declined",
101
+ reason: literal.declined
102
+ };
103
+ if (literal === void 0) return;
104
+ const magnitude = exactlyRepresentable(literal.canonicalDecimal);
105
+ if (magnitude === void 0) return {
106
+ outcome: "declined",
107
+ reason: "precision-loss"
108
+ };
109
+ return {
110
+ outcome: "retyped",
111
+ value: {
112
+ kind: "percentage",
113
+ value: magnitude / PERCENT_HUNDREDTHS
114
+ },
115
+ rule: "percentage"
116
+ };
117
+ }
118
+ const ISO_DATE_PATTERN = /^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/u;
119
+ const DAY_MONTH_YEAR_PATTERN = /^(?<day>\d{1,2})[\s-](?<month>[A-Za-z]{3,9})\.?[\s-](?<year>\d{4})$/u;
120
+ const MONTH_DAY_YEAR_PATTERN = /^(?<month>[A-Za-z]{3,9})\.?[\s-](?<day>\d{1,2}),?[\s-](?<year>\d{4})$/u;
121
+ const NUMERIC_SEPARATED_DATE_PATTERN = /^\d{1,4}[/.]\d{1,2}[/.]\d{1,4}$/u;
122
+ const MONTHS_PER_YEAR = 12;
123
+ function isRealCalendarDate(year, month, day) {
124
+ if (month < 1 || month > MONTHS_PER_YEAR || day < 1) return false;
125
+ const probe = new Date(Date.UTC(year, month - 1, day));
126
+ return probe.getUTCFullYear() === year && probe.getUTCMonth() === month - 1 && probe.getUTCDate() === day;
127
+ }
128
+ function isoDateValue(year, month, day) {
129
+ return `${String(year).padStart(4, "0")}-${String(month).padStart(2, "0")}-${String(day).padStart(2, "0")}`;
130
+ }
131
+ function inferDate(text) {
132
+ const iso = ISO_DATE_PATTERN.exec(text);
133
+ if (iso?.groups !== void 0) {
134
+ const year = Number(iso.groups.year);
135
+ const month = Number(iso.groups.month);
136
+ const day = Number(iso.groups.day);
137
+ return isRealCalendarDate(year, month, day) ? {
138
+ outcome: "retyped",
139
+ value: {
140
+ kind: "date",
141
+ value: isoDateValue(year, month, day)
142
+ },
143
+ rule: "iso-date"
144
+ } : void 0;
145
+ }
146
+ const named = DAY_MONTH_YEAR_PATTERN.exec(text) ?? MONTH_DAY_YEAR_PATTERN.exec(text);
147
+ if (named?.groups !== void 0) {
148
+ const month = MONTH_NAMES.get(named.groups.month.toLowerCase());
149
+ if (month === void 0) return;
150
+ const year = Number(named.groups.year);
151
+ const day = Number(named.groups.day);
152
+ return isRealCalendarDate(year, month, day) ? {
153
+ outcome: "retyped",
154
+ value: {
155
+ kind: "date",
156
+ value: isoDateValue(year, month, day)
157
+ },
158
+ rule: "named-month-date"
159
+ } : void 0;
160
+ }
161
+ return NUMERIC_SEPARATED_DATE_PATTERN.test(text) ? {
162
+ outcome: "declined",
163
+ reason: "ambiguous-date-order"
164
+ } : void 0;
165
+ }
166
+ function inferBoolean(text) {
167
+ const lowered = text.toLowerCase();
168
+ const literal = BOOLEAN_LITERALS.get(lowered);
169
+ if (literal !== void 0) return {
170
+ outcome: "retyped",
171
+ value: {
172
+ kind: "boolean",
173
+ value: literal
174
+ },
175
+ rule: "boolean-literal"
176
+ };
177
+ return AMBIGUOUS_BOOLEAN_WORDS.has(lowered) ? {
178
+ outcome: "declined",
179
+ reason: "ambiguous-boolean-word"
180
+ } : void 0;
181
+ }
182
+ function inferNumber(text) {
183
+ const literal = parseNumericLiteral(text);
184
+ if (isDecline(literal)) return {
185
+ outcome: "declined",
186
+ reason: literal.declined
187
+ };
188
+ if (literal === void 0) return;
189
+ const value = exactlyRepresentable(literal.canonicalDecimal);
190
+ if (value === void 0) return {
191
+ outcome: "declined",
192
+ reason: "precision-loss"
193
+ };
194
+ return {
195
+ outcome: "retyped",
196
+ value: {
197
+ kind: "number",
198
+ value
199
+ },
200
+ rule: literal.grouped ? "grouped-number" : "plain-number"
201
+ };
202
+ }
203
+ function inferCellValue(displayText) {
204
+ const text = normalizeWhitespace(displayText);
205
+ if (text.length === 0) return;
206
+ return inferBoolean(text) ?? inferDate(text) ?? inferCurrency(text) ?? inferPercentage(text) ?? inferNumber(text);
207
+ }
208
+ //#endregion
209
+ exports.inferCellValue = inferCellValue;
@@ -0,0 +1,22 @@
1
+ import { ContentCellValue } from "document-schema.js";
2
+ //#region src/layout/cell-typing.d.ts
3
+ type CellTypeRule = 'boolean-literal' | 'iso-date' | 'named-month-date' | 'plain-number' | 'grouped-number' | 'percentage' | 'currency';
4
+ type CellTypeDeclineReason = 'ambiguous-boolean-word' | 'ambiguous-date-order' | 'ambiguous-grouping-separator' | 'leading-zero-digits' | 'precision-loss';
5
+ type CellTypeInferenceResult = {
6
+ readonly outcome: 'retyped';
7
+ readonly value: ContentCellValue;
8
+ readonly rule: CellTypeRule;
9
+ } | {
10
+ readonly outcome: 'declined';
11
+ readonly reason: CellTypeDeclineReason;
12
+ };
13
+ type CellTypeInference = {
14
+ readonly sheetIndex: number;
15
+ readonly row: number;
16
+ readonly column: number;
17
+ readonly displayText: string;
18
+ } & CellTypeInferenceResult;
19
+ type CellTypeInferenceSink = (inference: CellTypeInference) => void;
20
+ declare function inferCellValue(displayText: string): CellTypeInferenceResult | undefined;
21
+ //#endregion
22
+ export { CellTypeDeclineReason, CellTypeInference, CellTypeInferenceResult, CellTypeInferenceSink, CellTypeRule, inferCellValue };