///
import { App } from '@tldraw/editor';
import { Context } from 'react';
import { ForwardRefExoticComponent } from 'react';
import { MemoExoticComponent } from 'react';
import { NamedExoticComponent } from 'react';
import * as React_2 from 'react';
import { default as React_3 } from 'react';
import { ReactNode } from 'react';
import { RefAttributes } from 'react';
import { TLCopyType } from '@tldraw/editor';
import { TLExportType } from '@tldraw/editor';
import { TLShapeId } from '@tldraw/editor';
import { TLStyleItem } from '@tldraw/editor';
import { TLStyleType } from '@tldraw/editor';
import { VecLike } from '@tldraw/primitives';
/** @public */
export declare interface ActionItem {
icon?: TLUiIconType;
id: string;
kbd?: string;
title?: string;
label?: TLTranslationKey;
menuLabel?: TLTranslationKey;
shortcutsLabel?: TLTranslationKey;
contextMenuLabel?: TLTranslationKey;
readonlyOk: boolean;
checkbox?: boolean;
onSelect: () => Promise | void;
}
/** @public */
export declare const ActionsContext: React_2.Context;
/** @public */
export declare type ActionsContextType = Record;
/** @public */
export declare const ActionsMenuSchemaContext: React_3.Context;
/** @public */
export declare type ActionsMenuSchemaContextType = MenuSchema;
/** @public */
export declare const ActionsMenuSchemaProvider: MemoExoticComponent<({ overrides, children, }: ActionsMenuSchemaProviderProps) => JSX.Element>;
/** @public */
export declare type ActionsMenuSchemaProviderProps = {
overrides?: (app: App, schema: ActionsMenuSchemaContextType, helpers: {
actions: ReturnType;
oneSelected: boolean;
twoSelected: boolean;
threeSelected: boolean;
}) => ActionsMenuSchemaContextType;
children: any;
};
/** @public */
export declare function ActionsProvider({ overrides, children }: ActionsProviderProps): JSX.Element;
/** @public */
export declare type ActionsProviderProps = {
overrides?: (app: App, actions: ActionsContextType, helpers: undefined) => ActionsContextType;
children: any;
};
/** @public */
export declare const BASE_URL: string;
/** @public */
declare function Body_2({ className, children, style, }: {
className?: string;
children: any;
style?: React.CSSProperties;
}): JSX.Element;
/** @public */
export declare function BreakPointProvider({ children }: {
children: any;
}): JSX.Element;
/** @public */
export declare const Button: React_2.ForwardRefExoticComponent>;
/** @public */
export declare const ButtonPicker: React_2.MemoExoticComponent;
declare function _ButtonPicker(props: ButtonPickerProps): JSX.Element;
/** @public */
export declare interface ButtonPickerProps {
title: string;
items: T[];
styleType: TLStyleType;
value?: string | number | null;
columns?: 2 | 3 | 4;
'data-wd'?: string;
onValueChange: (item: T, squashing: boolean) => void;
}
/** @public */
export declare interface ButtonProps extends React_2.HTMLAttributes {
loading?: boolean;
disabled?: boolean;
label?: TLTranslationKey;
icon?: TLUiIconType;
spinner?: boolean;
iconLeft?: TLUiIconType;
smallIcon?: boolean;
kbd?: string;
isChecked?: boolean;
invertIcon?: boolean;
type?: 'primary' | 'danger' | 'normal';
}
/** @public */
declare function CheckboxItem({ children, onSelect, ...rest }: DropdownMenuCheckboxItemProps): JSX.Element;
/** @public */
declare function CloseButton(): JSX.Element;
/** @public */
export declare function compactMenuItems(arr: T[]): Exclude[];
/** @public */
declare function Content({ side, align, sideOffset, alignOffset, children, }: {
children: any;
alignOffset?: number;
sideOffset?: number;
align?: 'start' | 'center' | 'end';
side?: 'bottom' | 'top' | 'right' | 'left';
}): JSX.Element;
/** @public */
export declare const ContextMenu: ({ children }: {
children: any;
}) => JSX.Element;
/** @public */
export declare interface ContextMenuProps {
children: any;
}
/** @public */
export declare const ContextMenuSchemaContext: React_3.Context;
/** @public */
export declare type ContextMenuSchemaContextType = MenuSchema;
/** @public */
export declare const ContextMenuSchemaProvider: MemoExoticComponent<({ overrides, children, }: ContextMenuSchemaProviderProps) => JSX.Element>;
/** @public */
export declare type ContextMenuSchemaProviderProps = {
overrides?: (app: App, schema: ContextMenuSchemaContextType, helpers: {
actions: ReturnType;
oneSelected: boolean;
twoSelected: boolean;
threeSelected: boolean;
showAutoSizeToggle: boolean;
showUngroup: boolean;
onlyFlippableShapeSelected: boolean;
}) => ContextMenuSchemaContextType;
children: any;
};
/** @public */
export declare type CustomMenuItem = {
id: string;
type: 'custom';
disabled: boolean;
readonlyOk: boolean;
};
/** @public */
export declare const DebugPanel: React_2.NamedExoticComponent<{
renderDebugMenuItems: (() => React_2.ReactNode) | null;
}>;
/** @public */
export declare const DEFAULT_TRANSLATION: TLTranslation;
declare type DefaultHelpers = ReturnType;
declare namespace Dialog {
export {
Header,
Title,
CloseButton,
Body_2 as Body,
Footer
}
}
export { Dialog }
/** @public */
export declare interface DialogProps {
onClose: () => void;
}
/** @public */
export declare const DialogsContext: Context;
/** @public */
export declare type DialogsContextType = {
addDialog: (dialog: Omit & {
id?: string;
}) => string;
removeDialog: (id: string) => string;
updateDialog: (id: string, newDialogData: Partial) => string;
clearDialogs: () => void;
dialogs: TLDialog[];
};
/** @public */
export declare function DialogsProvider({ children }: DialogsProviderProps): JSX.Element;
/** @public */
export declare type DialogsProviderProps = {
overrides?: (app: App) => DialogsContextType;
children: any;
};
declare namespace DropdownMenu {
export {
Root,
Trigger,
Content,
Sub,
SubTrigger,
SubContent,
Group,
Indicator,
Item,
CheckboxItem,
DropdownMenuItemProps,
DropdownMenuCheckboxItemProps
}
}
export { DropdownMenu }
/** @public */
declare interface DropdownMenuCheckboxItemProps {
checked?: boolean;
onSelect?: (e: Event) => void;
disabled?: boolean;
title: string;
children: any;
}
/** @public */
declare interface DropdownMenuItemProps extends ButtonProps {
noClose?: boolean;
}
/** @public */
export declare type EmbedInfo = {
width: number;
height: number;
doesResize: boolean;
isEmbedUrl: (url: string) => boolean;
toEmbed: (url: string) => string;
};
/** @public */
export declare function fetchTranslation(locale: TLTranslationLocale): Promise;
/** @public */
export declare function findMenuItem(menu: MenuSchema, path: string[]): MenuChild;
/** @public */
declare function Footer({ className, children }: {
className?: string;
children: any;
}): JSX.Element;
/** @public */
export declare const getActiveToolId: (app: App) => string | undefined;
/** @public */
export declare const getBaseUrl: () => string;
/** @public */
export declare function getTranslation(locale: TLTranslationLocale): Promise;
/** @public */
declare function Group({ children, size, }: {
children: any;
size?: 'tiny' | 'small' | 'medium' | 'wide';
}): JSX.Element;
/** @public */
declare function Header({ className, children }: {
className?: string;
children: any;
}): JSX.Element;
/** @public */
export declare const HelpMenu: React_2.NamedExoticComponent