teodor-new-chat-ui 4.3.392 → 4.3.394
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/components/chat/ChatInput.d.ts +3 -1
- package/dist/components/ui/resizable.d.ts +1 -1
- package/dist/index.esm.js +6667 -6580
- package/dist/index.umd.js +44 -52
- package/dist/lib/markdown.d.ts +6 -3
- package/package.json +1 -1
- package/dist/lib/validation.d.ts +0 -36
package/dist/lib/markdown.d.ts
CHANGED
|
@@ -6,11 +6,13 @@ interface MarkdownOptions {
|
|
|
6
6
|
escapeHtml?: boolean;
|
|
7
7
|
breaks?: boolean;
|
|
8
8
|
}
|
|
9
|
-
import { decodeHtmlEntities } from './validation';
|
|
10
|
-
export { decodeHtmlEntities };
|
|
11
9
|
/**
|
|
12
|
-
*
|
|
10
|
+
* Decode HTML entities back to plain text
|
|
13
11
|
*/
|
|
12
|
+
export declare function decodeHtmlEntities(content: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Process HTML content by decoding HTML entities
|
|
15
|
+
*/
|
|
14
16
|
export declare function processHtmlContent(content: string): string;
|
|
15
17
|
/**
|
|
16
18
|
* Simple markdown renderer for chat content
|
|
@@ -41,3 +43,4 @@ export declare function useMarkdownRenderer(): {
|
|
|
41
43
|
isHtmlContent: typeof isHtmlContent;
|
|
42
44
|
shouldRenderAsHtml: typeof shouldRenderAsHtml;
|
|
43
45
|
};
|
|
46
|
+
export {};
|
package/package.json
CHANGED
package/dist/lib/validation.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export declare const MESSAGE_MAX_LENGTH = 10000;
|
|
2
|
-
export declare const TITLE_MAX_LENGTH = 200;
|
|
3
|
-
export declare const THREAD_ID_PATTERN: RegExp;
|
|
4
|
-
/**
|
|
5
|
-
* Sanitize HTML content to prevent XSS attacks
|
|
6
|
-
* Basic implementation that escapes HTML entities
|
|
7
|
-
*/
|
|
8
|
-
export declare function sanitizeHtml(content: string): string;
|
|
9
|
-
/**
|
|
10
|
-
* Decode HTML entities back to plain text
|
|
11
|
-
*/
|
|
12
|
-
export declare function decodeHtmlEntities(content: string): string;
|
|
13
|
-
/**
|
|
14
|
-
* Sanitize plain text content but allow safe HTML tags
|
|
15
|
-
*/
|
|
16
|
-
export declare function sanitizeText(content: string): string;
|
|
17
|
-
/**
|
|
18
|
-
* Validate message length
|
|
19
|
-
*/
|
|
20
|
-
export declare function validateMessageLength(content: string, maxLength?: number): string;
|
|
21
|
-
/**
|
|
22
|
-
* Validate thread ID format
|
|
23
|
-
*/
|
|
24
|
-
export declare function validateThreadId(threadId: string): string;
|
|
25
|
-
/**
|
|
26
|
-
* Validate and sanitize message content
|
|
27
|
-
*/
|
|
28
|
-
export declare function validateAndSanitizeMessage(content: string | unknown): string;
|
|
29
|
-
/**
|
|
30
|
-
* Validate and sanitize title
|
|
31
|
-
*/
|
|
32
|
-
export declare function validateAndSanitizeTitle(title: string): string;
|
|
33
|
-
/**
|
|
34
|
-
* Safe JSON parse with validation
|
|
35
|
-
*/
|
|
36
|
-
export declare function safeJsonParse(jsonString: string): unknown;
|