/** * Browser-safe exports from @formspec/config. * * This entry point excludes the file-based config loader (loadConfig) * which requires Node.js APIs. Use this entry point for browser builds. * * For browser use: * - Use loadConfigFromString() to parse YAML config strings * - Use defineConstraints() for programmatic configuration * - Use validateFormSpec() for validation * * @packageDocumentation */ export type { Severity, FieldTypeConstraints, LayoutConstraints, LayoutTypeConstraints, RuleEffectConstraints, RuleConstraints, UISchemaConstraints, FieldOptionConstraints, ControlOptionConstraints, ConstraintConfig, ResolvedConstraintConfig, ResolvedUISchemaConstraints, ResolvedRuleConstraints, FormSpecConfig, ValidationIssue, ValidationResult, } from "./types.js"; import type { ConstraintConfig, ResolvedConstraintConfig } from "./types.js"; import { mergeWithDefaults, DEFAULT_CONSTRAINTS, DEFAULT_CONFIG } from "./defaults.js"; export { DEFAULT_CONSTRAINTS, DEFAULT_CONFIG, mergeWithDefaults }; /** * Synchronously loads config from a pre-parsed YAML string. * Useful for browser environments or when config is already available. * * @param yamlContent - The YAML content to parse * @returns The parsed and merged configuration */ export declare function loadConfigFromString(yamlContent: string): ResolvedConstraintConfig; /** * Creates a constraint configuration directly from an object. * Useful for programmatic configuration without YAML. * * @param config - Partial constraint configuration * @returns Complete configuration with defaults applied * * @example * ```ts * const config = defineConstraints({ * fieldTypes: { * dynamicEnum: 'error', * dynamicSchema: 'error', * }, * layout: { * group: 'error', * }, * }); * ``` */ export declare function defineConstraints(config: ConstraintConfig): ResolvedConstraintConfig; export { validateFormSpecElements, validateFormSpec, type FormSpecValidationOptions, } from "./validators/formspec.js"; export { validateFieldTypes, isFieldTypeAllowed, getFieldTypeSeverity, type FieldTypeContext, } from "./validators/field-types.js"; export { validateLayout, isLayoutTypeAllowed, isNestingDepthAllowed, type LayoutContext, } from "./validators/layout.js"; export { validateFieldOptions, extractFieldOptions, isFieldOptionAllowed, getFieldOptionSeverity, type FieldOptionsContext, type FieldOption, } from "./validators/field-options.js"; //# sourceMappingURL=browser.d.ts.map