import { DragDropManager } from 'dnd-core'; import React__default, { ReactElement } from 'react'; import { v as MosaicKey, u as TileRenderer, t as TabToolbarRenderer, s as TabTitleRenderer, T as TabButtonRenderer, q as TabCanCloseFunction, C as CreateNode, h as MosaicNode, R as ResizeOptions, c as LegacyMosaicNode } from '../types-BQA_Gcq_.js'; import 'immutability-helper'; interface MosaicBaseProps { /** * Lookup function to convert `T` to a displayable `ReactElement` */ renderTile: TileRenderer; /** * Lookup function to convert tab title to a displayable `ReactElement` */ renderTabToolbar?: TabToolbarRenderer; /** * Function to render custom tab titles */ renderTabTitle?: TabTitleRenderer; /** * Custom tab button renderer */ renderTabButton?: TabButtonRenderer; /** * Function to determine if a tab can be closed */ canClose?: TabCanCloseFunction; createNode?: CreateNode; /** * Called when a user initiates any change to the tree (removing, adding, moving, resizing, etc.) */ onChange?: (newNode: MosaicNode | null) => void; /** * Called when a user completes a change (fires like above except for the interpolation during resizing) */ onRelease?: (newNode: MosaicNode | null) => void; /** * Additional classes to affix to the root element * Default: 'mosaic-blueprint-theme' */ className?: string; /** * Options that control resizing * @see: [[ResizeOptions]] */ resize?: ResizeOptions; /** * View to display when the current value is `null` * default: Simple NonIdealState view */ zeroStateView?: ReactElement; /** * Override the mosaicId passed to `react-dnd` to control how drag and drop works with other components * Note: does not support updating after instantiation * default: Random UUID */ mosaicId?: string; /** * Make it possible to use different versions of Blueprint with `mosaic-blueprint-theme` * Note: does not support updating after instantiation * default: 'bp3' */ blueprintNamespace?: string; /** * Override the react-dnd provider to allow applications to inject an existing drag and drop context */ dragAndDropManager?: DragDropManager | undefined; } interface MosaicControlledProps extends MosaicBaseProps { /** * The tree to render */ value: LegacyMosaicNode | MosaicNode | null; onChange: (newNode: MosaicNode | null) => void; } interface MosaicUncontrolledProps extends MosaicBaseProps { /** * The initial tree to render, can be modified by the user */ initialValue: LegacyMosaicNode | MosaicNode | null; } type MosaicProps = MosaicControlledProps | MosaicUncontrolledProps; interface MosaicState { currentNode: MosaicNode | null; lastInitialValue: MosaicNode | null; mosaicId: string; } declare class MosaicWithoutDragDropContext extends React__default.PureComponent, MosaicState> { static defaultProps: { onChange: () => undefined; zeroStateView: React__default.JSX.Element; className: string; blueprintNamespace: string; }; static getDerivedStateFromProps(nextProps: Readonly>, prevState: MosaicState): Partial> | null; state: MosaicState; render(): React__default.JSX.Element; private getRoot; private updateRoot; private replaceRoot; private actions; private readonly childContext; private renderTree; private validateTree; } declare class Mosaic extends React__default.PureComponent> { render(): React__default.JSX.Element; } export { Mosaic, type MosaicBaseProps, type MosaicControlledProps, type MosaicProps, type MosaicState, type MosaicUncontrolledProps, MosaicWithoutDragDropContext };