import type { AspectRatioBound, FileValidationRule, VideoOrientationValue } from './file-validation-types'; /** * Built-in rule factories. Each takes a constraint and an optional `message`; when omitted, the * rule falls back to a localized default from `FileValidationLocalization` (kit ships no English * literals — defaults follow `AppLocale`). The `Mime` factory additionally attaches `.accept` so * containing UI cmps (`FileUploader`, `OpenFileButton`) can auto-derive the native picker filter / * drag-over hint. * * @example * ```ts * const rules = [ * FileRules.Mime('image/*'), * FileRules.MaxSize(5 * 1024 * 1024, 'Image must be under 5 MB.') * ]; * const results = await FileValidator.validateMany(files, rules); * ``` */ export declare const FileRules: { /** Passes when the container reports no duration (e.g. a live-stream WebM) — bitrate cannot be derived without it. */ AudioBitrate: (maxKbps: number, message?: string) => FileValidationRule; AudioDuration: (maxSeconds: number, message?: string) => FileValidationRule; AudioOnly: (message?: string) => FileValidationRule; Extensions: (extensions: string[], message?: string) => FileValidationRule; ImageDimensions: (max: { width: number; height: number; }, message?: string) => FileValidationRule; ImageMinDimensions: (min: { width: number; height: number; }, message?: string) => FileValidationRule; MaxSize: (bytes: number, message?: string) => FileValidationRule; Mime: (accept: string, message?: string) => FileValidationRule; VideoAspectRatio: (ratios: string[], message?: string, tolerancePercent?: number) => FileValidationRule; /** * Validates a video's width / height ratio against an inclusive `[min, max]` interval. Each * bound is a `'w:h'` string or a decimal; both are optional, so the interval can be open-ended * (`{ min }` = "this wide or wider", `{ max }` = "up to this"). `tolerancePercent` widens the * interval outward on both edges. An empty `{}` specifies no constraint and accepts everything. */ VideoAspectRatioRange: (range: { min?: AspectRatioBound; max?: AspectRatioBound; }, message?: string, tolerancePercent?: number) => FileValidationRule; VideoOrientation: (orientation: VideoOrientationValue, message?: string, tolerancePercent?: number) => FileValidationRule; VideoDimensions: (max: { width: number; height: number; }, message?: string) => FileValidationRule; VideoDuration: (maxSeconds: number, message?: string) => FileValidationRule; };