documents.js 1.63.0 → 1.64.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 (177) hide show
  1. package/README.md +113 -20
  2. package/dist/convert/convert.cjs +3 -3
  3. package/dist/convert/convert.d.cts +5 -2
  4. package/dist/convert/convert.d.ts +4 -1
  5. package/dist/convert/convert.js +3 -3
  6. package/dist/edit/docx/content.d.cts +1 -1
  7. package/dist/edit/docx/content.d.ts +1 -1
  8. package/dist/edit/docx/paragraph.d.cts +3 -3
  9. package/dist/edit/docx/paragraph.d.ts +3 -3
  10. package/dist/edit/ods/address.cjs +42 -24
  11. package/dist/edit/ods/address.d.cts +12 -2
  12. package/dist/edit/ods/address.d.ts +12 -2
  13. package/dist/edit/ods/address.js +39 -25
  14. package/dist/edit/ods/column-row.cjs +68 -6
  15. package/dist/edit/ods/column-row.d.cts +5 -1
  16. package/dist/edit/ods/column-row.d.ts +5 -1
  17. package/dist/edit/ods/column-row.js +68 -10
  18. package/dist/edit/ods/content.cjs +10 -2
  19. package/dist/edit/ods/content.js +10 -2
  20. package/dist/edit/ods/floating.cjs +90 -0
  21. package/dist/edit/ods/floating.d.cts +7 -0
  22. package/dist/edit/ods/floating.d.ts +7 -0
  23. package/dist/edit/ods/floating.js +88 -0
  24. package/dist/edit/ods/print-settings.cjs +158 -2
  25. package/dist/edit/ods/print-settings.js +159 -3
  26. package/dist/edit/ods/sheet.cjs +13 -0
  27. package/dist/edit/ods/sheet.d.cts +5 -1
  28. package/dist/edit/ods/sheet.d.ts +5 -1
  29. package/dist/edit/ods/sheet.js +14 -1
  30. package/dist/edit/odt/content.cjs +8 -4
  31. package/dist/edit/odt/content.js +8 -4
  32. package/dist/edit/odt/editor.cjs +7 -0
  33. package/dist/edit/odt/editor.d.cts +3 -0
  34. package/dist/edit/odt/editor.d.ts +3 -0
  35. package/dist/edit/odt/editor.js +7 -0
  36. package/dist/edit/odt/formula.cjs +19 -0
  37. package/dist/edit/odt/formula.d.cts +8 -0
  38. package/dist/edit/odt/formula.d.ts +8 -0
  39. package/dist/edit/odt/formula.js +17 -0
  40. package/dist/evaluate-BU5N1Jk1.d.ts +11 -0
  41. package/dist/evaluate-BhMXY6DM.d.cts +11 -0
  42. package/dist/firebird/backup.d.cts +1 -1
  43. package/dist/firebird/backup.d.ts +1 -1
  44. package/dist/firebird/data.cjs +30 -16
  45. package/dist/firebird/data.d.cts +3 -2
  46. package/dist/firebird/data.d.ts +3 -2
  47. package/dist/firebird/data.js +30 -17
  48. package/dist/fonts/ooxml.d.cts +1 -1
  49. package/dist/fonts/registry.d.cts +1 -1
  50. package/dist/formula-CgydMiTt.d.ts +10 -0
  51. package/dist/formula-CiwPw8nY.d.cts +10 -0
  52. package/dist/hsqldb/binary-script.d.cts +1 -1
  53. package/dist/hsqldb/binary-script.d.ts +1 -1
  54. package/dist/hsqldb/cache.d.cts +1 -1
  55. package/dist/hsqldb/cache.d.ts +1 -1
  56. package/dist/hsqldb/rowformat.cjs +22 -13
  57. package/dist/hsqldb/rowformat.js +22 -13
  58. package/dist/hsqldb/script.d.cts +1 -18
  59. package/dist/hsqldb/script.d.ts +1 -18
  60. package/dist/index.cjs +56 -0
  61. package/dist/index.d.cts +22 -8
  62. package/dist/index.d.ts +21 -7
  63. package/dist/index.js +15 -2
  64. package/dist/layout/sheets.cjs +30 -24
  65. package/dist/layout/sheets.js +31 -25
  66. package/dist/layout/slides.cjs +6 -4
  67. package/dist/layout/slides.js +7 -5
  68. package/dist/lexer-DGPWx_f2.d.cts +42 -0
  69. package/dist/lexer-DGPWx_f2.d.ts +42 -0
  70. package/dist/mathml/layout.d.cts +1 -1
  71. package/dist/mathml/layout.d.ts +1 -1
  72. package/dist/mathml/variant.d.cts +1 -6
  73. package/dist/mathml/variant.d.ts +1 -6
  74. package/dist/odb/csv.d.cts +1 -1
  75. package/dist/odb/csv.d.ts +1 -1
  76. package/dist/odb/formula/definition.cjs +49 -0
  77. package/dist/odb/formula/definition.d.cts +8 -0
  78. package/dist/odb/formula/definition.d.ts +8 -0
  79. package/dist/odb/formula/definition.js +46 -0
  80. package/dist/odb/formula/errors.cjs +47 -0
  81. package/dist/odb/formula/errors.d.cts +21 -0
  82. package/dist/odb/formula/errors.d.ts +21 -0
  83. package/dist/odb/formula/errors.js +43 -0
  84. package/dist/odb/formula/evaluate.cjs +283 -0
  85. package/dist/odb/formula/evaluate.d.cts +43 -0
  86. package/dist/odb/formula/evaluate.d.ts +43 -0
  87. package/dist/odb/formula/evaluate.js +281 -0
  88. package/dist/odb/formula/parser.cjs +198 -0
  89. package/dist/odb/formula/parser.d.cts +29 -0
  90. package/dist/odb/formula/parser.d.ts +29 -0
  91. package/dist/odb/formula/parser.js +197 -0
  92. package/dist/odb/read.d.cts +1 -1
  93. package/dist/odb/read.d.ts +1 -1
  94. package/dist/odb/report/content.cjs +27 -0
  95. package/dist/odb/report/content.d.cts +14 -0
  96. package/dist/odb/report/content.d.ts +14 -0
  97. package/dist/odb/report/content.js +25 -0
  98. package/dist/odb/report/render.cjs +106 -0
  99. package/dist/odb/report/render.d.cts +7 -0
  100. package/dist/odb/report/render.d.ts +7 -0
  101. package/dist/odb/report/render.js +106 -0
  102. package/dist/odb/report/source.cjs +45 -0
  103. package/dist/odb/report/source.d.cts +14 -0
  104. package/dist/odb/report/source.d.ts +14 -0
  105. package/dist/odb/report/source.js +42 -0
  106. package/dist/odb/spreadsheet.d.cts +1 -1
  107. package/dist/odb/spreadsheet.d.ts +1 -1
  108. package/dist/odb/sql/errors.cjs +38 -0
  109. package/dist/odb/sql/errors.d.cts +17 -0
  110. package/dist/odb/sql/errors.d.ts +17 -0
  111. package/dist/odb/sql/errors.js +35 -0
  112. package/dist/odb/sql/evaluate.cjs +312 -0
  113. package/dist/odb/sql/evaluate.d.cts +2 -0
  114. package/dist/odb/sql/evaluate.d.ts +2 -0
  115. package/dist/odb/sql/evaluate.js +311 -0
  116. package/dist/odb/sql/lexer.cjs +282 -0
  117. package/dist/odb/sql/lexer.d.cts +2 -0
  118. package/dist/odb/sql/lexer.d.ts +2 -0
  119. package/dist/odb/sql/lexer.js +281 -0
  120. package/dist/odb/sql/parser.cjs +479 -0
  121. package/dist/odb/sql/parser.d.cts +2 -0
  122. package/dist/odb/sql/parser.d.ts +2 -0
  123. package/dist/odb/sql/parser.js +478 -0
  124. package/dist/odb/values.cjs +75 -0
  125. package/dist/odb/values.d.cts +2 -0
  126. package/dist/odb/values.d.ts +2 -0
  127. package/dist/odb/values.js +69 -0
  128. package/dist/odf/odt/read.cjs +43 -21
  129. package/dist/odf/odt/read.js +43 -21
  130. package/dist/odf-package/formula.cjs +59 -0
  131. package/dist/odf-package/formula.d.cts +11 -0
  132. package/dist/odf-package/formula.d.ts +11 -0
  133. package/dist/odf-package/formula.js +58 -0
  134. package/dist/odf-package/manifest.cjs +29 -0
  135. package/dist/odf-package/manifest.d.cts +5 -2
  136. package/dist/odf-package/manifest.d.ts +5 -2
  137. package/dist/odf-package/manifest.js +30 -2
  138. package/dist/odf-package/media.cjs +2 -1
  139. package/dist/odf-package/media.js +2 -2
  140. package/dist/omml/read.cjs +265 -0
  141. package/dist/omml/read.d.cts +12 -0
  142. package/dist/omml/read.d.ts +12 -0
  143. package/dist/omml/read.js +263 -0
  144. package/dist/omml/shared.cjs +67 -0
  145. package/dist/omml/shared.d.cts +2 -0
  146. package/dist/omml/shared.d.ts +2 -0
  147. package/dist/omml/shared.js +64 -0
  148. package/dist/omml/write.cjs +3 -51
  149. package/dist/omml/write.d.cts +2 -2
  150. package/dist/omml/write.d.ts +2 -2
  151. package/dist/omml/write.js +1 -49
  152. package/dist/ooxml/docx/extras.cjs +15 -0
  153. package/dist/ooxml/docx/extras.d.cts +12 -0
  154. package/dist/ooxml/docx/extras.d.ts +12 -0
  155. package/dist/ooxml/docx/extras.js +14 -0
  156. package/dist/ooxml/docx/formula.cjs +109 -0
  157. package/dist/ooxml/docx/formula.d.cts +2 -0
  158. package/dist/ooxml/docx/formula.d.ts +2 -0
  159. package/dist/ooxml/docx/formula.js +108 -0
  160. package/dist/ooxml/docx/read.cjs +10 -2
  161. package/dist/ooxml/docx/read.d.cts +6 -2
  162. package/dist/ooxml/docx/read.d.ts +6 -2
  163. package/dist/ooxml/docx/read.js +11 -3
  164. package/dist/parser-B9vC1T6T.d.cts +101 -0
  165. package/dist/parser-DQSgYJzQ.d.ts +101 -0
  166. package/dist/{registry-CtPhMD0f.d.cts → registry-lqJej0Jr.d.cts} +1 -1
  167. package/dist/script-DsGGIzGU.d.cts +19 -0
  168. package/dist/script-DsGGIzGU.d.ts +19 -0
  169. package/dist/shared-DLZ3IQUl.d.cts +15 -0
  170. package/dist/shared-DUOzjwcL.d.ts +15 -0
  171. package/dist/values-BetetbaH.d.cts +23 -0
  172. package/dist/values-BetetbaH.d.ts +23 -0
  173. package/dist/variant-BMrebjMw.d.cts +7 -0
  174. package/dist/variant-BMrebjMw.d.ts +7 -0
  175. package/dist/{write-DuyfnbL_.d.cts → write-BQ6SK8r8.d.cts} +2 -6
  176. package/dist/{write-Zqwx6pka.d.ts → write-THs7ipBq.d.ts} +2 -6
  177. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,12 +1,14 @@
