import { ActionIconProps } from '@mantine/core';
import { AlertProps } from '@mantine/core';
import { BadgeProps } from '@mantine/core';
import { BoxProps } from '@mantine/core';
import { ButtonProps } from '@mantine/core';
import { CodeProps } from '@mantine/core';
import { Command } from '@codemirror/view';
import { ComponentType } from 'react';
import { default as default_2 } from 'github-slugger';
import { EditorSelection } from '@codemirror/state';
import { EditorState } from '@codemirror/state';
import { EditorView } from '@codemirror/view';
import { ElementProps } from '@mantine/core';
import { Extension } from '@codemirror/state';
import { FC } from 'react';
import { GroupProps } from '@mantine/core';
import { Highlighter } from '@lezer/highlight';
import { HighlightStyle } from '@codemirror/language';
import { HTMLAttributes } from 'react';
import { ImageProps } from '@mantine/core';
import { KeyBinding } from '@codemirror/view';
import { Language as Language_2 } from '@codemirror/language';
import { MantineColor } from '@mantine/core';
import { MantineColorScheme } from '@mantine/core';
import { MantineFontSize } from '@mantine/core';
import { MantineSize } from '@mantine/core';
import { MantineThemeOverride } from '@mantine/core';
import { PaperProps } from '@mantine/core';
import { PropsWithChildren } from 'react';
import { ReactElement } from 'react';
import { ReactNode } from 'react';
import { RefObject } from 'react';
import { SelectProps } from '@mantine/core';
import { StateEffectType } from '@codemirror/state';
import { StateField } from '@codemirror/state';
import { SyntaxNode } from '@lezer/common';
import { TabsListProps } from '@mantine/core';
import { TabsProps as TabsProps_2 } from '@mantine/core';
import { TabsTabProps } from '@mantine/core';
import { TextProps } from '@mantine/core';
import { TitleOrder } from '@mantine/core';
import { TitleProps } from '@mantine/core';
import { Tree } from '@lezer/common';
import { VideoHTMLAttributes } from 'react';

/**
 * A keybind used to accept a completion
 */
export declare const acceptWithTab: KeyBinding;

/**
 * Add cursor above the current line
 */
export declare const addCursorAbove: Command;

/**
 * Add cursor below the current line
 */
export declare const addCursorBelow: Command;

/**
 * A keymap used to add a cursor below and above the current position
 */
export declare const addCursorVerticallyKeymap: readonly KeyBinding[];

declare type AnyFn = (...rest: any[]) => any;

/**
 * Apply automatic folding to objects/arrays at the specified depth level
 * @param view - CodeMirror editor view
 * @param autoCollapseDepth - Depth level to start folding (0 = disabled)
 */
export declare function applyAutoFolding(view: EditorView, autoCollapseDepth: number): void;

export declare interface BooleanHandle {
    open: () => void;
    close: () => void;
    toggle: () => void;
    set: React.Dispatch<React.SetStateAction<boolean>>;
}

export declare const brandAgno: string;

export declare const brandAirbyte: string;

export declare const brandAmazonBedrock: string;

export declare const brandApple: string;

export declare const brandAppleRetro: string;

export declare const brandAspire: string;

export declare const brandAstro: string;

export declare const brandAWS: string;

export declare const brandBluesky: string;

export declare const brandC: string;

export declare const brandCalamu: string;

export declare const brandCamelAI: string;

export declare const brandCrewAI: string;

export declare const brandCursor: string;

export declare const brandDagster: string;

export declare const brandDeepEval: string;

export declare const brandDevTo: string;

export declare const brandDigitalKin: string;

export declare const brandDiscord: string;

export declare const brandDocker: string;

export declare const brandDotNet: string;

export declare const brandDynamiq: string;

export declare const brandFeast: string;

export declare const brandFivetran: string;

export declare const brandFountain: string;

export declare const brandGameScript: string;

export declare const brandGemini: string;

export declare const brandGithub: string;

export declare const brandGo: string;

export declare const brandGoogleAgent: string;

export declare const brandGoogleCloud: string;

export declare const brandHuggingFace: string;

export declare const brandInstagram: string;

export declare const brandJava: string;

export declare const brandJavaScript: string;

export declare const brandKubernetes: string;

export declare const brandLangchain: string;

export declare const brandLinkedin: string;

export declare const brandLinux: string;

export declare const brandLiveSponsors: string;

export declare const brandLlamaIndex: string;

export declare const brandMedium: string;

export declare const brandMicrosoftAzure: string;

export declare const brandMistral: string;

export declare const brandN8N: string;

export declare const brandNetlify: string;

export declare const brandNodeJs: string;

export declare const brandOllama: string;

export declare const brandOpenAi: string;

export declare const brandPermitIO: string;

export declare const brandPHP: string;

export declare const brandPolyAI: string;

export declare const brandPython: string;

export declare const brandReact: string;

export declare const brandReddit: string;

export declare const brandRuby: string;

export declare const brandRust: string;

export declare const brandSamsung: string;

export declare const brandSiteForge: string;

export declare const brandSmolAgents: string;

export declare const brandSolidJS: string;

export declare const brandStackOverflow: string;

export declare const brandStripe: string;

export declare const brandSurrealDB: string;

export declare const brandSwift: string;

export declare const brandTencent: string;

export declare const brandThreads: string;

export declare const brandTogetherAI: string;

export declare const brandTypescript: string;

export declare const brandVercel: string;

export declare const brandVerizon: string;

export declare const brandVSCode: string;

export declare const brandWebAssembly: string;

export declare const brandWindows: string;

export declare const brandX: string;

export declare const brandYaacomm: string;

export declare const brandYouTube: string;

export declare const BreadcrumbButton: FC<ButtonProps & ElementProps<"button">>;

/**
 * GitHub-flavoured markdown alert kinds (`> [!kind]`, see GitHub docs).
 * Other spellings in source are normalised onto this set.
 */
declare type CalloutKind = "note" | "tip" | "important" | "warning" | "caution";

export declare const CDN_ID_PATTERN: RegExp;

export declare const CDN_URL_PATTERN: RegExp;

export declare function Check({ children, ...props }: CheckProps): ReactNode;

export declare interface CheckProps extends GroupProps {
    children?: ReactNode;
}

declare interface ChoiceNode {
    type: "Choice";
    default?: number;
    children: RailroadNode[];
}

export declare function clsx(...args: unknown[]): string;

/**
 * Enhanced code block component with copy button, title, and highlight regions
 */
export declare const CodeBlock: FC<CodeBlockProps>;

export declare interface CodeBlockProps extends Omit<PaperProps, "children" | "styles"> {
    title?: string;
    value: string;
    lang?: string;
    colorScheme?: MantineColorScheme;
    copyCodeProps?: ActionIconProps;
    withLineNumbers?: boolean;
}

export declare const CodeEditor: FC<CodeEditorProps>;

export declare interface CodeEditorProps extends BoxProps {
    controller: EditorController;
    autoFocus?: boolean;
    innerProps?: BoxProps;
    withPadding?: boolean;
    ref?: RefObject<EditorView>;
}

/** React component keyed by lower-cased fenced-code info string. */
export declare type CodeRenderer = ComponentType<CodeRendererProps>;

/** Props for a custom fenced-code-block renderer (inactive block / viewer). */
export declare interface CodeRendererProps {
    /** The code body verbatim (CodeText slice, fences excluded). */
    code: string;
    /** The (lower-cased) info string from the opening fence, e.g. `mermaid`. */
    language: string;
}

export declare type ColorScheme = keyof ThemeConfig;

declare type ColorScheme_2 = keyof ThemeConfig_2;

declare type CommandAction = (view: EditorView, range: SlashCommandRange) => void;

declare interface CommentNode {
    type: "Comment";
    text: string;
}

/**
 * Common extensions applied to all CodeMirror editors
 */
export declare const commonExtensions: () => Extension;

export declare function ConfirmationProvider({ enterConfirms, children, }: PropsWithChildren<ConfirmationProviderProps>): ReactNode;

export declare interface ConfirmationProviderProps {
    enterConfirms?: boolean;
}

export declare interface ConfirmOptions<T> {
    title?: DynamicNode<T>;
    message: DynamicNode<T>;
    skippable?: boolean;
    dismissText?: DynamicNode<T>;
    dismissProps?: ButtonProps;
    confirmText?: DynamicNode<T>;
    confirmProps?: ButtonProps;
    verification?: string;
    verifyText?: ReactNode;
    onDismiss?: () => void;
    onConfirm: (value: T) => void;
}

/**
 * Get a cached style highlighter for the given color scheme
 */
export declare function createHighlighter(colorScheme: MantineColorScheme): Highlighter;

/**
 * Create a new serialized editor state from a document string.
 *
 * @param doc The document string to create a serialized state from
 * @returns The serialized state
 */
export declare function createSerializedState(doc: string): EditorStateSnapshot;

/**
 * Create a style highlighter for the given color scheme and syntax theme
 */
export declare function createStyleHighlighter(theme: ThemeConfig_2, colorScheme: ColorScheme_2): Highlighter;

/**
 * A custom variant of the history keymap that uses
 * the Mod key instead of the Ctrl key
 */
export declare const customHistoryKeymap: readonly KeyBinding[];

