import { RuleBuilder } from "../rule-builder"; import { FieldControlType } from "./field-definition"; /** * Base operators defined inside RuleBuilder. */ type RuleOperatorBase = keyof typeof RuleBuilder.value; /** * Special operator that represents a field reference. */ type RuleOperatorSpecial = "var"; /** * Union of all operator keys supported by the system. */ export type RuleOperatorKey = RuleOperatorBase | RuleOperatorSpecial; /** * Defines the kind of value an operator expects: * - "list": expects an array of values * - "single": expects a single value * - "none": no value required (boolean-like) * - "field": expects a reference to another field * - undefined: not specified */ export type RuleOperatorValueType = "list" | "single" | "none" | "field" | undefined; /** * Metadata for describing how an operator behaves. */ export interface RuleOperatorMeta { /** Label to display in the UI (can be customized by consumers). */ label: string; /** Which field types this operator is allowed for. */ allowedTypes?: FieldControlType[] | "all"; /** Exclude field types by using this operator */ disallowedTypes?: FieldControlType[]; /** The type of value this operator requires. */ valueType?: RuleOperatorValueType; /** If true, the operator will be hidden from the UI picker. */ hideFromPicker?: boolean; } export type RuleOperatorMetaPatch = Partial>; export type RuleOperatorPatches = Partial>>; export type RuleOperatorsMap = Partial>>; /** * Default operator map shipped with `@form-flow/core`. * Consumers may override or extend this map at runtime. */ export declare const FORM_FLOW_OPERATORS_MAP: RuleOperatorsMap; export {}; //# sourceMappingURL=operators.d.ts.map