import type { Ref } from 'vue';
export type CELVar = {
    type: string;
    label: string;
    description?: string;
    value: unknown;
};
export type CELContext = Record<string, CELVar>;
export declare const SCOPE_ADDRESS_VAR = "__scopes__";
export declare const SELECTIONS_VAR = "selections";
export type ScopeAccessor = Record<string, () => unknown>;
export declare function provideCELContext(context: CELContext): void;
export declare function injectCELContext(): CELContext;
export declare function provideScopeAddress(uuid: string, accessor: ScopeAccessor): void;
/** One addressable member of an ancestor scope, e.g. `row` / `index`. */
export type ScopeAncestorMember = Readonly<{
    /** Member name appended after the address — `__scopes__["id"].<key>`. */
    key: string;
    label: string;
    /** CEL type shown as the picker badge. */
    type: string;
    description?: string;
}>;
/** A scope-exposing ancestor instance, as seen by an expression-editor picker. */
export type ScopeAncestor = Readonly<{
    /** Instance id keyed into `__scopes__["<id>"]`. */
    id: string;
    /** Instance display name (a table's 内部名称); blank → show the type name alone. */
    name?: string;
    /** Component type display name (from type metadata). */
    typeName: string;
    /** Component type icon (from type metadata). */
    typeIcon?: string;
    members: ReadonlyArray<ScopeAncestorMember>;
}>;
/**
 * Contribute one scope-exposing ancestor frame. Descendant editors see it
 * prepended (nearest first) to the inherited chain. A `null` value contributes
 * nothing — for an editor whose current target may or may not own an `id`.
 */
export declare function provideScopeAncestor(ancestor: Ref<ScopeAncestor | null>): void;
/**
 * The scope-exposing ancestors enclosing the current editing position, nearest
 * first. Empty when nothing up the config tree exposes an addressable scope.
 */
export declare function useScopeAncestry(): Ref<ReadonlyArray<ScopeAncestor>>;
/** One selection-like field in the editing form, as the picker/chip surfaces it. */
export type SelectionFieldRef = Readonly<{
    /** Field uuid keyed into `selections["<id>"]` — the registry/publish key. */
    id: string;
    /** The field's designer-facing name, shown instead of the raw uuid. */
    name: string;
}>;
/**
 * Advertise the form's selection-like fields to every descendant
 * ExpressionEditor, so it can render `selections["<id>"]` as the field's name
 * and list those fields in the variable picker. Design-time only — the runtime
 * counterpart is `provideSelectionsRegistry` (utils/selections-registry). A form
 * host provides the whole roster; a nested form overrides with its own (a field
 * references its own form's siblings, not an outer form's).
 */
export declare function provideSelectionRoster(roster: Ref<ReadonlyArray<SelectionFieldRef>>): void;
/**
 * The selection-like fields of the enclosing form, or empty when the editor
 * sits outside any form (a table column expression, a standalone editor).
 */
export declare function useSelectionRoster(): Ref<ReadonlyArray<SelectionFieldRef>>;
export declare function celBindings(context: CELContext): Record<string, unknown>;
