import type { VNode } from 'vue'; import type { AppConfig } from '@nuxt/schema'; import type { Editor } from '@tiptap/vue-3'; import type { BubbleMenuPluginProps } from '@tiptap/extension-bubble-menu'; import type { FloatingMenuPluginProps } from '@tiptap/extension-floating-menu'; import theme from '#build/b24ui/editor-toolbar'; import type { ButtonProps, DropdownMenuProps, DropdownMenuItem, TooltipProps, LinkPropsKeys } from '../types'; import type { EditorItem, EditorCustomHandlers } from '../types/editor'; import type { ArrayOrNested, DynamicSlots, MergeTypes, NestedItem } from '../types/utils'; import type { ComponentConfig } from '../types/tv'; type EditorToolbar = ComponentConfig; type ButtonItem = Omit & { 'slot'?: string; 'tooltip'?: TooltipProps; 'aria-label'?: string; }; type EditorToolbarButtonItem = Omit & EditorItem; type EditorToolbarDropdownChildItem = DropdownMenuItem | (Omit & EditorItem); type EditorToolbarDropdownItem = ButtonItem & DropdownMenuProps>>; export type EditorToolbarItem = ButtonItem | EditorToolbarButtonItem | EditorToolbarDropdownItem; type EditorToolbarBaseProps = ArrayOrNested> = { /** * The element or component this component should render as. * @defaultValue 'div' */ as?: any; /** * The color of the toolbar controls. * @defaultValue 'air-tertiary-no-accent' */ color?: ButtonProps['color']; /** * The color of the active toolbar control. * @defaultValue 'air-tertiary-accent' */ activeColor?: ButtonProps['color']; /** * The size of the toolbar controls. * @defaultValue 'sm' */ size?: ButtonProps['size']; items?: T; editor: Editor; class?: any; b24ui?: EditorToolbar['slots']; }; export type EditorToolbarProps = ArrayOrNested> = (EditorToolbarBaseProps & { layout?: 'fixed'; }) | (EditorToolbarBaseProps & Partial> & { layout?: 'bubble'; }) | (EditorToolbarBaseProps & Partial> & { layout?: 'floating'; }); type SlotPropsProps = { index: number; isActive: (item: EditorToolbarItem) => boolean; isDisabled: (item: EditorToolbarItem) => boolean; onClick: (e: MouseEvent, item: EditorToolbarItem) => void; }; type SlotProps = (props: { item: T; } & SlotPropsProps) => VNode[]; export type EditorToolbarSlots = ArrayOrNested, T extends NestedItem = NestedItem> = { item?: SlotProps; } & DynamicSlots, undefined, SlotPropsProps>; declare const _default: typeof __VLS_export; export default _default; declare const __VLS_export: >(__VLS_props: NonNullable>["props"], __VLS_ctx?: __VLS_PrettifyLocal>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable>["expose"], __VLS_setup?: Promise<{ props: import("vue").PublicProps & __VLS_PrettifyLocal> & (typeof globalThis extends { __VLS_PROPS_FALLBACK: infer P; } ? P : {}); expose: (exposed: {}) => void; attrs: any; slots: EditorToolbarSlots>; emit: {}; }>) => import("vue").VNode & { __ctx?: Awaited; }; type __VLS_PrettifyLocal = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};