js.documents 14.1.1 → 14.3.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.
- package/dist/convert/variant-bridges.cjs +2 -2
- package/dist/convert/variant-bridges.js +2 -2
- package/dist/diagnostics-C2-C2uUI.d.cts +17 -0
- package/dist/diagnostics-C2-C2uUI.d.ts +17 -0
- package/dist/{diagnostics-9twvwLNY.d.cts → diagnostics-CGWySzd-.d.cts} +1 -0
- package/dist/{diagnostics-9twvwLNY.d.ts → diagnostics-CGWySzd-.d.ts} +1 -0
- package/dist/edit/doc/table.cjs +3 -3
- package/dist/edit/doc/table.js +3 -3
- package/dist/edit/docx/content.cjs +14 -3
- package/dist/edit/docx/content.d.cts +2 -0
- package/dist/edit/docx/content.d.ts +2 -0
- package/dist/edit/docx/content.js +14 -3
- package/dist/edit/docx/diagnostics.cjs +7 -0
- package/dist/edit/docx/diagnostics.d.cts +2 -0
- package/dist/edit/docx/diagnostics.d.ts +2 -0
- package/dist/edit/docx/diagnostics.js +5 -0
- package/dist/edit/markdown/table.cjs +3 -3
- package/dist/edit/markdown/table.js +3 -3
- package/dist/edit/odp/slide.d.cts +1 -1
- package/dist/edit/odp/slide.d.ts +1 -1
- package/dist/edit/odt/content.cjs +4 -2
- package/dist/edit/odt/content.d.cts +2 -2
- package/dist/edit/odt/content.d.ts +2 -2
- package/dist/edit/odt/content.js +4 -2
- package/dist/edit/odt/editor.d.cts +1 -1
- package/dist/edit/odt/editor.d.ts +1 -1
- package/dist/edit/odt/table.cjs +59 -4
- package/dist/edit/odt/table.d.cts +1 -1
- package/dist/edit/odt/table.d.ts +1 -1
- package/dist/edit/odt/table.js +59 -4
- package/dist/edit/pptx/content.cjs +12 -1
- package/dist/edit/pptx/content.d.cts +1 -1
- package/dist/edit/pptx/content.d.ts +1 -1
- package/dist/edit/pptx/content.js +12 -1
- package/dist/edit/pptx/diagnostics.cjs +4 -1
- package/dist/edit/pptx/diagnostics.d.cts +1 -1
- package/dist/edit/pptx/diagnostics.d.ts +1 -1
- package/dist/edit/pptx/diagnostics.js +4 -1
- package/dist/edit/pptx/slide.d.cts +1 -1
- package/dist/edit/pptx/slide.d.ts +1 -1
- package/dist/edit/pptx/table.cjs +29 -3
- package/dist/edit/pptx/table.d.cts +1 -1
- package/dist/edit/pptx/table.d.ts +1 -1
- package/dist/edit/pptx/table.js +29 -3
- package/dist/edit/table-grid.cjs +2 -2
- package/dist/edit/table-grid.js +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/layout/engine.cjs +1 -1
- package/dist/layout/engine.js +1 -1
- package/dist/layout/reconstruct.cjs +6 -6
- package/dist/layout/reconstruct.js +6 -6
- package/dist/layout/shared.cjs +3 -2
- package/dist/layout/shared.js +3 -2
- package/dist/layout/slides.cjs +1 -1
- package/dist/layout/slides.js +1 -1
- package/dist/markdown/render.cjs +3 -3
- package/dist/markdown/render.js +3 -3
- package/dist/odb/report/render.cjs +1 -1
- package/dist/odb/report/render.js +1 -1
- package/dist/{table-BuNLtwgL.d.ts → table-B1uKqI0r.d.ts} +2 -0
- package/dist/{table-Cou5rKOo.d.ts → table-B5htMG3g.d.ts} +2 -0
- package/dist/{table-ukpjK2hS.d.cts → table-CxLN4l90.d.cts} +2 -0
- package/dist/{table-Bt9ahRyh.d.cts → table-DrE6jEWv.d.cts} +2 -0
- package/package.json +13 -13
package/dist/markdown/render.js
CHANGED
|
@@ -114,17 +114,17 @@ function sheetToTable(sheet, sink) {
|
|
|
114
114
|
const visibleColumns = [];
|
|
115
115
|
for (let column = 0; column <= maxColumn; column += 1) if (!hiddenColumns.has(column)) visibleColumns.push(column);
|
|
116
116
|
const columnWidthByIndex = new Map(sheet.columns.map((column) => [column.index, column.widthPt]));
|
|
117
|
-
const
|
|
117
|
+
const columns = visibleColumns.map((column) => ({ widthPt: columnWidthByIndex.get(column) ?? DEFAULT_COLUMN_WIDTH_PT }));
|
|
118
118
|
const rows = visibleRows.map((row) => ({ cells: visibleColumns.map((column) => spreadsheetCellToTableCell(cellByPosition.get(`${String(row)}:${String(column)}`))) }));
|
|
119
119
|
sink({
|
|
120
120
|
severity: "info",
|
|
121
121
|
code: MarkdownRenderDiagnosticCodes.SPREADSHEET_SHEET_AS_TABLE,
|
|
122
|
-
message: `sheet "${sheet.name}" flattened to a ${String(rows.length)}x${String(
|
|
122
|
+
message: `sheet "${sheet.name}" flattened to a ${String(rows.length)}x${String(columns.length)} GFM table; its first row is rendered as the table header (a GFM table always has one, and a spreadsheet has no header/body distinction of its own)`
|
|
123
123
|
});
|
|
124
124
|
return {
|
|
125
125
|
kind: "table",
|
|
126
126
|
rows,
|
|
127
|
-
|
|
127
|
+
columns
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
function spreadsheetBlocks(document, sink) {
|
|
@@ -56,7 +56,7 @@ function bandTable(band) {
|
|
|
56
56
|
const columnWidthPt = CONTENT_WIDTH_PT / band.elements.length;
|
|
57
57
|
return {
|
|
58
58
|
kind: "table",
|
|
59
|
-
|
|
59
|
+
columns: band.elements.map(() => ({ widthPt: columnWidthPt })),
|
|
60
60
|
rows: [{ cells: band.elements.map((element, index) => ({ blocks: [cellParagraph(element, band.values[index], band.styleId)] })) }]
|
|
61
61
|
};
|
|
62
62
|
}
|
|
@@ -55,7 +55,7 @@ function bandTable(band) {
|
|
|
55
55
|
const columnWidthPt = CONTENT_WIDTH_PT / band.elements.length;
|
|
56
56
|
return {
|
|
57
57
|
kind: "table",
|
|
58
|
-
|
|
58
|
+
columns: band.elements.map(() => ({ widthPt: columnWidthPt })),
|
|
59
59
|
rows: [{ cells: band.elements.map((element, index) => ({ blocks: [cellParagraph(element, band.values[index], band.styleId)] })) }]
|
|
60
60
|
};
|
|
61
61
|
}
|
|
@@ -6,6 +6,7 @@ interface PptxTableInit {
|
|
|
6
6
|
readonly rows: number;
|
|
7
7
|
readonly columns: number;
|
|
8
8
|
readonly columnWidthsPt?: readonly number[];
|
|
9
|
+
readonly rowHeightsPt?: readonly (number | undefined)[];
|
|
9
10
|
}
|
|
10
11
|
declare class PptxTableCell {
|
|
11
12
|
private readonly node;
|
|
@@ -25,6 +26,7 @@ declare class PptxTableCell {
|
|
|
25
26
|
get verticalAlign(): ContentTableCell["verticalAlign"];
|
|
26
27
|
set verticalAlign(value: ContentTableCell["verticalAlign"]);
|
|
27
28
|
private readBorder;
|
|
29
|
+
private readBorderStyle;
|
|
28
30
|
setParagraphs(paragraphs: readonly DrawingParagraphInit[]): void;
|
|
29
31
|
}
|
|
30
32
|
declare class PptxTableRow {
|
|
@@ -62,6 +62,8 @@ declare class OdtTable {
|
|
|
62
62
|
rows(): OdtTableRow[];
|
|
63
63
|
headerRows(): boolean[];
|
|
64
64
|
setHeaderRows(flags: readonly boolean[]): void;
|
|
65
|
+
headerColumns(): boolean[];
|
|
66
|
+
setHeaderColumns(flags: readonly boolean[]): void;
|
|
65
67
|
gridRows(): TableGridRows<OdtTableCell>;
|
|
66
68
|
gridColumnCount(): number;
|
|
67
69
|
private grid;
|
|
@@ -6,6 +6,7 @@ interface PptxTableInit {
|
|
|
6
6
|
readonly rows: number;
|
|
7
7
|
readonly columns: number;
|
|
8
8
|
readonly columnWidthsPt?: readonly number[];
|
|
9
|
+
readonly rowHeightsPt?: readonly (number | undefined)[];
|
|
9
10
|
}
|
|
10
11
|
declare class PptxTableCell {
|
|
11
12
|
private readonly node;
|
|
@@ -25,6 +26,7 @@ declare class PptxTableCell {
|
|
|
25
26
|
get verticalAlign(): ContentTableCell["verticalAlign"];
|
|
26
27
|
set verticalAlign(value: ContentTableCell["verticalAlign"]);
|
|
27
28
|
private readBorder;
|
|
29
|
+
private readBorderStyle;
|
|
28
30
|
setParagraphs(paragraphs: readonly DrawingParagraphInit[]): void;
|
|
29
31
|
}
|
|
30
32
|
declare class PptxTableRow {
|
|
@@ -62,6 +62,8 @@ declare class OdtTable {
|
|
|
62
62
|
rows(): OdtTableRow[];
|
|
63
63
|
headerRows(): boolean[];
|
|
64
64
|
setHeaderRows(flags: readonly boolean[]): void;
|
|
65
|
+
headerColumns(): boolean[];
|
|
66
|
+
setHeaderColumns(flags: readonly boolean[]): void;
|
|
65
67
|
gridRows(): TableGridRows<OdtTableCell>;
|
|
66
68
|
gridColumnCount(): number;
|
|
67
69
|
private grid;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js.documents",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.3.0",
|
|
4
4
|
"description": "Bidirectional docx/pptx <-> PDF conversion and a read+write editable OOXML document model, built on ooxml.js and Zod 4 codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -77,21 +77,21 @@
|
|
|
77
77
|
],
|
|
78
78
|
"license": "MIT",
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"archive-codec": "1.11.
|
|
80
|
+
"archive-codec": "1.11.12",
|
|
81
81
|
"byte-codec": "1.8.1",
|
|
82
|
-
"doc-codec": "6.0
|
|
83
|
-
"document-schema.js": "7.
|
|
84
|
-
"epub-codec": "5.0
|
|
82
|
+
"doc-codec": "6.1.0",
|
|
83
|
+
"document-schema.js": "7.15.0",
|
|
84
|
+
"epub-codec": "5.1.0",
|
|
85
85
|
"fflate": "0.8.3",
|
|
86
|
-
"markdown-codec": "11.0
|
|
87
|
-
"odf.js": "11.0
|
|
88
|
-
"ooxml.js": "12.0
|
|
89
|
-
"pdf-codec": "5.2.
|
|
90
|
-
"ppt-codec": "2.
|
|
91
|
-
"rtf-codec": "8.0
|
|
86
|
+
"markdown-codec": "11.1.0",
|
|
87
|
+
"odf.js": "11.1.0",
|
|
88
|
+
"ooxml.js": "12.1.0",
|
|
89
|
+
"pdf-codec": "5.2.6",
|
|
90
|
+
"ppt-codec": "2.2.0",
|
|
91
|
+
"rtf-codec": "8.1.0",
|
|
92
92
|
"temml": "0.13.4",
|
|
93
|
-
"wpd-codec": "5.1.
|
|
94
|
-
"xls-codec": "4.15.
|
|
93
|
+
"wpd-codec": "5.1.2",
|
|
94
|
+
"xls-codec": "4.15.18",
|
|
95
95
|
"zod": "4.4.3"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|