/** Default fenced-code renderers keyed by lower-cased info string (e.g. `mermaid`). */
export declare const DEFAULT_CODE_RENDERERS: Record<string, CodeRenderer>;

/** Default JSX components for `<PascalCase />` tags in markdown (e.g. `<Since />`, `<Tabs>`). */
export declare const DEFAULT_COMPONENTS: MarkdownComponents;

/** Default mode used when no mode is provided. */
export declare const DEFAULT_MARKDOWN_MODE: MarkdownEditMode;

/**
 * Built-in slash commands for the Markdown editor. Consumers can override or
 * extend this set via the `commands` prop on `MarkdownEditor`.
 */
export declare const DEFAULT_SLASH_COMMANDS: readonly SlashCommand[];

export declare type DefaultSort = {
    [key: string]: unknown;
};

/**
 * Details component for collapsible content sections
 * Styled with obsidian border and surreal purple/pink accents
 */
export declare const Details: FC<DetailsProps> & {
    Summary: FC<SummaryProps>;
};

export declare interface DetailsProps extends Omit<BoxProps, "component" | "children"> {
    children: ReactNode;
}

export declare interface DiagramNode {
    type: "Diagram";
    padding?: [number, number, number, number];
    children: RailroadNode[];
}

declare type DynamicNode<T> = ReactNode | ((value: T) => ReactNode);

export declare interface EditorController {
    ref: RefObject<HTMLDivElement | null>;
    mounted: boolean;
    getEditor: () => EditorView;
    restoreState: (snapshot: EditorStateSnapshot) => void;
}

/**
 * Extensions applicable to all full editors
 */
export declare const editorExtensions: () => Extension;

export declare interface EditorOptions {
    fields?: StateFields;
    theme?: ThemeConfig;
    document?: string;
    state?: EditorStateSnapshot;
    readOnly?: boolean;
    extensions?: Extension;
    language?: Language;
    lineNumbers?: boolean;
    onMounted?: (editor: EditorView) => void;
    onChangeDocument?: (document: string) => void;
    onChangeSelection?: (selection: EditorSelection) => void;
    onChangeState?: (snapshot: EditorStateSnapshot) => void;
}

export declare type EditorStateSnapshot = Record<string, unknown>;

/**
 * Use a specific syntax theme with the given color scheme
 */
export declare function editorTheme(theme: ThemeConfig_2, colorScheme: MantineColorScheme): Extension;

export declare function extractCdnId(query: string): string | undefined;

export declare interface ExtractedCode {
    test?: string;
    code: string;
}

/**
 * Extract headings from a Lezer markdown tree (SSR-safe).
 * Walks the full tree and collects plain inline text (no markdown delimiters).
 */
export declare function extractHeadings(tree: Tree, source: MarkdownSource, opts?: ExtractHeadingsOptions): Heading[];

export declare interface ExtractHeadingsOptions {
    /** Heading depths to include. Default: `[2, 3]`. */
    depths?: ReadonlyArray<1 | 2 | 3 | 4 | 5 | 6>;
}

/**
 * Extract test code from block comments at the start.
 * Pattern: block comment (slash-star-star ... star-slash) followed by code
 */
export declare function extractTest(input: string): ExtractedCode;

/** Case-insensitive filter over command titles and keywords. */
export declare function filterSlashCommands(commands: readonly SlashCommand[], query: string): SlashCommand[];

/**
 * Generate a 24-character hex string suitable for use as a
 * stable block identifier. Uses `crypto.getRandomValues` for
 * collision resistance.
 */
export declare function generateRandomId(): string;

export declare function getCDNImageURL(imageId: string | undefined, width?: number, quality?: number): string | undefined;

export declare function getCDNVideoURL(videoId: string | undefined, format?: "mp4" | "webm" | "mov", controls?: boolean): string | undefined;

/** Read whether the markdown editor has completed its initial paint. */
export declare function getMarkdownEditorReady(state: EditorState): boolean;

/**
 * Read the current markdown mode from an {@link EditorState}.
 */
export declare function getMarkdownMode(state: EditorState): MarkdownEditMode;

/** A document heading with slug id, plain text, and depth. */
declare interface Heading {
    id: string;
    text: string;
    depth: 1 | 2 | 3 | 4 | 5 | 6;
}

/** Source range of `{#custom-id}` suffix when present. */
export declare function headingCustomIdSuffixRange(node: SyntaxNode, source: MarkdownSource): {
    from: number;
    to: number;
} | undefined;

/** Heading title source bounds (after `HeaderMark`, trailing newlines and `{#id}` trimmed). */
export declare interface HeadingTitleBounds {
    titleFrom: number;
    /** End of title line, excluding trailing newlines. */
    titleTo: number;
    /** End of visible title (excludes `{#id}` suffix when present). */
    visibleTo: number;
    /** Custom id from `{#id}` suffix when present. */
    customId?: string;
}

export declare function headingTitleBounds(node: SyntaxNode, source: MarkdownSource): HeadingTitleBounds;

export declare const Highlighting: FC<HighlightingProps>;

export declare interface HighlightingProps extends BoxProps {
    value: string;
    language: string;
    colorScheme?: MantineColorScheme;
    highlightRegions?: HighlightRegion[];
    withLineNumbers?: boolean;
}

export declare interface HighlightRegion {
    start: number;
    end: number;
}

export declare function HoverGlow({ className, ...props }: HoverGlowProps): ReactNode;

export declare type HoverGlowProps = PropsWithChildren<BoxProps>;

export declare const Icon: FC<IconProps>;

export declare const iconAccount: string;

export declare const iconAccountPlus: string;

export declare const iconAccountSecure: string;

export declare const iconAlert: string;

export declare const iconAPI: string;

export declare const iconArrowDown: string;

export declare const iconArrowDownFat: string;

export declare const iconArrowEnter: string;

export declare const iconArrowLeft: string;

export declare const iconArrowLeftFat: string;

export declare const iconArrowRight: string;

export declare const iconArrowUp: string;

export declare const iconArrowUpRight: string;

export declare const iconAtom: string;

export declare const iconAuth: string;

export declare const iconAuthKeyhole: string;

export declare const iconAutoFix: string;

export declare const iconBalance: string;

export declare const iconBook: string;

export declare const iconBookmark: string;

export declare const iconBraces: string;

export declare const iconBrandBluesky: string;

export declare const iconBrandDev: string;

export declare const iconBrandDiscord: string;

export declare const iconBrandGitHub: string;

export declare const iconBrandInstagram: string;

export declare const iconBrandLinkedin: string;

export declare const iconBrandMedium: string;

export declare const iconBrandReddit: string;

export declare const iconBrandStackOverflow: string;

export declare const iconBrandX: string;

export declare const iconBrandYouTube: string;

export declare const iconBroadcastOff: string;

export declare const iconBroadcastOn: string;

export declare const iconBug: string;

export declare const iconBullhorn: string;

export declare const iconBusiness: string;

export declare const iconCalculator: string;

export declare const iconCancel: string;

export declare const iconChart: string;

export declare const iconChat: string;

export declare const iconChatGPT: string;

export declare const iconCheck: string;

export declare const iconCheckCircle: string;

export declare const iconChevronDown: string;

export declare const iconChevronLeft: string;

export declare const iconChevronRight: string;

export declare const iconChevronUp: string;

export declare const iconChevronY: string;

export declare const iconCircle: string;

export declare const iconCircleFilled: string;

export declare const iconClaude: string;

export declare const iconClock: string;

export declare const iconClose: string;

export declare const iconCloud: string;

export declare const iconCloudClock: string;

export declare const iconCog: string;

export declare const iconCombined: string;

export declare const iconCommand: string;

export declare const iconComment: string;

export declare const iconCommunity: string;

export declare const iconConsole: string;

export declare const iconCopy: string;

export declare const iconCreditCard: string;

export declare const iconCursor: string;

export declare const iconDatabase: string;

export declare const iconDatabaseSecure: string;

export declare const iconDataTable: string;

export declare const iconDelete: string;

export declare const iconDesigner: string;

export declare const iconDiscord: string;

export declare const iconDistributedStorage: string;

export declare const iconDollar: string;

export declare const iconDotsVertical: string;

export declare const iconDownload: string;

export declare const iconDrag: string;

export declare const iconEdit: string;

export declare const iconEmail: string;

export declare const iconErrorCircle: string;

export declare const iconExitToAp: string;

export declare const iconExplorer: string;

export declare const iconEye: string;

export declare const iconEyeOff: string;

export declare const iconFile: string;

export declare const iconFilter: string;

export declare const iconFlag: string;

export declare const iconFloppy: string;

export declare const iconFolderPlus: string;

export declare const iconFolderSecure: string;

export declare const iconFullscreen: string;

export declare const iconFunction: string;

export declare const iconGraphql: string;

export declare const iconGrid: string;

export declare const iconHammer: string;

export declare const iconHeart: string;

export declare const iconHelp: string;

export declare const iconHistory: string;

export declare const iconHome: string;

export declare const iconHomePlus: string;

export declare const iconImage: string;

export declare const iconInbox: string;

export declare const iconIndex: string;

export declare const iconInfo: string;

export declare const iconIntegration: string;

export declare const iconJSON: string;

export declare const iconKey: string;

export declare const iconKeyboardControl: string;

export declare const iconKeyboardOption: string;

export declare const iconKeyboardShift: string;

