import type { Store } from '@blocksuite/store'; import { type GfxCompatibleInterface, type GfxGroupCompatibleInterface } from '../gfx/model/base.js'; import type { GfxGroupModel, GfxModel } from '../gfx/model/model.js'; /** * Get the top elements from the list of elements, which are in some tree structures. * * For example: a list `[G1, E1, G2, E2, E3, E4, G4, E5, E6]`, * and they are in the elements tree like: * ``` * G1 G4 E6 * / \ | * E1 G2 E5 * / \ * E2 G3* * / \ * E3 E4 * ``` * where the star symbol `*` denote it is not in the list. * * The result should be `[G1, G4, E6]` */ export declare function getTopElements(elements: GfxModel[]): GfxModel[]; export declare function descendantElementsImpl(container: GfxGroupCompatibleInterface): GfxModel[]; export declare function hasDescendantElementImpl(container: GfxGroupCompatibleInterface, element: GfxCompatibleInterface): boolean; /** * This checker is used to prevent circular reference, when adding a child element to a container. */ export declare function canSafeAddToContainer(container: GfxGroupModel, element: GfxCompatibleInterface): boolean; export declare function isLockedByAncestorImpl(element: GfxCompatibleInterface): boolean; export declare function isLockedBySelfImpl(element: GfxCompatibleInterface): boolean; export declare function isLockedImpl(element: GfxCompatibleInterface): boolean; export declare function lockElementImpl(doc: Store, element: GfxCompatibleInterface): void; export declare function unlockElementImpl(doc: Store, element: GfxCompatibleInterface): void; //# sourceMappingURL=tree.d.ts.map