feat(app): application on the canonical sheet — report v3 store with v2 draft migration, bundled SheetProvider (SHEET_BUNDLE), annotation layer rendered from the document, zone interaction service, pickers and cards on the sheet index, PDF v3 export with v2 archive import; legacy registry, matchers, editors and assets removed

This commit is contained in:
bchanot committed 2026-10-10 11:36:14 +02:00
1 parent 0a17e390cf
commit ce2ec26112
114 files changed
+3560 -14637

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
import {
REPORT_VERSION,
type Observation,
type Report,
} from '@faunosteo/domain'
import { loadSheetIndex } from '@/sheets/useSheet'
import type { SheetIndex } from '@/services/sheetIndex'
/** The bundled reference draft (vitest runs the sheet-bundle plugin in draft mode). */
export async function loadTestSheet(): Promise<SheetIndex> {
const index = await loadSheetIndex('equine')
if (!index) throw new Error('bundled sheet missing: run pnpm import:equine')
return index
}
export function emptyObservation(id = 'obs-1'): Observation {
return { id, zones: [], findings: [], freeTextFindings: [], comment: '' }
}
export function minimalReport(
sheet: SheetIndex,
patch: Partial<Report> = {},
): Report {
return {
version: REPORT_VERSION,
id: 'r1',
createdAt: '2026-10-10T10:00:00Z',
date: '2026-10-10',
practitioner: { name: 'Dr. Dupont' },
animal: { speciesId: 'equine', name: 'Mistral' },
owner: { name: 'Jean Martin' },
sheet: sheet.sheet.ref,
observations: [],
conclusion: '',
recommendations: '',
localAnnotations: [],
...patch,
}
}