export declare const iconList: string;

export declare const iconLive: string;

export declare const iconMagnifyMinus: string;

export declare const iconMagnifyPlus: string;

export declare const iconMarker: string;

export declare const iconMaximize: string;

export declare const iconMCP: string;

export declare const iconMemory: string;

export declare const iconMinimize: string;

export declare const iconMinus: string;

export declare const iconModel: string;

export declare const iconModuleML: string;

export declare const iconMoon: string;

export declare const iconMute: string;

export declare const iconNamespace: string;

export declare const iconNewspaper: string;

export declare const iconOffice: string;

export declare const iconOpen: string;

export declare const iconOpenFolder: string;

export declare const iconOrganization: string;

export declare const iconPackageClosed: string;

export declare const iconPaperclip: string;

export declare const iconPause: string;

export declare const iconPin: string;

export declare const iconPinOff: string;

export declare const iconPlay: string;

export declare const iconPlugin: string;

export declare const iconPlus: string;

export declare const iconPower: string;

export declare const iconProgressClock: string;

export declare interface IconProps extends BoxProps, Omit<HTMLAttributes<SVGElement>, "style"> {
    size?: MantineFontSize | number;
    color?: MantineColor;
    spin?: boolean;
    path: string;
    flip?: "horizontal" | "vertical" | "both";
}

export declare const iconQuery: string;

export declare const iconReferral: string;

export declare const iconRefresh: string;

export declare const iconRelation: string;

export declare const iconRelationIn: string;

export declare const iconRelationOut: string;

export declare const iconReset: string;

export declare const iconRestore: string;

export declare const iconRoutes: string;

export declare const iconSandbox: string;

export declare const iconSearch: string;

export declare const iconSend: string;

export declare const iconServer: string;

export declare const iconServerSecure: string;

export declare const iconSidebar: string;

export declare const iconSidekick: string;

export declare const iconSpectron: string;

export declare const iconStar: string;

export declare const iconStarPlus: string;

export declare const iconStop: string;

export declare const iconSun: string;

export declare const iconSurreal: string;

export declare const iconSurrealism: string;

export declare const iconSurrealist: string;

export declare const iconTable: string;

export declare const iconTag: string;

export declare const iconTarget: string;

export declare const iconText: string;

export declare const iconTextBox: string;

export declare const iconTextBoxMinus: string;

export declare const iconTextBoxPlus: string;

export declare const iconTransfer: string;

export declare const iconTrash: string;

export declare const iconTrend: string;

export declare const iconTune: string;

export declare const iconUniversity: string;

export declare const iconUnmute: string;

export declare const iconUpload: string;

export declare const iconVariable: string;

export declare const iconVideo: string;

export declare const iconViewGrid: string;

export declare const iconViewList: string;

export declare const iconWarning: string;

export declare const iconWrench: string;

export declare const iconXml: string;

/** Any object intersected with a stable string `id`. */
export declare type Identified<T = object, I = string> = T & {
    id: I;
};

/** Normalised image descriptor for viewer renderers and `onImage` callbacks. */
export declare interface ImageDescriptor {
    src: string;
    alt?: string;
    title?: string;
    darkSrc?: string;
}

/**
 * Build a `run` that inserts a callout of the given kind.
 */
export declare function insertCallout(kind: CalloutKind): CommandAction;

/**
 * Build a `run` that inserts the given markdown and positions the caret at the end of the inserted text,
 * or at the given offset.
 */
export declare function insertMarkdown(insert: string, caretOffset?: number): CommandAction;

export declare function isCDNId(query: string): boolean;

/** True when the registered component declares `block: true`. */
export declare function isMarkdownComponentBlock(components: MarkdownComponents | undefined, name: string): boolean;

/** How `<Component />` tags are handled. */
export declare type JsxMode = "render" | "throw" | "graceful" | "omit";

export declare function Label({ label, ...props }: LabelProps): ReactNode;

export declare interface LabelProps extends Omit<BadgeProps, "children"> {
    label: string;
}

declare type Language = "csharp" | "rust" | "javascript" | "typescript" | "surrealql" | "json" | "yaml" | "java" | "go" | "python" | "html" | "cli" | "php" | "markdown" | "syntax";

/**
 * The Mantine theme configurtation
 */
export declare const MANTINE_THEME: MantineThemeOverride;

/**
 * Configuration for a single `<Component />` registered in {@link MarkdownComponents}.
 * Set `block: true` to opt into the block-rendering path (own line, hover
 * outline, edit-source action) instead of the default inline-widget path.
 */
export declare interface MarkdownComponentConfig {
    component: ComponentType<any>;
    block?: boolean;
}

/** A registered component is either a bare React component (inline) or a config object. */
export declare type MarkdownComponentDef = ComponentType<any> | MarkdownComponentConfig;

/** Map of PascalCase JSX tag names to viewer/editor component registrations. */
export declare type MarkdownComponents = Record<string, MarkdownComponentDef>;

/**
 * Rendering mode of the markdown editor.
 *
 * - `source` renders raw markdown syntax with subtle styling.
 * - `preview` shows source markup only on the active line/block;
 *   other content is rendered visually.
 */
export declare type MarkdownEditMode = "source" | "preview";

/**
 * High-level Markdown editor primitive that wires together the
 * `CodeEditor` shell, the live preview extension, the widget store and
 * the React portal host.
 *
 * See {@link MarkdownViewer} for a Markdown viewer equivalent.
 */
export declare const MarkdownEditor: FC<MarkdownEditorProps>;

export declare interface MarkdownEditorProps extends Omit<EditorOptions, "language" | "extensions">, Omit<BoxProps, "onChange"> {
    /** `source` or `preview` (live preview). Defaults to `preview`. */
    mode?: MarkdownEditMode;
    /** Additional CodeMirror extensions to layer on top of the live preview. */
    extensions?: Extension;
    /** GFM table preview widgets in preview mode. Defaults to `true`. */
    tables?: boolean;
    /**
     * Auto-format GFM table source while editing: align columns and pad cells
     * with trailing spaces. Defaults to `false`.
     */
    withTableFormatter?: boolean;
    /** React components for `<PascalCase />` tags (preview widgets). */
    components?: MarkdownComponents;
    /** How unsupported JSX is handled in preview. Default `render` (uses {@link DEFAULT_COMPONENTS}). */
    jsxMode?: JsxMode;
    /** Auto-focus the editor on mount. */
    autoFocus?: boolean;
    /**
     * Custom per-language renderers for fenced code blocks. Keys are the
     * lower-cased fenced-code info string (e.g. `mermaid`). When the block
     * is inactive, a matching renderer fully replaces the source. Defaults
     * to `{ mermaid: MermaidCodeRenderer }`; pass `{}` to disable.
     */
    codeRenderers?: Record<string, CodeRenderer>;
    /** Enable the slash command palette. Defaults to `true`. */
    slashCommands?: boolean;
    /** Override the slash command set. Defaults to {@link DEFAULT_SLASH_COMMANDS}. */
    commands?: readonly SlashCommand[];
}

/**
 * Marks the editor ready after the first animation frame so mount-time decoration
 * classes do not trigger CSS transitions. Exposes {@link markdownEditorReadyField}
 * and `data-markdown-ready` on the editor root.
 */
export declare function markdownEditorReady(): Extension;

/**
 * Whether the markdown editor has completed its initial paint. CSS transitions
 * and similar effects should be gated on this so decoration classes do not
 * animate from their pre-decoration computed values on mount.
 */
export declare const markdownEditorReadyField: StateField<boolean>;

/**
 * Live preview stack: language (optional), mode field, folding, decorations, theme.
 */
export declare function markdownLivePreview(opts: MarkdownLivePreviewOptions): Extension;

/** Options for {@link markdownLivePreview}. */
export declare interface MarkdownLivePreviewOptions {
    /** GFM table preview widgets in preview mode. Defaults to `true`. */
    tables?: boolean;
    /**
     * Auto-format GFM table source on edit: align columns, pad cells with
     * trailing spaces, and normalise the delimiter row. Defaults to `false`.
     */
    withTableFormatter?: boolean;
    /**
     * Per-language renderers used when a fenced code block is inactive (preview
     * unfocused / caret outside the block). Keys are the lower-cased fenced-code
     * info string (e.g. `mermaid`). Defaults to `{}`.
     */
    codeRenderers?: Record<string, CodeRenderer>;
    /** Required widget store, typically returned by `useMarkdownWidgetStore()`. */
    widgetStore: WidgetStore;
    /** Whether to install the markdown language alongside the live preview. */
    includeLanguage?: boolean;
    /**
     * Optional language resolver for embedded fenced code blocks.
     */
    resolveCodeLanguage?: (info: string) => Language_2 | undefined;
    /** JSX/HTML preview widgets (viewer parity). Omit to leave raw source in preview. */
    components?: MarkdownComponents;
    jsxMode?: JsxMode;
    /**
     * Slash command palette. Pass a store (from `useSlashStore()`) to enable
     * the slash (`/`) command menu. Render `<SlashCommandMenu>` with the
     * same store. Omit to disable.
     */
    slash?: {
        store: SlashStore;
    };
}

/**
 * State field tracking the current {@link MarkdownEditMode}.
 */
export declare const markdownModeField: StateField<MarkdownEditMode>;

