rtf-codec@3.0.0
·
276 commits
to main
since this release
3.0.0 (2026-09-06)
⚠ BREAKING CHANGES
- rtf-codec: RtfDiagnosticCodes.EMBEDDED_OBJECT_DROPPED, a public
export since rtf-codec@1.0.0, is removed with no replacement and no
deprecated alias, since every embeddedObject block now writes
successfully and the code it named is unreachable.
Features
- rtf-codec: build a real OLE compound file for an embedded object's \objdata (96c5ad6)
- rtf-codec: map RTF form fields to the contentControl construct (5eafb9e)
- rtf-codec: read and write a dropdown's selected \ffl entry (a537e1b)
- rtf-codec: report a dropDown's unmatched value through the diagnostic sink (70f1b71)
- rtf-codec: truncate a dropDown's options at MS-DOC's 25-entry cap (57d279c)
Bug Fixes
- rtf-codec: actually order a formfield payload's fields per RTF's grammar (ead107d)
- rtf-codec: anchor form-field instruction keywords on the leading token (711dc73)
- rtf-codec: decode \objdata as one ordered byte sequence, not two buffers (46477c2), references #SDATA
- rtf-codec: default a bare \ffres/\ffdefres to 0, not undefined (4189dd8)
- rtf-codec: default bare \ffownhelp/\ffprot to false, matching their Value-word classification (b7e2757)
- rtf-codec: default fOwnHelp to false when \ffownhelp is absent from a form field (bc096e6)
- rtf-codec: diagnose \result's fallback when \object has no \objdata at all (110609f)
- rtf-codec: drain unmatched form-field extents at paragraph end (7fde988)
- rtf-codec: drop a contentControl extent that crosses another instead of mis-nesting both (f953370)
- rtf-codec: fall through a dropdown's undefined ffres sentinel to ffdefres (ed9d4f4)
- rtf-codec: fix ffhaslistbox and ffdefres minting for a dropDown form field (e1a0cfa)
- rtf-codec: flush a cell's pending paragraph separator before a construct marker (917641a)
- rtf-codec: frame embedded-object data as a real MS-OLEDS EmbeddedObject (b78c562)
- rtf-codec: mint a dropDown's \ffhaslistbox with its explicit 1 (3d4f658)
- rtf-codec: mint ffhaslistbox and ffdefres when writing a dropDown form field (7aad61f)
- rtf-codec: name truncation, not a false mismatch, for a truncated dropDown selection (9778953)
- rtf-codec: order a *\formfield payload's fields to match RTF's own grammar production (919c1ff)
- rtf-codec: pair a form field's open/close on formFieldStarted, not a re-derived match (75b6aa2)
- rtf-codec: read \ffdefres before \ffres for a checkbox's checked state (30e258f)
- rtf-codec: read \ffownhelp0 so auto-generated help text doesn't surface as an alias (ff8cfe4)
- rtf-codec: read a bare \ffownhelp as true, not the Value-word 0-default (cd72202)
- rtf-codec: recognise \oleclsid as a spec-legal \object sub-group (616efe4), references #PCDATA
- rtf-codec: recognise and silently skip the remaining formstrings destinations (1089d4d)
- rtf-codec: recover \result's fallback when \intbl is restated on \result's own group (1b93875)
- rtf-codec: recover \result's fallback when \object sits in a cell (e9ea8ea)
- rtf-codec: recover \result's own paragraphs when \objdata cannot decode (5de2614)
- rtf-codec: remove unreachable startRun check from form field close loop (807ab05)
- rtf-codec: render \result's fallback in an isolated scratch accumulator (6c5de47)
- rtf-codec: report a checkbox's recorded value and cross-type fields rather than dropping them (f83a8ed)
- rtf-codec: report a dropDown's stray checked state through the diagnostic sink (629cd49)
- rtf-codec: report a form field's contentControl when \fldrslt spans a paragraph or cell (f1f917b)
- rtf-codec: report a non-paragraph block dropped from a table cell (ff76ff8)
- rtf-codec: report a partial \objw/\objh size hint instead of dropping it (399338b)
- rtf-codec: report a plainText value written into \ffdeftext through the diagnostic sink (c91dd9e)
- rtf-codec: resolve \object's \result fallback before either sibling is read (7897f20)
- rtf-codec: restore real body when \result never closes (c21a722)
- rtf-codec: retract \result's fallback once \objdata decodes, not via a lookahead (6fcf7e8)
- rtf-codec: state the real reason a run-scoped contentControl drops (2756842)
- rtf-codec: stop a doctored \objdata payload overriding the block's kind (3eaab96)
- rtf-codec: stop a nested group from re-firing \object/\objdata's own group-end handler (677ce19)
- rtf-codec: stop a nested group inside \pict re-finalising the same picture (b84c7a1)
- rtf-codec: stop collecting a form field's default text nowhere reads back (3ef2a8c)
- rtf-codec: stop discarding a dropDown selection that is a real empty-string option (4602d1d)
- rtf-codec: stop dropping a plainText form field's value (371e606)
- rtf-codec: stop fabricating a default index for a dropDown's unselected value (5220cd3)
- rtf-codec: stop flagging an empty options array as dropped data (1228997)
- rtf-codec: stop form-field writer emitting unbalanced braces for a controlType it can't mint (f2f2422)
- rtf-codec: stop fragmenting ordinary field text into extra runs (6e94bbc)
- rtf-codec: stop opening a Word-shaped nested \fldinst group's contentControl twice (db52621)
- rtf-codec: stop reporting a plainText form field's default text as its current value (4acfc9d)
- rtf-codec: stop silently dropping a form field's alias and lock (9bad313)
- rtf-codec: stop stray par/page inside a form field destination splitting the document (acb72ce)
- rtf-codec: treat a checkbox's \ffres as FFDataBits' own sentinel, not a constant to skip (79e4870)
- rtf-codec: treat a plainText contentControl's empty-string value as absent (46b21e5)
- rtf-codec: treat an empty-string checkbox/dropDown value as absent (198a26d)
- rtf-codec: trim a contentControl's alias/tag before writing \ffhelptext/\ffname (acf2cc3)
- rtf-codec: validate an embedded object's residue before carrying it through (36a8ed8)
- rtf-codec: write \ffres for a checkbox's own current state (6b0f9ea)
- rtf-codec: write \fftypeN on every minted form field (0fc4dec)
- rtf-codec: write and validate the mandatory Presentation field in \objdata (85b5eaa)
- rtf-codec: write constructStart/constructEnd markers inside table cells (fe28d7d)
- rtf-codec: write ffprot's explicit parameter and split its lock diagnostic (bbc71ad)
- rtf-codec: write image and embedded-object blocks placed directly in a table cell (042d4e8)
Code Refactoring
- rtf-codec: drop countGroupBraces's unused export (f84fdd4)
Documentation
- rtf-codec: cite rather than for the \objw/\objh pair (fae8446)
- rtf-codec: cite RTF 1.9.1's real Form Fields grammar instead of claiming none exists (b5eb15f)
- rtf-codec: correct stale references in the form-field sentinel comments (cb29f5f)
- rtf-codec: correct the claimed permissiveness of \obj's / ordering (becb2f7)
- rtf-codec: correct the claimed splice position of \result's fallback (230790d)
- rtf-codec: correct the dropdown ffres/ffdefres omission rationale (7987f0c)
- rtf-codec: correct the form-field payload paragraph and add ffdeftext/ffprot1/ffownhelp notes (1c89ca5)
- rtf-codec: correct the form-field read row and document the checkbox/plainText value gaps (78f677c)
- rtf-codec: correct which field of \objdata is the real compound file (44d953b)
- rtf-codec: correct which spec section requires FormatID 0x00000002 (4110257)
- rtf-codec: describe \objdata's own hex payload as the full EmbeddedObject envelope (5623ff5)
- rtf-codec: describe the real ObjectHeader/NativeDataSize \objdata framing (3bd110c)
- rtf-codec: describe the table-cell write gap as table/pageBreak only (36c730d)
- rtf-codec: document the form-field contentControl mapping (0c04168)
- rtf-codec: document the OLE embedded-object mechanism and the archive-codec dependency (37ef85d)
- rtf-codec: document the write-side drop for crossing contentControl extents (bccb85e)
- rtf-codec: fix a wrong wDef citation in the ffdeftext omission comment (b9b7be9)
- rtf-codec: fix comment claiming a FORMDROPDOWN fixture never sees a value (a5cb7f6)
- rtf-codec: fix FFDataBits' MS-DOC section number, mislabeled as FFData's 2.9.78 (15538db)
- rtf-codec: qualify the writer's embeddedObject claim for table cells (891ffe1)
- rtf-codec: quote FFData.xstzTextDef's real MS-DOC text and note value's write-only direction (e8b04c4)
- rtf-codec: quote RTF's Toggle definition in full and fix \b's citation (6ea9562)
- rtf-codec: separate the Value-word default rule from its classification (d7f5193)
- rtf-codec: stop attributing formfield field order to a nonexistent RTF grammar production (39c7cfa)
- rtf-codec: stop calling LibreOffice's bare \ffownhelp emission unconditional (32caa84)
- rtf-codec: stop claiming a bare \ffprot fixture proves what real producers write (fe365f2)
- rtf-codec: stop claiming the reader has a bare-\ffhaslistbox default (c394521)
Styles
- rtf-codec: realign the deliberately-not-handled table's Construct column (89acaeb)
Tests
- rtf-codec: assert brace balance across the write test suite (a215ab0)
- rtf-codec: assert the explicit \ffhaslistbox1 form, not a bare substring (ef7ce6a)
- rtf-codec: assert the split-lock diagnostic's actual message text, not just its code (9d55533)
- rtf-codec: correct the LinkedObject FormatID test's claim about ObjectHeader's own spec text (36d1f33)
- rtf-codec: cover \binN and 'hh-delivered \objdata payloads (7b71dc0), references #BDATA #SDATA #SDATA
- rtf-codec: cover embedded-object round-tripping and the foreign-payload degrade path (6f22cbc)
- rtf-codec: cover the form-field contentControl round trip (6f7ee62)
- rtf-codec: cover the ObjectHeader framing and the \result recovery path (5ae34c8)
Dependencies
- Updated archive-codec to ^1.6.0