@helpway/react 0.17.2 → 0.17.3
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 +18 -2
- package/dist/index.js +222 -94
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/themed/styles.css +23 -6
package/dist/index.d.ts
CHANGED
|
@@ -410,9 +410,14 @@ interface MessageBubbleProps {
|
|
|
410
410
|
* the answer visibly render a second time the moment it finished.
|
|
411
411
|
*/
|
|
412
412
|
streaming?: boolean;
|
|
413
|
+
/**
|
|
414
|
+
* Called each time a paced answer draws more text, so the list can keep the
|
|
415
|
+
* last line in view. A bubble that was never a stream does not call it.
|
|
416
|
+
*/
|
|
417
|
+
onReveal?: () => void;
|
|
413
418
|
}
|
|
414
419
|
/** Single message bubble — Intercom-style, renders text + image/file parts */
|
|
415
|
-
declare function MessageBubble({ text, sender, senderName, parts, timestamp, showAuthor, metadata, onQuickReplyTap, streaming, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
|
|
420
|
+
declare function MessageBubble({ text, sender, senderName, parts, timestamp, showAuthor, metadata, onQuickReplyTap, streaming, onReveal, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
|
|
416
421
|
|
|
417
422
|
interface MessageListProps {
|
|
418
423
|
items: TimelineItem[];
|
|
@@ -576,7 +581,18 @@ declare function AnnouncementPreviews({ onOpen, avatar, placement, footer, maxVi
|
|
|
576
581
|
* server-side. Additionally, our renderMarkdown escapes HTML entities before
|
|
577
582
|
* processing markdown syntax, preventing injection of raw HTML tags.
|
|
578
583
|
*/
|
|
579
|
-
|
|
584
|
+
interface RenderMarkdownOptions {
|
|
585
|
+
/**
|
|
586
|
+
* What `` becomes. "show" draws the picture, which is right for
|
|
587
|
+
* an article we published. "link" writes a link to it instead, which is
|
|
588
|
+
* what a message gets: a picture is fetched the moment it is drawn, with no
|
|
589
|
+
* click, so a message that can name any address can send whatever it put in
|
|
590
|
+
* that address to whoever owns it. An AI answer is such a message.
|
|
591
|
+
* Pictures a person attaches travel as parts, not as markdown.
|
|
592
|
+
*/
|
|
593
|
+
images?: "show" | "link";
|
|
594
|
+
}
|
|
595
|
+
declare function renderMarkdown(source: string, options?: RenderMarkdownOptions): string;
|
|
580
596
|
/**
|
|
581
597
|
* Convert bare URLs in plain text to clickable links.
|
|
582
598
|
* Used for visitor/team messages (not full markdown).
|