* chore: organise the demos into a folder for each topic
The demos were one flat list of 124 numbered files, which made it hard to
find the one you wanted. Each is now in a folder for its topic, such as
demo/tables/basic-table.ts, with a name that says what it shows instead of
a number.
npm run demo lists every demo and narrows the list as you type. It also
takes a demo's path or name, a topic, or search words.
The demos' images moved to demo/assets/images, as images is now a topic.
The docs' links, the Demos workflow, the shape render script and its
reference images use the new paths and names.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix: list only a topic's own demos, and drop stale output file names
npm run demo text also offered the text-boxes demos and others with
"text" in their name, so a topic now searches for "text/". Three demos
logged their old numbered file name after writing My Document.docx.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat: support run properties on ImageRun
* fix: review fixes for the run formatting of images
- Rename ImageRun's `runProperties` to `run`, the name Paragraph, styles and numbering give run formatting
- Build an image's run the same way whether or not it is a tracked revision, so the breaks and text of a TextRun's
options given as `run` are ignored in w:ins and w:del too, instead of adding a line break before the image
- Give ChartRun, ShapeRun, ShapeGroupRun and ShapeCanvasRun a `run` option as well, so they can be raised and lowered
- Write an image with both `insertion` and `deletion` as w:ins > w:del > w:r, instead of dropping the deletion
- Pass an image's `solidFill` on to its picture, which ignored it
- Docs: move the section out of Positioning, where it split that section from its Usage, and read pizza.gif, which
exists, instead of pizza.png
- Test run formatting with floating, SVG, style and tracked images, and with the options of a TextRun
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test: import the chart test's run options type apart from docx's, so it merges with master
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Dolan Miu <dolan_miu@hotmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(demos): give each image its type, and each revision in demo 98 an id of its own
ImageRun's type is required, but 11 demos left it out. The image was then written as <hash>.undefined, which isn't in
the package's content types, so Word can't open it and the Open XML SDK validator stops there. The demos now give the
type of the file or base64 data they read, as demos 5 and 114 do.
Demo 98 gave the same revision id to each mark of one change, such as every cell of an inserted row. Word needs each
w:ins, w:del, w:cellIns, w:cellDel and property change to have an id of its own, so they are now numbered in order.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(shapes): write a custom dash or gap of 0 as the smallest length Office accepts
A custom dash of length 0 with round caps draws dots, as demo 111 does. ISO allows a:ds d="0", but Office's schema
wants d and sp to be at least 1, so the Open XML SDK validator rejected it. A dash or gap of 0 is now written as 1,
a thousandth of a percent of the line width.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(numbering): write a level's alignment as left, center or right
Office's schema only allows left, center and right in w:lvlJc, where a paragraph's w:jc takes every AlignmentType.
Levels default to AlignmentType.START, so every numbering part failed the Open XML SDK validator.
A level's alignment is now written as Office allows: START and the justified alignments as left, END as right.
The alignment option's type is unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(numbering): write a level's children in the schema's order
A level wrote w:suff before w:isLgl, and w:pStyle after w:lvlJc. CT_Lvl puts w:pStyle after w:numFmt, and w:isLgl
before w:suff, so a level with a paragraph style, or with legal numbering and a suffix, didn't match the schema.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(demos): write demo 19's base64 string as the document it encodes
Demo 19 wrote the base64 text itself to My Document.docx, which isn't a document, so Word can't open the file and it
can't be checked. It now decodes the string before writing it, which also shows that the string is the whole document.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix: write paragraph borders in the schema's order
Paragraph borders were written top, bottom, left, right, where CT_PBdr wants
top, left, bottom, right, between. Word files with left or right paragraph
borders didn't match the schema, which the Open XML SDK reports as an
unexpected element.
Table, cell and page borders were already in their schemas' order.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix: stop writing w:highlightCs, which is in no schema
Every highlight was written twice: as w:highlight and as w:highlightCs. There
is no w:highlightCs in WordprocessingML, so documents with highlighted text
didn't match the schema, and the Open XML SDK reports it as an invalid element
in the run properties. w:highlight already highlights all of a run's text,
complex script included.
highlightComplexScript is kept, deprecated, and has no effect.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix: write tab stop positions as whole twips
A tab stop's position was written as given, so one worked out as a fraction,
such as TabStopPosition.MAX / 4 * 3 (6769.5), was written as a decimal. w:pos
is ST_SignedTwipsMeasure, a whole number of twips, so the document didn't
match the schema. Positions are now rounded down, as indents already are.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix: write shading without a pattern as clear shading
w:shd's w:val is required, but shading given only a fill or a color, with no
type, was written without it. The document didn't match the schema, and the
Open XML SDK reports a missing required attribute. Shading with no type is now
written with w:val="clear", the fill color only, which is what Word writes.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(fonts): write an embedded font's key in upper case
w:fontKey is an ST_Guid, whose pattern only allows upper-case hex digits, but the key docx generates is lower case,
so the Open XML SDK validator rejected the font table of every document with an embedded font. The key is now written
in upper case. The font is obfuscated with the same bytes either way, since the obfuscation reads the hex digits in
either case.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(textbox): stop writing insetmode on a VML text box
A VML text box was written with insetmode="auto", without the o: prefix it needs. With the prefix, the Open XML SDK
validator still rejects it, as Office only takes o:insetmode on the shape. It's no longer written: its default, custom,
uses the inset attribute, which defaults to Word's usual margins when it's left out, as it always is for a text box.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(patcher): put merged run properties in the schema's order
With keepOriginalStyles, a patched run that has run properties of its own takes the placeholder's too. They were
written with the placeholder's first and the run's after, so a run with a font whose placeholder had a size got w:sz
before w:rFonts. ISO 29500 allows any order, but Office's schema doesn't, and the Open XML SDK validator rejected
demo 89. The merged properties are now put in Office's order: CT_RPr's elements, then Word 2010's text effects and
OpenType features, then any it doesn't know, then w:rPrChange.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(styles): write each style id once, and the document defaults first
Two styles could share an id, which a styles part doesn't allow:
- with externalStyles, docx's default styles were written in front of the external ones, so a style such as Heading1
was there twice, as were w:docDefaults. The external w:docDefaults and w:latentStyles also came after docx's styles,
where CT_Styles wants them first;
- a paragraph or character style with a default style's id, such as Heading2, was written after the default one
instead of replacing it.
Styles now writes the document defaults, then the latent styles, then the styles, and a style replaces an earlier one
with its id. So external styles take the place of docx's default styles, docx's fill in the ones they leave out, and
paragraph and character styles take the place of the default ones.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(settings): write the settings in the schema's order
w:evenAndOddHeaders and w:updateFields were written before w:defaultTabStop and the hyphenation settings, and
w:hyphenationZone before w:consecutiveHyphenLimit, where CT_Settings wants them after. Word's validator rejected
settings.xml whenever a default tab stop or hyphenation was set, as in demo 75.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(settings): write the compatibility mode last in w:compat
w:compatSetting was written first in w:compat, where CT_Compat puts it after every other element, so a document with
any compatibility option, as in demo 76, didn't match the schema.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(sections): write a section's previous properties after the document grid
w:sectPrChange was written before w:docGrid, where CT_SectPr puts it after every other element, so a section with a
tracked change, as in demo 98, didn't match the schema.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(tables): write a floating table's overlap beside w:tblpPr
The float option's overlap was written as w:tblOverlap inside w:tblpPr, which CT_TblPPr doesn't allow children in, so
a floating table with an overlap, as in demo 34, didn't match the schema. It's now written in w:tblPr right after
w:tblpPr, where CT_TblPrBase puts it. createTableFloatProperties no longer writes it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(tables): write a row's cantSplit and tblHeader, and a table's bidiVisual, as off when false
These were written as w:val="false". ISO allows that, but Office's schema only takes on and off for them, so Word's
validator rejected a row with cantSplit or tableHeader set to false, as in demo 98's row revision, and a table with
visuallyRightToLeft set to false. Off is now written as "off", which both schemas accept.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(tables): write a table's cell spacing after its alignment
w:tblCellSpacing was written last in w:tblPr, after w:tblLook, where CT_TblPrBase puts it between w:jc and w:tblInd.
Word's validator rejected any table with cellSpacing and another property after it, such as the borders every table
has.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(math): write sums, integrals and pre-scripts in the schema's order
- A sum or integral without a limit left out its m:sub or m:sup. CT_Nary needs
both, so a hidden limit is now written empty, as Word writes it
- m:naryPr wrote supHide before subHide; the schema wants subHide first
- m:sPre wrote the base before the scripts; the schema wants sub, sup, e
The other math structures already match shared-math.xsd.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix: write a run given in a run's children beside it, not inside it
A FootnoteReferenceRun in a TextRun's children, as demo 60 has, wrote a w:r
inside a w:r, which the schema doesn't allow.
- A run with a run in its children now ends before it. The inner run, such as
the footnote reference with its own style, comes next, and the children
after it go in a run with the outer run's properties, as Word writes it
- The same goes for a DeletedTextRun's children
- A component can now be written as several side by side (writtenAs), which
the serializer and the patcher use for such a run
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* ci: check the demos with the Open XML SDK validator, with none left out
Every demo's document now passes Microsoft's Open XML SDK validator, which checks each part against Office's schemas,
so the demos are checked with it instead of xmllint, and the list of demos left unchecked is gone.
xmllint only checked document.xml and the theme against the bundled schemas, which are Word 2007's: they don't declare
the Word 2010 extensions that templates and shapes use (w14:paraId, w14:checkbox, wps, wpg, mc:AlternateContent), so
26 demos weren't checked at all. The validator understands them, checks every part, and found the bugs fixed before
this. The validator is 80 MB, so it's installed only in this workflow rather than as a dependency.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(styles): let the default styles given in styles.default take the place of external ones
With externalStyles, a default style given in styles.default, such as heading1, or the document defaults given as
document, was replaced by the external style with its id, so the option did nothing. Now the external styles replace
only the default styles that weren't given, and the ones given replace the external ones.
Before, both were written, the default one first. ISO 29500 has the first of two styles with an id keep it, so the
style given in styles.default was the one that applied, as it is again.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(tables): write a cell's merge revision before its previous properties
w:cellMerge was written after w:tcPrChange, where CT_TcPr puts it before, so a cell with both a merge revision and a
property revision didn't match the schema, which the Open XML SDK validator reports as an unexpected element.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(numbering): leave highlight, math and revision out of a level's run properties
Office's schema doesn't allow w:highlight, w:oMath or w:rPrChange in a numbering level's run properties, so the Open
XML SDK validator rejected the numbering part of a document whose level's run style had a highlight. None of them
applies to a level's number, so they're no longer written. The option's type is unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* fix(demos): make parrots.bmp a bitmap
demo/images/parrots.bmp, the bitmap demos 5, 23 and 114 show, held PNG data, so those documents had a part typed
image/bmp that wasn't a BMP. It's now the same picture as a 24-bit BMP, with the same pixels.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
* Add schemas and validators
* Fix dependencies
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- `paths` draws a custom shape from several paths, each filled with the
shape's fill, not at all, or lighter or darker, and with or without its line
- A closed part of a path inside another is a hole, whichever way round it
is drawn: parts are turned round so both fill rules cut the same holes
- `textArea` sets where a custom shape's text goes, and "fitText" fits it
- `connectionPoints` gives a custom shape its own connection points
- Connection sites and text areas are guides that keep their share of the
shape when it is resized, as PowerPoint writes freeforms
- Demo 120, with a reference render, and docs in shapes.md
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Document's background.color takes a ThemeColor, written with w:themeColor,
w:themeTint or w:themeShade and the hex colour it comes to. The released
themeColor, themeTint and themeShade strings still work, and are deprecated.
- patchDocument reads the template's theme colours (a:srgbClr, a:sysClr), so
theme colours in patches get the template's hex value rather than Office's.
- Demo 119 has a page background in a theme colour. Docs updated.
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Shapes in a ShapeGroupRun or the new ShapeCanvasRun can have an `id`, and a
child with `type: "connector"` joins two of them:
{ type: "connector", from: "start", to: { id: "step", side: "top" }, route: "elbow" }
The connector is drawn from one shape to the other, so it needs no size or
position. It attaches at the shapes' connection sites (a:stCxn/a:endCxn),
choosing the facing sides unless a side is given, and routes as Word does:
a straight line, or elbow and curved connectors that leave and arrive at right
angles and loop around shapes when they have to.
Word only keeps connectors attached when shapes move on a drawing canvas, so
ShapeCanvasRun writes a wpc:wpc canvas with an optional background and outline.
Connection sites come from the preset shape definitions of ECMA-376:
scripts/generate-preset-shape-geometry.ts extracts each shape's sites and the
guides they depend on, and a small evaluator calculates them for a shape's size
and adjustments. A test also checks the adjustments table against the
definitions.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
OOXML abbreviates or numbers many names (roundRect, snip2DiagRect, ribbon2,
bentConnector3, sysDot, lgDash, sm/med/lg). The public API now uses names
that say what each value is, and maps them to OOXML names when writing XML:
- 49 of the 187 preset shape types, e.g. rectangle, roundedRectangle,
diagonalSnippedCornersRectangle, ribbonUp, elbowConnector, lineCallout
- Line dashes: longDash, shortDot, shortDashDot, ...
- Arrowhead sizes: small, medium, large
- Gradient path: rectangle
Passing an OOXML shape name throws an error that suggests the new name.
A new Shape Types docs page lists every shape with its OOXML name.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* watermark added
* fix: resolve final eslint identifier denylist error for string key
* fix: resolve verbatimModuleSyntax errors by using type-only imports
* style: format watermark files with prettier
* style: format watermark files with prettier
* fix: bypass prettier and eslint conflict using computed property for string key
* fix: replace explicit any with unknown array in mock context
* fix: replace explicit any with unknown array in mock context
* fix: replace explicit any with unknown array in mock context
* feat: add text and image watermarks on a generic VML drawing layer
Adds TextWatermark and ImageWatermark, inline elements that go inside a
header paragraph and emit the same markup Word writes for its own
watermarks (WordArt shape type 136 for text, picture frame type 75 for
images, PowerPlusWaterMarkObject / WordPictureWatermark ids), so Word
recognizes them and can remove or replace them from Design > Watermark.
The watermarks are built on a new src/file/vml module: typed builders for
w:pict, v:shape, v:shapetype, v:fill, v:stroke, v:textpath, v:imagedata,
v:path, v:formulas, v:handles and o:lock, plus the Word preset shape types.
The existing Textbox now uses the same builders, and future VML drawing
features can compose them too.
Compared with the original draft, rotation is written in degrees in the
shape style as Word does (not 65536-based fixed point), the shape type
definition is included, colours are normalized for VML, the default height
keeps letters in proportion for the text length, and image watermarks
register their media and header relationship like ImageRun.
Also adds docs/usage/watermarks.md, a sidebar entry, a cross-link from the
headers and footers page, and two demos.
Resolves#3017
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: unknown <yusuf.unal@nordisglobal.com>
Co-authored-by: Dolan Miu <dolan_miu@hotmail.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* fix(table): emit numeric pct widths in fiftieths of a percent
createTableWidthElement wrote a numeric PERCENTAGE size as a "50%" string.
Both that string and the fiftieths-of-a-percent integer (50% = 2500) are
valid under ST_MeasurementOrPercent, but Word writes the integer, and
stricter consumers — Google Docs and Apple Pages/QuickLook/Mail — misread
the string form and collapse table columns to one character.
Emit the integer (Math.round(size * 50)) for numeric pct sizes to match
Word's output. Callers who want the literal percent string can still pass a
Percentage (e.g. "50%"), which is left untouched. Adds table-width.spec.ts
and updates the two specs that asserted the old string output.
* fix(table): derive tblGrid from table and cell widths so tables render in Google Docs and Pages
Writing pct widths as fiftieths of a percent (previous commit) is correct but
does not fix#1457 on its own. Google Docs, Apple Pages, QuickLook and other
consumers lay a table out from w:tblGrid alone and ignore w:tblW / w:tcW
percentages, while docx wrote a placeholder grid of 100 twips per column
whenever columnWidths was omitted. Every percentage-width table therefore
collapsed to one character per column in those readers (#1457, #349, #216,
#3015). Word recomputes the layout from the preferred widths, which is why it
was never affected.
When columnWidths is omitted the grid is now derived, in twips, the way Word
writes it after laying the table out:
- percentages resolve against the text width of the section the table is in
(page width minus margins and gutter, per column in multi-column sections),
or against the parent cell for nested tables, at serialization time
- dxa and universal-measure widths are used as they are
- columns without a width share what is left of the table width equally
- column spans and the continuation cells inserted for rowSpan are honoured
Explicit columnWidths are written unchanged. Tables formatted without a
document (bare Formatter, patcher) resolve against the default A4 page, and
formatting a table more than once is idempotent.
New: SectionProperties.AvailableTextWidth, Body.getSectionPropertiesFor,
universalMeasureToTwips, Table.ColumnWidths and Table.getCellWidth. Adds a
demo, documents columnWidths, and applies the review nits on table-width.spec.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* test: use a cspell-friendly malformed measure in the universalMeasureToTwips spec
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: Dolan Miu <dolan_miu@hotmail.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* docs: Write documentation and comments
Upgrade and remove dependencies
* Add more demos to the run
* Add more tests to fill coverage to 100%
---------
Co-authored-by: Dolan Miu <>
* chore(gitignore): build folder
* chore(demo): passing demo number as argument will run that demo
* feat(table-of-contents): cached data
* chore(table-of-contents): clean up
This commit can be squashed with the previous one if necessary
* test(table-of-contents): cached entries
* docs(table-of-contents): added cached entries section
* Improve coverage
* Fix tests
* feat(table-of-contents): use style with levels in cached entries
---------
Co-authored-by: Dolan Miu <>
* Added the table look parameter to new Table class to enable controlling various conditional formatting table properties (first row, first column etc)
* Improve documentation
---------
Co-authored-by: Dolan <dolan_miu@hotmail.com>
* feat(footnotes): Support lists and images in footnotes
* fix numbering in headers/footers
* Fix tests and add documentation
---------
Co-authored-by: Dolan <dolan_miu@hotmail.com>
* feat: add endnotes support to docx library
- Add comprehensive endnotes implementation with EndnoteReferenceRun component
- Create Endnotes class and EndnotesWrapper for document integration
- Add endnote attributes, reference runs, and separator components
- Update documentation to cover both footnotes and endnotes usage
- Include demo file demonstrating endnotes functionality with multiple sections
- Integrate endnotes into compiler pipeline and content types
- Add comprehensive test coverage for endnote components
Endnotes appear at the end of the document, unlike footnotes which appear at the bottom of each page, making them ideal for academic papers and formal documents.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
# Conflicts:
# src/export/packer/next-compiler.ts
# src/file/paragraph/run/empty-children.ts
# src/file/styles/style/default-styles.ts
* Fix tests
* Add documentation
* Add and fix test
---------
Co-authored-by: matt <matthew.ed.keller@gmail.com>
* docs(numbering): add docs for `instance` option and update full example
- Documented `numbering.instance` for ordered lists
- Explains continuation vs restart behavior
- Added example usage with multiple instances
- Updated full example to reflect latest numbering behavior
resolves 3037, fixes 3037
* clean up lock file
* fix numbering reference
* Remove example update
* fix: separate vertical alignment enums for table and section properties
- Introduced `VerticalAlignTable` for table-cell vertical alignment with valid values: `top`, `center`, and `bottom`.
- Added `VerticalAlignSection` for section properties, extending `VerticalAlignTable` with an additional value `both`.
- Marked the original `VerticalAlign` as deprecated for backward compatibility, directing users to the new enums.
- Updated type definitions for better clarity on valid vertical alignments.
* refactor: update vertical alignment imports and types for section and table properties
- Renamed `VerticalAlign` to `VerticalAlignSection` in section properties and `VerticalAlignTable` in table-cell properties for clarity.
- Updated type definitions to reflect the new enum names, ensuring better organization and understanding of vertical alignment options.
- Adjusted related test cases to utilize the new imports and types.
* refactor: update demos to use new enums for table and section properties for vertical alignment