/** * Strict inline mention parser — implements the grammar defined in * concept-model/docs/design/inline-mentions-implementation-guide.md. * * Key principle: invalid mentions produce errors, they are NEVER * silently passed through. */ export type TargetType = 'urn' | 'dataset_qualified' | 'entity_id' | 'url' | 'path'; export interface Target { type: TargetType; urn?: string; dataset?: string; id?: string; url?: string; path?: string; } export type MentionKind = 'concept' | 'cite' | 'fig' | 'table' | 'formula' | 'bib' | 'link' | 'image'; export interface Mention { kind: MentionKind; target: Target; label: string | null; raw: string; start: number; end: number; } export interface TextSegment { kind: 'text'; content: string; start: number; end: number; } export type Segment = Mention | TextSegment; export declare class InvalidMentionError extends Error { readonly raw: string; readonly reason: string; readonly position: number; constructor(raw: string, reason: string, position: number); } /** * Parse a single mention body (the content inside {{...}}). * Returns a Mention object or throws InvalidMentionError. */ export declare function parseMentionStrict(raw: string, position?: number): Mention; /** * Parse a text string into an array of segments (text + mentions). * Throws InvalidMentionError on any invalid mention. */ export declare function parseMentions(text: string): Segment[]; //# sourceMappingURL=parser.d.ts.map