## API Report File for "@tldraw/ui"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
///
import { App } from '@tldraw/editor';
import { Context } from 'react';
import { EditorAssetUrls } from '@tldraw/editor';
import { EMBED_DEFINITIONS } from '@tldraw/editor';
import { MemoExoticComponent } from 'react';
import { NamedExoticComponent } from 'react';
import { default as React_2 } from 'react';
import * as React_3 from 'react';
import { ReactNode } 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 (undocumented)
export interface ActionItem {
// (undocumented)
checkbox?: boolean;
// (undocumented)
contextMenuLabel?: TLTranslationKey;
// (undocumented)
icon?: TLUiIconType;
// (undocumented)
id: string;
// (undocumented)
kbd?: string;
// (undocumented)
label?: TLTranslationKey;
// (undocumented)
menuLabel?: TLTranslationKey;
// (undocumented)
onSelect: (source: TLUiEventSource) => Promise | void;
// (undocumented)
readonlyOk: boolean;
// (undocumented)
shortcutsLabel?: TLTranslationKey;
// (undocumented)
title?: string;
}
// @public (undocumented)
export const ActionsContext: React_3.Context;
// @public (undocumented)
export type ActionsContextType = Record;
// @public (undocumented)
export const ActionsMenuSchemaContext: React_2.Context;
// @public (undocumented)
export type ActionsMenuSchemaContextType = MenuSchema;
// @public (undocumented)
export const ActionsMenuSchemaProvider: MemoExoticComponent<({ overrides, children, }: ActionsMenuSchemaProviderProps) => JSX.Element>;
// @public (undocumented)
export type ActionsMenuSchemaProviderProps = {
overrides?: (app: App, schema: ActionsMenuSchemaContextType, helpers: {
actions: ReturnType;
oneSelected: boolean;
twoSelected: boolean;
threeSelected: boolean;
}) => ActionsMenuSchemaContextType;
children: any;
};
// @public (undocumented)
export function ActionsProvider({ overrides, children }: ActionsProviderProps): JSX.Element;
// @public (undocumented)
export type ActionsProviderProps = {
overrides?: (app: App, actions: ActionsContextType, helpers: undefined) => ActionsContextType;
children: any;
};
// @public (undocumented)
export function AssetUrlsProvider({ assetUrls, children, }: {
assetUrls: UiAssetUrls;
children: React.ReactNode;
}): JSX.Element;
// @public (undocumented)
export const BASE_URL: string;
// @public (undocumented)
function Body_2({ className, children, style, }: {
className?: string;
children: any;
style?: React.CSSProperties;
}): JSX.Element;
// @public (undocumented)
export function BreakPointProvider({ children }: {
children: any;
}): JSX.Element;
// @public (undocumented)
export const Button: React_3.ForwardRefExoticComponent>;
// @public (undocumented)
export const ButtonPicker: React_3.MemoExoticComponent;
// @public (undocumented)
export interface ButtonPickerProps {
// (undocumented)
'data-wd'?: string;
// (undocumented)
columns?: 2 | 3 | 4;
// (undocumented)
items: T[];
// (undocumented)
onValueChange: (item: T, squashing: boolean) => void;
// (undocumented)
styleType: TLStyleType;
// (undocumented)
title: string;
// (undocumented)
value?: null | number | string;
}
// @public (undocumented)
export interface ButtonProps extends React_3.HTMLAttributes {
// (undocumented)
disabled?: boolean;
// (undocumented)
icon?: TLUiIconType;
// (undocumented)
iconLeft?: TLUiIconType;
// (undocumented)
invertIcon?: boolean;
// (undocumented)
isChecked?: boolean;
// (undocumented)
kbd?: string;
// (undocumented)
label?: TLTranslationKey;
// (undocumented)
loading?: boolean;
// (undocumented)
smallIcon?: boolean;
// (undocumented)
spinner?: boolean;
// (undocumented)
type?: 'danger' | 'normal' | 'primary';
}
// @public (undocumented)
function CheckboxItem({ children, onSelect, ...rest }: DropdownMenuCheckboxItemProps): JSX.Element;
// @public (undocumented)
function CloseButton(): JSX.Element;
// @public (undocumented)
export function compactMenuItems(arr: T[]): Exclude[];
// @public (undocumented)
function Content({ side, align, sideOffset, alignOffset, children, }: {
children: any;
alignOffset?: number;
sideOffset?: number;
align?: 'center' | 'end' | 'start';
side?: 'bottom' | 'left' | 'right' | 'top';
}): JSX.Element;
// @public (undocumented)
export const ContextMenu: ({ children }: {
children: any;
}) => JSX.Element;
// @public (undocumented)
export interface ContextMenuProps {
// (undocumented)
children: any;
}
// @public (undocumented)
export const ContextMenuSchemaContext: React_2.Context;
// @public (undocumented)
export type ContextMenuSchemaContextType = MenuSchema;
// @public (undocumented)
export const ContextMenuSchemaProvider: MemoExoticComponent<({ overrides, children, }: ContextMenuSchemaProviderProps) => JSX.Element>;
// @public (undocumented)
export 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 (undocumented)
export type CustomMenuItem = {
id: string;
type: 'custom';
disabled: boolean;
readonlyOk: boolean;
};
// @public (undocumented)
export const DebugPanel: React_3.NamedExoticComponent<{
renderDebugMenuItems: (() => React_3.ReactNode) | null;
}>;
declare namespace Dialog {
export {
Header,
Title,
CloseButton,
Body_2 as Body,
Footer
}
}
export { Dialog }
// @public (undocumented)
export interface DialogProps {
// (undocumented)
onClose: () => void;
}
// @public (undocumented)
export const DialogsContext: Context;
// @public (undocumented)
export type DialogsContextType = {
addDialog: (dialog: Omit & {
id?: string;
}) => string;
removeDialog: (id: string) => string;
updateDialog: (id: string, newDialogData: Partial) => string;
clearDialogs: () => void;
dialogs: TLDialog[];
};
// @public (undocumented)
export function DialogsProvider({ children }: DialogsProviderProps): JSX.Element;
// @public (undocumented)
export type DialogsProviderProps = {
overrides?: (app: App) => DialogsContextType;
children: any;
};
declare namespace DropdownMenu {
export {
Root,
Trigger,
Content,
Sub,
SubTrigger,
SubContent,
Group,
Indicator,
Item,
CheckboxItem,
RadioItem,
DropdownMenuItemProps,
DropdownMenuCheckboxItemProps
}
}
export { DropdownMenu }
// @public (undocumented)
interface DropdownMenuCheckboxItemProps {
// (undocumented)
checked?: boolean;
// (undocumented)
children: any;
// (undocumented)
disabled?: boolean;
// (undocumented)
onSelect?: (e: Event) => void;
// (undocumented)
title: string;
}
// @public (undocumented)
interface DropdownMenuItemProps extends ButtonProps {
// (undocumented)
noClose?: boolean;
}
// @public (undocumented)
export type EmbedInfo = {
width: number;
height: number;
doesResize: boolean;
isEmbedUrl: (url: string) => boolean;
toEmbed: (url: string) => string;
};
// @public (undocumented)
export const EN_TRANSLATION: TLTranslation;
// @public (undocumented)
export type EventsProviderProps = {
onEvent?: TLUiEventHandler;
children: any;
};
// @public (undocumented)
export function fetchTranslation(locale: TLTranslationLocale, assetUrls: UiAssetUrls): Promise;
// @public (undocumented)
export function findMenuItem(menu: MenuSchema, path: string[]): MenuChild;
// @public (undocumented)
function Footer({ className, children }: {
className?: string;
children: any;
}): JSX.Element;
// @public (undocumented)
export const getBaseUrl: () => string;
// @public (undocumented)
export function getTranslation(locale: TLTranslationLocale, assetUrls: UiAssetUrls): Promise;
// @public (undocumented)
function Group({ children, size, }: {
children: any;
size?: 'medium' | 'small' | 'tiny' | 'wide';
}): JSX.Element;
// @public (undocumented)
function Header({ className, children }: {
className?: string;
children: any;
}): JSX.Element;
// @public (undocumented)
export const HelpMenu: React_3.NamedExoticComponent