/**
 * Bundles the slash session {@link slashSessionField} with a `ViewPlugin` that
 * mirrors the active session and caret into the given {@link SlashStore}, which
 * the React menu reads via `useSyncExternalStore`. Anchor coordinates are
 * measured by the React component — `coordsAtPos` cannot run during an update.
 */
export declare function markdownSlashCommands(options: MarkdownSlashCommandsOptions): Extension;

/** Options for {@link markdownSlashCommands}. */
export declare interface MarkdownSlashCommandsOptions {
    /** Store bridging the session to the React `<SlashCommandMenu>`. */
    store: SlashStore;
}

/**
 * Document slice compatible with CodeMirror {@link Text} line API.
 * Used by tree helpers and the viewer renderer.
 */
export declare interface MarkdownSource {
    readonly length: number;
    slice(from: number, to: number): string;
    lineAt(pos: number): {
        from: number;
        to: number;
        number: number;
    };
    line(n: number): {
        from: number;
        to: number;
        number: number;
    };
    readonly lineCount: number;
}

/**
 * Build a {@link MarkdownSource} from raw markdown (SSR-safe).
 */
export declare function markdownSourceFromString(source: string): MarkdownSource;

/**
 * Editor base theme for the markdown live preview. Cursor / scroller rules and
 * editor-only chrome; shared surface styles live in `markdown.module.scss`.
 */
export declare function markdownTheme(): Extension;

/**
 * High-level Markdown viewer primitive that renders a Markdown structure
 * as a React tree.
 *
 * See {@link MarkdownEditor} for a Markdown editor equivalent.
 */
export declare const MarkdownViewer: FC<MarkdownViewerProps>;

export declare interface MarkdownViewerProps extends BoxProps {
    /** Markdown source string. Ignored when `tree` is provided. */
    content?: string;
    /** Pre-parsed tree and markdown source. */
    tree?: MarkdownViewerTreeInput;
    /** Collapse consecutive blank lines into a single line break. Defaults to `true`. */
    collapseBlankLines?: boolean;
    /** Override built-in element renderers. */
    renderers?: MarkdownViewerRenderers;
    /** Rewrite image URLs before render (e.g. CDN resolution). */
    onImage?: (node: ImageDescriptor) => ImageDescriptor;
    /** Add slug IDs and hover anchor links on headings. */
    autoLink?: boolean;
    /**
     * Custom per-language renderers for fenced code blocks. Keys are the
     * lower-cased fenced-code info string (e.g. `mermaid`). When the block
     * is inactive, a matching renderer fully replaces the source. Defaults
     * to `{ mermaid: MermaidCodeRenderer }`; pass `{}` to disable.
     */
    codeRenderers?: Record<string, CodeRenderer>;
    /** React components for `<PascalCase />` tags. */
    components?: MarkdownComponents;
    /** How unsupported JSX is handled. Default `render` (uses {@link DEFAULT_COMPONENTS}). */
    jsxMode?: JsxMode;
}

/**
 * Optional per-node React render overrides for {@link MarkdownViewer}.
 * `listItem` and `strikethrough` are reserved for a future release and are not
 * consulted by the current viewer pipeline.
 */
export declare type MarkdownViewerRenderers = Partial<{
    heading: (props: {
        children: ReactNode;
        level: number;
        id?: string;
    }) => ReactNode;
    paragraph: (props: {
        children: ReactNode;
    }) => ReactNode;
    link: (props: {
        href: string;
        title?: string;
        children: ReactNode;
    }) => ReactNode;
    list: (props: {
        ordered: boolean;
        children: ReactNode;
    }) => ReactNode;
    listItem: (props: {
        children: ReactNode;
        checked?: boolean;
    }) => ReactNode;
    blockquote: (props: {
        children: ReactNode;
    }) => ReactNode;
    code: (props: {
        value: string;
        lang?: string;
        title?: string;
        runnable?: string;
    }) => ReactNode;
    inlineCode: (props: {
        value: string;
    }) => ReactNode;
    table: (props: {
        children: ReactNode;
    }) => ReactNode;
    thematicBreak: () => ReactNode;
    image: (props: ImageDescriptor) => ReactNode;
    strong: (props: {
        children: ReactNode;
    }) => ReactNode;
    emphasis: (props: {
        children: ReactNode;
    }) => ReactNode;
    strikethrough: (props: {
        children: ReactNode;
    }) => ReactNode;
    jsxComponent: (props: {
        name: string;
        children: ReactNode;
        attributes: Record<string, unknown>;
    }) => ReactNode;
}>;

export declare interface MarkdownViewerTreeInput {
    tree: Tree;
    source: MarkdownSource;
}

/**
 * React component that renders a portal for every widget registered in the
 * given {@link WidgetStore}. Mount this once per editor (the
 * `MarkdownEditor` primitive does this for you), inside the
 * `MantineProvider` tree so widgets inherit theme and other context.
 *
 * The component renders no DOM of its own — only invisible portal targets
 * that hand off to the host elements created by `WidgetType.toDOM()`.
 */
export declare const MarkdownWidgetPortals: FC<MarkdownWidgetPortalsProps>;

export declare interface MarkdownWidgetPortalsProps {
    /** The store to read widget entries from. */
    store: WidgetStore;
}

/** Merge default JSX components with caller overrides (caller wins on key clash). */
export declare function mergeMarkdownComponents(components?: MarkdownComponents): MarkdownComponents;

/**
 * Standalone {@link CodeRenderer} for fenced code blocks whose info string
 * is `mermaid`. Lazy-loads the `mermaid` module the first time it mounts so
 * consumers only pay the bundle cost when actually using diagrams. Renders
 * inside a Mantine `Center` while loading and replaces it with the SVG once
 * available.
 */
export declare const MermaidCodeRenderer: CodeRenderer;

export declare interface MiniConfig {
    url?: string;
    dataset?: "surreal-deal-store-mini" | `/${string}.surql`;
    setup?: string;
    query?: string;
    variables?: string | Record<string, unknown>;
    theme?: "auto" | "light" | "dark";
    orientation?: "horizontal" | "vertical";
    appearance?: "normal" | "compact" | "plain";
    transparent?: boolean;
    autorun?: boolean;
    corners?: string;
    nonumbers?: boolean;
}

export declare class MiniController {
    private frameRef;
    constructor(frameRef: RefObject<HTMLIFrameElement | null>);
    private get ref();
    private post;
    /**
     * Updates the currently displayed query or variables in the mini
     */
    setEditor(options: {
        query?: string;
        variables?: string;
    }): void;
    /**
     * Clears the query response
     */
    clearResponse(): void;
    /**
     * Sets the mini to show either the query or variables editor
     */
    setEditorMode(mode: "query" | "variables"): void;
    /**
     * Sets the output/result mode to combined, single, graph, table or live
     */
    setResultMode(mode: "combined" | "single" | "graph" | "table" | "live"): void;
    /**
     * Runs the query with the variables as they are currently set
     */
    runQuery(): void;
    /**
     * Executes a given query in the background
     */
    executeQuery(query: string): void;
}

declare interface NonTerminalNode {
    type: "NonTerminal";
    text: string;
}

/**
 * Note/Callout component with variants: note, important, warning, caution
 */
export declare const Note: FC<NoteProps>;

export declare const NOTE_KINDS: readonly ["note", "tip", "important", "warning", "caution"];

export declare type NoteKind = (typeof NOTE_KINDS)[number];

export declare interface NoteProps extends Omit<AlertProps, "title" | "children"> {
    kind: NoteKind;
    title?: string;
    children: ReactNode;
}

declare interface OneOrMoreNode {
    type: "OneOrMore";
    child: RailroadNode;
    repeat?: RailroadNode;
}

declare interface OptionalNode {
    type: "Optional";
    skip?: boolean;
    child: RailroadNode;
}

declare interface ParsedHeadingTitle {
    /** Visible title text (custom id suffix removed). */
    text: string;
    /** Custom id from `{#id}` when present. */
    customId?: string;
}

/** Split plain heading text into visible title and optional `{#id}` suffix. */
export declare function parseHeadingTitleText(plain: string): ParsedHeadingTitle;

/**
 * Parse markdown into a Lezer syntax tree using the same grammar as CodeMirror.
 * Safe in SSR: no {@link EditorState} or DOM.
 */
export declare function parseMarkdownTree(source: string): Tree;

export declare const picto2106: string;

export declare const picto2106Gradient: string;

export declare const picto360DegreeView: string;

export declare const picto360DegreeViewGradient: string;

export declare const picto5Stars: string;

export declare const picto5StarsGradient: string;

export declare const pictoACID: string;

export declare const pictoACIDGradient: string;

export declare const pictoAgno: string;

export declare const pictoAgnoGradient: string;

export declare const pictoAI: string;

export declare const pictoAIGradient: string;

export declare const pictoAPI: string;

export declare const pictoAPIGradient: string;

export declare const pictoArrowDown: string;

export declare const pictoArrowDownGradient: string;

export declare const pictoArrows: string;

export declare const pictoArrowsGradient: string;

export declare const pictoArrowTopRight: string;

export declare const pictoArrowTopRightGradient: string;

export declare const pictoArrowUp: string;

export declare const pictoArrowUpGradient: string;

export declare const pictoAtom: string;

export declare const pictoAtomGradient: string;

