Skip to content

feat: make ContentListMembership.numId optional for depth-only list membership - #19

Merged
Mearman merged 1 commit into
mainfrom
feat/optional-num-id
Aug 17, 2026
Merged

feat: make ContentListMembership.numId optional for depth-only list membership#19
Mearman merged 1 commit into
mainfrom
feat/optional-num-id

Conversation

@Mearman

@Mearman Mearman commented Aug 17, 2026

Copy link
Copy Markdown
Member

Part of the outline-hierarchy reader work tracked in #14: OOXML drawing paragraphs carry only an outline level (a:pPr/@lvl) — no numbering identity — so a required numId would force the pptx reader to fabricate one. The same applies to the odp reader, where text:list nesting inside slide text frames is structural rather than identity-bearing; ODF mints a numId only where the source format actually has a numbering definition to point at.

ContentListMembership.numId is now optional: it identifies a shared numbering definition when the source format has one (docx's w:numId; ODF's minted structural identity) and is absent when the format carries only a depth (OOXML drawing paragraphs' a:pPr/@lvl). level alone still carries the depth and remains required.

  • src/content.tsnumId: z.string().optional(), with the field's comment extended to state when the identity exists and when it does not.
  • src/content-json-schema-defs.ts — the hand-transcribed $defs fragment drops numId from required, matching the live z.toJSONSchema() output its regression test compares against.
  • src/content.test.ts{ level } without numId parses; { numId, level } still parses; level remains required.

Purely additive, so CONTENT_FORMAT_VERSION stays 3.

Generated by Claude Code

…embership

OOXML drawing paragraphs carry only an outline level (a:pPr/@lvl) with no
numbering identity, so a required numId forced readers of that shape to
fabricate one. numId now identifies a shared numbering definition only when
the source format has one (docx w:numId, ODF minted structural identity) and
stays absent otherwise; level alone still carries the depth. The
content-json-schema-defs.ts hand transcription drops numId from required to
match, held by its existing regression test against a live z.toJSONSchema()
call. Purely additive, so CONTENT_FORMAT_VERSION stays 3.
@Mearman
Mearman merged commit 8c41086 into main Aug 17, 2026
11 checks passed
@Mearman
Mearman deleted the feat/optional-num-id branch August 17, 2026 21:25
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 3.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant