/** * Evidence graph (v1) view-model helpers: the rel→copy key map, the * retraction confirmation parameters, and the provenance jump filter. Pure * glue between the fold's structured product and the card — no layout, no * graph library (the v1 constraint), everything re-derivable. * @module dsh-client-ui-mimir/client/evidence-graph-view */ import type { EvidenceConflict, EvidenceGraphEdge, EvidenceTimelineEntry, ResearchEventFilter } from 'dsh-mimir/types'; import type { ResearchKey } from './locales.ts'; import type { ResearchT } from './view-common.ts'; import { type LedgerWindow } from './ledger-view.ts'; /** * The evidence graph's window request — the exact contract of the host's * `getEvidenceGraph` verb: optional project scope plus ISO-8601 bounds * (`since` inclusive, `until` = now). No list-only fields (`limit`, `order`) * ever cross this boundary. */ export interface EvidenceGraphRequest { readonly projectId?: string | undefined; readonly since?: string | undefined; readonly until?: string | undefined; } /** * Translate the ledger's authoritative window + project scope into the * evidence graph's window request (the SAME resolved semantics as * `ledgerWindowFilter`: bounded windows get `since = now − days`, `all` opens * the lower bound, `until` is always now). The ledger owns this state; the * graph never grows a second filter system. * @param window - the ledger's selected time window. * @param projectId - the ledger's resolved project scope, or null. * @param nowMs - the wall clock (injectable for tests). * @returns the request for one `getEvidenceGraph` call. */ export declare function evidenceGraphRequestOf(window: LedgerWindow, projectId: string | null, nowMs: number): EvidenceGraphRequest; /** * Locale key of one timeline entry's relation. Retract rows carry the raw * action string, so they map onto their own copy key. */ export declare function evidenceRelKey(rel: string): ResearchKey; /** * Whether one timeline entry renders with the strikethrough mark: a * superseded declaration or a retract row — the accumulation story stays * fully inline (v1.1 §2.4), nothing is hidden. */ export declare function isStruckThrough(entry: EvidenceTimelineEntry): boolean; /** The confirmation parameters of one retraction (what the card asks about). */ export interface EvidenceRetractConfirm { /** The edge's server-computed identity (retracts every duplicate). */ readonly dedupKey: string; /** The edge's human-readable shape, shown in the confirmation line. */ readonly label: string; } /** * Build the retraction confirmation for one edge, or null when the edge * carries no retraction affordance: already-retracted edges (idempotence * belongs to the fold, not to more writes) and derived edges (they have no * dedupKey and cannot be retracted — the trail that produced them is the * write itself). */ export declare function retractConfirmOf(edge: EvidenceGraphEdge): EvidenceRetractConfirm | null; /** * The raw-ledger-timeline filter that frames one provenance event: a ±1-day * window is enough to show the row in context without dragging the whole * history into the raw timeline. */ export declare function provenanceFilter(ts: string): ResearchEventFilter; /** * Group the fold's active conflict pairs into per-claim tooltip lines. One * line per conflict, both ends itemized: `支持 · {src} ↔ 反驳 · {src}`, with * the supporting side's note appended (CJK-safely truncated) when present. * Deterministic: the fold's `conflicts` order is the stable iteration order. * @param conflicts - the fold's active conflicts (supports × contradicts). * @param t - the locale resolver. * @returns claimKey → tooltip detail lines, in fold order. */ export declare function conflictLinesByClaim(conflicts: readonly EvidenceConflict[], t: ResearchT): ReadonlyMap; //# sourceMappingURL=evidence-graph-view.d.ts.map