oasis-editor 0.0.57 → 0.0.59

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.
@@ -0,0 +1,24 @@
1
+ import { Element as XmlElement } from '@xmldom/xmldom';
2
+ import { EditorParagraphNode, EditorTableCellStyle, EditorTableRowNode, EditorTableRowStyle, EditorTableStyle } from '../../core/model.js';
3
+ import { EditorTableBorders } from './borders.js';
4
+ import { ParagraphAutospacingFlags } from './paragraphStyle.js';
5
+
6
+ export declare function parseTableStyle(tblPr: XmlElement | null, tableStyleId?: string): EditorTableStyle | undefined;
7
+ export declare function parseTableRowStyle(rowProperties: XmlElement | null): EditorTableRowStyle | undefined;
8
+ export declare function getTableCellColSpan(cellProperties: XmlElement | null): number;
9
+ export declare function getTableCellVMerge(cellProperties: XmlElement | null): "restart" | "continue" | undefined;
10
+ export declare function parseTableCellStyle(cellProperties: XmlElement | null, tableDefaultMargins?: EditorTableStyle["defaultCellMargins"]): EditorTableCellStyle | undefined;
11
+ export declare function isTableHeaderRow(rowNode: XmlElement): boolean;
12
+ /**
13
+ * Reproduces Word's HTML-style margin collapsing for paragraphs that use "auto
14
+ * spacing" (`w:beforeAutospacing` / `w:afterAutospacing`) inside a table cell.
15
+ * Word ignores the literal before/after values for these margins and collapses
16
+ * them: the first paragraph's auto before-space and the last paragraph's auto
17
+ * after-space collapse to 0 against the cell edge, and two adjacent auto margins
18
+ * collapse to their max instead of summing. Without this, oasis renders cells
19
+ * taller than Word because every paragraph's spacing is summed in full.
20
+ *
21
+ * The flags array is parallel to `paragraphs` (one entry per `<w:p>` in the cell).
22
+ */
23
+ export declare function collapseCellAutospacing(paragraphs: EditorParagraphNode[], flags: ParagraphAutospacingFlags[]): void;
24
+ export declare function applyTableBordersToRows(rows: EditorTableRowNode[], tblBorders: EditorTableBorders): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis-editor",
3
- "version": "0.0.57",
3
+ "version": "0.0.59",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",