import { DropInfo, MosaicDropTargetPosition } from '../internalTypes.js'; import { v as MosaicKey, m as MosaicUpdate, n as MosaicUpdateSpec, h as MosaicNode, i as MosaicPath } from '../../types-BQA_Gcq_.js'; import 'immutability-helper'; import 'react'; /** * Used to prepare `update` for `immutability-helper` * @param mosaicUpdate * @returns {any} */ declare function buildSpecFromUpdate(mosaicUpdate: MosaicUpdate): MosaicUpdateSpec; /** * Applies a list of updates to a tree and returns the new tree. * * @param tree The tree to be updated. * @param updates An array of MosaicUpdate objects. * @returns The new, updated tree. */ declare function updateTree(tree: MosaicNode, updates: MosaicUpdate[]): MosaicNode; /** * Creates a `MosaicUpdate` to remove the node at `path` from `root` * @param root * @param path * @returns {{path: MosaicPath, spec: MosaicUpdateSpec}} */ declare function createRemoveUpdate(root: MosaicNode | null, path: MosaicPath): MosaicUpdate; /** * Creates a `MosaicUpdate` to split the _leaf_ at `destinationPath` into a node of it and the node from `sourcePath` * placing the node from `sourcePath` in `position`. * @param root * @param sourcePath * @param destinationPath * @param dropInfo * @returns {MosaicUpdate[]} */ declare function createDragToUpdates(root: MosaicNode, sourcePath: MosaicPath, destinationPath: MosaicPath, dropInfo: DropInfo): MosaicUpdate[]; /** * Sets the splitPercentages to hide the node at `path` * @param root * @param path * @returns {{path: MosaicPath, spec: MosaicUpdateSpec}} */ declare function createHideUpdate(root: MosaicNode | null, path: MosaicPath): MosaicUpdate; /** * Sets the splitPercentages of node at `path` and all of its parents to expand the target node * @param path * @param percentage * @returns {{spec: MosaicUpdateSpec, path: MosaicPath}} */ declare function createExpandUpdate(path: MosaicPath, percentage: number): MosaicUpdate; /** * Helper function to create an update that adds a new child to a split node * @param path Path to the split node * @param newChild The new child to add * @param insertIndex Index where to insert the new child (optional, defaults to end) * @returns MosaicUpdate to add the child */ declare function createAddChildUpdate(path: MosaicPath, newChild: MosaicNode, insertIndex?: number): MosaicUpdate; declare function convertToDropInfo(position: MosaicDropTargetPosition | undefined, tabReorderIndex?: number): DropInfo; export { buildSpecFromUpdate, convertToDropInfo, createAddChildUpdate, createDragToUpdates, createExpandUpdate, createHideUpdate, createRemoveUpdate, updateTree };