UNPKG

claritykit-svelte

Version:

A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility

46 lines 1.33 kB
import { Extension } from '@tiptap/core'; export interface SlashCommand { id: string; title: string; description: string; icon: string; keywords: string[]; command: (props: { editor: any; range: any; props: any; }) => void; category?: 'media' | 'interaction' | 'utility' | 'formatting'; enabled?: boolean; } export interface SlashCommandsOptions { suggestion: { items: (props: { query: string; }) => SlashCommand[]; render: () => { onStart: (props: any) => void; onUpdate: (props: any) => void; onKeyDown: (props: any) => boolean; onExit: () => void; }; char: string; allowSpaces: boolean; startOfLine: boolean; }; commands: SlashCommand[]; } declare module '@tiptap/core' { interface Commands<ReturnType> { slashCommands: { /** * Execute a slash command */ executeSlashCommand: (commandId: string, props?: any) => ReturnType; }; } } export declare const SlashCommandsExtension: Extension<SlashCommandsOptions, any>; export declare const defaultSlashCommands: SlashCommand[]; export default SlashCommandsExtension; //# sourceMappingURL=SlashCommandsExtension.d.ts.map