@helpway/react 0.2.0 → 0.3.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.
- package/dist/index.d.ts +31 -3
- package/dist/index.js +723 -432
- package/dist/index.js.map +1 -1
- package/package.json +5 -3
- package/src/themed/styles.css +427 -30
package/dist/index.d.ts
CHANGED
|
@@ -167,6 +167,7 @@ declare function useComposer(conversationId: string | null): {
|
|
|
167
167
|
removeAttachment: (id: string) => void;
|
|
168
168
|
sendError: string | null;
|
|
169
169
|
clearSendError: () => void;
|
|
170
|
+
emailGateConvId: string | null;
|
|
170
171
|
};
|
|
171
172
|
|
|
172
173
|
/**
|
|
@@ -223,11 +224,10 @@ interface MessageBubbleProps {
|
|
|
223
224
|
text: string;
|
|
224
225
|
sender: "visitor" | "team" | "ai";
|
|
225
226
|
senderName?: string;
|
|
226
|
-
time: string;
|
|
227
227
|
parts?: TimelineItemPart[] | null;
|
|
228
228
|
}
|
|
229
229
|
/** Single message bubble — Intercom-style, renders text + image/file parts */
|
|
230
|
-
declare function MessageBubble({ text, sender, senderName,
|
|
230
|
+
declare function MessageBubble({ text, sender, senderName, parts }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
|
|
231
231
|
|
|
232
232
|
interface MessageListProps {
|
|
233
233
|
items: TimelineItem[];
|
|
@@ -264,4 +264,32 @@ interface ComposerProps {
|
|
|
264
264
|
/** Widget composer — auto-resize, Enter-to-send, paste/drop attachments */
|
|
265
265
|
declare function Composer({ text, onTextChange, onSubmit, onTyping, isSubmitting, placeholder, compact, attachments, onAddFiles, onRemoveAttachment, disabled, }: ComposerProps): react_jsx_runtime.JSX.Element;
|
|
266
266
|
|
|
267
|
-
|
|
267
|
+
/**
|
|
268
|
+
* Lightweight Markdown → HTML renderer.
|
|
269
|
+
* Zero dependencies. Handles common patterns:
|
|
270
|
+
* headings, bold, italic, code, links, lists, blockquotes, images, hr.
|
|
271
|
+
*
|
|
272
|
+
* Security note: Content is served from Better i18n Content CMS which only
|
|
273
|
+
* accepts authenticated writes (secret API key). The CMS sanitizes content
|
|
274
|
+
* server-side. Additionally, our renderMarkdown escapes HTML entities before
|
|
275
|
+
* processing markdown syntax, preventing injection of raw HTML tags.
|
|
276
|
+
*/
|
|
277
|
+
declare function renderMarkdown(md: string): string;
|
|
278
|
+
/**
|
|
279
|
+
* Convert bare URLs in plain text to clickable links.
|
|
280
|
+
* Used for visitor/team messages (not full markdown).
|
|
281
|
+
* HTML-escaped for safety.
|
|
282
|
+
*/
|
|
283
|
+
declare function linkifyText(text: string): string;
|
|
284
|
+
/**
|
|
285
|
+
* Renders markdown or pre-rendered HTML content.
|
|
286
|
+
* Prefers bodyHtml (server-sanitized by CMS) when available,
|
|
287
|
+
* falls back to client-side markdown rendering (HTML-escaped).
|
|
288
|
+
*/
|
|
289
|
+
declare function MarkdownContent({ bodyHtml, bodyMarkdown, className, }: {
|
|
290
|
+
bodyHtml?: string | null;
|
|
291
|
+
bodyMarkdown?: string | null;
|
|
292
|
+
className?: string;
|
|
293
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
294
|
+
|
|
295
|
+
export { Composer, DefaultWidget, HelpwayWidget, type HelpwayWidgetProps, type IdentifyData, MarkdownContent, MessageBubble, MessageList, SupportProvider, linkifyText, renderMarkdown, useComposer, useConversations, useIdentify, usePresence, useRealtime, useTimeline, useUnread, useWidget, useWidgetStore };
|