1
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";
2
+ import { i as mapMathVariant, n as applyMathVariant, r as isMathVariant, t as MathVariant } from "./variant-BMrebjMw.js";
3
+ import { n as OmmlDiagnosticKind, t as OmmlDiagnostic } from "./shared-DUOzjwcL.js";
4
4
  import { i as extractSourceFonts, n as FontSourcePackage, r as createDocumentFontRegistry, t as DocumentFontRegistryOptions } from "./registry-CrSqLIcn.js";
5
5
  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";
6
6
  import { ConversionOptions, ConversionRequest, ConversionResult, Diagnostic, DocumentConverter, DocumentFormat, DocumentPayload } from "./convert/port.js";
7
7
  import { docxPdfCodec, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, odgPdfCodec, odpPdfCodec, odpPptxCodec, odsPdfCodec, odsXlsxCodec, odtDocxCodec, odtPdfCodec, pptxPdfCodec, xlsxPdfCodec } from "./convert/codec.js";
8
8
  import { createLocalDocumentConverter } from "./convert/local.js";
9
9
  import { BuildDocxPackageOptions, buildDocxPackage } from "./edit/docx/content.js";
10
+ 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";
11
+ import { n as buildOfficeMath, r as buildOfficeMathParagraph, t as OmmlWriteResult } from "./write-THs7ipBq.js";
10
12
  import { a as rgbHexToColor, n as LayoutColor, t as COLOR_BLACK } from "./color-Bo228AY2.js";
11
13
  import { t as DocxRun } from "./run-D2rTWHbt.js";
12
14
  import { DocxParagraph } from "./edit/docx/paragraph.js";
@@ -37,7 +39,7 @@ import { n as DrawingRunInit, r as PptxShape, t as DrawingParagraphInit } from "
37
39
  import { i as PptxTableRow, n as PptxTableCell, r as PptxTableInit, t as PptxTable } from "./table-DvS_7UQS.js";
38
40
  import { PptxSlide, SlideImageInit as SlideImageInit$1, SlideTableInit as SlideTableInit$1, TextBoxInit as TextBoxInit$2 } from "./edit/pptx/slide.js";
39
41
  import { PptxEditor, createPptx, openPptx } from "./edit/pptx/editor.js";
40
- import { HsqldbColumn, HsqldbScriptParseError, HsqldbTable, displayTextFor, parseHsqldbScript } from "./hsqldb/script.js";
42
+ import { a as parseHsqldbScript, i as displayTextFor, n as HsqldbScriptParseError, r as HsqldbTable, t as HsqldbColumn } from "./script-DsGGIzGU.js";
41
43
  import { t as FirebirdBackupParseError } from "./reader-DP0Mbaj4.js";
42
44
  import { D as FirebirdUnsupportedFieldTypeError } from "./blr-types-DVgO1DQ9.js";
43
45
  import { r as FirebirdSchemaParseError } from "./schema-CSKwSb_v.js";
@@ -51,10 +53,11 @@ import { decodeHsqldbCachedTables } from "./hsqldb/cache.js";
51
53
  import { DocxBytesSchema, MarkdownBytesSchema, OdgBytesSchema, OdpBytesSchema, OdsBytesSchema, OdtBytesSchema, PdfBytesSchema, PptxBytesSchema, XlsxBytesSchema } from "./model/bytes.js";
52
54
  import { MathBox, MathColor, MathDiagnostic, MathDiagnosticKind, MathGlyphRun, MathLayoutItem, MathLayoutResult, MathRule, MathStroke } from "./mathml/layout-types.js";
53
55
  import { MathFontMetrics, MathGlyphMetrics } from "./mathml/metrics.js";
54
- import { MathVariant, applyMathVariant, isMathVariant, mapMathVariant } from "./mathml/variant.js";
55
56
  import { LayoutFormulaOptions, layoutFormula } from "./mathml/layout.js";
56
57
  import { OperatorProperties, operatorProperties } from "./mathml/operators.js";
