@bitrix24/b24ui-nuxt
Version:
Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE
61 lines (60 loc) • 2.42 kB
TypeScript
import type { AppConfig } from '@nuxt/schema';
import type { Editor, JSONContent } from '@tiptap/vue-3';
import type { DragHandleProps } from '@tiptap/extension-drag-handle-vue-3';
import theme from '#build/b24ui/editor-drag-handle';
import type { ButtonProps, IconComponent, LinkPropsKeys } from '../types';
import type { FloatingUIOptions } from '../types/editor';
import type { ComponentConfig } from '../types/tv';
type EditorDragHandle = ComponentConfig<typeof theme, AppConfig, 'editorDragHandle'>;
export interface EditorDragHandleProps extends Omit<DragHandleProps, 'editor' | 'element' | 'onNodeChange' | 'computePositionConfig' | 'class'>, Omit<ButtonProps, LinkPropsKeys | 'icon' | 'color'> {
/**
* @defaultValue icons.drag
* @IconComponent
*/
icon?: IconComponent;
/**
* @defaultValue 'air-tertiary-no-accent'
*/
color?: ButtonProps['color'];
/**
* The options for positioning the drag handle. Those are passed to Floating UI and include options for the placement, offset, flip, shift, size, autoPlacement, hide, and inline middleware.
* @defaultValue { strategy: 'absolute', placement: 'left-start' }
* @see https://floating-ui.com/docs/computePosition#options
*/
options?: FloatingUIOptions;
editor: Editor;
b24ui?: EditorDragHandle['slots'] & ButtonProps['b24ui'];
}
export interface EditorDragHandleSlots {
default(props: {
b24ui: EditorDragHandle['b24ui'];
onClick: () => {
node: JSONContent;
pos: number;
} | undefined;
}): any;
}
export interface EditorDragHandleEmits {
nodeChange: [{
node: JSONContent;
pos: number;
}];
}
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<EditorDragHandleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
nodeChange: (args_0: {
node: JSONContent;
pos: number;
}) => any;
}, string, import("vue").PublicProps, Readonly<EditorDragHandleProps> & Readonly<{
onNodeChange?: ((args_0: {
node: JSONContent;
pos: number;
}) => any) | undefined;
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, EditorDragHandleSlots>;
declare const _default: typeof __VLS_export;
export default _default;
type __VLS_WithSlots<T, S> = T & {
new (): {
$slots: S;
};
};