UNPKG

vuetify-pro-tiptap

Version:
242 lines (241 loc) 8.04 kB
import { AnyExtension, Editor, EditorContent } from '@tiptap/vue-3'; import { VuetifyTiptapOnChange } from '../type'; import { hasExtension } from '../utils/utils'; import { default as BubbleMenu } from './BubbleMenu.vue'; import { default as TipTapToolbar } from './TiptapToolbar.vue'; interface Props { modelValue?: string | object; markdownTheme?: string | false; output?: 'html' | 'json' | 'text'; dark?: boolean; dense?: boolean; outlined?: boolean; flat?: boolean; disabled?: boolean; label?: string; hideToolbar?: boolean; disableToolbar?: boolean; hideBubble?: boolean; removeDefaultWrapper?: boolean; maxWidth?: string | number; minHeight?: string | number; maxHeight?: string | number; extensions?: AnyExtension[]; editorClass?: string | string[] | Record<string, any>; errorMessages?: string | string[] | null; } declare const isFullscreen: import('vue').ComputedRef<boolean>; declare const editor: Editor; declare const t: import('vue').ComputedRef<(path: string) => string>; declare const isDark: import('vue').ComputedRef<boolean>; declare const contentDynamicClasses: import('vue').ComputedRef<(string | string[] | Record<string, any> | undefined)[]>; declare const contentDynamicStyles: import('vue').ComputedRef<{ maxWidth: string | number | undefined; width: string | undefined; margin: string | undefined; backgroundColor: string; height: string; overflowY: string; } | { maxWidth: string | number | undefined; width: string | undefined; margin: string | undefined; backgroundColor: string; minHeight: string | number | undefined; maxHeight: string | number | undefined; overflowY: string; }>; declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>; declare var __VLS_27: { editor: Editor; props: { class: string; 'data-testid': string; }; }, __VLS_33: { editor: Editor; }; type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & { editor?: (props: typeof __VLS_27) => any; } & { bottom?: (props: typeof __VLS_33) => any; }>; declare const __VLS_self: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, { modelValue: string; markdownTheme: undefined; output: string; dark: undefined; dense: boolean; outlined: boolean; flat: boolean; disabled: boolean; label: undefined; hideToolbar: boolean; disableToolbar: boolean; hideBubble: boolean; removeDefaultWrapper: boolean; maxWidth: undefined; minHeight: undefined; maxHeight: undefined; errorMessages: () => never[]; extensions: () => never[]; editorClass: undefined; }>, { hasExtension: typeof hasExtension; EditorContent: typeof EditorContent; BubbleMenu: typeof BubbleMenu; TipTapToolbar: typeof TipTapToolbar; isFullscreen: typeof isFullscreen; editor: typeof editor; t: typeof t; isDark: typeof isDark; contentDynamicClasses: typeof contentDynamicClasses; contentDynamicStyles: typeof contentDynamicStyles; }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, { enter: () => void; change: (value: VuetifyTiptapOnChange) => void; "update:modelValue": (value: string | object | undefined) => void; "update:markdownTheme": (value: string) => void; }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, { modelValue: string; markdownTheme: undefined; output: string; dark: undefined; dense: boolean; outlined: boolean; flat: boolean; disabled: boolean; label: undefined; hideToolbar: boolean; disableToolbar: boolean; hideBubble: boolean; removeDefaultWrapper: boolean; maxWidth: undefined; minHeight: undefined; maxHeight: undefined; errorMessages: () => never[]; extensions: () => never[]; editorClass: undefined; }>>> & { "onUpdate:modelValue"?: ((value: string | object | undefined) => any) | undefined; onChange?: ((value: VuetifyTiptapOnChange) => any) | undefined; onEnter?: (() => any) | undefined; "onUpdate:markdownTheme"?: ((value: string) => any) | undefined; }, { markdownTheme: string | false; extensions: AnyExtension[]; flat: boolean; disabled: boolean; disableToolbar: boolean; maxHeight: string | number; maxWidth: string | number; minHeight: string | number; outlined: boolean; modelValue: string | object; errorMessages: string | string[] | null; label: string; output: "html" | "json" | "text"; dark: boolean; dense: boolean; hideToolbar: boolean; hideBubble: boolean; removeDefaultWrapper: boolean; editorClass: string | string[] | Record<string, any>; }, {}>; declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, { modelValue: string; markdownTheme: undefined; output: string; dark: undefined; dense: boolean; outlined: boolean; flat: boolean; disabled: boolean; label: undefined; hideToolbar: boolean; disableToolbar: boolean; hideBubble: boolean; removeDefaultWrapper: boolean; maxWidth: undefined; minHeight: undefined; maxHeight: undefined; errorMessages: () => never[]; extensions: () => never[]; editorClass: undefined; }>, { editor: Editor; }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, { enter: () => void; change: (value: VuetifyTiptapOnChange) => void; "update:modelValue": (value: string | object | undefined) => void; "update:markdownTheme": (value: string) => void; }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, { modelValue: string; markdownTheme: undefined; output: string; dark: undefined; dense: boolean; outlined: boolean; flat: boolean; disabled: boolean; label: undefined; hideToolbar: boolean; disableToolbar: boolean; hideBubble: boolean; removeDefaultWrapper: boolean; maxWidth: undefined; minHeight: undefined; maxHeight: undefined; errorMessages: () => never[]; extensions: () => never[]; editorClass: undefined; }>>> & { "onUpdate:modelValue"?: ((value: string | object | undefined) => any) | undefined; onChange?: ((value: VuetifyTiptapOnChange) => any) | undefined; onEnter?: (() => any) | undefined; "onUpdate:markdownTheme"?: ((value: string) => any) | undefined; }, { markdownTheme: string | false; extensions: AnyExtension[]; flat: boolean; disabled: boolean; disableToolbar: boolean; maxHeight: string | number; maxWidth: string | number; minHeight: string | number; outlined: boolean; modelValue: string | object; errorMessages: string | string[] | null; label: string; output: "html" | "json" | "text"; dark: boolean; dense: boolean; hideToolbar: boolean; hideBubble: boolean; removeDefaultWrapper: boolean; editorClass: string | string[] | Record<string, any>; }, {}>; declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>; export default _default; type __VLS_WithDefaults<P, D> = { [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & { default: D[K]; }> : P[K]; }; type __VLS_NonUndefinedable<T> = T extends undefined ? never : T; type __VLS_TypePropsToOption<T> = { [K in keyof T]-?: {} extends Pick<T, K> ? { type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>; } : { type: import('vue').PropType<T[K]>; required: true; }; }; type __VLS_WithSlots<T, S> = T & { new (): { $slots: S; }; }; type __VLS_PrettifyLocal<T> = { [K in keyof T]: T[K]; } & {};