@smarter.sh/ui-chat 0.36.1-alpha.1 → 0.36.2-alpha.1

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.
@@ -1,6 +1,16 @@
1
1
  import type { ApiMessage, ChatMessage } from "../types";
2
2
  import { type MessageDirection } from "./enums";
3
3
  export declare function escapeHtml(text: string): string;
4
+ /**
5
+ * Replace a message's image that failed to load with its description, so that the message shows
6
+ * neither a broken image nor an empty gap. A linked image's link, to the image, is kept.
7
+ *
8
+ * Messages are html strings, so SmarterChat calls this from its error listener. See Component.tsx.
9
+ *
10
+ * @param target The element that failed to load.
11
+ * @returns Whether it was a message's image, and was replaced.
12
+ */
13
+ export declare function replaceBrokenImage(target: EventTarget | null): boolean;
4
14
  /**
5
15
  * Html for a message's text: escaped, with markdown images and links as html.
6
16
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smarter.sh/ui-chat",
3
- "version": "0.36.1-alpha.1",
3
+ "version": "0.36.2-alpha.1",
4
4
  "description": "chatbot React.js component for the https://smarter.sh declarative, plugin-based AI resource management platform.",
5
5
  "homepage": "https://smarter.sh",
6
6
  "type": "module",