Architecture spike for a standalone, read-only browser-based Office Open XML viewer built on @silurus/ooxml.
Milestone 2 (API Contract) is complete. The core custom element, <office-viewer>, now has a stable, documented public API covering source loading, lifecycle management, and format-specific navigation controls for DOCX, XLSX, and PPTX.
The focus shifts from defining the API surface to solidifying the integration points:
- Implementing the DOCX Adapter: Scaffolding for
src/viewers/docx-adapter.tsis required. - Testing: Initial unit tests for source normalization and format detection must be created.
- Initialization: The main application entry point in
src/index.tsmust be updated to correctly initialize and use the component.
The public API contract is now finalized and documented in src/viewers/adapter-types.ts. Key additions include:
- Format-specific methods: Added optional methods like
goToPage?(),goToSheet?(), andgoToSlide?()toOfficeViewerAdapterto expose format-specific interaction points. - Core Methods:
load(),reload(),destroy(),getSummary()remain the primary control points. - Event System: Continues to dispatch granular events (
pagechange,sheetchange,slidechange) to support advanced framework integration.
(Keep existing installation instructions) ...