57
- import { readDocxContent } from "./ooxml/docx/read.js";
58
+ import { OmmlReadResult, collectOfficeMathElements, readOfficeMath } from "./omml/read.js";
59
+ import { ReadDocxContentOptions, readDocxContent } from "./ooxml/docx/read.js";
60
+ import { DocxExtras, readDocxExtras } from "./ooxml/docx/extras.js";
58
61
  import { readPptxContent } from "./ooxml/pptx/read.js";
59
62
  import { readOdtContent } from "./odf/odt/read.js";
60
63
  import { readOdpContent } from "./odf/odp/read.js";
@@ -77,10 +80,21 @@ import { OdbNoEmbeddedDataSourceError, OdbUnsupportedFormat, OdbUnsupportedForma
77
80
  import { odbTablesToSpreadsheetDocument } from "./odb/spreadsheet.js";
78
81
  import { readOdbForms, readOdbReports } from "./odb/components.js";
79
82
  import { OdbTableNotFoundError, OdbTableNotSpecifiedError } from "./odb/csv.js";
83
+ import { i as tokenizeSql, n as SqlPunctuation, r as SqlToken, t as SqlComparisonOperator } from "./lexer-DGPWx_f2.js";
84
+ import { a as SqlNameRef, c as SqlPredicate, d as SqlSortDirection, f as parseSelect, i as SqlLiteral, l as SqlSelectItem, n as SqlAggregateFunction, o as SqlOperand, r as SqlColumnRef, s as SqlOrderByTerm, t as SqlAggregateArgument, u as SqlSelectStatement } from "./parser-DQSgYJzQ.js";
85
+ import { n as evaluateSelect, t as SqlResultSet } from "./evaluate-BU5N1Jk1.js";
86
+ import { HsqldbSqlEvaluationError, HsqldbSqlParseError, HsqldbSqlUnsupportedError } from "./odb/sql/errors.js";
87
+ import { RptBandDefinition, RptBandInstance, RptBandKind, RptGroupDefinition, RptNamedFunctionDefinition, RptReportDefinition, RptReportRun, RptScope, evaluateRptBandOutsideData, runRptReport } from "./odb/formula/evaluate.js";
88
+ import { RptAggregateFunction, RptFormula, RptReference, parseRptFormula } from "./odb/formula/parser.js";
89
+ import { odbReportGroupChain, rptBandDefinition, rptDefinitionFromReport } from "./odb/formula/definition.js";
90
+ import { RptFormulaEvaluationError, RptFormulaParseError, RptFormulaUnsupportedError, RptReportStructureError } from "./odb/formula/errors.js";
91
+ import { OdbReportContentOptions, OdbReportNotSpecifiedError, readOdbReportContent } from "./odb/report/content.js";
92
+ import { renderOdbReportContent } from "./odb/report/render.js";
93
+ import { OdbReportDataSourceError, odbReportCommandSql, resolveOdbReportRows } from "./odb/report/source.js";
80
94
  import { ClockPort, fixedClock, systemClock } from "./ports/clock.js";
81
95
  import { throwIfAborted } from "./ports/abort.js";
82
- 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";
96
+ import { Attribute, AttributeSchema, BinaryPart, BinaryPartSchema, Comment, CommentSchema, CompactAttrPairs, CompactPackage, CompactPackageSchema, CompactPart, CompactPartSchema, CompactXmlNode, CompactXmlNodeSchema, DefinedName, DefinedNameSchema, Footnote, FootnoteSchema, NumberingDefinition, NumberingDefinitionSchema, NumberingDefinitions, NumberingLevel, NumberingLevelSchema, 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";
83
97
  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";
84
98
  import { OdbComponentInfo, OdbConnectionInfo, OdbForm, OdbFormControl, OdbFormDefinition, OdbInventory, OdbQueryInfo, OdbReport, OdbReportBand, OdbReportElement, OdbReportFunction, OdbReportGroup, readOdbForm, readOdbInventory, readOdbReport, resolveOdbComponent } from "odf.js";
85
99
  import { FontRegistry, FontRegistryOptions, FontSubstitution, LoadedMathFont, MathFont, MathFontDescriptorMetrics, NOOP_DIAGNOSTIC_SINK, PdfDiagnostic, PdfDiagnosticSeverity, PdfDiagnosticSink, PdfEncryptedError, PdfParseError, PositionedFormula, ProvidedFont, ReadPdfOptions, ResolvedFace, WinAnsiSubstitution, WritePdfOptions, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, loadMathFont, pdfCodec, readPdf, writePdf } from "pdf-codec";
86
- 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 ConversionOptions, type ConversionRequest, type ConversionResult, DEFAULT_LAYOUT_FONT, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentBridgeOptions, type DocumentConverter, type DocumentFontRegistryOptions, 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, FontDeobfuscationError, type FontRegistry, type FontRegistryOptions, type FontSourcePackage, type FontSubstitution, 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, OdfEmbeddedFontError, 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, OoxmlEmbeddedFontError, 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 ProvidedFont, type ReadFirebirdBackupResult, type ReadPdfOptions, type ReconstructOptions, type Relationship, type ResolvedFace, 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, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createOdg, createOdp, createOds, createOdt, createPptx, createStandardFontMeasurer, decodeCompactPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodePackage, deobfuscateEmbeddedFont, deriveFontKey, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeMarkdownText, encodePackage, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, firstChildByLocalName, fixedClock, flipY, formulaDocument, formulaOfBlock, formulaPlaceholderText, fromCompact, displayTextFor as hsqldbCellDisplayText, inferCellValue, inflateHsqldbCompressedScript, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, layoutDocumentWithSchema, layoutFormula, loadMathFont, localName, looksLikeSfnt, 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 };
100
+ 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 ConversionOptions, type ConversionRequest, type ConversionResult, DEFAULT_LAYOUT_FONT, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentBridgeOptions, type DocumentConverter, type DocumentFontRegistryOptions, type DocumentFormat, type DocumentJsonResult, type DocumentPackage, type DocumentPackageJson, DocumentPackageSchema, type DocumentPayload, type DocumentSchemaKind, type DocumentToPdfOptions, type DocxBody, DocxBytesSchema, DocxEditor, type DocxExtras, 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, FontDeobfuscationError, type FontRegistry, type FontRegistryOptions, type FontSourcePackage, type FontSubstitution, type Footnote, FootnoteSchema, type GridLattice, type HsqldbBinaryScript, HsqldbBinaryScriptParseError, type HsqldbColumn, type HsqldbDecodeOptions, HsqldbRowFormatError, HsqldbScriptParseError, HsqldbSqlEvaluationError, HsqldbSqlParseError, HsqldbSqlUnsupportedError, 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 NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, type OdbComponentInfo, type OdbConnectionInfo, type OdbConversionOptions, type OdbForm, type OdbFormControl, type OdbFormDefinition, type OdbInventory, OdbNoEmbeddedDataSourceError, type OdbQueryInfo, type OdbReport, type OdbReportBand, type OdbReportContentOptions, OdbReportDataSourceError, type OdbReportElement, type OdbReportFunction, type OdbReportGroup, OdbReportNotSpecifiedError, OdbTableNotFoundError, OdbTableNotSpecifiedError, type OdbToCsvOptions, type OdbUnsupportedFormat, OdbUnsupportedFormatError, OdfEmbeddedFontError, 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 OmmlReadResult, type OmmlWriteResult, OoxmlEmbeddedFontError, 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 ProvidedFont, type ReadDocxContentOptions, type ReadFirebirdBackupResult, type ReadPdfOptions, type ReconstructOptions, type Relationship, type ResolvedFace, type RptAggregateFunction, type RptBandDefinition, type RptBandInstance, type RptBandKind, type RptFormula, RptFormulaEvaluationError, RptFormulaParseError, RptFormulaUnsupportedError, type RptGroupDefinition, type RptNamedFunctionDefinition, type RptReference, type RptReportDefinition, type RptReportRun, RptReportStructureError, type RptScope, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, type SheetsLayoutOptions, type SlideImageInit$1 as SlideImageInit, type SlideTableInit$1 as SlideTableInit, type SlidesLayoutOptions, type SqlAggregateArgument, type SqlAggregateFunction, type SqlColumnRef, type SqlComparisonOperator, type SqlLiteral, type SqlNameRef, type SqlOperand, type SqlOrderByTerm, type SqlPredicate, type SqlPunctuation, type SqlResultSet, type SqlSelectItem, type SqlSelectStatement, type SqlSortDirection, type SqlToken, 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, collectOfficeMathElements, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createOdg, createOdp, createOds, createOdt, createPptx, createStandardFontMeasurer, decodeCompactPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodePackage, deobfuscateEmbeddedFont, deriveFontKey, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeMarkdownText, encodePackage, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, firstChildByLocalName, fixedClock, flipY, formulaDocument, formulaOfBlock, formulaPlaceholderText, fromCompact, displayTextFor as hsqldbCellDisplayText, inferCellValue, inflateHsqldbCompressedScript, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, layoutDocumentWithSchema, layoutFormula, loadMathFont, localName, looksLikeSfnt, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToDocx, markdownToOdt, markdownToPdf, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, 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, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToOdp, pptxToPdf, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderOdbReportContent, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxPdfCodec, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
package/dist/index.js CHANGED
@@ -41,7 +41,9 @@ import { OdfEmbeddedFontError, extractOdfEmbeddedFonts } from "./fonts/odf.js";
41
41
  import { OoxmlEmbeddedFontError, extractOoxmlEmbeddedFonts } from "./fonts/ooxml.js";
42
42
  import { createDocumentFontRegistry, extractSourceFonts } from "./fonts/registry.js";
43
43
  import { layoutFormula } from "./mathml/layout.js";
44
+ import { collectOfficeMathElements, readOfficeMath } from "./omml/read.js";
44
45
  import { readDocxContent } from "./ooxml/docx/read.js";
46
+ import { readDocxExtras } from "./ooxml/docx/extras.js";
45
47
  import { readPptxContent } from "./ooxml/pptx/read.js";
46
48
  import { readOdfEmbeddedFormula, readOdfFormulaContent } from "./odf/formula/read.js";
47
49
  import { readOdtContent } from "./odf/odt/read.js";
@@ -74,10 +76,21 @@ import { odbTablesToSpreadsheetDocument } from "./odb/spreadsheet.js";
74
76
  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";
75
77
  import { docxPdfCodec, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, odgPdfCodec, odpPdfCodec, odpPptxCodec, odsPdfCodec, odsXlsxCodec, odtDocxCodec, odtPdfCodec, pptxPdfCodec, xlsxPdfCodec } from "./convert/codec.js";
76
78
  import { readOdbForms, readOdbReports } from "./odb/components.js";
79
+ import { HsqldbSqlEvaluationError, HsqldbSqlParseError, HsqldbSqlUnsupportedError } from "./odb/sql/errors.js";
80
+ import { evaluateSelect } from "./odb/sql/evaluate.js";
81
+ import { tokenizeSql } from "./odb/sql/lexer.js";
82
+ import { parseSelect } from "./odb/sql/parser.js";
83
+ import { RptFormulaEvaluationError, RptFormulaParseError, RptFormulaUnsupportedError, RptReportStructureError } from "./odb/formula/errors.js";
84
+ import { parseRptFormula } from "./odb/formula/parser.js";
85
+ import { evaluateRptBandOutsideData, runRptReport } from "./odb/formula/evaluate.js";
86
+ import { odbReportGroupChain, rptBandDefinition, rptDefinitionFromReport } from "./odb/formula/definition.js";
87
+ import { renderOdbReportContent } from "./odb/report/render.js";
88
+ import { OdbReportDataSourceError, odbReportCommandSql, resolveOdbReportRows } from "./odb/report/source.js";
89
+ import { OdbReportNotSpecifiedError, readOdbReportContent } from "./odb/report/content.js";
77
90
  import { createLocalDocumentConverter } from "./convert/local.js";
78
91
  import { fixedClock, systemClock } from "./ports/clock.js";
79
- 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";
92
+ import { AttributeSchema, BinaryPartSchema, CommentSchema, CompactPackageSchema, CompactPartSchema, CompactXmlNodeSchema, DefinedNameSchema, FootnoteSchema, NumberingDefinitionSchema, NumberingLevelSchema, 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";
80
93
  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";
81
94
  import { readOdbForm, readOdbInventory, readOdbReport, resolveOdbComponent } from "odf.js";
82
95
  import { NOOP_DIAGNOSTIC_SINK, PdfEncryptedError, PdfParseError, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, loadMathFont, pdfCodec, readPdf, writePdf } from "pdf-codec";
83
- 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, FontDeobfuscationError, HsqldbBinaryScriptParseError, HsqldbRowFormatError, HsqldbScriptParseError, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, MarkdownBytesSchema, NOOP_DIAGNOSTIC_SINK, OdbNoEmbeddedDataSourceError, OdbTableNotFoundError, OdbTableNotSpecifiedError, OdbUnsupportedFormatError, OdfEmbeddedFontError, OdgBoxVector, OdgBytesSchema, OdgEditor, OdgLineVector, OdgPage, OdgPathVector, OdmUnresolvedSectionError, OdpBytesSchema, OdpEditor, OdpShape, OdpSlide, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, OdtRun, OdtTable, OdtTableCell, OdtTableRow, OoxmlEmbeddedFontError, 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, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createOdg, createOdp, createOds, createOdt, createPptx, createStandardFontMeasurer, decodeCompactPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodePackage, deobfuscateEmbeddedFont, deriveFontKey, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeMarkdownText, encodePackage, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, firstChildByLocalName, fixedClock, flipY, formulaDocument, formulaOfBlock, formulaPlaceholderText, fromCompact, displayTextFor as hsqldbCellDisplayText, inferCellValue, inflateHsqldbCompressedScript, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, layoutDocumentWithSchema, layoutFormula, loadMathFont, localName, looksLikeSfnt, 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 };
96
+ 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, FontDeobfuscationError, FootnoteSchema, HsqldbBinaryScriptParseError, HsqldbRowFormatError, HsqldbScriptParseError, HsqldbSqlEvaluationError, HsqldbSqlParseError, HsqldbSqlUnsupportedError, LAYOUT_FORMAT_VERSION, LayoutDocumentSchema, MarkdownBytesSchema, NOOP_DIAGNOSTIC_SINK, NumberingDefinitionSchema, NumberingLevelSchema, OdbNoEmbeddedDataSourceError, OdbReportDataSourceError, OdbReportNotSpecifiedError, OdbTableNotFoundError, OdbTableNotSpecifiedError, OdbUnsupportedFormatError, OdfEmbeddedFontError, OdgBoxVector, OdgBytesSchema, OdgEditor, OdgLineVector, OdgPage, OdgPathVector, OdmUnresolvedSectionError, OdpBytesSchema, OdpEditor, OdpShape, OdpSlide, OdsBytesSchema, OdsCell, OdsEditor, OdsSheet, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, OdtRun, OdtTable, OdtTableCell, OdtTableRow, OoxmlEmbeddedFontError, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageSchema, PartSchema, PdfBytesSchema, PdfEncryptedError, PdfParseError, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, PptxTable, PptxTableCell, PptxTableRow, RptFormulaEvaluationError, RptFormulaParseError, RptFormulaUnsupportedError, RptReportStructureError, 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, collectOfficeMathElements, compactCodec, compactPackageCodec, contentDocumentWithSchema, convertDrawingToLayout, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocumentFontRegistry, createDocx, createFontMeasurer, createFontRegistry, createLocalDocumentConverter, createOdg, createOdp, createOds, createOdt, createPptx, createStandardFontMeasurer, decodeCompactPackage, decodeEntities, decodeHsqldbCachedTables, decodeMarkdownText, decodePackage, deobfuscateEmbeddedFont, deriveFontKey, detectGridLattice, documentFromJson, documentPackageWithSchema, documentSchemaKindOf, docxPdfCodec, docxToMarkdown, docxToOdt, docxToPdf, drawingOfBlock, elementChildren, elementLocalName, elementsWithTag, encodeCompactPackage, encodeMarkdownText, encodePackage, evaluateRptBandOutsideData, evaluateSelect, extractOdfEmbeddedFonts, extractOoxmlEmbeddedFonts, extractSourceFonts, firstChildByLocalName, fixedClock, flipY, formulaDocument, formulaOfBlock, formulaPlaceholderText, fromCompact, displayTextFor as hsqldbCellDisplayText, inferCellValue, inflateHsqldbCompressedScript, isCompactXmlNode, isContentBlock, isMathMlElement, isMathVariant, isXmlNode, layoutDocumentWithSchema, layoutFormula, loadMathFont, localName, looksLikeSfnt, mapMathVariant, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, markdownToDocx, markdownToOdt, markdownToPdf, textContent as mathMlTextContent, odbReportCommandSql, odbReportGroupChain, 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, parseRptFormula, parseSelect, parseXml, pdfCodec, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxPdfCodec, pptxToOdp, pptxToPdf, readDocxContent, readDocxExtras, readFirebirdBackup, readMarkdownContent, readOdbForm, readOdbForms, readOdbInventory, readOdbReport, readOdbReportContent, readOdbReports, readOdbTables, readOdfEmbeddedFormula, readOdfFormulaContent, readOdgContent, readOdpContent, readOdsContent, readOdtContent, readOfficeMath, readPdf, readPptxContent, reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing, renderOdbReportContent, resolveOdbComponent, resolveOdbReportRows, resolveRelationships, rgbHexToColor, rootElement, rptBandDefinition, rptDefinitionFromReport, runRptReport, schemaUriFor, serializePackage, systemClock, textContent$1 as textContent, throwIfAborted, toCompact, tokenizeSql, unzipPackage, walk, writePdf, xlsxPdfCodec, xlsxToOds, xlsxToPdf, xmlCodec, zipPackage };
@@ -218,39 +218,45 @@ function renderCellText(cell, frameYDown, rowCells, columnAxis, pageHeightPt, me
218
218
  const alignment = cell.alignment ?? defaultAlignmentForValue(cell.value.kind);
219
219
  const numericLike = isNumericLikeValue(cell.value.kind);
220
220
  const styledRuns = cellStyledRuns(cell);
221
- const naturalLine = (0, pdf_codec.wrapRunsToWidth)(styledRuns, measurer, Number.POSITIVE_INFINITY)[0];
221
+ const lines = (0, pdf_codec.wrapRunsToWidth)(styledRuns, measurer, Number.POSITIVE_INFINITY);
222
+ const naturalLine = lines[0];
222
223
  let availableWidthPt = Math.max(0, ownWidthPt - 4);
223
224
  let fragments = naturalLine.fragments;
224
225
  let lineWidthPt = naturalLine.widthPt;
225
- if (lineWidthPt > availableWidthPt) if (numericLike) {
226
- const overflowRuns = [{
227
- text: NUMERIC_OVERFLOW_TEXT,
228
- font: styledRuns[0].font,
229
- sizePt: styledRuns[0].sizePt,
230
- color: styledRuns[0].color
231
- }];
232
- const overflowLine = (0, pdf_codec.wrapRunsToWidth)(overflowRuns, measurer, Number.POSITIVE_INFINITY)[0];
233
- fragments = overflowLine.fragments;
234
- lineWidthPt = overflowLine.widthPt;
235
- } else if (cell.value.kind === "string") {
236
- let spillColumn = cell.column + (cell.colSpan ?? 1);
237
- while (lineWidthPt > availableWidthPt) {
238
- const neighborPosition = columnAxis.positionByIndex.get(spillColumn);
239
- if (neighborPosition === void 0 || !isCellVisuallyEmpty(rowCells?.get(spillColumn))) break;
240
- availableWidthPt += columnAxis.sizesPt[neighborPosition];
241
- spillColumn++;
242
- }
243
- if (lineWidthPt > availableWidthPt) fragments = truncateFragmentsToWidth(fragments, measurer, availableWidthPt);
244
- } else fragments = truncateFragmentsToWidth(fragments, measurer, availableWidthPt);
226
+ let overflowed = false;
227
+ if (lineWidthPt > availableWidthPt) {
228
+ overflowed = true;
229
+ if (numericLike) {
230
+ const overflowRuns = [{
231
+ text: NUMERIC_OVERFLOW_TEXT,
232
+ font: styledRuns[0].font,
233
+ sizePt: styledRuns[0].sizePt,
234
+ color: styledRuns[0].color
235
+ }];
236
+ const overflowLine = (0, pdf_codec.wrapRunsToWidth)(overflowRuns, measurer, Number.POSITIVE_INFINITY)[0];
237
+ fragments = overflowLine.fragments;
238
+ lineWidthPt = overflowLine.widthPt;
239
+ } else if (cell.value.kind === "string") {
240
+ let spillColumn = cell.column + (cell.colSpan ?? 1);
241
+ while (lineWidthPt > availableWidthPt) {
242
+ const neighborPosition = columnAxis.positionByIndex.get(spillColumn);
243
+ if (neighborPosition === void 0 || !isCellVisuallyEmpty(rowCells?.get(spillColumn))) break;
244
+ availableWidthPt += columnAxis.sizesPt[neighborPosition];
245
+ spillColumn++;
246
+ }
247
+ if (lineWidthPt > availableWidthPt) fragments = truncateFragmentsToWidth(fragments, measurer, availableWidthPt);
248
+ } else fragments = truncateFragmentsToWidth(fragments, measurer, availableWidthPt);
249
+ }
245
250
  const alignOffsetPt = require_layout_shared.alignmentOffsetPt(alignment, availableWidthPt, lineWidthPt);
246
251
  const textStartXPt = xLeftPt + CELL_TEXT_PADDING_PT + alignOffsetPt;
247
252
  const lineHeightPt = require_layout_shared.lineNaturalHeightPt(naturalLine, measurer, styledRuns[0]);
248
253
  const baselineYDownPt = verticalLineTopYDownPt(cell.verticalAlignment ?? DEFAULT_CELL_VERTICAL_ALIGNMENT, yTopDownPt, heightPt, lineHeightPt) + naturalLine.ascentPt;
249
- for (const fragment of fragments) {
254
+ const justifyGapsPt = alignment === "justify" && !overflowed && lines.length > 1 ? require_layout_shared.justifyLineGapsPt(naturalLine, availableWidthPt, measurer) : void 0;
255
+ fragments.forEach((fragment, fragmentIndex) => {
250
256
  const textItem = {
251
257
  kind: "text",
252
258
  text: fragment.text,
253
- xPt: textStartXPt + fragment.xOffsetPt,
259
+ xPt: textStartXPt + fragment.xOffsetPt + (justifyGapsPt?.[fragmentIndex] ?? 0),
254
260
  yPt: pageHeightPt - baselineYDownPt,
255
261
  font: fragment.font,
256
262
  sizePt: fragment.sizePt,
@@ -259,7 +265,7 @@ function renderCellText(cell, frameYDown, rowCells, columnAxis, pageHeightPt, me
259
265
  sourcePath: fragment.sourcePath
260
266
  };
261
267
  out.push(textItem);
262
- }
268
+ });
263
269
  }
264
270
  function renderHeaderLabels(gutter, columnAxis, rowAxis, gridLeftXPt, gridTopYDownPt, pageHeightPt, measurer, out) {
265
271
  const lineHeightPt = measurer.lineHeightAtSize(document_schema_js.DEFAULT_LAYOUT_FONT, HEADER_LABEL_SIZE_PT);
@@ -1,7 +1,7 @@
1
1
  import { flipY } from "../model/geometry.js";
2
2
  import { COLOR_BLACK as COLOR_BLACK$1, rgbHexToColor } from "../model/color.js";
3
3
  import { DEFAULT_LAYOUT_FONT } from "../model/style.js";
4
- import { alignmentOffsetPt, lineNaturalHeightPt, pushCellBorderLines, sumColumnWidthsPt, toStyledRuns } from "./shared.js";
4
+ import { alignmentOffsetPt, justifyLineGapsPt, lineNaturalHeightPt, pushCellBorderLines, sumColumnWidthsPt, toStyledRuns } from "./shared.js";
5
5
  import { throwIfAborted } from "../ports/abort.js";
6
6
  import { LAYOUT_FORMAT_VERSION } from "document-schema.js";
7
7
  import { wrapRunsToWidth } from "pdf-codec";
@@ -219,39 +219,45 @@ function renderCellText(cell, frameYDown, rowCells, columnAxis, pageHeightPt, me
219
219
  const alignment = cell.alignment ?? defaultAlignmentForValue(cell.value.kind);
220
220
  const numericLike = isNumericLikeValue(cell.value.kind);
221
221
  const styledRuns = cellStyledRuns(cell);
222
- const naturalLine = wrapRunsToWidth(styledRuns, measurer, Number.POSITIVE_INFINITY)[0];
222
+ const lines = wrapRunsToWidth(styledRuns, measurer, Number.POSITIVE_INFINITY);
223
+ const naturalLine = lines[0];
223
224
  let availableWidthPt = Math.max(0, ownWidthPt - 4);
224
225
  let fragments = naturalLine.fragments;
225
226
  let lineWidthPt = naturalLine.widthPt;
226
- if (lineWidthPt > availableWidthPt) if (numericLike) {
227
- const overflowRuns = [{
228
- text: NUMERIC_OVERFLOW_TEXT,
229
- font: styledRuns[0].font,
230
- sizePt: styledRuns[0].sizePt,
231
- color: styledRuns[0].color
232
- }];
233
- const overflowLine = wrapRunsToWidth(overflowRuns, measurer, Number.POSITIVE_INFINITY)[0];
234
- fragments = overflowLine.fragments;
235
- lineWidthPt = overflowLine.widthPt;
236
- } else if (cell.value.kind === "string") {
237
- let spillColumn = cell.column + (cell.colSpan ?? 1);
238
- while (lineWidthPt > availableWidthPt) {
239
- const neighborPosition = columnAxis.positionByIndex.get(spillColumn);
240
- if (neighborPosition === void 0 || !isCellVisuallyEmpty(rowCells?.get(spillColumn))) break;
241
- availableWidthPt += columnAxis.sizesPt[neighborPosition];
242
- spillColumn++;
243
- }
244
- if (lineWidthPt > availableWidthPt) fragments = truncateFragmentsToWidth(fragments, measurer, availableWidthPt);
245
- } else fragments = truncateFragmentsToWidth(fragments, measurer, availableWidthPt);
227
+ let overflowed = false;
228
+ if (lineWidthPt > availableWidthPt) {
229
+ overflowed = true;
230
+ if (numericLike) {
231
+ const overflowRuns = [{
232
+ text: NUMERIC_OVERFLOW_TEXT,
233
+ font: styledRuns[0].font,
234
+ sizePt: styledRuns[0].sizePt,
235
+ color: styledRuns[0].color
236
+ }];
237
+ const overflowLine = wrapRunsToWidth(overflowRuns, measurer, Number.POSITIVE_INFINITY)[0];
238
+ fragments = overflowLine.fragments;
239
+ lineWidthPt = overflowLine.widthPt;
240
+ } else if (cell.value.kind === "string") {
241
+ let spillColumn = cell.column + (cell.colSpan ?? 1);
242
+ while (lineWidthPt > availableWidthPt) {
243
+ const neighborPosition = columnAxis.positionByIndex.get(spillColumn);
244
+ if (neighborPosition === void 0 || !isCellVisuallyEmpty(rowCells?.get(spillColumn))) break;
245
+ availableWidthPt += columnAxis.sizesPt[neighborPosition];
246
+ spillColumn++;
247
+ }
248
+ if (lineWidthPt > availableWidthPt) fragments = truncateFragmentsToWidth(fragments, measurer, availableWidthPt);
249
+ } else fragments = truncateFragmentsToWidth(fragments, measurer, availableWidthPt);
250
+ }
246
251
  const alignOffsetPt = alignmentOffsetPt(alignment, availableWidthPt, lineWidthPt);
247
252
  const textStartXPt = xLeftPt + CELL_TEXT_PADDING_PT + alignOffsetPt;
248
253
  const lineHeightPt = lineNaturalHeightPt(naturalLine, measurer, styledRuns[0]);
249
254
  const baselineYDownPt = verticalLineTopYDownPt(cell.verticalAlignment ?? DEFAULT_CELL_VERTICAL_ALIGNMENT, yTopDownPt, heightPt, lineHeightPt) + naturalLine.ascentPt;
250
- for (const fragment of fragments) {
255
+ const justifyGapsPt = alignment === "justify" && !overflowed && lines.length > 1 ? justifyLineGapsPt(naturalLine, availableWidthPt, measurer) : void 0;
256
+ fragments.forEach((fragment, fragmentIndex) => {
251
257
  const textItem = {
252
258
  kind: "text",
253
259
  text: fragment.text,
254
- xPt: textStartXPt + fragment.xOffsetPt,
260
+ xPt: textStartXPt + fragment.xOffsetPt + (justifyGapsPt?.[fragmentIndex] ?? 0),
255
261
  yPt: pageHeightPt - baselineYDownPt,
256
262
  font: fragment.font,
257
263
  sizePt: fragment.sizePt,
@@ -260,7 +266,7 @@ function renderCellText(cell, frameYDown, rowCells, columnAxis, pageHeightPt, me
260
266
  sourcePath: fragment.sourcePath
261
267
  };
262
268
  out.push(textItem);
263
- }
269
+ });
264
270
  }
265
271
  function renderHeaderLabels(gutter, columnAxis, rowAxis, gridLeftXPt, gridTopYDownPt, pageHeightPt, measurer, out) {
266
272
  const lineHeightPt = measurer.lineHeightAtSize(DEFAULT_LAYOUT_FONT, HEADER_LABEL_SIZE_PT);
@@ -31,14 +31,16 @@ function layoutParagraph(paragraph, contentLeftXDown, contentWidthPt, startYDown
31
31
  const fallbackRun = effectiveRuns[0];
32
32
  const paragraphLeftXDown = contentLeftXDown + (paragraph.indentLeftPt ?? 0);
33
33
  const paragraphWidthPt = Math.max(0, contentWidthPt - (paragraph.indentLeftPt ?? 0));
34
- (0, pdf_codec.wrapRunsToWidth)(effectiveRuns, measurer, paragraphWidthPt).forEach((line, lineIndex) => {
34
+ const lines = (0, pdf_codec.wrapRunsToWidth)(effectiveRuns, measurer, paragraphWidthPt);
35
+ lines.forEach((line, lineIndex) => {
35
36
  const scaledLineHeightPt = require_layout_shared.lineNaturalHeightPt(line, measurer, fallbackRun) * (paragraph.lineSpacing ?? 1) * spacingScale;
36
37
  const baselineYDown = cursorYDown + line.ascentPt;
37
38
  const firstLineIndentPt = lineIndex === 0 ? paragraph.indentFirstLinePt ?? 0 : 0;
38
39
  const alignOffsetPt = require_layout_shared.alignmentOffsetPt(paragraph.alignment, paragraphWidthPt, line.widthPt);
39
- for (const fragment of line.fragments) {
40
+ const justifyGapsPt = paragraph.alignment === "justify" && lineIndex < lines.length - 1 ? require_layout_shared.justifyLineGapsPt(line, paragraphWidthPt, measurer) : void 0;
41
+ line.fragments.forEach((fragment, fragmentIndex) => {
40
42
  const unrotated = {
41
- x: paragraphLeftXDown + firstLineIndentPt + alignOffsetPt + fragment.xOffsetPt,
43
+ x: paragraphLeftXDown + firstLineIndentPt + alignOffsetPt + fragment.xOffsetPt + (justifyGapsPt?.[fragmentIndex] ?? 0),
42
44
  y: slideHeightPt - baselineYDown
43
45
  };
44
46
  const placed = placement.place(unrotated);
@@ -72,7 +74,7 @@ function layoutParagraph(paragraph, contentLeftXDown, contentWidthPt, startYDown
72
74
  };
73
75
  out.push(link);
74
76
  }
75
- }
77
+ });
76
78
  cursorYDown += scaledLineHeightPt;
77
79
  });
78
80
  cursorYDown += paragraph.spacingAfterPt ?? 0;
@@ -1,7 +1,7 @@
1
1
  import { flipY } from "../model/geometry.js";
2
2
  import { formulaOfBlock } from "../model/formula.js";
3
3
  import { layoutFormula } from "../mathml/layout.js";
4
- import { alignmentOffsetPt, effectiveStyledRuns, estimateRowHeightPt, lineNaturalHeightPt, registerImage, sumColumnWidthsPt } from "./shared.js";
4
+ import { alignmentOffsetPt, effectiveStyledRuns, estimateRowHeightPt, justifyLineGapsPt, lineNaturalHeightPt, registerImage, sumColumnWidthsPt } from "./shared.js";
5
5
  import { COLOR_BLACK, LAYOUT_FORMAT_VERSION } from "document-schema.js";
6
6
  import { loadMathFont, rotatePointAboutCenter, wrapRunsToWidth } from "pdf-codec";
7
7
  //#region src/layout/slides.ts
@@ -30,14 +30,16 @@ function layoutParagraph(paragraph, contentLeftXDown, contentWidthPt, startYDown
30
30
  const fallbackRun = effectiveRuns[0];
31
31
  const paragraphLeftXDown = contentLeftXDown + (paragraph.indentLeftPt ?? 0);
32
32
  const paragraphWidthPt = Math.max(0, contentWidthPt - (paragraph.indentLeftPt ?? 0));
33
- wrapRunsToWidth(effectiveRuns, measurer, paragraphWidthPt).forEach((line, lineIndex) => {
33
+ const lines = wrapRunsToWidth(effectiveRuns, measurer, paragraphWidthPt);
34
+ lines.forEach((line, lineIndex) => {
34
35
  const scaledLineHeightPt = lineNaturalHeightPt(line, measurer, fallbackRun) * (paragraph.lineSpacing ?? 1) * spacingScale;
35
36
  const baselineYDown = cursorYDown + line.ascentPt;
36
37
  const firstLineIndentPt = lineIndex === 0 ? paragraph.indentFirstLinePt ?? 0 : 0;
37
38
  const alignOffsetPt = alignmentOffsetPt(paragraph.alignment, paragraphWidthPt, line.widthPt);
38
- for (const fragment of line.fragments) {
39
+ const justifyGapsPt = paragraph.alignment === "justify" && lineIndex < lines.length - 1 ? justifyLineGapsPt(line, paragraphWidthPt, measurer) : void 0;
40
+ line.fragments.forEach((fragment, fragmentIndex) => {
39
41
  const unrotated = {
40
- x: paragraphLeftXDown + firstLineIndentPt + alignOffsetPt + fragment.xOffsetPt,
42
+ x: paragraphLeftXDown + firstLineIndentPt + alignOffsetPt + fragment.xOffsetPt + (justifyGapsPt?.[fragmentIndex] ?? 0),
41
43
  y: slideHeightPt - baselineYDown
42
44
  };
43
45
  const placed = placement.place(unrotated);
@@ -71,7 +73,7 @@ function layoutParagraph(paragraph, contentLeftXDown, contentWidthPt, startYDown
71
73
  };
72
74
  out.push(link);
73
75
  }
74
- }
76
+ });
75
77
  cursorYDown += scaledLineHeightPt;
76
78
  });
77
79
  cursorYDown += paragraph.spacingAfterPt ?? 0;
@@ -0,0 +1,42 @@
1
+ //#region src/odb/sql/lexer.d.ts
2
+ type SqlComparisonOperator = '=' | '<>' | '<' | '>' | '<=' | '>=';
3
+ type SqlPunctuation = '(' | ')' | ',' | '.' | '*' | ';' | '-';
4
+ type SqlToken = {
5
+ readonly kind: 'keyword';
6
+ readonly keyword: string;
7
+ readonly text: string;
8
+ readonly start: number;
9
+ } | {
10
+ readonly kind: 'identifier';
11
+ readonly name: string;
12
+ readonly quoted: boolean;
13
+ readonly text: string;
14
+ readonly start: number;
15
+ } | {
16
+ readonly kind: 'string';
17
+ readonly value: string;
18
+ readonly text: string;
19
+ readonly start: number;
20
+ } | {
21
+ readonly kind: 'number';
22
+ readonly value: number;
23
+ readonly text: string;
24
+ readonly start: number;
25
+ } | {
26
+ readonly kind: 'operator';
27
+ readonly operator: SqlComparisonOperator;
28
+ readonly text: string;
29
+ readonly start: number;
30
+ } | {
31
+ readonly kind: 'punctuation';
32
+ readonly punctuation: SqlPunctuation;
33
+ readonly text: string;
34
+ readonly start: number;
35
+ } | {
36
+ readonly kind: 'end';
37
+ readonly text: string;
38
+ readonly start: number;
39
+ };
40
+ declare function tokenizeSql(sql: string): readonly SqlToken[];
41
+ //#endregion
42
+ export { tokenizeSql as i, SqlPunctuation as n, SqlToken as r, SqlComparisonOperator as t };
@@ -0,0 +1,42 @@
1
+ //#region src/odb/sql/lexer.d.ts
2
+ type SqlComparisonOperator = '=' | '<>' | '<' | '>' | '<=' | '>=';
3
+ type SqlPunctuation = '(' | ')' | ',' | '.' | '*' | ';' | '-';
4
+ type SqlToken = {
5
+ readonly kind: 'keyword';
6
+ readonly keyword: string;
7
+ readonly text: string;
8
+ readonly start: number;
9
+ } | {
10
+ readonly kind: 'identifier';
11
+ readonly name: string;
12
+ readonly quoted: boolean;
13
+ readonly text: string;
14
+ readonly start: number;
15
+ } | {
16
+ readonly kind: 'string';
17
+ readonly value: string;
18
+ readonly text: string;
19
+ readonly start: number;
20
+ } | {
21
+ readonly kind: 'number';
22
+ readonly value: number;
23
+ readonly text: string;
24
+ readonly start: number;
25
+ } | {
26
+ readonly kind: 'operator';
27
+ readonly operator: SqlComparisonOperator;
28
+ readonly text: string;
29
+ readonly start: number;
30
+ } | {
31
+ readonly kind: 'punctuation';
32
+ readonly punctuation: SqlPunctuation;
33
+ readonly text: string;
34
+ readonly start: number;
35
+ } | {
36
+ readonly kind: 'end';
37
+ readonly text: string;
38
+ readonly start: number;
39
+ };
40
+ declare function tokenizeSql(sql: string): readonly SqlToken[];
41
+ //#endregion
42
+ export { tokenizeSql as i, SqlPunctuation as n, SqlToken as r, SqlComparisonOperator as t };
@@ -1,7 +1,7 @@
1
+ import { t as MathVariant } from "../variant-BMrebjMw.cjs";
1
2
  import { r as MathMlNode } from "../nodes-pArN9ilm.cjs";
2
3
  import { MathBox, MathColor, MathDiagnostic, MathLayoutResult } from "./layout-types.cjs";
3
4
  import { MathFontMetrics } from "./metrics.cjs";
4
- import { MathVariant } from "./variant.cjs";
5
5
  //#region src/mathml/layout.d.ts
6
6
  interface LayoutFormulaOptions {
7
7
  readonly metrics: MathFontMetrics;
@@ -1,7 +1,7 @@
1
+ import { t as MathVariant } from "../variant-BMrebjMw.js";
1
2
  import { r as MathMlNode } from "../nodes-pArN9ilm.js";
2
3
  import { MathBox, MathColor, MathDiagnostic, MathLayoutResult } from "./layout-types.js";
3
4
  import { MathFontMetrics } from "./metrics.js";
4
- import { MathVariant } from "./variant.js";
5
5
  //#region src/mathml/layout.d.ts
6
6
  interface LayoutFormulaOptions {
7
7
  readonly metrics: MathFontMetrics;
@@ -1,7 +1,2 @@
1
- //#region src/mathml/variant.d.ts
2
- type MathVariant = 'normal' | 'bold' | 'italic' | 'bold-italic' | 'double-struck' | 'bold-fraktur' | 'script' | 'bold-script' | 'fraktur' | 'sans-serif' | 'bold-sans-serif' | 'sans-serif-italic' | 'sans-serif-bold-italic' | 'monospace';
3
- declare function mapMathVariant(codePoint: number, variant: MathVariant): number;
4
- declare function applyMathVariant(text: string, variant: MathVariant): string;
5
- declare function isMathVariant(value: string): value is MathVariant;
6
- //#endregion
1
+ import { i as mapMathVariant, n as applyMathVariant, r as isMathVariant, t as MathVariant } from "../variant-BMrebjMw.cjs";
7
2
  export { MathVariant, applyMathVariant, isMathVariant, mapMathVariant };
@@ -1,7 +1,2 @@
1
- //#region src/mathml/variant.d.ts
2
- type MathVariant = 'normal' | 'bold' | 'italic' | 'bold-italic' | 'double-struck' | 'bold-fraktur' | 'script' | 'bold-script' | 'fraktur' | 'sans-serif' | 'bold-sans-serif' | 'sans-serif-italic' | 'sans-serif-bold-italic' | 'monospace';
3
- declare function mapMathVariant(codePoint: number, variant: MathVariant): number;
4
- declare function applyMathVariant(text: string, variant: MathVariant): string;
5
- declare function isMathVariant(value: string): value is MathVariant;
6
- //#endregion
1
+ import { i as mapMathVariant, n as applyMathVariant, r as isMathVariant, t as MathVariant } from "../variant-BMrebjMw.js";
7
2
  export { MathVariant, applyMathVariant, isMathVariant, mapMathVariant };
@@ -1,4 +1,4 @@
1
- import { HsqldbTable } from "../hsqldb/script.cjs";
1
+ import { r as HsqldbTable } from "../script-DsGGIzGU.cjs";
2
2
  //#region src/odb/csv.d.ts
3
3
  declare class OdbTableNotSpecifiedError extends Error {
4
4
  readonly availableTables: readonly string[];
package/dist/odb/csv.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { HsqldbTable } from "../hsqldb/script.js";
1
+ import { r as HsqldbTable } from "../script-DsGGIzGU.js";
2
2
  //#region src/odb/csv.d.ts
3
3
  declare class OdbTableNotSpecifiedError extends Error {
4
4
  readonly availableTables: readonly string[];
@@ -0,0 +1,49 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_odb_formula_errors = require("./errors.cjs");
3
+ //#region src/odb/formula/definition.ts
4
+ function rptBandDefinition(band) {
5
+ return { formulas: band.elements.map((element) => element.formula) };
6
+ }
7
+ function bandDefinition(band) {
8
+ return band === void 0 ? void 0 : rptBandDefinition(band);
9
+ }
10
+ function odbReportGroupChain(report) {
11
+ const chain = [];
12
+ let level = report.groups;
13
+ while (level.length > 0) {
14
+ if (level.length > 1) throw new require_odb_formula_errors.RptReportStructureError(`${String(level.length)} sibling groups are declared at one nesting level, but Report Builder nests groups strictly and this engine's scoping is defined only for a chain`, report.name);
15
+ const group = level[0];
16
+ if (group === void 0) throw new require_odb_formula_errors.RptReportStructureError("a group nesting level reported a non-zero length but held no group", report.name);
17
+ chain.push(group);
18
+ level = group.groups;
19
+ }
20
+ return chain;
21
+ }
22
+ function groupDefinition(group, level, reportName) {
23
+ if (group.groupExpression === void 0) throw new require_odb_formula_errors.RptReportStructureError(`the group at nesting level ${String(level)} declares no rpt:group-expression, so there is no break test to evaluate`, reportName);
24
+ return {
25
+ groupExpression: group.groupExpression,
26
+ functions: group.functions.map((declaration) => ({
27
+ name: declaration.name,
28
+ formula: declaration.formula
29
+ })),
30
+ header: bandDefinition(group.header),
31
+ footer: bandDefinition(group.footer)
32
+ };
33
+ }
34
+ function rptDefinitionFromReport(report) {
35
+ return {
36
+ functions: report.functions.map((declaration) => ({
37
+ name: declaration.name,
38
+ formula: declaration.formula
39
+ })),
40
+ reportHeader: bandDefinition(report.reportHeader),
41
+ groups: odbReportGroupChain(report).map((group, level) => groupDefinition(group, level, report.name)),
42
+ detail: bandDefinition(report.detail),
43
+ reportFooter: bandDefinition(report.reportFooter)
44
+ };
45
+ }
46
+ //#endregion
47
+ exports.odbReportGroupChain = odbReportGroupChain;
48
+ exports.rptBandDefinition = rptBandDefinition;
49
+ exports.rptDefinitionFromReport = rptDefinitionFromReport;
@@ -0,0 +1,8 @@
1
+ import { RptBandDefinition, RptReportDefinition } from "./evaluate.cjs";
2
+ import { OdbReport, OdbReportBand, OdbReportGroup } from "odf.js";
3
+ //#region src/odb/formula/definition.d.ts
4
+ declare function rptBandDefinition(band: OdbReportBand): RptBandDefinition;
5
+ declare function odbReportGroupChain(report: OdbReport): readonly OdbReportGroup[];
6
+ declare function rptDefinitionFromReport(report: OdbReport): RptReportDefinition;
7
+ //#endregion
8
+ export { odbReportGroupChain, rptBandDefinition, rptDefinitionFromReport };