export declare const pictoAudioClip: string;

export declare const pictoAudioClipGradient: string;

export declare const pictoBackups: string;

export declare const pictoBackupsGradient: string;

export declare const pictoBadgeAccess: string;

export declare const pictoBadgeAccessGradient: string;

export declare const pictoBank: string;

export declare const pictoBankGradient: string;

export declare const pictoBars: string;

export declare const pictoBarsGradient: string;

export declare const pictoBegin: string;

export declare const pictoBeginGradient: string;

export declare const pictoBicycle: string;

export declare const pictoBicycleGradient: string;

export declare const pictoBinary: string;

export declare const pictoBinaryGradient: string;

export declare const pictoBlocks: string;

export declare const pictoBlocksGradient: string;

export declare const pictoBlog: string;

export declare const pictoBlogGradient: string;

export declare const pictoBook: string;

export declare const pictoBookGradient: string;

export declare const pictoBookmark: string;

export declare const pictoBookmarkGradient: string;

export declare const pictoBot: string;

export declare const pictoBotGradient: string;

export declare const pictoBrain: string;

export declare const pictoBrainGradient: string;

export declare const pictoBreakfast: string;

export declare const pictoBreakfastGradient: string;

export declare const pictoBucket: string;

export declare const pictoBucketGradient: string;

export declare const pictoCalculator: string;

export declare const pictoCalculatorGradient: string;

export declare const pictoCancel: string;

export declare const pictoCancelGradient: string;

export declare const pictoCapabilites: string;

export declare const pictoCapabilitesGradient: string;

export declare const pictoCBOR: string;

export declare const pictoCBORGradient: string;

export declare const pictoChatHeart: string;

export declare const pictoChatHeartGradient: string;

export declare const pictoChecklist: string;

export declare const pictoChecklistGradient: string;

export declare const pictoChristmas: string;

export declare const pictoChristmasGradient: string;

export declare const pictoCircle: string;

export declare const pictoCircleGradient: string;

export declare const pictoCircles: string;

export declare const pictoCirclesGradient: string;

export declare const pictoClaimsManagement: string;

export declare const pictoClaimsManagementGradient: string;

export declare const pictoClaude: string;

export declare const pictoClaudeGradient: string;

export declare const pictoCline: string;

export declare const pictoClineGradient: string;

export declare const pictoClipboard: string;

export declare const pictoClipboardGradient: string;

export declare const pictoClisdb: string;

export declare const pictoClisdbGradient: string;

export declare const pictoClock: string;

export declare const pictoClockGradient: string;

export declare const pictoCloud: string;

export declare const pictoCloudGradient: string;

export declare const pictoCloudNodes: string;

export declare const pictoCloudNodesGradient: string;

export declare const pictoColor: string;

export declare const pictoColorGradient: string;

export declare const pictoCommit: string;

export declare const pictoCommitGradient: string;

export declare const pictoCommitQueue: string;

export declare const pictoCommitQueueGradient: string;

export declare const pictoCompass: string;

export declare const pictoCompassGradient: string;

export declare const pictoCompute: string;

export declare const pictoComputeGradient: string;

export declare const pictoComputer: string;

export declare const pictoComputerGradient: string;

export declare const pictoConflictDetection: string;

export declare const pictoConflictDetectionGradient: string;

export declare const pictoConnect: string;

export declare const pictoConnectGradient: string;

export declare const pictoContext: string;

export declare const pictoContextGradient: string;

export declare const pictoCopyright: string;

export declare const pictoCopyrightGradient: string;

export declare const pictoCore: string;

export declare const pictoCoreGradient: string;

export declare const pictoCreate: string;

export declare const pictoCreateGradient: string;

export declare const pictoCrop: string;

export declare const pictoCropGradient: string;

export declare const pictoCrown: string;

export declare const pictoCrownGradient: string;

export declare const pictoCurlyBraces: string;

export declare const pictoCurlyBracesGradient: string;

export declare const pictoCursor: string;

export declare const pictoCursorGradient: string;

export declare const pictoCustomAPIEndpoints: string;

export declare const pictoCustomAPIEndpointsGradient: string;

export declare const pictoDarthVader: string;

export declare const pictoDarthVaderGradient: string;

export declare const pictoDedicatedSupport: string;

export declare const pictoDedicatedSupportGradient: string;

export declare const pictoDev: string;

export declare const pictoDevelopment: string;

export declare const pictoDevelopmentGradient: string;

export declare const pictoDevGradient: string;

export declare const pictoDiagram: string;

export declare const pictoDiagramGradient: string;

export declare const pictoDiscord: string;

export declare const pictoDiscordGradient: string;

export declare const pictoDocument: string;

export declare const pictoDocumentGradient: string;

export declare const pictoDocumentSearch: string;

export declare const pictoDocumentSearchGradient: string;

export declare const pictoDollar: string;

export declare const pictoDollarGradient: string;

export declare const pictoDownload: string;

export declare const pictoDownloadGradient: string;

export declare const pictoDragCursor: string;

export declare const pictoDragCursorGradient: string;

export declare const pictoEar: string;

export declare const pictoEarGradient: string;

export declare const pictoEmbeddedDevices: string;

export declare const pictoEmbeddedDevicesGradient: string;

export declare const pictoEmbeddedEdge: string;

export declare const pictoEmbeddedEdgeGradient: string;

export declare const pictoEmbeddingg: string;

export declare const pictoEmbeddinggGradient: string;

export declare const pictoEntertainment: string;

export declare const pictoEntertainmentGradient: string;

export declare const pictoEV: string;

export declare const pictoEVGradient: string;

export declare const pictoExpand: string;

export declare const pictoExpandGradient: string;

export declare const pictoFile: string;

export declare const pictoFilmMovie: string;

export declare const pictoFilmMovieGradient: string;

export declare const pictoFingerPrints: string;

export declare const pictoFingerPrintsGradient: string;

export declare const pictoFlexible: string;

export declare const pictoFlexibleGradient: string;

export declare const pictoFloat: string;

export declare const pictoFloatGradient: string;

export declare const pictoForm: string;

export declare const pictoFormGradient: string;

export declare const pictoFraudDetection: string;

export declare const pictoFraudDetectionGradient: string;

export declare const pictoFrown: string;

export declare const pictoFrownGradient: string;

export declare const pictoFullTextSearch: string;

export declare const pictoFullTextSearchGradient: string;

export declare const pictoGenerativeAI: string;

export declare const pictoGenerativeAIGradient: string;

export declare const pictoGeospatial: string;

export declare const pictoGeospatialGradient: string;

export declare const pictoGitHub: string;

export declare const pictoGitHubGradient: string;

export declare const pictoGlitter: string;

export declare const pictoGlitterGradient: string;

export declare const pictoGlobe: string;

export declare const pictoGlobeGradient: string;

export declare const pictoGQL: string;

export declare const pictoGQLGradient: string;

export declare const pictoGraph: string;

export declare const pictoGraphGradient: string;

export declare const pictoGraphQL: string;

export declare const pictoGraphQLGradient: string;

export declare const pictoGraphRAG: string;

export declare const pictoGraphRAGGradient: string;

export declare const pictoGrid: string;

export declare const pictoGridGradient: string;

export declare const pictoGrowth: string;

export declare const pictoGrowthGradient: string;

export declare const pictoHands: string;

export declare const pictoHandsGradient: string;

export declare const pictoHandsOn: string;

export declare const pictoHandsOnGradient: string;

export declare const pictoHardDisc: string;

export declare const pictoHardDiscGradient: string;

export declare const pictoHealthBubble: string;

export declare const pictoHealthChat: string;

export declare const pictoHealthChatGradient: string;

export declare const pictoHealthInsurance: string;

export declare const pictoHealthInsuranceGradient: string;

export declare const pictoHeart: string;

export declare const pictoHeartGradient: string;

export declare const pictoHomeSetup: string;

export declare const pictoHomeSetupGradient: string;

export declare const pictoHTTP: string;

export declare const pictoHTTPGradient: string;

export declare const pictoHyperlink: string;

export declare const pictoHyperlinkGradient: string;

export declare const pictoImage: string;

export declare const pictoImageGradient: string;

export declare const pictoInbox: string;

export declare const pictoInboxGradient: string;

export declare const pictoInclusiveCommunication: string;

export declare const pictoInclusiveCommunicationGradient: string;

export declare const pictoInstagram: string;

export declare const pictoInstagramGradient: string;

export declare const pictoInstanceVersion: string;

export declare const pictoInstanceVersionGradient: string;

export declare const pictoIntegrations: string;

export declare const pictoIntegrationsGradient: string;

export declare const pictoIntegrationSupport: string;

export declare const pictoIntegrationSupportGradient: string;

export declare const pictoIntercom: string;

export declare const pictoIntercomGradient: string;

export declare const pictoJavascript: string;

export declare const pictoJSON: string;

export declare const pictoJSONFile: string;

export declare const pictoJSONFileGradient: string;

export declare const pictoJSONGradient: string;

export declare const pictoKey: string;

export declare const pictoKeyGradient: string;

export declare const pictoKeyValue: string;

export declare const pictoKeyValueGradient: string;

export declare const pictoKnowledgeGraph: string;

export declare const pictoKnowledgeGraphGradient: string;

export declare const pictoKV: string;

export declare const pictoKVGradient: string;

