odf-kit 0.9.6 → 0.9.7

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/CHANGELOG.md CHANGED
@@ -5,6 +5,33 @@ All notable changes to odf-kit will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.9.7] - 2026-04-10
9
+
10
+ ### Added
11
+
12
+ - **Number formats** — `numberFormat` option on `OdsCellOptions` for professional numeric display. Formats: `"integer"` (1,234), `"decimal:N"` (1,234.56), `"percentage"` / `"percentage:N"` (12.34%), `"currency:CODE"` / `"currency:CODE:N"` (€1,234.56). Applies at row level (default for all cells) or per cell. Style deduplication — identical formats share one ODF style element.
13
+ - **Percentage cells** — `type: "percentage"` on `OdsCellObject`. Stores raw decimal, displays as percentage.
14
+ - **Currency cells** — `type: "currency"` on `OdsCellObject` with `numberFormat: "currency:CODE"`. Supports 30+ ISO 4217 currency codes with correct symbols.
15
+ - **Merged cells** — `colSpan` and `rowSpan` on `OdsCellObject`. Automatically emits `table:covered-table-cell` elements for spanned positions. Supports combined colSpan + rowSpan and merges at any column position.
16
+ - **Freeze rows/columns** — `sheet.freezeRows(N)` and `sheet.freezeColumns(N)` on `OdsSheet`. Generates `settings.xml` in the ODS ZIP with LibreOffice-compatible freeze configuration. `settings.xml` only emitted when at least one sheet has freeze settings.
17
+ - **Hyperlinks in ODS cells** — `href` on `OdsCellObject`. Cell text rendered as `text:a` link with `xlink:href`. `xmlns:xlink` namespace declared on document root.
18
+ - **Sheet tab color** — `sheet.setTabColor(color)` on `OdsSheet`. Accepts hex (`"#FF0000"`) or CSS named colors. Emits `table:tab-color` on the sheet's table style.
19
+ - **`OdsCellType`** exported from public API.
20
+ - 32 new tests (849 total).
21
+
22
+ ## [0.9.6] - 2026-04-10
23
+
24
+ ### Added
25
+
26
+ - **`tiptapToOdt()`** — Convert TipTap/ProseMirror JSON directly to ODT. Accepts the JSON object returned by `editor.getJSON()` in TipTap and returns a valid `.odt` file as `Uint8Array`. No dependency on `@tiptap/core` — walks the JSON tree as a plain object.
27
+ - **Supported block nodes:** `doc`, `paragraph`, `heading` (levels 1–6), `bulletList`, `orderedList`, `listItem` (nested), `blockquote`, `codeBlock`, `horizontalRule`, `hardBreak`, `image`, `table`, `tableRow`, `tableCell`, `tableHeader`.
28
+ - **Supported marks:** `bold`, `italic`, `underline`, `strike`, `code`, `link`, `textStyle` (color, fontSize, fontFamily), `highlight`, `superscript`, `subscript`.
29
+ - **Image support:** Data URIs decoded and embedded directly. Other URLs looked up in the `images` option (`Record<src, Uint8Array>`). Unknown URLs emit a placeholder paragraph.
30
+ - **`unknownNodeHandler`** callback in `TiptapToOdtOptions` — handle custom TipTap extensions without waiting for odf-kit to add support.
31
+ - **`TiptapNode`**, **`TiptapMark`**, **`TiptapToOdtOptions`** types exported.
32
+ - All `HtmlToOdtOptions` apply (page format, margins, orientation, metadata).
33
+ - 31 new tests (817 total).
34
+
8
35
  ## [0.9.5] - 2026-04-09
9
36
 
10
37
  ### Added
@@ -142,6 +169,8 @@ Initial release. Complete ODT generation support.
142
169
  - Tables, page layout, headers/footers, page breaks, lists, tab stops.
143
170
  - Method chaining. Full TypeScript types. ESM-only, Node.js 22+. 102 tests.
144
171
 
172
+ [0.9.7]: https://github.com/GitHubNewbie0/odf-kit/releases/tag/v0.9.7
173
+ [0.9.6]: https://github.com/GitHubNewbie0/odf-kit/releases/tag/v0.9.6
145
174
  [0.9.5]: https://github.com/GitHubNewbie0/odf-kit/releases/tag/v0.9.5
146
175
  [0.9.4]: https://github.com/GitHubNewbie0/odf-kit/releases/tag/v0.9.4
147
176
  [0.9.2]: https://github.com/GitHubNewbie0/odf-kit/releases/tag/v0.9.2