/** * This file is part of the NocoBase (R) project. * Copyright (c) 2020-2024 NocoBase Co., Ltd. * Authors: NocoBase Team. * * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. * For more information, please refer to: https://www.nocobase.com/agreement. */ import type { CSSProperties, RefObject } from 'react'; type ToolbarPortalPositioningMode = 'fixed' | 'absolute'; export interface ToolbarPortalRenderSnapshot { mountElement: HTMLElement; positioningMode: ToolbarPortalPositioningMode; } export interface ToolbarPortalRect { top: number; left: number; width: number; height: number; } interface UseFloatToolbarPortalOptions { active: boolean; containerRef: RefObject; toolbarContainerRef: RefObject; toolbarStyle?: CSSProperties; } interface UseFloatToolbarPortalResult { portalRect: ToolbarPortalRect; portalRenderSnapshot: ToolbarPortalRenderSnapshot | null; getPopupContainer: (triggerNode?: HTMLElement) => HTMLElement; updatePortalRect: () => void; schedulePortalRectUpdate: () => void; } export declare const omitToolbarPortalInsetStyle: (toolbarStyle?: CSSProperties) => CSSProperties | undefined; export declare const useFloatToolbarPortal: ({ active, containerRef, toolbarContainerRef, toolbarStyle, }: UseFloatToolbarPortalOptions) => UseFloatToolbarPortalResult; export {};