import { ReactCodeMirrorProps } from '@uiw/react-codemirror'; import { Extension } from '@codemirror/state'; import React from 'react'; /** * PromptsEditor 组件属性 * 继承自 ReactCodeMirrorProps,支持传入 CodeMirror 的所有属性(如 height、width 等) */ export interface PromptsEditorProps extends Omit { /** * @description 可以输入内容的最大长度 * @descriptionEn Maximum length of input content */ maxLength?: number; /** * @description 可以插入的变量列表 * @descriptionEn Available variables for insertion */ variables?: Array<{ code: string; }>; /** * @description 新增变量的触发回调 * @descriptionEn Callback function to create new variable */ onCreate?: () => void; /** * @description 新增变量的按钮文本 * @descriptionEn Text of the create variable button */ createBtnText?: string; /** * @description 提示文本,传入 false 时隐藏提示 * @descriptionEn Text of the tips, set to false to hide the tips */ tipsText?: string | React.ReactNode | false; /** * @description 自定义扩展,会与内置扩展合并 * @descriptionEn Custom extensions, will be merged with built-in extensions */ extensions?: Extension[]; } export declare const langExtensionsMap: Record; declare const _default: React.MemoExoticComponent<(props: PromptsEditorProps) => import("react/jsx-runtime").JSX.Element>; export default _default;