Export HtmlViewerAdapter from package root, add scrollRequestKey parity, register finished workplan, update SCOPE.
55 lines
1.6 KiB
TypeScript
55 lines
1.6 KiB
TypeScript
// Public entrypoint for `evidence-anchor` — the full barrel.
|
|
//
|
|
// Mirrors the surface the umbrella previously consumed as `@anchor/index`, so
|
|
// consumers (and their `vi.mock(...)` calls) resolve every anchor symbol from a
|
|
// single specifier. Viewer *code* still lives only under `src/pdf/` (enforced
|
|
// by eslint); this barrel merely re-exports it.
|
|
//
|
|
// A focused, viewer-free entry is also available at `evidence-anchor/pdf` for
|
|
// consumers that want the PDF surface explicitly — but importing the package
|
|
// root pulls in the PDF adapter, matching the pre-extraction behaviour.
|
|
|
|
// Adapter-side types + the viewer contract.
|
|
export * from "./types";
|
|
|
|
// Selector creation / resolution (pure core).
|
|
export {
|
|
createSelectors,
|
|
resolveSelectors,
|
|
DEFAULT_CONTEXT_CHARS,
|
|
type CreateSelectorsOptions,
|
|
} from "./selectors";
|
|
|
|
// DOM adapter (re-exported from the src/dom/ boundary).
|
|
export {
|
|
HtmlViewerAdapter,
|
|
resolveHtmlSelectors,
|
|
scrollToHtmlTarget,
|
|
renderHtmlHighlight,
|
|
captureFromRange,
|
|
domPathToNode,
|
|
nodeAtPath,
|
|
type HtmlViewerAdapterProps,
|
|
type HtmlViewerDebugOptions,
|
|
type StoredHtmlAnnotation,
|
|
} from "./dom";
|
|
|
|
// PDF adapter + helpers (re-exported from the src/pdf/ boundary).
|
|
export {
|
|
PdfViewerAdapter,
|
|
PdfSpikeViewer,
|
|
getHighlightClientRects,
|
|
type PdfViewerAdapterProps,
|
|
type PdfViewerDebugOptions,
|
|
selectorsFromPdfCapture,
|
|
findPdfRectSelector,
|
|
findTextQuoteSelector,
|
|
unionRect,
|
|
runScrollToHighlightJob,
|
|
DEFAULT_SCROLL_ATTEMPTS,
|
|
type PdfSpikeViewerProps,
|
|
type StoredAnnotation,
|
|
type ScrollToHighlightJob,
|
|
type ScrollToHighlightDeps,
|
|
type ScrollToHighlightState,
|
|
} from "./pdf";
|