@helpway/react 0.14.0 → 0.15.0

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
@@ -318,9 +318,12 @@ declare function DefaultWidget({ hideLauncher, placement, colorScheme, dockSugge
318
318
  interface MessageBubbleProps {
319
319
  text: string;
320
320
  sender: "visitor" | "team" | "ai";
321
+ /**
322
+ * Explicit label for the meta row, overriding the sender's role. The widget's
323
+ * own timeline never passes this — it labels by role — but a caller embedding
324
+ * a single bubble may need to name someone.
325
+ */
321
326
  senderName?: string;
322
- /** Name the conversation header is showing; a sender matching it stays unlabelled. */
323
- headerName?: string;
324
327
  parts?: TimelineItemPart[] | null;
325
328
  timestamp?: string;
326
329
  /**
@@ -334,13 +337,24 @@ interface MessageBubbleProps {
334
337
  metadata?: TimelineItemMetadata | null;
335
338
  /** Called when the visitor taps a quick-reply option. */
336
339
  onQuickReplyTap?: (optionId: string, stepId: string) => void;
340
+ /**
341
+ * This bubble is a stream still arriving. Closes dangling markdown so an
342
+ * unfinished ```fence does not flash as literal backticks, and shows the
343
+ * caret.
344
+ *
345
+ * The stream is rendered through THIS component, not a hand-rolled copy of
346
+ * its markup, so that the streamed bubble and the message that replaces it are
347
+ * the same element type under the same key — React then reuses the DOM node
348
+ * instead of tearing it down and mounting a replacement, which is what made
349
+ * the answer visibly render a second time the moment it finished.
350
+ */
351
+ streaming?: boolean;
337
352
  }
338
353
  /** Single message bubble — Intercom-style, renders text + image/file parts */
339
- declare function MessageBubble({ text, sender, senderName, headerName, parts, timestamp, showAuthor, metadata, onQuickReplyTap, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
354
+ declare function MessageBubble({ text, sender, senderName, parts, timestamp, showAuthor, metadata, onQuickReplyTap, streaming, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
340
355
 
341
356
  interface MessageListProps {
342
357
  items: TimelineItem[];
343
- visitorName?: string;
344
358
  isTyping?: boolean;
345
359
  isAiProcessing?: boolean;
346
360
  streamingText?: string;
@@ -351,7 +365,7 @@ interface MessageListProps {
351
365
  renderAfterMessages?: react__default.ReactNode;
352
366
  }
353
367
  /** Timeline with date separators, typing indicator, infinite scroll, and AI processing state */
354
- declare function MessageList({ items, visitorName, isTyping, isAiProcessing, streamingText, hasMore, isLoadingMore, onLoadMore, renderAfterMessages, }: MessageListProps): react_jsx_runtime.JSX.Element;
368
+ declare function MessageList({ items, isTyping, isAiProcessing, streamingText, hasMore, isLoadingMore, onLoadMore, renderAfterMessages, }: MessageListProps): react_jsx_runtime.JSX.Element;
355
369
 
356
370
  interface ComposerProps {
357
371
  text: string;