/** * UISchema Utilities * * Functions for resolving JSON Pointer scope strings to property keys, * and for generating default UISchema from a ConfigSchema. */ import type { ConfigSchema } from '../types/index.js'; import type { UISchemaElement, UISchemaVerticalLayout } from '../types/uischema.js'; /** * Resolve a JSON Pointer scope string to a property key. * * Supports the JSON Forms scope format: #/properties/ * * @param scope - JSON Pointer string (e.g., "#/properties/temperature") * @returns The property key (e.g., "temperature"), or null if invalid * * @example * ```typescript * resolveScopeToKey("#/properties/temperature") // => "temperature" * resolveScopeToKey("#/properties/nested/deep") // => null (only single-level supported) * resolveScopeToKey("invalid") // => null * ``` */ export declare function resolveScopeToKey(scope: string): string | null; /** * Build a scope string from a property key. * Inverse of resolveScopeToKey. * * @param key - Property key (e.g., "temperature") * @returns JSON Pointer scope string (e.g., "#/properties/temperature") */ export declare function keyToScope(key: string): string; /** * Generate a default UISchema from a ConfigSchema. * Creates a flat VerticalLayout with one Control per property, * preserving the property iteration order. * * This is a convenience utility for programmatically building UISchema. * * @param schema - The ConfigSchema to generate a UISchema from * @returns A VerticalLayout UISchema element */ export declare function generateDefaultUISchema(schema: ConfigSchema): UISchemaVerticalLayout; /** * Collect all property keys referenced by Controls in a UISchema tree. * Useful for detecting properties that are NOT in the UISchema * (e.g., to warn about unreferenced fields during development). * * @param element - Root UISchema element * @returns Set of property keys referenced by Controls */ export declare function collectReferencedKeys(element: UISchemaElement): Set;