EANCH-WP-0001 T05 (prep): make root a full barrel for umbrella cutover

The umbrella's DOM tests vi.mock the single @anchor/index barrel (spreading
the original and overriding PdfSpikeViewer). To keep the cutover a mechanical
specifier swap and preserve those mocks, the evidence-anchor root re-exports
the full surface (pure core + PDF adapter), matching the prior @anchor/index.
evidence-anchor/pdf remains a focused viewer entry. Viewer code still lives
only under src/pdf/ (eslint-enforced). Repo stays green: 30 tests, tc, lint.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tegwick 2026-07-08 21:02:06 +02:00
parent 243cb41938
commit d5c5155df8
3 changed files with 37 additions and 14 deletions

View file

@ -62,13 +62,14 @@ Boundary rules for the layout (enforced by `eslint.config.js`):
are confined to `src/pdf/` — the pure zone (`src/selectors/**`, `src/types.ts`)
may not import them;
- `src/selectors/` is pure and depends only on `citation-engine` shared types;
- the **root** entrypoint (`evidence-anchor`) exposes only the pure surface —
`createSelectors`, `resolveSelectors`, the selector/resolution types, and the
`DocumentViewerAdapter` contract;
- the concrete PDF adapter is reached through the **`evidence-anchor/pdf`**
subpath, so pure consumers never pull PDF.js or React into their bundle. That
adapter is still the explicitly-named `PdfSpikeViewer` spike; promoting it to
a production `PDFViewerAdapter` is registered follow-on work (T06).
- the **root** entrypoint (`evidence-anchor`) is the full barrel — selector
creation/resolution, the adapter types/contract, and the PDF adapter — so
consumers resolve every anchor symbol (and their test `vi.mock(...)` calls)
from a single specifier, matching the umbrella's prior `@anchor/index`;
- a focused, viewer-free entry is also published at **`evidence-anchor/pdf`**
for consumers that want the PDF surface explicitly. The concrete adapter is
still the explicitly-named `PdfSpikeViewer` spike; promoting it to a
production `PDFViewerAdapter` is registered follow-on work (T06).
## Public API (target surface)