@helpway/react 0.4.1 → 0.4.2
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 +5 -4
- package/dist/index.js +78 -103
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/themed/styles.css +5 -72
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as _helpway_widget_core from '@helpway/widget-core';
|
|
3
|
-
import {
|
|
3
|
+
import { HelpwayMethods, WidgetStore } from '@helpway/widget-core';
|
|
4
4
|
export { ConversationSummary, HelpwayAPI, RealtimeEvent, TimelineItem, WidgetEventName, WidgetEvents, WidgetState, WidgetStore, clearVisitorId, formatRelativeTime, formatTime, getInitials, getOrCreateVisitorId } from '@helpway/widget-core';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import react__default, { ReactNode } from 'react';
|
|
@@ -60,7 +60,7 @@ interface HelpwayWidgetProps {
|
|
|
60
60
|
src?: string;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
type HelpwayPublicAPI =
|
|
63
|
+
type HelpwayPublicAPI = HelpwayMethods;
|
|
64
64
|
/**
|
|
65
65
|
* Render this once at the root of your app (e.g. in `_app.tsx`,
|
|
66
66
|
* `layout.tsx`, or `main.tsx`). Unmounting cleanly tears down the
|
|
@@ -84,7 +84,7 @@ interface SupportProviderProps {
|
|
|
84
84
|
apiUrl?: string;
|
|
85
85
|
locale?: string;
|
|
86
86
|
initialConversationId?: string;
|
|
87
|
-
onReady?: (api:
|
|
87
|
+
onReady?: (api: HelpwayMethods) => void;
|
|
88
88
|
customLauncherSelector?: string;
|
|
89
89
|
onOpen?: () => void;
|
|
90
90
|
onClose?: () => void;
|
|
@@ -238,9 +238,10 @@ interface MessageBubbleProps {
|
|
|
238
238
|
sender: "visitor" | "team" | "ai";
|
|
239
239
|
senderName?: string;
|
|
240
240
|
parts?: TimelineItemPart[] | null;
|
|
241
|
+
timestamp?: string;
|
|
241
242
|
}
|
|
242
243
|
/** Single message bubble — Intercom-style, renders text + image/file parts */
|
|
243
|
-
declare function MessageBubble({ text, sender, senderName, parts }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
|
|
244
|
+
declare function MessageBubble({ text, sender, senderName, parts, timestamp }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
|
|
244
245
|
|
|
245
246
|
interface MessageListProps {
|
|
246
247
|
items: TimelineItem[];
|