react-ai-renderer 0.1.20 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -110,6 +110,12 @@ interface ReactAIRendererProps {
110
110
  mdxLayoutClassName?: string;
111
111
  /** MdxLayout 的自定义样式 */
112
112
  mdxLayoutStyle?: React.CSSProperties;
113
+ /** 为 true 时未完成组件优先走 loader,避免 remount 后跳过骨架 */
114
+ streaming?: boolean;
115
+ /** 整体主题:dark(默认)/ light / 自定义字符串 */
116
+ theme?: "dark" | "light" | string;
117
+ /** 代码语法主题:github / atom / 或 react-syntax-highlighter prism 样式名(如 dracula、one-dark 等) */
118
+ codeTheme?: "github" | "atom" | string;
113
119
  /** 其他传递给组件的属性 */
114
120
  [key: string]: any;
115
121
  }
@@ -159,7 +165,7 @@ declare class MDXStreamingParser {
159
165
  private messages;
160
166
  constructor(components: any[]);
161
167
  isComponentRegistered(name: string): boolean;
162
- parse(messageId: string, input: string): ComponentData[];
168
+ parse(_messageId: string, input: string): ComponentData[];
163
169
  private findComponentClose;
164
170
  private parseComponentTag;
165
171
  private parsePropsCommon;
@@ -167,6 +173,6 @@ declare class MDXStreamingParser {
167
173
  reset(): void;
168
174
  }
169
175
 
170
- declare function ReactAIRenderer({ content, scope, components, children, componentHandlers, useGithubStyles, mdxLayoutClassName, mdxLayoutStyle }: ReactAIRendererProps): React.JSX.Element;
176
+ declare function ReactAIRenderer({ content, scope, components, children, componentHandlers, useGithubStyles, mdxLayoutClassName, mdxLayoutStyle, theme, codeTheme, }: ReactAIRendererProps): React.JSX.Element | null;
171
177
 
172
178
  export { ComponentData$1 as ComponentData, ComponentHandler, ComponentValue, EnhancedComponentConfig, MDXStreamingParser, MdxLayout, MdxLayoutProps, ParseResult, ParserState, ReactAIRendererProps, ReactMarkdownProps, Think, ThinkProps, ToolCall, ToolCallProps, ReactAIRenderer as default };