export declare const pictoLangChain: string;

export declare const pictoLangChainGradient: string;

export declare const pictoLaptop: string;

export declare const pictoLaptopGradient: string;

export declare const pictoLearn: string;

export declare const pictoLifebuoy: string;

export declare const pictoLifebuoyGradient: string;

export declare const pictoLightbulb: string;

export declare const pictoLightbulbGradient: string;

export declare const pictoLinkedIn: string;

export declare const pictoLinkedInGradient: string;

export declare const pictoLunch: string;

export declare const pictoLunchGradient: string;

export declare const pictoMachineLearning: string;

export declare const pictoMachineLearningGradient: string;

export declare const pictoMail: string;

export declare const pictoMailGradient: string;

export declare const pictoManInCircle: string;

export declare const pictoManInCircleGradient: string;

export declare const pictoMCP: string;

export declare const pictoMCPGradient: string;

export declare const pictoMediaFile: string;

export declare const pictoMedium: string;

export declare const pictoMediumGradient: string;

export declare const pictoMemory: string;

export declare const pictoMemoryGradient: string;

export declare const pictoMentalHealth: string;

export declare const pictoMentalHealthGradient: string;

export declare const pictoMergeQueue: string;

export declare const pictoMicrophone: string;

export declare const pictoMicrophoneGradient: string;

export declare const pictoML: string;

export declare const pictoMLGradient: string;

export declare const pictoMonitoring: string;

export declare const pictoMoon: string;

export declare const pictoMoonGradient: string;

export declare const pictoN8n: string;

export declare const pictoN8nGradient: string;

export declare const pictoNature: string;

export declare const pictoNatureGradient: string;

export declare const pictoNinja: string;

export declare const pictoNinjaGradient: string;

export declare const pictoNode: string;

export declare const pictoNodeBrain: string;

export declare const pictoNodeBrainGradient: string;

export declare const pictoNodeGradient: string;

export declare const pictoNotification: string;

export declare const pictoNotificationGradient: string;

export declare const pictoOnDisk: string;

export declare const pictoOnDiskGradient: string;

export declare const pictoOpenAI: string;

export declare const pictoOperationalReadiness: string;

export declare const pictoOperationalReadinessGradient: string;

export declare const pictoPadlockClosed: string;

export declare const pictoPadlockClosedGradient: string;

export declare const pictoPadlockOpen: string;

export declare const pictoPadlockOpenGradient: string;

export declare const pictoPalette: string;

export declare const pictoPaletteGradient: string;

export declare const pictoPaperclip: string;

export declare const pictoPaperclipGradient: string;

export declare const pictoPasskey: string;

export declare const pictoPasskeyGradient: string;

export declare const pictoPath: string;

export declare const pictoPathGradient: string;

export declare const pictoPDF: string;

export declare const pictoPDFGradient: string;

export declare const pictoPen: string;

export declare const pictoPenGradient: string;

export declare const pictoPension: string;

export declare const pictoPensionGradient: string;

export declare const pictoPercentage: string;

export declare const pictoPercentageGradient: string;

export declare const pictoPerformance: string;

export declare const pictoPerformanceGradient: string;

export declare const pictoPersonalizedPolicy: string;

export declare const pictoPersonalizedPolicyGradient: string;

export declare const pictoPieChart: string;

export declare const pictoPieChartGradient: string;

export declare const pictoPin: string;

export declare const pictoPinGradient: string;

export declare const pictoPlay: string;

export declare const pictoPlayGradient: string;

export declare const pictoPlayPause: string;

export declare const pictoPlayPauseGradient: string;

export declare const pictoPlugins: string;

export declare const pictoPlus: string;

export declare const pictoPlusGradient: string;

export declare const pictoPortability: string;

export declare const pictoPortabilityGradient: string;

export declare const pictoPortfolioRiskManagement: string;

export declare const pictoPortfolioRiskManagementGradient: string;

export declare const pictoPresentation: string;

export declare const pictoPresentationGradient: string;

export declare const pictoPriceTag: string;

export declare const pictoPriceTagGradient: string;

export declare const pictoProblemDangerError: string;

export declare const pictoProblemDangerErrorGradient: string;

export declare const pictoPuzzle: string;

export declare const pictoPuzzleGradient: string;

export declare const pictoPython: string;

export declare const pictoPythonGradient: string;

export declare const pictoQL: string;

export declare const pictoQLGradient: string;

export declare const pictoQuestion: string;

export declare const pictoQuestionGradient: string;

export declare const pictoQuotationMarks: string;

export declare const pictoQuotationMarksGradient: string;

export declare const pictoQuote: string;

export declare const pictoQuoteGradient: string;

export declare const pictoRAG: string;

export declare const pictoRAGGradient: string;

export declare const pictoRealTimeApplications: string;

export declare const pictoRealTimeApplicationsGradient: string;

export declare const pictoReddit: string;

export declare const pictoRedditGradient: string;

export declare const pictoReferenceGuides: string;

export declare const pictoReferenceGuidesGradient: string;

export declare const pictoRegulatoryCompliance: string;

export declare const pictoRegulatoryComplianceGradient: string;

export declare const pictoRelational: string;

export declare const pictoRelationalGradient: string;

export declare const pictoREST: string;

export declare const pictoRESTGradient: string;

export declare const pictoRiskManagement: string;

export declare const pictoRiskManagementGradient: string;

export declare const pictoRocket: string;

export declare const pictoRocketGradient: string;

export declare const pictoRPC: string;

export declare const pictoRPCGradient: string;

export declare const pictoRust: string;

export declare const pictoRustGradient: string;

export declare const pictoSafe: string;

export declare const pictoSafeGradient: string;

export declare const pictoSaveFloppyDisc: string;

export declare const pictoSaveFloppyDiscGradient: string;

export declare const pictoScale: string;

export declare const pictoScaleGradient: string;

export declare const pictoSDBCloud: string;

export declare const pictoSDBCloudGradient: string;

export declare const pictoSDKs: string;

export declare const pictoSDKsGradient: string;

export declare const pictoSecureDocument: string;

export declare const pictoSecureDocumentGradient: string;

export declare const pictoSettings: string;

export declare const pictoSettingsGradient: string;

export declare const pictoShield: string;

export declare const pictoShieldGradient: string;

export declare const pictoSidekick: string;

export declare const pictoSidekickGradient: string;

export declare const pictoSignal: string;

export declare const pictoSignalGradient: string;

export declare const pictoSmartphone: string;

export declare const pictoSmartphoneGradient: string;

export declare const pictoSmile: string;

export declare const pictoSmileGradient: string;

export declare const pictoSpectron: string;

export declare const pictoSpectronGradient: string;

export declare const pictoSpeed: string;

export declare const pictoSpeedGradient: string;

export declare const pictoSQLBackends: string;

export declare const pictoSQLBackendsGradient: string;

export declare const pictoStability: string;

export declare const pictoStabilityGradient: string;

export declare const pictoStackOverflow: string;

export declare const pictoStackOverflowGradient: string;

export declare const pictoStar: string;

export declare const pictoStarGradient: string;

export declare const pictoSun: string;

export declare const pictoSurrealDB: string;

export declare const pictoSurrealDBGradient: string;

export declare const pictoSurrealism: string;

export declare const pictoSurrealismGradient: string;

export declare const pictoSurrealist: string;

export declare const pictoSurrealistGradient: string;

export declare const pictoSurrealKV: string;

export declare const pictoSurrealKVGradient: string;

export declare const pictoSurrealMCP: string;

export declare const pictoSurrealML: string;

export declare const pictoSwag: string;

export declare const pictoSwagGradient: string;

export declare const pictoSwatch: string;

export declare const pictoSwatchGradient: string;

export declare const pictoTables: string;

export declare const pictoTablesGradient: string;

export declare const pictoText: string;

export declare const pictoTextGradient: string;

export declare const pictoThreads: string;

export declare const pictoThreadsGradient: string;

export declare const pictoThumbnail: string;

export declare const pictoThumbnailGradient: string;

export declare const pictoThumbsDown: string;

export declare const pictoThumbsDownGradient: string;

export declare const pictoThumbsUp: string;

export declare const pictoThumbsUpGradient: string;

export declare const pictoTimeline: string;

export declare const pictoTimeSeries: string;

export declare const pictoTimeSeriesGradient: string;

export declare const pictoTOML: string;

export declare const pictoTOMLGradient: string;

export declare const pictoTravel: string;

export declare const pictoTravelGradient: string;

export declare const pictoTrigger: string;

export declare const pictoTriggerGradient: string;

export declare const pictoTutorials: string;

export declare const pictoTutorialsGradient: string;

export declare const pictoTwoCircles: string;

export declare const pictoTwoCirclesGradient: string;

export declare const pictoUniversity: string;

export declare const pictoUniversityGradient: string;

export declare const pictoUpdate: string;

export declare const pictoUpdateGradient: string;

export declare const pictoUpscale: string;

export declare const pictoUpscaleGradient: string;

export declare const pictoValue: string;

export declare const pictoValueGradient: string;

export declare const pictoVectorSearch: string;

export declare const pictoVectorSearchGradient: string;

export declare const pictoVectorStores: string;

export declare const pictoVectorStoresGradient: string;

export declare const pictoVideoFile: string;

