@sanity/form-builder
Version:
Sanity form builder
21 lines • 972 B
TypeScript
import { HotkeyOptions, PortableTextBlock, PortableTextChild, PortableTextFeatures, Type } from '@sanity/portable-text-editor';
import { Path } from '@sanity/types';
import { BlockStyleItem, PTEToolbarAction, PTEToolbarActionGroup } from './types';
export declare function useFocusBlock(): PortableTextBlock;
export declare function useFocusChild(): PortableTextChild;
export declare function useFeatures(): PortableTextFeatures;
export declare function useActionGroups({ hotkeys, onFocus, resolveInitialValue, disabled, }: {
hotkeys: HotkeyOptions;
onFocus: (path: Path) => void;
resolveInitialValue: (type: Type) => any;
disabled: boolean;
}): PTEToolbarActionGroup[];
export declare function useActiveActionKeys({ actions, }: {
actions: Array<PTEToolbarAction & {
firstInGroup?: true;
}>;
}): string[];
export declare function useActiveStyleKeys({ items }: {
items: BlockStyleItem[];
}): string[];
//# sourceMappingURL=hooks.d.ts.map