js.documents 9.0.0 → 10.0.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/edit/doc/table.d.cts +1 -1
- package/dist/edit/doc/table.d.ts +1 -1
- package/dist/edit/docx/content.cjs +2 -0
- package/dist/edit/docx/content.js +2 -0
- package/dist/edit/docx/table.d.cts +1 -1
- package/dist/edit/docx/table.d.ts +1 -1
- package/dist/edit/markdown/table.d.cts +1 -1
- package/dist/edit/markdown/table.d.ts +1 -1
- package/dist/edit/odp/slide.d.cts +1 -1
- package/dist/edit/odp/slide.d.ts +1 -1
- package/dist/edit/odt/content.cjs +2 -0
- package/dist/edit/odt/content.d.cts +1 -1
- package/dist/edit/odt/content.d.ts +1 -1
- package/dist/edit/odt/content.js +2 -0
- package/dist/edit/odt/editor.d.cts +1 -1
- package/dist/edit/odt/editor.d.ts +1 -1
- package/dist/edit/odt/table.d.cts +1 -1
- package/dist/edit/odt/table.d.ts +1 -1
- package/dist/edit/pptx/content.cjs +2 -0
- package/dist/edit/pptx/content.js +2 -0
- package/dist/edit/table-grid.cjs +8 -0
- package/dist/edit/table-grid.d.cts +2 -2
- package/dist/edit/table-grid.d.ts +2 -2
- package/dist/edit/table-grid.js +9 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/{table-CwF1-ClQ.d.ts → table-BMYJo_-F.d.ts} +1 -1
- package/dist/{table-D3Hpm5uR.d.cts → table-CCjF09Ho.d.cts} +1 -1
- package/dist/{table-grid-Dlg4fNhn.d.cts → table-grid-Xbaddzz3.d.cts} +5 -1
- package/dist/{table-grid-Dlg4fNhn.d.ts → table-grid-Xbaddzz3.d.ts} +5 -1
- package/package.json +13 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ParagraphInit, t as DocParagraph } from "../../paragraph-DM9n9I4T.cjs";
|
|
2
|
-
import { i as TableGridRows } from "../../table-grid-
|
|
2
|
+
import { i as TableGridRows } from "../../table-grid-Xbaddzz3.cjs";
|
|
3
3
|
import { ContentBlock, ContentTable, ContentTableCell, ContentTableRow } from "document-schema.js";
|
|
4
4
|
//#region src/edit/doc/table.d.ts
|
|
5
5
|
interface TableInit {
|
package/dist/edit/doc/table.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ParagraphInit, t as DocParagraph } from "../../paragraph-Byw2Y7xu.js";
|
|
2
|
-
import { i as TableGridRows } from "../../table-grid-
|
|
2
|
+
import { i as TableGridRows } from "../../table-grid-Xbaddzz3.js";
|
|
3
3
|
import { ContentBlock, ContentTable, ContentTableCell, ContentTableRow } from "document-schema.js";
|
|
4
4
|
//#region src/edit/doc/table.d.ts
|
|
5
5
|
interface TableInit {
|
|
@@ -6,6 +6,7 @@ const require_ports_clock = require("../../ports/clock.cjs");
|
|
|
6
6
|
const require_model_units = require("../../model/units.cjs");
|
|
7
7
|
const require_edit_docx_image = require("./image.cjs");
|
|
8
8
|
const require_edit_docx_scaffold = require("./scaffold.cjs");
|
|
9
|
+
const require_edit_table_grid = require("../table-grid.cjs");
|
|
9
10
|
const require_edit_docx_editor = require("./editor.cjs");
|
|
10
11
|
const require_model_embedded_drawing = require("../../model/embedded-drawing.cjs");
|
|
11
12
|
const require_model_formula = require("../../model/formula.cjs");
|
|
@@ -208,6 +209,7 @@ function docxRowCells(positions, positionsByRow) {
|
|
|
208
209
|
});
|
|
209
210
|
}
|
|
210
211
|
function appendTable(body, block) {
|
|
212
|
+
require_edit_table_grid.assertTableObeysGridRule(block, "buildDocxPackage");
|
|
211
213
|
const columns = block.columnWidthsPt.length;
|
|
212
214
|
if (block.rows.length === 0 || columns === 0) return;
|
|
213
215
|
const table = body.appendTable({
|
|
@@ -5,6 +5,7 @@ import { systemClock } from "../../ports/clock.js";
|
|
|
5
5
|
import { ptToTwips } from "../../model/units.js";
|
|
6
6
|
import { assertDocxWritableImageFormat } from "./image.js";
|
|
7
7
|
import { createEmptyDocxPackage } from "./scaffold.js";
|
|
8
|
+
import { assertTableObeysGridRule } from "../table-grid.js";
|
|
8
9
|
import { DocxEditor } from "./editor.js";
|
|
9
10
|
import { FLOW_CONTAINER_ORIGIN, drawingOfBlock, embeddedDrawingVectors } from "../../model/embedded-drawing.js";
|
|
10
11
|
import { formulaOfBlock, formulaPlaceholderText } from "../../model/formula.js";
|
|
@@ -207,6 +208,7 @@ function docxRowCells(positions, positionsByRow) {
|
|
|
207
208
|
});
|
|
208
209
|
}
|
|
209
210
|
function appendTable(body, block) {
|
|
211
|
+
assertTableObeysGridRule(block, "buildDocxPackage");
|
|
210
212
|
const columns = block.columnWidthsPt.length;
|
|
211
213
|
if (block.rows.length === 0 || columns === 0) return;
|
|
212
214
|
const table = body.appendTable({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as TableGridRows } from "../../table-grid-
|
|
1
|
+
import { i as TableGridRows } from "../../table-grid-Xbaddzz3.cjs";
|
|
2
2
|
import { DocxParagraph, ParagraphInit } from "./paragraph.cjs";
|
|
3
3
|
import { Color, ContentCellBorders } from "document-schema.js";
|
|
4
4
|
import { XmlElement, XmlNode } from "ooxml.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as TableGridRows } from "../../table-grid-
|
|
1
|
+
import { i as TableGridRows } from "../../table-grid-Xbaddzz3.js";
|
|
2
2
|
import { DocxParagraph, ParagraphInit } from "./paragraph.js";
|
|
3
3
|
import { XmlElement, XmlNode } from "ooxml.js";
|
|
4
4
|
import { Color, ContentCellBorders } from "document-schema.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as TableGridRows } from "../../table-grid-
|
|
1
|
+
import { i as TableGridRows } from "../../table-grid-Xbaddzz3.cjs";
|
|
2
2
|
import { MarkdownParagraph, ParagraphInit } from "./paragraph.cjs";
|
|
3
3
|
import { ContentBlock, ContentTable, ContentTableCell, ContentTableRow } from "document-schema.js";
|
|
4
4
|
//#region src/edit/markdown/table.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as TableGridRows } from "../../table-grid-
|
|
1
|
+
import { i as TableGridRows } from "../../table-grid-Xbaddzz3.js";
|
|
2
2
|
import { MarkdownParagraph, ParagraphInit } from "./paragraph.js";
|
|
3
3
|
import { ContentBlock, ContentTable, ContentTableCell, ContentTableRow } from "document-schema.js";
|
|
4
4
|
//#region src/edit/markdown/table.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as ImageInit } from "../../image-D1z0T9Za.cjs";
|
|
2
2
|
import { t as OdpShape } from "../../shape-Kmmxib5z.cjs";
|
|
3
3
|
import { s as OdgVector } from "../../vector-DDP7hgvm.cjs";
|
|
4
|
-
import { o as TableInit, r as OdtTable } from "../../table-
|
|
4
|
+
import { o as TableInit, r as OdtTable } from "../../table-CCjF09Ho.cjs";
|
|
5
5
|
import { Box, ContentFormula, ContentVector } from "document-schema.js";
|
|
6
6
|
import { Package, XmlElement, XmlNode } from "odf.js";
|
|
7
7
|
//#region src/edit/odp/slide.d.ts
|
package/dist/edit/odp/slide.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as ImageInit } from "../../image-D1z0T9Za.js";
|
|
2
2
|
import { t as OdpShape } from "../../shape-ZAfNsCC5.js";
|
|
3
3
|
import { s as OdgVector } from "../../vector-DDP7hgvm.js";
|
|
4
|
-
import { o as TableInit, r as OdtTable } from "../../table-
|
|
4
|
+
import { o as TableInit, r as OdtTable } from "../../table-BMYJo_-F.js";
|
|
5
5
|
import { Box, ContentFormula, ContentVector } from "document-schema.js";
|
|
6
6
|
import { Package, XmlElement, XmlNode } from "odf.js";
|
|
7
7
|
//#region src/edit/odp/slide.d.ts
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_model_metadata = require("../../model/metadata.cjs");
|
|
3
3
|
const require_ports_clock = require("../../ports/clock.cjs");
|
|
4
|
+
const require_edit_table_grid = require("../table-grid.cjs");
|
|
4
5
|
const require_model_embedded_drawing = require("../../model/embedded-drawing.cjs");
|
|
5
6
|
const require_model_formula = require("../../model/formula.cjs");
|
|
6
7
|
const require_edit_odt_paragraph = require("./paragraph.cjs");
|
|
@@ -132,6 +133,7 @@ function populateCellBlocks(cell, blocks) {
|
|
|
132
133
|
for (const remaining of restBlocks) appendCellBlock(cell, remaining);
|
|
133
134
|
}
|
|
134
135
|
function populateOdtTable(table, block) {
|
|
136
|
+
require_edit_table_grid.assertTableObeysGridRule(block, "populateOdtTable");
|
|
135
137
|
const gridPositions = (0, document_schema_js.walkTableGrid)(block);
|
|
136
138
|
block.rows.forEach((row, rowIndex) => {
|
|
137
139
|
const tableRow = table.appendEmptyRow();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as ClockPort } from "../../clock-C7SUuYN0.cjs";
|
|
2
2
|
import { t as OdtParagraph } from "../../paragraph-CRaLSzWz.cjs";
|
|
3
|
-
import { r as OdtTable } from "../../table-
|
|
3
|
+
import { r as OdtTable } from "../../table-CCjF09Ho.cjs";
|
|
4
4
|
import { ContentDocument, ContentParagraph, ContentTable } from "document-schema.js";
|
|
5
5
|
import { Package } from "odf.js";
|
|
6
6
|
//#region src/edit/odt/content.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as ClockPort } from "../../clock-C7SUuYN0.js";
|
|
2
2
|
import { t as OdtParagraph } from "../../paragraph-D4f705GG.js";
|
|
3
|
-
import { r as OdtTable } from "../../table-
|
|
3
|
+
import { r as OdtTable } from "../../table-BMYJo_-F.js";
|
|
4
4
|
import { ContentDocument, ContentParagraph, ContentTable } from "document-schema.js";
|
|
5
5
|
import { Package } from "odf.js";
|
|
6
6
|
//#region src/edit/odt/content.d.ts
|
package/dist/edit/odt/content.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { resolveMetadataTimestamps } from "../../model/metadata.js";
|
|
2
2
|
import { systemClock } from "../../ports/clock.js";
|
|
3
|
+
import { assertTableObeysGridRule } from "../table-grid.js";
|
|
3
4
|
import { FLOW_CONTAINER_ORIGIN, drawingOfBlock, embeddedDrawingVectors } from "../../model/embedded-drawing.js";
|
|
4
5
|
import { formulaOfBlock, formulaPlaceholderText } from "../../model/formula.js";
|
|
5
6
|
import { headingStyleName } from "./paragraph.js";
|
|
@@ -131,6 +132,7 @@ function populateCellBlocks(cell, blocks) {
|
|
|
131
132
|
for (const remaining of restBlocks) appendCellBlock(cell, remaining);
|
|
132
133
|
}
|
|
133
134
|
function populateOdtTable(table, block) {
|
|
135
|
+
assertTableObeysGridRule(block, "populateOdtTable");
|
|
134
136
|
const gridPositions = walkTableGrid(block);
|
|
135
137
|
block.rows.forEach((row, rowIndex) => {
|
|
136
138
|
const tableRow = table.appendEmptyRow();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as ClockPort } from "../../clock-C7SUuYN0.cjs";
|
|
2
2
|
import { n as ParagraphInit, t as OdtParagraph } from "../../paragraph-CRaLSzWz.cjs";
|
|
3
3
|
import { t as OdtList } from "../../list-C_UPIZWM.cjs";
|
|
4
|
-
import { o as TableInit, r as OdtTable } from "../../table-
|
|
4
|
+
import { o as TableInit, r as OdtTable } from "../../table-CCjF09Ho.cjs";
|
|
5
5
|
import { Box, ContentControlDescriptor, ContentFormula, ContentVector, DivisionDescriptor, LayoutMetadata } from "document-schema.js";
|
|
6
6
|
import { Package } from "odf.js";
|
|
7
7
|
//#region src/edit/odt/editor.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as ClockPort } from "../../clock-C7SUuYN0.js";
|
|
2
2
|
import { n as ParagraphInit, t as OdtParagraph } from "../../paragraph-D4f705GG.js";
|
|
3
3
|
import { t as OdtList } from "../../list-C2GWIe6E.js";
|
|
4
|
-
import { o as TableInit, r as OdtTable } from "../../table-
|
|
4
|
+
import { o as TableInit, r as OdtTable } from "../../table-BMYJo_-F.js";
|
|
5
5
|
import { Box, ContentControlDescriptor, ContentFormula, ContentVector, DivisionDescriptor, LayoutMetadata } from "document-schema.js";
|
|
6
6
|
import { Package } from "odf.js";
|
|
7
7
|
//#region src/edit/odt/editor.d.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as OdtTableRow, c as buildTable, i as OdtTableCell, l as readCellDecoration, n as OdtCoveredTableCell, o as TableInit, r as OdtTable, s as buildCellStyle, t as CellDecoration } from "../../table-
|
|
1
|
+
import { a as OdtTableRow, c as buildTable, i as OdtTableCell, l as readCellDecoration, n as OdtCoveredTableCell, o as TableInit, r as OdtTable, s as buildCellStyle, t as CellDecoration } from "../../table-CCjF09Ho.cjs";
|
|
2
2
|
export { CellDecoration, OdtCoveredTableCell, OdtTable, OdtTableCell, OdtTableRow, TableInit, buildCellStyle, buildTable, readCellDecoration };
|
package/dist/edit/odt/table.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as OdtTableRow, c as buildTable, i as OdtTableCell, l as readCellDecoration, n as OdtCoveredTableCell, o as TableInit, r as OdtTable, s as buildCellStyle, t as CellDecoration } from "../../table-
|
|
1
|
+
import { a as OdtTableRow, c as buildTable, i as OdtTableCell, l as readCellDecoration, n as OdtCoveredTableCell, o as TableInit, r as OdtTable, s as buildCellStyle, t as CellDecoration } from "../../table-BMYJo_-F.js";
|
|
2
2
|
export { CellDecoration, OdtCoveredTableCell, OdtTable, OdtTableCell, OdtTableRow, TableInit, buildCellStyle, buildTable, readCellDecoration };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_model_metadata = require("../../model/metadata.cjs");
|
|
3
3
|
const require_ports_clock = require("../../ports/clock.cjs");
|
|
4
|
+
const require_edit_table_grid = require("../table-grid.cjs");
|
|
4
5
|
const require_model_embedded_drawing = require("../../model/embedded-drawing.cjs");
|
|
5
6
|
const require_model_formula = require("../../model/formula.cjs");
|
|
6
7
|
const require_edit_pptx_scaffold = require("./scaffold.cjs");
|
|
@@ -113,6 +114,7 @@ function populateCellParagraphs(cell, blocks, resolveHyperlinkRId) {
|
|
|
113
114
|
cell.setParagraphs(paragraphs);
|
|
114
115
|
}
|
|
115
116
|
function populatePptxTable(table, block, resolveHyperlinkRId) {
|
|
117
|
+
require_edit_table_grid.assertTableObeysGridRule(block, "buildPptxPackage");
|
|
116
118
|
(0, document_schema_js.walkTableGrid)(block).forEach((positions, rowIndex) => {
|
|
117
119
|
positions.forEach((position) => {
|
|
118
120
|
const { cell, columnIndex } = position;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { resolveMetadataTimestamps } from "../../model/metadata.js";
|
|
2
2
|
import { systemClock } from "../../ports/clock.js";
|
|
3
|
+
import { assertTableObeysGridRule } from "../table-grid.js";
|
|
3
4
|
import { drawingOfBlock, embeddedDrawingVectors } from "../../model/embedded-drawing.js";
|
|
4
5
|
import { formulaOfBlock, formulaPlaceholderText } from "../../model/formula.js";
|
|
5
6
|
import { createEmptyPptxPackage } from "./scaffold.js";
|
|
@@ -112,6 +113,7 @@ function populateCellParagraphs(cell, blocks, resolveHyperlinkRId) {
|
|
|
112
113
|
cell.setParagraphs(paragraphs);
|
|
113
114
|
}
|
|
114
115
|
function populatePptxTable(table, block, resolveHyperlinkRId) {
|
|
116
|
+
assertTableObeysGridRule(block, "buildPptxPackage");
|
|
115
117
|
walkTableGrid(block).forEach((positions, rowIndex) => {
|
|
116
118
|
positions.forEach((position) => {
|
|
117
119
|
const { cell, columnIndex } = position;
|
package/dist/edit/table-grid.cjs
CHANGED
|
@@ -53,6 +53,14 @@ function resolvePivotTableGrid(table, wrap) {
|
|
|
53
53
|
rowSpan: cell.rowSpan
|
|
54
54
|
}))), table.columnWidthsPt.length);
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Throws when `table` breaks the grid rule (ContentTableCell in document-schema.js), naming `entryPoint` and the fault. The edit layer's builders write a covered position as a marker with no content of its own (a docx vertical-merge continuation, an ODF `table:covered-table-cell`, a pptx `hMerge`/`vMerge` cell), so a table whose covered positions carry blocks or spans, whose rows disagree about the grid, or whose regions run past the grid or into each other has no faithful spelling: the builder would drop what a covered position held, or guess which of two regions a position belongs to.
|
|
58
|
+
*/
|
|
59
|
+
function assertTableObeysGridRule(table, entryPoint) {
|
|
60
|
+
const fault = (0, document_schema_js.findTableGridFault)(table);
|
|
61
|
+
if (fault !== void 0) throw new Error(`${entryPoint}: table breaks the grid rule (${(0, document_schema_js.describeTableGridFault)(fault)})`);
|
|
62
|
+
}
|
|
56
63
|
//#endregion
|
|
64
|
+
exports.assertTableObeysGridRule = assertTableObeysGridRule;
|
|
57
65
|
exports.resolveLiveTableGrid = resolveLiveTableGrid;
|
|
58
66
|
exports.resolvePivotTableGrid = resolvePivotTableGrid;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { LiveTableGrid, PlacedLiveCell, TableGridCell, TableGridRows, resolveLiveTableGrid, resolvePivotTableGrid };
|
|
1
|
+
import { a as assertTableObeysGridRule, i as TableGridRows, n as PlacedLiveCell, o as resolveLiveTableGrid, r as TableGridCell, s as resolvePivotTableGrid, t as LiveTableGrid } from "../table-grid-Xbaddzz3.cjs";
|
|
2
|
+
export { LiveTableGrid, PlacedLiveCell, TableGridCell, TableGridRows, assertTableObeysGridRule, resolveLiveTableGrid, resolvePivotTableGrid };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { LiveTableGrid, PlacedLiveCell, TableGridCell, TableGridRows, resolveLiveTableGrid, resolvePivotTableGrid };
|
|
1
|
+
import { a as assertTableObeysGridRule, i as TableGridRows, n as PlacedLiveCell, o as resolveLiveTableGrid, r as TableGridCell, s as resolvePivotTableGrid, t as LiveTableGrid } from "../table-grid-Xbaddzz3.js";
|
|
2
|
+
export { LiveTableGrid, PlacedLiveCell, TableGridCell, TableGridRows, assertTableObeysGridRule, resolveLiveTableGrid, resolvePivotTableGrid };
|
package/dist/edit/table-grid.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { denseTableRows, tableGridColumnCount, walkTableGrid } from "document-schema.js";
|
|
1
|
+
import { denseTableRows, describeTableGridFault, findTableGridFault, tableGridColumnCount, walkTableGrid } from "document-schema.js";
|
|
2
2
|
//#region src/edit/table-grid.ts
|
|
3
3
|
function positionKey(rowIndex, columnIndex) {
|
|
4
4
|
return `${rowIndex}:${columnIndex}`;
|
|
@@ -52,5 +52,12 @@ function resolvePivotTableGrid(table, wrap) {
|
|
|
52
52
|
rowSpan: cell.rowSpan
|
|
53
53
|
}))), table.columnWidthsPt.length);
|
|
54
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Throws when `table` breaks the grid rule (ContentTableCell in document-schema.js), naming `entryPoint` and the fault. The edit layer's builders write a covered position as a marker with no content of its own (a docx vertical-merge continuation, an ODF `table:covered-table-cell`, a pptx `hMerge`/`vMerge` cell), so a table whose covered positions carry blocks or spans, whose rows disagree about the grid, or whose regions run past the grid or into each other has no faithful spelling: the builder would drop what a covered position held, or guess which of two regions a position belongs to.
|
|
57
|
+
*/
|
|
58
|
+
function assertTableObeysGridRule(table, entryPoint) {
|
|
59
|
+
const fault = findTableGridFault(table);
|
|
60
|
+
if (fault !== void 0) throw new Error(`${entryPoint}: table breaks the grid rule (${describeTableGridFault(fault)})`);
|
|
61
|
+
}
|
|
55
62
|
//#endregion
|
|
56
|
-
export { resolveLiveTableGrid, resolvePivotTableGrid };
|
|
63
|
+
export { assertTableObeysGridRule, resolveLiveTableGrid, resolvePivotTableGrid };
|
package/dist/index.d.cts
CHANGED
|
@@ -21,7 +21,7 @@ import { BuildCsvTextOptions, CsvSheetNotFoundError, CsvSheetNotSpecifiedError,
|
|
|
21
21
|
import { MetadataOverrides } from "./metadata/core-patch.cjs";
|
|
22
22
|
import { n as RunInit, t as DocRun } from "./run-iYz2M-a_.cjs";
|
|
23
23
|
import { n as ParagraphInit, t as DocParagraph } from "./paragraph-DM9n9I4T.cjs";
|
|
24
|
-
import { i as TableGridRows, r as TableGridCell } from "./table-grid-
|
|
24
|
+
import { i as TableGridRows, r as TableGridCell } from "./table-grid-Xbaddzz3.cjs";
|
|
25
25
|
import { DocTable, DocTableCell, DocTableRow, TableInit } from "./edit/doc/table.cjs";
|
|
26
26
|
import { CreateDocOptions, DocEditor, DocSection, SectionInit, createDoc, openDoc } from "./edit/doc/editor.cjs";
|
|
27
27
|
import { BuildDocxPackageOptions, buildDocxPackage } from "./edit/docx/content.cjs";
|
|
@@ -47,7 +47,7 @@ import { OdgPage, PageImageInit, TextBoxInit } from "./edit/odg/page.cjs";
|
|
|
47
47
|
import { CreateOdgOptions, OdgEditor, createOdg, openOdg } from "./edit/odg/editor.cjs";
|
|
48
48
|
import { CreateEmptyOdgPackageOptions } from "./edit/odg/scaffold.cjs";
|
|
49
49
|
import { BuildOdpPackageOptions, buildOdpPackage } from "./edit/odp/content.cjs";
|
|
50
|
-
import { a as OdtTableRow, i as OdtTableCell, n as OdtCoveredTableCell, o as TableInit$2, r as OdtTable } from "./table-
|
|
50
|
+
import { a as OdtTableRow, i as OdtTableCell, n as OdtCoveredTableCell, o as TableInit$2, r as OdtTable } from "./table-CCjF09Ho.cjs";
|
|
51
51
|
import { OdpSlide, SlideImageInit, SlideTableInit, TextBoxInit as TextBoxInit$1 } from "./edit/odp/slide.cjs";
|
|
52
52
|
import { CreateOdpOptions, OdpEditor, createOdp, openOdp } from "./edit/odp/editor.cjs";
|
|
53
53
|
import { CreateEmptyOdpPackageOptions } from "./edit/odp/scaffold.cjs";
|
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ import { BuildCsvTextOptions, CsvSheetNotFoundError, CsvSheetNotSpecifiedError,
|
|
|
21
21
|
import { MetadataOverrides } from "./metadata/core-patch.js";
|
|
22
22
|
import { n as RunInit, t as DocRun } from "./run-iYz2M-a_.js";
|
|
23
23
|
import { n as ParagraphInit, t as DocParagraph } from "./paragraph-Byw2Y7xu.js";
|
|
24
|
-
import { i as TableGridRows, r as TableGridCell } from "./table-grid-
|
|
24
|
+
import { i as TableGridRows, r as TableGridCell } from "./table-grid-Xbaddzz3.js";
|
|
25
25
|
import { DocTable, DocTableCell, DocTableRow, TableInit } from "./edit/doc/table.js";
|
|
26
26
|
import { CreateDocOptions, DocEditor, DocSection, SectionInit, createDoc, openDoc } from "./edit/doc/editor.js";
|
|
27
27
|
import { BuildDocxPackageOptions, buildDocxPackage } from "./edit/docx/content.js";
|
|
@@ -47,7 +47,7 @@ import { OdgPage, PageImageInit, TextBoxInit } from "./edit/odg/page.js";
|
|
|
47
47
|
import { CreateOdgOptions, OdgEditor, createOdg, openOdg } from "./edit/odg/editor.js";
|
|
48
48
|
import { CreateEmptyOdgPackageOptions } from "./edit/odg/scaffold.js";
|
|
49
49
|
import { BuildOdpPackageOptions, buildOdpPackage } from "./edit/odp/content.js";
|
|
50
|
-
import { a as OdtTableRow, i as OdtTableCell, n as OdtCoveredTableCell, o as TableInit$2, r as OdtTable } from "./table-
|
|
50
|
+
import { a as OdtTableRow, i as OdtTableCell, n as OdtCoveredTableCell, o as TableInit$2, r as OdtTable } from "./table-BMYJo_-F.js";
|
|
51
51
|
import { OdpSlide, SlideImageInit, SlideTableInit, TextBoxInit as TextBoxInit$1 } from "./edit/odp/slide.js";
|
|
52
52
|
import { CreateOdpOptions, OdpEditor, createOdp, openOdp } from "./edit/odp/editor.js";
|
|
53
53
|
import { CreateEmptyOdpPackageOptions } from "./edit/odp/scaffold.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as TableGridRows } from "./table-grid-
|
|
1
|
+
import { i as TableGridRows } from "./table-grid-Xbaddzz3.js";
|
|
2
2
|
import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-D4f705GG.js";
|
|
3
3
|
import { Color, ContentCellBorders } from "document-schema.js";
|
|
4
4
|
import { Package, XmlElement, XmlNode } from "odf.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as TableGridRows } from "./table-grid-
|
|
1
|
+
import { i as TableGridRows } from "./table-grid-Xbaddzz3.cjs";
|
|
2
2
|
import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-CRaLSzWz.cjs";
|
|
3
3
|
import { Color, ContentCellBorders } from "document-schema.js";
|
|
4
4
|
import { Package, XmlElement, XmlNode } from "odf.js";
|
|
@@ -41,5 +41,9 @@ declare function resolveLiveTableGrid<C>(rows: readonly (readonly PlacedLiveCell
|
|
|
41
41
|
* A pivot table's rows are already dense, so an entry's index is its grid column and no width needs deriving; what this adds is the resolution of a covered position to the anchor that owns it, which is the same resolution the XML-backed editors need.
|
|
42
42
|
*/
|
|
43
43
|
declare function resolvePivotTableGrid<C>(table: ContentTable, wrap: (cell: ContentTableCell) => C): LiveTableGrid<C>;
|
|
44
|
+
/**
|
|
45
|
+
* Throws when `table` breaks the grid rule (ContentTableCell in document-schema.js), naming `entryPoint` and the fault. The edit layer's builders write a covered position as a marker with no content of its own (a docx vertical-merge continuation, an ODF `table:covered-table-cell`, a pptx `hMerge`/`vMerge` cell), so a table whose covered positions carry blocks or spans, whose rows disagree about the grid, or whose regions run past the grid or into each other has no faithful spelling: the builder would drop what a covered position held, or guess which of two regions a position belongs to.
|
|
46
|
+
*/
|
|
47
|
+
declare function assertTableObeysGridRule(table: ContentTable, entryPoint: string): void;
|
|
44
48
|
//#endregion
|
|
45
|
-
export {
|
|
49
|
+
export { assertTableObeysGridRule as a, TableGridRows as i, PlacedLiveCell as n, resolveLiveTableGrid as o, TableGridCell as r, resolvePivotTableGrid as s, LiveTableGrid as t };
|
|
@@ -41,5 +41,9 @@ declare function resolveLiveTableGrid<C>(rows: readonly (readonly PlacedLiveCell
|
|
|
41
41
|
* A pivot table's rows are already dense, so an entry's index is its grid column and no width needs deriving; what this adds is the resolution of a covered position to the anchor that owns it, which is the same resolution the XML-backed editors need.
|
|
42
42
|
*/
|
|
43
43
|
declare function resolvePivotTableGrid<C>(table: ContentTable, wrap: (cell: ContentTableCell) => C): LiveTableGrid<C>;
|
|
44
|
+
/**
|
|
45
|
+
* Throws when `table` breaks the grid rule (ContentTableCell in document-schema.js), naming `entryPoint` and the fault. The edit layer's builders write a covered position as a marker with no content of its own (a docx vertical-merge continuation, an ODF `table:covered-table-cell`, a pptx `hMerge`/`vMerge` cell), so a table whose covered positions carry blocks or spans, whose rows disagree about the grid, or whose regions run past the grid or into each other has no faithful spelling: the builder would drop what a covered position held, or guess which of two regions a position belongs to.
|
|
46
|
+
*/
|
|
47
|
+
declare function assertTableObeysGridRule(table: ContentTable, entryPoint: string): void;
|
|
44
48
|
//#endregion
|
|
45
|
-
export {
|
|
49
|
+
export { assertTableObeysGridRule as a, TableGridRows as i, PlacedLiveCell as n, resolveLiveTableGrid as o, TableGridCell as r, resolvePivotTableGrid as s, LiveTableGrid as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js.documents",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.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.9",
|
|
81
81
|
"byte-codec": "1.7.0",
|
|
82
|
-
"doc-codec": "
|
|
83
|
-
"document-schema.js": "7.
|
|
84
|
-
"epub-codec": "
|
|
82
|
+
"doc-codec": "5.0.0",
|
|
83
|
+
"document-schema.js": "7.13.0",
|
|
84
|
+
"epub-codec": "4.0.0",
|
|
85
85
|
"fflate": "0.8.3",
|
|
86
|
-
"markdown-codec": "
|
|
87
|
-
"odf.js": "
|
|
88
|
-
"ooxml.js": "
|
|
89
|
-
"pdf-codec": "5.2.
|
|
90
|
-
"ppt-codec": "2.0.
|
|
91
|
-
"rtf-codec": "
|
|
86
|
+
"markdown-codec": "9.0.0",
|
|
87
|
+
"odf.js": "10.0.0",
|
|
88
|
+
"ooxml.js": "11.0.0",
|
|
89
|
+
"pdf-codec": "5.2.3",
|
|
90
|
+
"ppt-codec": "2.0.4",
|
|
91
|
+
"rtf-codec": "7.0.0",
|
|
92
92
|
"temml": "0.13.4",
|
|
93
|
-
"wpd-codec": "5.0.
|
|
94
|
-
"xls-codec": "4.15.
|
|
93
|
+
"wpd-codec": "5.0.2",
|
|
94
|
+
"xls-codec": "4.15.15",
|
|
95
95
|
"zod": "4.4.3"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|