export declare const pictoVideoFileGradient: string;

export declare const pictoVisualStudioCode: string;

export declare const pictoVisualStudioCodeGradient: string;

export declare const pictoWasm: string;

export declare const pictoWasmGradient: string;

export declare const pictoWindsurf: string;

export declare const pictoWindsurfGradient: string;

export declare const pictoX: string;

export declare const pictoXGradient: string;

export declare const pictoYoga: string;

export declare const pictoYogaGradient: string;

export declare const pictoYoutube: string;

export declare const pictoYoutubeGradient: string;

export declare const pictoYUApp: string;

export declare const pictoZapier: string;

export declare const pictoZapierGradient: string;

export declare const pictoZed: string;

export declare const pictoZedGradient: string;

export declare const pictoZoomIn: string;

export declare const pictoZoomInGradient: string;

/**
 * Process highlight regions in code
 */
export declare function processHighlightRegions(code: string): {
    regions: HighlightRegion[];
    processedCode: string;
};

export declare function RailroadDiagram({ ast, ...props }: RailroadDiagramProps): ReactNode;

export declare interface RailroadDiagramProps extends BoxProps {
    ast?: DiagramNode;
}

export declare type RailroadNode = DiagramNode | SequenceNode | TerminalNode | NonTerminalNode | OptionalNode | ChoiceNode | OneOrMoreNode | ZeroOrMoreNode | CommentNode;

/** Resolve heading `id` from `{#custom}` suffix or slugged plain title. */
export declare function resolveHeadingId(node: SyntaxNode, source: MarkdownSource, slugger: default_2): string | undefined;

/** Normalise a component registration into its `{ component, block }` form. */
export declare function resolveMarkdownComponent(def: MarkdownComponentDef | undefined): MarkdownComponentConfig | undefined;

export declare interface ResponsiveTabItem {
    value: string;
    label: ReactNode;
    selectLabel?: string;
    tabProps?: Omit<TabsTabProps, "value" | "children">;
}

export declare function ResponsiveTabs({ tabs, value, defaultValue, onChange, breakpoint, showSelectWhen, mediaQuery, tabsListProps, tabProps, selectProps, ...tabsProps }: ResponsiveTabsProps): ReactNode;

export declare interface ResponsiveTabsProps extends Omit<TabsProps_2, "children" | "value" | "defaultValue" | "onChange"> {
    tabs: ResponsiveTabItem[];
    value?: string;
    defaultValue?: string;
    onChange?: (value: string | null) => void;
    breakpoint?: number | string;
    showSelectWhen?: "above" | "below";
    mediaQuery?: string;
    tabsListProps?: TabsListProps;
    tabProps?: Omit<TabsTabProps, "value" | "children">;
    selectProps?: Omit<SelectProps, "data" | "value" | "defaultValue" | "onChange">;
}

export declare function SectionTitle({ order, kicker, description, kickerProps, titleProps, descriptionProps, children, ...boxProps }: PropsWithChildren<SectionTitle>): ReactElement;

export declare interface SectionTitle extends BoxProps {
    /** The kicker text to display above the title */
    kicker?: ReactNode;
    /** Heading order (1-6), controls `font-size` when `size` is not set on the title. @default `1` */
    order?: TitleOrder;
    /** A description text to display below the title */
    description?: string;
    /** Props to pass to the kicker component */
    kickerProps?: TextProps;
    /** Props to pass to the title component */
    titleProps?: TitleProps;
    /** Props to pass to the description component */
    descriptionProps?: TextProps;
}

declare interface SequenceNode {
    type: "Sequence";
    children: RailroadNode[];
}

/**
 * Replace the entire document. External/programmatic sync must not pollute the
 * undo stack (see CodeMirror controlled-editor guidance).
 */
export declare function setEditorText(editor: EditorView, text: string): void;

export declare const setMarkdownEditorReady: StateEffectType<boolean>;

/**
 * State effect used to swap the active markdown rendering mode.
 */
export declare const setMarkdownMode: StateEffectType<MarkdownEditMode>;

export declare function Since({ v, prefix, ...props }: SinceProps): ReactNode;

export declare interface SinceProps extends Omit<BadgeProps, "children"> {
    v: string;
    prefix?: string;
}

/**
 * A single slash command. `run` receives the live editor and the range
 * covering the `/query` text to replace with boilerplate.
 */
export declare interface SlashCommand {
    /** Stable id used for filtering keys and keyboard navigation. */
    readonly id: string;
    /** Primary label shown in the menu. */
    readonly title: string;
    /** Extra terms matched against the query (besides the title). */
    readonly keywords?: readonly string[];
    /** Optional group heading; commands sharing a category are shown together. */
    readonly category?: string;
    /** React node for the leading icon. */
    readonly icon?: ReactNode;
    /** Apply the command — typically replaces `range` with markdown. */
    readonly run: CommandAction;
}

/**
 * Renders the slash command palette. Reads the active session
 * from the {@link SlashStore}, filters {@link SlashCommand}s by the typed
 * query and shows a Mantine `Menu` anchored to the caret. The editor keeps DOM
 * focus; navigation/selection keys are intercepted in the capture phase so
 * arrows move the highlight and `Enter` runs the command instead of editing
 * the document.
 *
 * Mount once per editor inside the `MantineProvider` tree, alongside
 * `MarkdownWidgetPortals`.
 */
export declare const SlashCommandMenu: FC<SlashCommandMenuProps>;

export declare interface SlashCommandMenuProps {
    /** Store fed by `markdownSlashCommands` (see {@link useSlashStore}). */
    store: SlashStore;
    /** Accessor for the live editor view (e.g. `controller.getEditor`). */
    getEditor: () => EditorView;
    /** Commands to offer. Defaults to {@link DEFAULT_SLASH_COMMANDS}. */
    commands?: readonly SlashCommand[];
}

/** Document range a command replaces: `from` = slash position, `to` = caret. */
export declare interface SlashCommandRange {
    readonly from: number;
    readonly to: number;
}

/** Viewport coordinates of the slash anchor (from `view.coordsAtPos`). */
export declare interface SlashCoords {
    readonly left: number;
    readonly top: number;
    readonly right: number;
    readonly bottom: number;
}

/** Active slash session: the slash position and the query typed after it. */
export declare interface SlashSession {
    /** Document position of the triggering `/`. */
    readonly from: number;
    /** Text between the slash and the caret (excludes the slash itself). */
    readonly query: string;
}

/**
 * Snapshot the React menu reads: the active session and caret. Anchor
 * coordinates are measured in React (not here) because `coordsAtPos` cannot be
 * called during a CodeMirror update.
 */
export declare interface SlashState {
    readonly session: SlashSession;
    /** Caret position (end of the `/query` range). */
    readonly to: number;
}

/**
 * CM write-side ↔ React read-side bridge for the slash palette, mirroring the
 * widget `WidgetStore`. `null` snapshot means no active session.
 */
export declare interface SlashStore {
    setState(state: SlashState | null): void;
    subscribe(listener: () => void): () => void;
    getSnapshot(): SlashState | null;
}

export declare type SortDirection = "asc" | "desc" | undefined;

export declare interface SortHandle<T = DefaultSort> {
    column: keyof T | undefined;
    direction: SortDirection;
    toggle: (column: keyof T) => void;
}

export declare interface SortOptions<T = DefaultSort> {
    defaultColumn?: keyof T;
    defaultSort?: SortDirection;
}

export declare const Spacer: FC<BoxProps>;

export declare function Spinner({ size, color, className, title, ...props }: SpinnerProps): ReactNode;

export declare interface SpinnerProps extends BoxProps {
    size?: MantineSize;
    color?: MantineColor;
    title?: string;
}

export declare type StateFields = {
    [prop: string]: StateField<any>;
};

/**
 * Suggest completions at the start of each line
 */
export declare const suggestCompletions: Command;

export declare interface SummaryProps extends Omit<BoxProps, "component" | "children"> {
    children: ReactNode;
}

export declare const SURREAL_CDN_BASE = "https://cdn.surrealdb.com";

export declare function SurrealistMini({ config, frameRef, ...props }: SurrealistMiniProps): ReactNode;

export declare interface SurrealistMiniProps extends BoxProps {
    config?: MiniConfig;
    frameRef?: RefObject<HTMLIFrameElement | null>;
}

export declare const SYNTAX_THEME_CONFIG: ThemeConfig;

export declare interface TabItem {
    label: string;
    icon?: string;
    content: ReactNode;
}

export declare function Tabs({ items, syncKey, ...props }: TabsProps): ReactNode;

export declare interface TabsProps extends Omit<TabsProps_2, "children" | "value" | "onChange"> {
    items: TabItem[];
    syncKey?: string;
}

declare interface TerminalNode {
    type: "Terminal";
    text: string;
}

export declare type ThemeConfig = {
    light: HighlightStyle;
    dark: HighlightStyle;
};

declare type ThemeConfig_2 = {
    light: HighlightStyle;
    dark: HighlightStyle;
};

/**
 * ThemedImage component that displays different images based on the current color scheme.
 */
export declare const ThemedImage: FC<ThemedImageProps>;

export declare interface ThemedImageProps extends ImageProps {
    lightSrc?: string;
    darkSrc?: string;
}

