UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

27 lines (26 loc) 1.27 kB
import { ValueSyncStore } from '../../../../util/events/sync-store'; import type { UiLifeCycles } from '../../../web/types'; import type { PeritextEventDetailMap } from '../../../events/types'; import type { PeritextSurfaceState } from '../../../web'; import type { MenuItem } from '../types'; import type { ToolbarPluginOpts } from '../ToolbarPlugin'; export declare class ToolbarState implements UiLifeCycles { readonly surface: PeritextSurfaceState; readonly opts: ToolbarPluginOpts; lastEvent: PeritextEventDetailMap['change']['ev'] | undefined; lastEventTs: number; readonly showInlineToolbar: ValueSyncStore<[show: boolean, time: number]>; constructor(surface: PeritextSurfaceState, opts: ToolbarPluginOpts); /** ------------------------------------------- {@link UiLifeCycles} */ start(): () => void; private setLastEv; private doShowInlineToolbar; readonly getFormattingMenu: () => MenuItem; readonly annotationsMenu: () => MenuItem; readonly modifyMenu: () => MenuItem; readonly copyAsMenu: (type: "copy" | "cut") => MenuItem; readonly pasteAsMenu: () => MenuItem; readonly clipboardMenu: () => MenuItem; readonly getCaretMenu: () => MenuItem; readonly getSelectionMenu: () => MenuItem; }