/** * Frontmatter parse / serialize — PURE functions for Obsidian YAML frontmatter. * * Covers the documented Dataview conventions: * - string scalars (unquoted) * - number scalars (integer or float, including negative) * - ISO-8601 date strings — kept as strings, never coerced to Date * - block-style lists (`- item` under the key line) * - inline-style lists (`[a, b, c]`) * - status enum strings (e.g. "active", "superseded") — just strings * * PURE: Never calls Date.now() or new Date() — no clock dependency. * Never touches the filesystem — no fs or network imports. * * bober: hand-rolled YAML subset — covers the six Dataview scalar/list * conventions documented above. Quoted strings, nested objects, and * multi-line scalars are NOT supported. Swap for a vetted YAML library * if those are needed. */ import type { VaultNote } from "./types.js"; /** * Parse the leading YAML frontmatter block and return the structured * frontmatter together with the verbatim body that follows. * * If the input does not begin with `---`, returns `{ frontmatter: {}, body: raw }`. */ export declare function parseFrontmatter(raw: string): { frontmatter: Record; body: string; }; /** * Serialize a frontmatter object and body back to a complete note string. * * Produces `---\n\n---\n`. Array values are serialized as * block-style lists (one ` - item` line per element). */ export declare function serializeFrontmatter(frontmatter: Record, body: string): string; /** * Parse a raw note string into a `VaultNote`. * The `path` parameter is stored verbatim — no filesystem access occurs here. */ export declare function parseNote(raw: string, path: string): VaultNote; /** * Serialize a `VaultNote` back to a raw string suitable for writing to disk. */ export declare function serializeNote(note: VaultNote): string; //# sourceMappingURL=frontmatter.d.ts.map