/** Trim `{#id}` from the end of a heading source range (returns new exclusive `titleTo`). */
export declare function trimCustomHeadingIdFromRange(source: {
    slice(from: number, to: number): string;
}, titleFrom: number, titleTo: number): {
    titleTo: number;
    customId?: string;
};

/**
 * Returns a function which can be used to trigger a confirmation dialog
 */
export declare function useConfirmation<T = void>(options: ConfirmOptions<T>): (value?: T) => void;

export declare function useEditor(options?: EditorOptions): EditorController;

/**
 * Keyboard navigation over a flat list of identified items. Returns a
 * `keydown` handler and the currently active item id.
 *
 * The handler responds to `ArrowUp`/`ArrowDown` (and `Tab`/`Shift+Tab`) to
 * move the active item, and `Enter` to submit it. The active element is
 * scrolled into view via the `[data-navigation-item-id="…"]` attribute, which
 * rendered items should carry.
 *
 * Ported from `surrealist/src/hooks/keys.ts`.
 */
export declare function useKeyNavigation<T extends Identified>(items: T[], onSubmit?: (item: T) => void, initial?: string): readonly [(e: React.KeyboardEvent) => void, string];

/**
 * Trigger a new render and invoke the passed function
 * during this next call. Useful when you require the component
 * state to be updated before dispatching an action.
 *
 * @param doLater The callback to invoke
 * @returns The function to trigger invocation
 */
export declare function useLater<T extends unknown[]>(doLater: (...args: T) => unknown): (...args: T) => void;

/**
 * Hook returning a stable {@link WidgetStore} reference for the lifetime of
 * the calling component. Pair with {@link MarkdownWidgetPortals} and pass
 * the same store into `markdownLivePreview({ widgetStore })`.
 */
export declare function useMarkdownWidgetStore(): WidgetStore;

export declare function useMiniController(): [RefObject<HTMLIFrameElement | null>, MiniController];

/**
 * Hook returning a stable {@link SlashStore} for the lifetime of the calling
 * component. Pair with {@link SlashCommandMenu} and pass the same store into
 * `markdownLivePreview({ slash: { store } })`.
 */
export declare function useSlashStore(): SlashStore;

export declare function useSort<T = DefaultSort>(options?: SortOptions<T>): SortHandle<T>;

/**
 * Wraps the given unstable function in a stable callback.
 *
 * @param callback The unstable callback function
 * @returns The stable callback
 */
export declare function useStable<T extends AnyFn>(callback: T): T;

/**
 * A state used to track an active/inactive switch state (boolean)
 *
 * @param initialState The initial state of the switch
 * @param callbacks The callbacks to call when the switch is opened or closed
 * @returns
 */
export declare function useSwitch(initialState?: boolean, callbacks?: {
    onOpen?: () => void;
    onClose?: () => void;
}): readonly [boolean, BooleanHandle];

export declare function Version({ version, ...props }: VersionProps): ReactNode;

export declare interface VersionProps extends CodeProps {
    version: string;
}

export declare type VideoControlsPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";

export declare const VideoPlayer: FC<VideoPlayerProps>;

export declare interface VideoPlayerProps extends BoxProps {
    src: string;
    thumbnail?: string;
    poster?: string;
    autoPlay?: boolean;
    loop?: boolean;
    initialMuted?: boolean;
    controlsPosition?: VideoControlsPosition;
    videoProps?: Omit<VideoHTMLAttributes<HTMLVideoElement>, "autoPlay" | "loop" | "poster" | "controls" | "src" | "muted">;
}

/**
 * The default UI Kit editor theme
 */
export declare const VIVID_THEME: ThemeConfig_2;

/**
 * Registered widget host + render closure for `createPortal`. Map identity uses `portalKey`, not `id`.
 */
declare interface WidgetEntry {
    /** Opaque key for this mount; survives logical id reuse across rebuilds. */
    readonly portalKey: number;
    /** Debug-oriented `kind:from-to`; not a store key. */
    readonly id: string;
    readonly host: HTMLElement;
    readonly render: () => ReactNode;
}

/**
 * CM write-side ↔ React read-side (`useSyncExternalStore` in `markdown-widget-portals.tsx`).
 */
declare interface WidgetStore {
    register(entry: WidgetEntry): void;
    /** Unregister only when the host still maps to `expectedPortalKey` (avoids stale destroys after host reuse). */
    unregisterHost(host: HTMLElement, expectedPortalKey?: number): void;
    /**
     * Replace render closure when `updateDOM` runs with same `portalKey` but new captured state.
     */
    update(portalKey: number, render: () => ReactNode): void;
    /** True after {@link register} for this key. */
    hasPortalKey(portalKey: number): boolean;
    subscribe(listener: () => void): () => void;
    /** Returns a stable, frozen snapshot of all currently registered widgets. */
    getSnapshot(): readonly WidgetEntry[];
}

declare interface ZeroOrMoreNode {
    type: "ZeroOrMore";
    child: RailroadNode;
    repeat?: RailroadNode;
}

export { }

declare module "@mantine/core" {
    type SurrealVariant = "surreal";
    type SurrealInputVariant = SurrealVariant | "gradient";
    interface ActionIconProps {
        variant?: import("@mantine/core").ActionIconVariant | SurrealVariant;
    }
    interface ThemeIconProps {
        variant?: import("@mantine/core").ThemeIconVariant | SurrealVariant;
    }
    interface ButtonProps {
        variant?: import("@mantine/core").ButtonVariant | SurrealVariant;
    }
    interface TextInputProps {
        variant?: import("@mantine/core").InputVariant | SurrealInputVariant;
    }
    interface InputBaseProps {
        variant?: import("@mantine/core").InputVariant | SurrealInputVariant;
    }
    interface AutocompleteProps {
        variant?: import("@mantine/core").InputVariant | SurrealInputVariant;
    }
    interface TextareaProps {
        variant?: import("@mantine/core").InputVariant | SurrealInputVariant;
    }
    interface NumberInputProps {
        variant?: import("@mantine/core").InputVariant | SurrealInputVariant;
    }
    interface TagsInputProps {
        variant?: import("@mantine/core").InputVariant | SurrealInputVariant;
    }
    interface MultiSelectProps {
        variant?: import("@mantine/core").InputVariant | SurrealInputVariant;
    }
    interface DividerProps {
        variant?: import("@mantine/core").DividerVariant | SurrealVariant;
    }
    interface CloseButtonProps {
        variant?: import("@mantine/core").CloseButtonVariant | SurrealVariant;
    }
    interface AnchorProps {
        variant?: import("@mantine/core").AnchorVariant | SurrealVariant | "glow" | "vibrant";
    }
    interface SelectProps {
        variant?: import("@mantine/core").InputVariant | SurrealInputVariant;
    }
    interface BadgeProps {
        variant?: import("@mantine/core").BadgeVariant | SurrealVariant;
    }
    interface CheckboxProps {
        variant?: import("@mantine/core").CheckboxVariant | SurrealVariant | "gradient";
    }
    interface RadioProps {
        variant?: import("@mantine/core").RadioVariant | SurrealVariant | "gradient";
    }
    interface PasswordInputProps {
        variant?: import("@mantine/core").InputVariant | SurrealInputVariant;
    }
    interface PinInputProps {
        variant?: import("@mantine/core").InputVariant | SurrealInputVariant;
    }
    interface NavLinkProps {
        variant?: import("@mantine/core").NavLinkVariant | SurrealVariant;
    }
    interface PaperProps {
        variant?: SurrealVariant | "gradient";
    }
    interface ScrollAreaProps {
        variant?: SurrealVariant;
    }
    interface TooltipProps {
        variant?: SurrealVariant;
    }
    interface PopoverDropdownProps {
        variant?: SurrealVariant | "transparent";
    }
    interface HoverCardDropdownProps {
        variant?: SurrealVariant | "transparent";
    }
    interface MenuDropdownProps {
        variant?: SurrealVariant;
    }
    interface LoaderProps {
        variant?: SurrealVariant;
    }
    interface ModalProps {
        variant?: SurrealVariant;
    }
    interface OverlayProps {
        variant?: SurrealVariant;
    }
    interface SkeletonProps {
        variant?: SurrealVariant;
    }
    interface SegmentedControlProps {
        variant?: "gradient";
    }
    interface KbdProps {
        variant?: SurrealVariant;
    }
    interface SwitchProps {
        variant?: SurrealVariant | "gradient";
    }
    interface TitleProps {
        variant?: "gradient" | "surreal-gradient";
    }
    interface PaginationProps {
        variant?: SurrealVariant;
    }
    interface TabsProps {
        variant?: "default" | "outline" | "pills" | "gradient" | SurrealVariant;
    }
    interface TableProps {
        variant?: SurrealVariant;
    }
    interface NotificationProps {
        variant?: SurrealVariant | "spaced";
    }
}

declare module "@mantine/core" {
    type ExtendedCustomColors = "obsidian" | "slate" | import("@mantine/core").DefaultMantineColor;
    interface MantineThemeColorsOverride {
        colors: Record<ExtendedCustomColors, import("@mantine/core").MantineColorsTuple>;
    }
}

declare module "@mantine/core" {
    type ExtendedCustomSizes = import("@mantine/core").DefaultMantineSize | "2xl" | "3xl";
    interface MantineThemeSizesOverride {
        spacing: Record<ExtendedCustomSizes, string>;
    }
}
