/** * RFC 0007 R26 — the naming grammar shared by the forward SVG export and the * reverse design audit. One grammar, written by one side and read by the * other, is what makes the Figma/Penpot round-trip lossless with zero API: * * ▸ / * * Identity is carried by contract *ids* (not human titles) so that * `parseFrameName(frameName(screen, state))` round-trips exactly. Screen and * state ids in JourneyGraph are drawn from `[\w.\-]+` (the same charset the * audit markers accept), so neither the " ▸ " nor the " / " separator can * occur inside an id. */ /** Page/section separator: ` ▸ …`. */ export declare const PAGE_SEP = " \u25B8 "; /** Frame separator: ` / `. */ export declare const FRAME_SEP = " / "; /** Page/section name for a journey (its id — the thing that round-trips). */ export declare function pageName(journeyId: string): string; /** Frame name for one screen × state, e.g. `Payment / error.declined`. */ export declare function frameName(screenId: string, stateId: string): string; /** Fully-qualified name including the journey, e.g. `Checkout ▸ Payment / default`. */ export declare function qualifiedName(journeyId: string, screenId: string, stateId: string): string; /** Layer name for a layout block, e.g. `2 · form: Card details`. */ export declare function blockLayerName(index: number, type: string, label?: string): string; /** A screen×state identity recovered from a design frame name. */ export interface FrameId { screen: string; state: string; /** Present only when the name carried a ` ▸ …` prefix. */ journey?: string; } /** * Parse a frame name back to its screen×state identity, tolerating the shapes * design tools emit: an optional ` ▸ ` prefix, and either the spaced * (` ▸ `, ` / `) or unspaced (`▸`, `/`) separators a designer may hand-type. * The state segment is constrained to the id charset so a screen id that * contains spaces still parses (the split is anchored on the trailing state). * Returns null when the string is not a frame name. */ export declare function parseFrameName(name: string): FrameId | null; /** A layout-block identity recovered from a block layer name. */ export interface BlockId { index: number; type: string; label?: string; } /** Inverse of {@link blockLayerName}; returns null when the name doesn't match. */ export declare function parseBlockLayerName(name: string): BlockId | null;