import { Feature, OperationFeature } from "../models";
/**
 * Utility functions for working with features.
 */
/**
 * Get the value of a feature by name from a feature array.
 * Returns undefined if not found.
 */
export declare function getFeatureValue(features: Feature[] | undefined, name: string): string | undefined;
/**
 * Check if a feature exists in a feature array.
 */
export declare function hasFeature(features: Feature[] | undefined, name: string): boolean;
/**
 * Get all features with names starting with a specific prefix.
 */
export declare function getFeaturesByPrefix(features: Feature[] | undefined, prefix: string): Feature[];
/**
 * Get all rendition features (those starting with "r_").
 */
export declare function getRenditionFeatures(features: Feature[] | undefined): Feature[];
/**
 * Get all trace features (those starting with "$").
 */
export declare function getTraceFeatures(features: Feature[] | undefined): Feature[];
/**
 * Check if a feature is a trace feature.
 */
export declare function isTraceFeature(feature: Feature): boolean;
/**
 * Check if a feature is a rendition feature.
 */
export declare function isRenditionFeature(feature: Feature): boolean;
/**
 * Filter out trace features from a feature array.
 */
export declare function filterTraceFeatures(features: Feature[] | undefined): Feature[];
/**
 * Filter out rendition features from a feature array (unless debug mode is on).
 */
export declare function filterRenditionFeatures(features: Feature[] | undefined, debug: boolean): Feature[];
/**
 * Parse char-offsets feature value.
 * Format: "ID:y=...,x=... ID:y=...,x=..." (multiple patterns separated by space)
 * Each pattern: ID:y=value,x=value (y and x are optional, can be in any order)
 * Values can be plain pixels (e.g. "10") or use font-relative units:
 *   tw = average character width of the base text font
 *   th = average character height of the base text font (≈ font size)
 * e.g. "0.5th" = half the average character height, "2tw" = twice the average width.
 *
 * @returns Map of node ID to {x?: number|string, y?: number|string}
 */
export declare function parseCharOffsets(value: string): Map<number, {
    x?: number | string;
    y?: number | string;
}>;
/**
 * Parse displaced span reference.
 * Format: "IDxN" where ID is node ID and N is count
 * Example: "21x7" means starting from node 21, include 7 characters
 *
 * @returns {nodeId, count} or undefined if invalid
 */
export declare function parseDisplacedSpan(value: string): {
    nodeId: number;
    count: number;
} | undefined;
/**
 * Parse hint variable assignments from r_hint-vars feature.
 * Format: "name=value name=value ..."
 * Example: "color=red bold=1"
 *
 * @returns Map of variable name to value
 */
export declare function parseHintVars(value: string): Map<string, string>;
/**
 * Get node features for a specific node at a specific version.
 * Node features are keyed as "vTAG_NODEID" in the nodeFeatures map.
 */
export declare function getNodeFeatures(nodeFeatures: Record<string, OperationFeature[]>, versionTag: string, nodeId: number): OperationFeature[];
