js.documents 14.4.56 → 14.4.57

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 (163) hide show
  1. package/dist/codecs/read.cjs +2 -2
  2. package/dist/codecs/read.js +1 -1
  3. package/dist/composition-plan-CfvhXeOC.cjs +627 -0
  4. package/dist/composition-plan-DU9nPPN7.d.cts +102 -0
  5. package/dist/composition-plan-f0zaExUW.js +508 -0
  6. package/dist/composition-plan-l6QPO4FX.d.ts +102 -0
  7. package/dist/convert/composition-plan.cjs +7 -0
  8. package/dist/convert/composition-plan.d.cts +2 -0
  9. package/dist/convert/composition-plan.d.ts +2 -0
  10. package/dist/convert/composition-plan.js +2 -0
  11. package/dist/convert/composition-to-pdf.cjs +12 -12
  12. package/dist/convert/composition-to-pdf.d.cts +1 -1
  13. package/dist/convert/composition-to-pdf.d.ts +1 -1
  14. package/dist/convert/composition-to-pdf.js +2 -2
  15. package/dist/convert/composition.cjs +16 -511
  16. package/dist/convert/composition.d.cts +2 -85
  17. package/dist/convert/composition.d.ts +2 -85
  18. package/dist/convert/composition.js +2 -502
  19. package/dist/convert/convert.cjs +2 -2
  20. package/dist/convert/convert.js +1 -1
  21. package/dist/convert/from-package.cjs +3 -3
  22. package/dist/convert/from-package.js +2 -2
  23. package/dist/convert/from-pdf.cjs +18 -18
  24. package/dist/convert/from-pdf.js +2 -2
  25. package/dist/convert/local.cjs +3 -3
  26. package/dist/convert/local.js +1 -1
  27. package/dist/edit/odp/slide.cjs +4 -4
  28. package/dist/edit/odp/slide.d.cts +1 -1
  29. package/dist/edit/odp/slide.d.ts +1 -1
  30. package/dist/edit/odp/slide.js +1 -1
  31. package/dist/edit/odt/content.d.cts +1 -1
  32. package/dist/edit/odt/content.d.ts +1 -1
  33. package/dist/edit/odt/editor.cjs +4 -4
  34. package/dist/edit/odt/editor.d.cts +1 -1
  35. package/dist/edit/odt/editor.d.ts +1 -1
  36. package/dist/edit/odt/editor.js +1 -1
  37. package/dist/edit/odt/table-grid.cjs +23 -0
  38. package/dist/edit/odt/table-grid.d.cts +54 -0
  39. package/dist/edit/odt/table-grid.d.ts +54 -0
  40. package/dist/edit/odt/table-grid.js +2 -0
  41. package/dist/edit/odt/table.cjs +12 -653
  42. package/dist/edit/odt/table.d.cts +2 -2
  43. package/dist/edit/odt/table.d.ts +2 -2
  44. package/dist/edit/odt/table.js +2 -647
  45. package/dist/{evaluate-BbOsgdmN.d.cts → evaluate-BSEUxiUK.d.cts} +3 -1
  46. package/dist/evaluate-CEzsBx3w.cjs +564 -0
  47. package/dist/{evaluate-C7fmk69X.d.ts → evaluate-D8fG2ZeB.d.ts} +3 -1
  48. package/dist/evaluate-IK-3aMv5.js +445 -0
  49. package/dist/evaluate-columns-CyqKHkIW.d.cts +41 -0
  50. package/dist/evaluate-columns-cOo8fOfT.d.ts +41 -0
  51. package/dist/index.cjs +24 -24
  52. package/dist/index.d.cts +6 -5
  53. package/dist/index.d.ts +6 -5
  54. package/dist/index.js +8 -8
  55. package/dist/latex/lint.cjs +2 -2
  56. package/dist/latex/lint.js +1 -1
  57. package/dist/latex/lower-fold.cjs +6 -0
  58. package/dist/latex/lower-fold.d.cts +17 -0
  59. package/dist/latex/lower-fold.d.ts +17 -0
  60. package/dist/latex/lower-fold.js +2 -0
  61. package/dist/latex/lower.cjs +11 -617
  62. package/dist/latex/lower.d.cts +18 -1
  63. package/dist/latex/lower.d.ts +18 -1
  64. package/dist/latex/lower.js +2 -616
  65. package/dist/latex/symbols.d.cts +1 -15
  66. package/dist/latex/symbols.d.ts +1 -15
  67. package/dist/latex/temml.d.cts +1 -24
  68. package/dist/latex/temml.d.ts +1 -24
  69. package/dist/layout/engine.cjs +2 -2
  70. package/dist/layout/engine.js +1 -1
  71. package/dist/layout/reconstruct-lines.cjs +315 -0
  72. package/dist/layout/reconstruct-lines.d.cts +2 -0
  73. package/dist/layout/reconstruct-lines.d.ts +2 -0
  74. package/dist/layout/reconstruct-lines.js +297 -0
  75. package/dist/layout/reconstruct-presentations-prod.cjs +9 -0
  76. package/dist/layout/reconstruct-presentations-prod.d.cts +26 -0
  77. package/dist/layout/reconstruct-presentations-prod.d.ts +26 -0
  78. package/dist/layout/reconstruct-presentations-prod.js +2 -0
  79. package/dist/layout/reconstruct-tables.cjs +5 -0
  80. package/dist/layout/reconstruct-tables.d.cts +22 -0
  81. package/dist/layout/reconstruct-tables.d.ts +22 -0
  82. package/dist/layout/reconstruct-tables.js +2 -0
  83. package/dist/layout/reconstruct.cjs +11 -1545
  84. package/dist/layout/reconstruct.d.cts +2 -14
  85. package/dist/layout/reconstruct.d.ts +2 -14
  86. package/dist/layout/reconstruct.js +2 -1542
  87. package/dist/layout/shared.cjs +2 -2
  88. package/dist/layout/shared.js +1 -1
  89. package/dist/layout/sheets-render.cjs +19 -0
  90. package/dist/layout/sheets-render.d.cts +41 -0
  91. package/dist/layout/sheets-render.d.ts +41 -0
  92. package/dist/layout/sheets-render.js +2 -0
  93. package/dist/layout/sheets.cjs +10 -544
  94. package/dist/layout/sheets.d.cts +13 -2
  95. package/dist/layout/sheets.d.ts +13 -2
  96. package/dist/layout/sheets.js +2 -543
  97. package/dist/layout/slides.cjs +2 -2
  98. package/dist/layout/slides.js +1 -1
  99. package/dist/layout-DIJzJk4x.js +526 -0
  100. package/dist/layout-iuiyl_Fk.cjs +621 -0
  101. package/dist/layout-types-oSbHvZid.d.cts +13 -0
  102. package/dist/layout-types-oSbHvZid.d.ts +13 -0
  103. package/dist/lower-DCs3rWI7.js +618 -0
  104. package/dist/lower-DzOb13w4.cjs +701 -0
  105. package/dist/markdown/math.cjs +2 -2
  106. package/dist/markdown/math.js +1 -1
  107. package/dist/mathml/layout-stretch.cjs +16 -0
  108. package/dist/mathml/layout-stretch.d.cts +24 -0
  109. package/dist/mathml/layout-stretch.d.ts +24 -0
  110. package/dist/mathml/layout-stretch.js +2 -0
  111. package/dist/mathml/layout-types.d.cts +1 -12
  112. package/dist/mathml/layout-types.d.ts +1 -12
  113. package/dist/mathml/layout.cjs +3 -525
  114. package/dist/mathml/layout.d.cts +2 -2
  115. package/dist/mathml/layout.d.ts +2 -2
  116. package/dist/mathml/layout.js +1 -523
  117. package/dist/odb/formula/evaluate.d.cts +1 -1
  118. package/dist/odb/formula/evaluate.d.ts +1 -1
  119. package/dist/odb/report/render.d.cts +1 -1
  120. package/dist/odb/report/render.d.ts +1 -1
  121. package/dist/odb/report/source.cjs +2 -2
  122. package/dist/odb/report/source.d.cts +1 -1
  123. package/dist/odb/report/source.d.ts +1 -1
  124. package/dist/odb/report/source.js +1 -1
  125. package/dist/odb/sql/evaluate-columns.cjs +122 -0
  126. package/dist/odb/sql/evaluate-columns.d.cts +2 -0
  127. package/dist/odb/sql/evaluate-columns.d.ts +2 -0
  128. package/dist/odb/sql/evaluate-columns.js +114 -0
  129. package/dist/odb/sql/evaluate-predicates.cjs +16 -0
  130. package/dist/odb/sql/evaluate-predicates.d.cts +23 -0
  131. package/dist/odb/sql/evaluate-predicates.d.ts +23 -0
  132. package/dist/odb/sql/evaluate-predicates.js +2 -0
  133. package/dist/odb/sql/evaluate.cjs +7 -556
  134. package/dist/odb/sql/evaluate.d.cts +2 -2
  135. package/dist/odb/sql/evaluate.d.ts +2 -2
  136. package/dist/odb/sql/evaluate.js +2 -552
  137. package/dist/read-BSH--XB4.js +682 -0
  138. package/dist/read-CahCZMwG.cjs +759 -0
  139. package/dist/reconstruct-BKOCAedo.d.ts +29 -0
  140. package/dist/reconstruct-D4TEteZ6.d.cts +29 -0
  141. package/dist/reconstruct-lines-B7t66ICm.d.cts +33 -0
  142. package/dist/reconstruct-lines-B7t66ICm.d.ts +33 -0
  143. package/dist/reconstruct-presentations-prod-B5fkPiRZ.js +1256 -0
  144. package/dist/reconstruct-presentations-prod-X315aBmI.cjs +1375 -0
  145. package/dist/sheets-BQCpNXsE.cjs +700 -0
  146. package/dist/sheets-DWDvGN-g.js +545 -0
  147. package/dist/svg/read-geometry.cjs +10 -0
  148. package/dist/svg/read-geometry.d.cts +24 -0
  149. package/dist/svg/read-geometry.d.ts +24 -0
  150. package/dist/svg/read-geometry.js +2 -0
  151. package/dist/svg/read.cjs +6 -680
  152. package/dist/svg/read.d.cts +17 -2
  153. package/dist/svg/read.d.ts +17 -2
  154. package/dist/svg/read.js +2 -679
  155. package/dist/symbols-BlzXfLEe.d.cts +16 -0
  156. package/dist/symbols-CKm2r4D0.d.ts +16 -0
  157. package/dist/table-B5gSMY7w.js +649 -0
  158. package/dist/{table-DrE6jEWv.d.cts → table-BK_Ao-Y6.d.cts} +9 -1
  159. package/dist/{table-B5htMG3g.d.ts → table-CxY85YUj.d.ts} +9 -1
  160. package/dist/table-DqUIOSPV.cjs +840 -0
  161. package/dist/temml-1-I9N9DD.d.cts +25 -0
  162. package/dist/temml-1-I9N9DD.d.ts +25 -0
  163. package/package.json +1 -1
