import { type Occasion, type Plan, type UnparsedOccasionLine, type UnparsedPlanLine } from './types.js'; /** The separator the renderer writes. */ export declare const OCCASION_SEPARATOR = "\u00B7"; /** Strip the Markdown list marker; the `- ` is syntax, not content. */ export declare function withoutListMarker(text: string): string; /** Split a line into its title and its attribute segments. */ export declare function splitSegments(text: string): { title: string; segments: readonly string[]; }; /** The stable id of an occasion or plan: its title, normalised. */ export declare function occasionIdFor(title: string): string; /** What one line under the dates heading turned out to be. */ export type OccasionLineResult = { readonly ok: true; readonly occasion: Occasion; } | { readonly ok: false; readonly unparsed: UnparsedOccasionLine; }; /** * Read one occasion line. * * Two refusals are deliberate and are the reason this returns a reason rather * than `null`: * * - **No date.** There is nothing to approach, so there is nothing to raise. * - **No kind.** The kind is the owner's choice, made at capture, and is never * inferred. A line without one is recorded and answerable, the owner can still ask * when the date is, and is never raised, because guessing whether a date * wants a cheerful gift prompt is exactly the guess that gets a death * anniversary wrong. */ export declare function parseOccasionLine(lineIndex: number, text: string): OccasionLineResult; /** * Render an occasion back to a line, WITHOUT its list marker or provenance. * * The caller supplies both, `appendProse` writes the marker and the store * writes the provenance suffix, so nothing here can produce a line that * bypasses the profile's write path. */ export declare function renderOccasionLine(occasion: Occasion): string; export type PlanLineResult = { readonly ok: true; readonly plan: Plan; } | { readonly ok: false; readonly unparsed: UnparsedPlanLine; }; /** * Read one plan line. * * ``` * - Lisbon · 2026-09-12..2026-09-19 · away · in Lisbon * ``` * * A plan needs a range and nothing else. `away` is opt-in rather than assumed: * a plan can be "the kitchen is being redone, 3rd to the 10th", which is a real * dated range the owner wants known and not them leaving the house. */ export declare function parsePlanLine(lineIndex: number, text: string): PlanLineResult; /** * Make one free-text detail safe to carry as a segment on a plan line. * * A plan's details, a confirmation number, a flight and its times, who is * travelling, why the owner is going, are the reason they pasted the itinerary, so they * are kept verbatim wherever verbatim is possible. Three things would corrupt * the line if they went through untouched, and each is handled rather than * refused: * * - A separator character inside the text would split one detail into two. * Both accepted separators are replaced with a hyphen. * - A newline would end the line early. All whitespace collapses to spaces. * - A detail that happens to READ like structure, a bare `away`, an `in X`, * or a `YYYY-MM-DD..YYYY-MM-DD` range, would be parsed back as the plan's * own attributes and silently change the record. Those are prefixed with * `note`, which parses back as an ordinary detail. * * Returns an empty string for a detail that was only whitespace; the caller * drops those rather than writing a bare separator. */ export declare function normalizePlanDetail(detail: string): string; /** Render a plan back to a line, without its marker or provenance. */ export declare function renderPlanLine(plan: Plan): string; //# sourceMappingURL=grammar.d.ts.map