@mxmweb/rtext 1.6.12 → 1.6.14

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.
@@ -94,6 +94,8 @@ export interface UnifiedRichTextProps {
94
94
  enableTemplateInput?: boolean;
95
95
  /** 禁用特定标签的核心转译能力(例如 'template' | 'think' | 'reference') */
96
96
  disabledTags?: Array<'template' | 'think' | 'reference'>;
97
+ /** 是否启用 PrismJS 语法高亮(默认 false,使用普通代码块样式) */
98
+ enablePrism?: boolean;
97
99
  }
98
100
  /**
99
101
  * 统一富文本组件
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ export interface CodeBlockProps {
3
+ attributes?: Record<string, any>;
4
+ language?: string;
5
+ children?: React.ReactNode;
6
+ styles?: any;
7
+ codeText?: string;
8
+ enablePrism?: boolean;
9
+ }
10
+ /**
11
+ * 代码块组件
12
+ * 支持语法高亮、语言标注、代码复制功能
13
+ * @param attributes - Slate 元素属性(可能包含 ref)
14
+ * @param language - 代码语言(如 'typescript', 'javascript')
15
+ * @param children - 代码内容(Slate 文本节点)
16
+ * @param styles - 样式配置
17
+ */
18
+ declare const CodeBlock: React.FC<CodeBlockProps>;
19
+ export default CodeBlock;