@@ -0,0 +1,29 @@
1
+ import { i as CellTypeInferenceSink } from "./cell-typing-BQ-xQ5X5.js";
2
+ import { ContentDocument, Margins } from "document-schema.js";
3
+ import { LayoutDocument, LayoutItem } from "pdf-codec";
4
+ //#region src/layout/reconstruct.d.ts
5
+ declare const DEFAULT_COLUMN_WIDTH_FALLBACK_PT = 40;
6
+ declare const NO_ITEMS: ReadonlySet<LayoutItem>;
7
+ interface ReconstructOptions {
8
+ readonly signal?: AbortSignal;
9
+ readonly onCellTypeInference?: CellTypeInferenceSink;
10
+ }
11
+ declare const ZERO_MARGINS: Margins;
12
+ declare function reconstructWordprocessing(doc: LayoutDocument, options?: ReconstructOptions): ContentDocument;
13
+ declare const CELL_TYPES: ReadonlySet<string>;
14
+ declare const ROW_TYPES: ReadonlySet<string>;
15
+ declare const TABLE_TYPES: ReadonlySet<string>;
16
+ interface StructureNode {
17
+ readonly id: string;
18
+ readonly type: string;
19
+ readonly parent: StructureNode | undefined;
20
+ readonly order: number;
21
+ }
22
+ interface StructureIndex {
23
+ readonly nodeOfItem: (item: LayoutItem) => StructureNode | undefined;
24
+ }
25
+ declare function indexStructure(doc: LayoutDocument): StructureIndex | undefined;
26
+ declare function nearestOfType(node: StructureNode | undefined, types: ReadonlySet<string>): StructureNode | undefined;
27
+ declare function reconstructSpreadsheet(doc: LayoutDocument, options?: ReconstructOptions): ContentDocument;
28
+ //#endregion
29
+ export { ReconstructOptions as a, TABLE_TYPES as c, nearestOfType as d, reconstructSpreadsheet as f, ROW_TYPES as i, ZERO_MARGINS as l, DEFAULT_COLUMN_WIDTH_FALLBACK_PT as n, StructureIndex as o, reconstructWordprocessing as p, NO_ITEMS as r, StructureNode as s, CELL_TYPES as t, indexStructure as u };
@@ -0,0 +1,29 @@
1
+ import { i as CellTypeInferenceSink } from "./cell-typing-BQ-xQ5X5.cjs";
2
+ import { ContentDocument, Margins } from "document-schema.js";
3
+ import { LayoutDocument, LayoutItem } from "pdf-codec";
4
+ //#region src/layout/reconstruct.d.ts
5
+ declare const DEFAULT_COLUMN_WIDTH_FALLBACK_PT = 40;
6
+ declare const NO_ITEMS: ReadonlySet<LayoutItem>;
7
+ interface ReconstructOptions {
8
+ readonly signal?: AbortSignal;
9
+ readonly onCellTypeInference?: CellTypeInferenceSink;
10
+ }
11
+ declare const ZERO_MARGINS: Margins;
12
+ declare function reconstructWordprocessing(doc: LayoutDocument, options?: ReconstructOptions): ContentDocument;
13
+ declare const CELL_TYPES: ReadonlySet<string>;
14
+ declare const ROW_TYPES: ReadonlySet<string>;
15
+ declare const TABLE_TYPES: ReadonlySet<string>;
16
+ interface StructureNode {
17
+ readonly id: string;
18
+ readonly type: string;
19
+ readonly parent: StructureNode | undefined;
20
+ readonly order: number;
21
+ }
22
+ interface StructureIndex {
23
+ readonly nodeOfItem: (item: LayoutItem) => StructureNode | undefined;
24
+ }
25
+ declare function indexStructure(doc: LayoutDocument): StructureIndex | undefined;
26
+ declare function nearestOfType(node: StructureNode | undefined, types: ReadonlySet<string>): StructureNode | undefined;
27
+ declare function reconstructSpreadsheet(doc: LayoutDocument, options?: ReconstructOptions): ContentDocument;
28
+ //#endregion
29
+ export { ReconstructOptions as a, TABLE_TYPES as c, nearestOfType as d, reconstructSpreadsheet as f, ROW_TYPES as i, ZERO_MARGINS as l, DEFAULT_COLUMN_WIDTH_FALLBACK_PT as n, StructureIndex as o, reconstructWordprocessing as p, NO_ITEMS as r, StructureNode as s, CELL_TYPES as t, indexStructure as u };
@@ -0,0 +1,33 @@
1
+ import { ContentParagraph, ContentRun, LayoutFrame } from "document-schema.js";
2
+ import { LayoutText } from "pdf-codec";
3
+ //#region src/layout/reconstruct-lines.d.ts
4
+ interface TextLine {
5
+ readonly items: readonly LayoutText[];
6
+ readonly baselineY: number;
7
+ }
8
+ declare const HALF_POINT_BUCKET_PT = 0.5;
9
+ declare function clusterIntoLines(items: readonly LayoutText[]): TextLine[];
10
+ declare function textItemVerticalExtent(item: LayoutText): {
11
+ ascentPt: number;
12
+ descentPt: number;
13
+ };
14
+ declare function textItemToContentRun(item: LayoutText): ContentRun;
15
+ declare const MIN_WORD_GAP_PT = 0.5;
16
+ declare function gapExceeds(previous: LayoutText, next: LayoutText, thresholdPt: number): boolean;
17
+ declare function textBoxOfItem(item: LayoutText, pageIndex: number): LayoutFrame;
18
+ declare function lineBox(line: TextLine, pageIndex: number): LayoutFrame;
19
+ declare function pushRunsForLine(runs: ContentRun[], line: TextLine, pageIndex: number): void;
20
+ declare function bucketCounts(values: readonly number[], bucketSize: number): Map<number, number>;
21
+ declare function modeOf(values: readonly number[], bucketSize: number): number;
22
+ declare const LARGE_GAP_EM_MULTIPLIER = 2;
23
+ declare function fontSizesClose(a: number, b: number): boolean;
24
+ declare const PARAGRAPH_GAP_MULTIPLIER = 1.25;
25
+ declare function estimateModalLineSpacing(lines: readonly TextLine[]): number;
26
+ interface TextParagraph {
27
+ readonly lines: TextLine[];
28
+ }
29
+ declare function clusterIntoParagraphs(lines: readonly TextLine[]): TextParagraph[];
30
+ declare const LEFT_ALIGN_TOLERANCE_PT = 2;
31
+ declare function paragraphToContentParagraph(paragraph: TextParagraph, pageIndex: number, headingLevel: number | undefined): ContentParagraph;
32
+ //#endregion
33
+ export { pushRunsForLine as _, PARAGRAPH_GAP_MULTIPLIER as a, textItemVerticalExtent as b, bucketCounts as c, estimateModalLineSpacing as d, fontSizesClose as f, paragraphToContentParagraph as g, modeOf as h, MIN_WORD_GAP_PT as i, clusterIntoLines as l, lineBox as m, LARGE_GAP_EM_MULTIPLIER as n, TextLine as o, gapExceeds as p, LEFT_ALIGN_TOLERANCE_PT as r, TextParagraph as s, HALF_POINT_BUCKET_PT as t, clusterIntoParagraphs as u, textBoxOfItem as v, textItemToContentRun as y };
@@ -0,0 +1,33 @@
1
+ import { ContentParagraph, ContentRun, LayoutFrame } from "document-schema.js";
2
+ import { LayoutText } from "pdf-codec";
3
+ //#region src/layout/reconstruct-lines.d.ts
4
+ interface TextLine {
5
+ readonly items: readonly LayoutText[];
6
+ readonly baselineY: number;
7
+ }
8
+ declare const HALF_POINT_BUCKET_PT = 0.5;
9
+ declare function clusterIntoLines(items: readonly LayoutText[]): TextLine[];
10
+ declare function textItemVerticalExtent(item: LayoutText): {
11
+ ascentPt: number;
12
+ descentPt: number;
13
+ };
14
+ declare function textItemToContentRun(item: LayoutText): ContentRun;
15
+ declare const MIN_WORD_GAP_PT = 0.5;
16
+ declare function gapExceeds(previous: LayoutText, next: LayoutText, thresholdPt: number): boolean;
17
+ declare function textBoxOfItem(item: LayoutText, pageIndex: number): LayoutFrame;
18
+ declare function lineBox(line: TextLine, pageIndex: number): LayoutFrame;
19
+ declare function pushRunsForLine(runs: ContentRun[], line: TextLine, pageIndex: number): void;
20
+ declare function bucketCounts(values: readonly number[], bucketSize: number): Map<number, number>;
21
+ declare function modeOf(values: readonly number[], bucketSize: number): number;
22
+ declare const LARGE_GAP_EM_MULTIPLIER = 2;
23
+ declare function fontSizesClose(a: number, b: number): boolean;
24
+ declare const PARAGRAPH_GAP_MULTIPLIER = 1.25;
25
+ declare function estimateModalLineSpacing(lines: readonly TextLine[]): number;
26
+ interface TextParagraph {
27
+ readonly lines: TextLine[];
28
+ }
29
+ declare function clusterIntoParagraphs(lines: readonly TextLine[]): TextParagraph[];
30
+ declare const LEFT_ALIGN_TOLERANCE_PT = 2;
31
+ declare function paragraphToContentParagraph(paragraph: TextParagraph, pageIndex: number, headingLevel: number | undefined): ContentParagraph;
32
+ //#endregion
33
+ export { pushRunsForLine as _, PARAGRAPH_GAP_MULTIPLIER as a, textItemVerticalExtent as b, bucketCounts as c, estimateModalLineSpacing as d, fontSizesClose as f, paragraphToContentParagraph as g, modeOf as h, MIN_WORD_GAP_PT as i, clusterIntoLines as l, lineBox as m, LARGE_GAP_EM_MULTIPLIER as n, TextLine as o, gapExceeds as p, LEFT_ALIGN_TOLERANCE_PT as r, TextParagraph as s, HALF_POINT_BUCKET_PT as t, clusterIntoParagraphs as u, textBoxOfItem as v, textItemToContentRun as y };