import { Editor, Extension } from '@tiptap/core'; /** Layout attrs shared by node options, live DOM, and export HTML. */ type StyleLayoutOptions = { width?: number | string | null; height?: number | string | null; float?: string | null; clear?: string | null; margin?: string | null; display?: string | null; justifyContent?: string | null; }; interface NodeOptions$1 { HTMLAttributes: Record; } interface AudioOptions extends StyleLayoutOptions, NodeOptions$1 { inline?: boolean; controls?: boolean; autoplay?: boolean; loop?: boolean; muted?: boolean; preload?: 'none' | 'metadata' | 'auto'; src: string | null; } type SetAudioOptions = { src: string; controls?: boolean; autoplay?: boolean; loop?: boolean; muted?: boolean; preload?: 'none' | 'metadata' | 'auto'; } & StyleLayoutOptions; interface ImageLayoutOptions { width?: number | null; height?: number | null; margin?: string; clear?: string; float?: string | null; display?: string; } interface ImageNodeOptions { HTMLAttributes: Record; } interface ImageOptions extends ImageLayoutOptions, ImageNodeOptions { allowBase64: boolean; /** Render as inline element instead of block */ inline: boolean; } type SetImageOptions = { src: string; alt?: string; title?: string; /** Caption rendered under the image (markdown export drops it — documented lossy contract) */ caption?: string; } & ImageLayoutOptions; interface UpdateImageDimensionsParams { keyId: string; width?: number | null; height?: number | null; } interface EmbedNodeOptions { inline: boolean; addPasteHandler: boolean; HTMLAttributes: Record; } interface FullscreenIframeKitOptions { allow: string; frameborder: number; allowfullscreen: boolean; } interface LoomEmbedKitOptions { autoplay: 0 | 1; muted: 0 | 1; hideOwner: boolean; hideShare: boolean; hideTitle: boolean; hideEmbedTopBar: boolean; allow: string; frameborder: number; allowfullscreen: boolean; scrolling: string; } interface LoomOptions extends StyleLayoutOptions, EmbedNodeOptions, LoomEmbedKitOptions { } type SetLoomOptions = { src: string; } & StyleLayoutOptions & Partial; /** SoundCloud HTML5 widget params — [widget docs](https://developers.soundcloud.com/docs/api/html5-widget). */ interface SoundCloudPlayerKitOptions { auto_play: boolean; hide_related: boolean; show_comments: boolean; show_user: boolean; show_reposts: boolean; visual: boolean; color?: string; buying: boolean; sharing: boolean; download: boolean; show_artwork: boolean; show_playcount: boolean; start_track?: number; single_active: boolean; scrolling: string; frameborder: string; allow: string; } interface SoundCloudOptions extends StyleLayoutOptions, EmbedNodeOptions, SoundCloudPlayerKitOptions { } type SetSoundCloudOptions = { src: string; } & StyleLayoutOptions & Partial; /** Embeddable Spotify entities — the `{type}` segment of an `open.spotify.com` URL. */ type SpotifyEntityType = 'track' | 'album' | 'playlist' | 'artist' | 'show' | 'episode'; declare const SPOTIFY_ENTITY_TYPES: readonly ["track", "album", "playlist", "artist", "show", "episode"]; /** Spotify's two embed themes — `0` dark (default), `1` light. No other values exist. */ type SpotifyTheme = 0 | 1; /** * Resolve a Spotify share URL or `spotify:` URI to its `{ type, id }`, or null. * Accepts `open.spotify.com/{type}/{id}`, localized `intl-xx`, already-`embed` * paths, and `spotify:type:id` URIs; rejects every other host (exact match). */ declare const parseSpotifyEntity: (input: string) => { type: SpotifyEntityType; id: string; } | null; interface SpotifyEmbedKitOptions extends FullscreenIframeKitOptions { /** `0` dark / `1` light. Unset uses Spotify's default (dark). */ theme?: SpotifyTheme; } interface SpotifyOptions extends StyleLayoutOptions, EmbedNodeOptions, SpotifyEmbedKitOptions { } type SetSpotifyOptions = { src: string; } & StyleLayoutOptions & Partial; interface NodeOptions { HTMLAttributes: Record; } interface VideoOptions extends StyleLayoutOptions, NodeOptions { inline?: boolean; controls?: boolean; autoplay?: boolean; loop?: boolean; muted?: boolean; poster?: string | null; preload?: 'none' | 'metadata' | 'auto'; src: string | null; } type SetVideoOptions = { src: string; controls?: boolean; autoplay?: boolean; loop?: boolean; muted?: boolean; poster?: string | null; preload?: 'none' | 'metadata' | 'auto'; } & StyleLayoutOptions; /** Kit defaults and node attrs merged into Vimeo player iframe query params. */ type VimeoBylinePortrait = boolean | 'site-default'; type VimeoQuality = '240p' | '360p' | '540p' | '720p' | '1080p' | '2k' | '4k' | 'auto'; interface VimeoPlayerKitOptions { autopause: boolean; autoplay: boolean; background: boolean; byline: VimeoBylinePortrait; color?: string; controls: boolean; dnt: boolean; keyboard: boolean; loop: boolean; muted: boolean; pip: boolean; playsinline: boolean; portrait: VimeoBylinePortrait; quality: VimeoQuality; speed: boolean; texttrack?: string | false; title: boolean; transparent: boolean; endTime?: number; allow: string; frameborder: number; allowfullscreen: boolean; } interface VimeoOptions extends StyleLayoutOptions, EmbedNodeOptions, VimeoPlayerKitOptions { } type SetVimeoOptions = { src: string; start?: number; } & StyleLayoutOptions & Partial; type XEmbedSizeId = 'compact' | 'standard' | 'wide'; type XEmbedTheme = 'light' | 'dark'; declare const X_EMBED_DEFAULT_MAXWIDTH = 400; declare const X_EMBED_SIZE_OPTIONS: ReadonlyArray<{ id: XEmbedSizeId; label: string; maxwidth: number; }>; declare const X_EMBED_THEME_OPTIONS: ReadonlyArray<{ id: XEmbedTheme; label: string; }>; declare const resolveXEmbedSizeId: (maxwidth: number | null | undefined) => XEmbedSizeId; interface XOEmbedKitOptions { theme: XEmbedTheme; lang: string; dnt: boolean; hide_media: boolean; hide_thread: boolean; } declare const buildXOEmbedParams: (attrs: Record, options: XOEmbedKitOptions) => Record; interface XOptions extends StyleLayoutOptions, EmbedNodeOptions, XOEmbedKitOptions { } type AddXOptions = { src: string; maxwidth?: number; theme?: XEmbedTheme; lang?: string; hide_media?: boolean; hide_thread?: boolean; } & StyleLayoutOptions; /** Kit defaults and node attrs merged into official YouTube iframe query params. */ type YoutubeEmbedColor = 'red' | 'white'; type YoutubeListType = 'playlist' | 'user_uploads'; interface YoutubePlayerKitOptions { autoplay: 0 | 1; ccLanguage?: string; ccLoadPolicy?: 0 | 1; color?: YoutubeEmbedColor; controls: 0 | 1; disableKBcontrols: 0 | 1; enableIFrameApi: 0 | 1; endTime?: number; fs: 0 | 1; interfaceLanguage?: string; ivLoadPolicy: 1 | 3; loop: 0 | 1; modestbranding: 0 | 1; nocookie: boolean; origin?: string; playlist?: string; playsinline: 0 | 1; rel: 0 | 1; list?: string; listType?: YoutubeListType; allow: string; frameborder: number; allowfullscreen: boolean; } declare const parseYoutubeVideoId: (url: string) => string | null; interface YoutubeOptions extends StyleLayoutOptions, EmbedNodeOptions, YoutubePlayerKitOptions { } type SetYoutubeVideoOptions = { src: string; start?: number; } & StyleLayoutOptions & Partial; /** Every public command the media nodes contribute, in one place. */ interface MediaPublicCommands { /** Insert an image node; mints a fresh `keyId` per insert. */ setImage: (options: SetImageOptions) => ReturnType; /** Set the `width` / `height` attributes of an existing image by `keyId`. */ updateImageDimensions: (options: UpdateImageDimensionsParams) => ReturnType; /** Insert a `