@helpway/react 0.2.0 → 0.3.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 +29 -1
- package/dist/index.js +106 -55
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/themed/styles.css +260 -15
package/dist/index.d.ts
CHANGED
|
@@ -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 };
|