/** * Bracket parser — markup string → structured `TextContent[]` tree. * * Public interface: `parseDecorations(template) → TextContent[]`. * Pure function; same input always yields same output. * * Owner context: `@sharpee/engine` — internal prose pipeline. * * @see ADR-174 §Markup syntax * @see ADR-174 §Internal interfaces * @see ADR-174 acceptance criteria AC-1..AC-5, AC-10..AC-12 */ import type { TextContent } from './types'; /** * Parse a template string into a `TextContent[]` tree. * * Bracket markup `[name:content]` becomes an `IDecoration` whose * `className` is the result of `resolveClassName(name)`. Plain runs * stay as strings. Nesting recurses. Escape sequences `\[`, `\]`, * `\\` produce literal characters. * * Forgiving rules (ADR-174 AC-10..AC-12): * - An unclosed `[` is treated as a literal character; the tail of * the string remains unparsed text. * - A bracket without `:` (e.g., `[em world]`) is emitted as literal * `[em world]` — no decoration created. * - A bracket with empty class name (e.g., `[:world]`) yields the * parsed inner content directly, with no decoration wrapper. * * @param template Raw template string, post message-id resolution. * @returns Flat array of strings and decorations. */ export declare function parseDecorations(template: string): TextContent[]; //# sourceMappingURL=parser.d.ts.map