The readers now resolve the main part from the root officeDocument relationship (#1314), but the edit path still opens it by name. packages/documents.js/src/edit/docx/editor.ts has its own DOCUMENT_PART_PATH = "word/document.xml" and throws package has no root element at word/document.xml; packages/documents.js/src/edit/pptx/editor.ts does the same with PRESENTATION_PART_PATH from edit/pptx/scaffold.ts.
So openDocx/openPptx on the exact file #1314 was about (body at word/document2.xml, which Word opens fine) throws, even though readDocxContent on the same package now reads it.
The docx side looks like resolving once in openDocx and threading the resolved path through the editor's media config and addRelationship call sites. The pptx side is more tangled: PRESENTATION_PART_PATH is a scaffold export that the writer genuinely needs as a literal when it builds a new package, so the read-an-existing-package path needs separating from the build-a-new-one path rather than just swapping the constant.
ooxml.js's findMainPartPath is the resolver, already exported.
The readers now resolve the main part from the root
officeDocumentrelationship (#1314), but the edit path still opens it by name.packages/documents.js/src/edit/docx/editor.tshas its ownDOCUMENT_PART_PATH = "word/document.xml"and throwspackage has no root element at word/document.xml;packages/documents.js/src/edit/pptx/editor.tsdoes the same withPRESENTATION_PART_PATHfromedit/pptx/scaffold.ts.So
openDocx/openPptxon the exact file #1314 was about (body atword/document2.xml, which Word opens fine) throws, even thoughreadDocxContenton the same package now reads it.The docx side looks like resolving once in
openDocxand threading the resolved path through the editor'smediaconfig andaddRelationshipcall sites. The pptx side is more tangled:PRESENTATION_PART_PATHis a scaffold export that the writer genuinely needs as a literal when it builds a new package, so the read-an-existing-package path needs separating from the build-a-new-one path rather than just swapping the constant.ooxml.js'sfindMainPartPathis the resolver, already exported.