/** * Schema for a single field in an options schema. * Supports nested schemas via properties, patternProperties, and items. */ export interface FieldSchema { type?: string | string[]; anyOf?: FieldSchema[]; oneOf?: FieldSchema[]; allOf?: FieldSchema[]; /** For object types: maps property names to their schemas */ properties?: Record; /** For object types: maps regex patterns to schemas for matching properties */ patternProperties?: Record; /** For array types: schema for array items */ items?: FieldSchema | FieldSchema[]; } /** * Options schema: maps field names to their schemas. * Example: { strokeWidth: { type: 'number' }, showLabels: { type: 'boolean' } } */ export type OptionsSchema = Record; /** * Gets the child schema for a given key from a parent schema. * Handles properties, patternProperties, and items. */ export declare const getChildSchema: (parentSchema: FieldSchema | undefined, key: string | number) => FieldSchema | undefined; /** * Coerces a resolved token value to the expected type based on field schema. * * @param value - The resolved value (typically a string from token resolution) * @param schema - The field schema specifying the expected type * @returns The coerced value, or original if coercion fails or isn't applicable * * @example * coerceValueToSchemaType("8", { type: "number" }); // returns 8 * coerceValueToSchemaType("true", { type: "boolean" }); // returns true * coerceValueToSchemaType("abc", { type: "number" }); // returns "abc" */ export declare const coerceValueToSchemaType: (value: unknown, schema: FieldSchema) => unknown; //# sourceMappingURL=coerceValueToSchemaType.d.ts.map