@fusioni/client-sdk 1.1.1 → 1.1.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../src/components/Message.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../src/components/Message.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,EAAC,YAAY,EAAC,MAAM,UAAU,CAAC;AA+LtC,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA4hB1C,CAAC"}
|
package/dist/fusioni-sdk.umd.js
CHANGED
|
@@ -5650,9 +5650,10 @@ var Fusioni = (function () {
|
|
|
5650
5650
|
const contentToDisplay = message.shouldAnimate
|
|
5651
5651
|
? displayedContent
|
|
5652
5652
|
: message.content;
|
|
5653
|
+
const extractedUrls = reactExports.useMemo(() => extractUrlsFromContent(message.content), [message.content]);
|
|
5653
5654
|
return (jsxRuntimeExports.jsxs("div", { className: getMessageClasses(), children: [message.content && !message.loading && (jsxRuntimeExports.jsx("div", { className: "fusioni-message-text", dangerouslySetInnerHTML: {
|
|
5654
5655
|
__html: enhanceMessageContent(contentToDisplay)
|
|
5655
|
-
} })), message.loading && (jsxRuntimeExports.jsx("div", { className: "fusioni-stream-messages", children: (streamMessages.length > 0 ? streamMessages : [t('chat.messages.loading')]).map((line, index) => (jsxRuntimeExports.jsxs("div", { className: "fusioni-stream-message-item", children: [jsxRuntimeExports.jsx("div", { className: "fusioni-stream-message-logo-wrap", children: jsxRuntimeExports.jsx("div", { className: "fusioni-stream-message-logo-frame", children: jsxRuntimeExports.jsx("img", { className: "fusioni-stream-message-logo-img", src: FUSIONI_LOGO_BASE64, alt: "", width: 32, height: 32 }) }) }), jsxRuntimeExports.jsx(Spotlight, { className: "fusioni-stream-message-spotlight", text: line })] }, streamMessages.length > 0 ? `${index}-${line}` : 'loading-placeholder'))) })), !message.loading &&
|
|
5656
|
+
} })), message.loading && (jsxRuntimeExports.jsx("div", { className: "fusioni-stream-messages", children: (streamMessages.length > 0 ? streamMessages : [t('chat.messages.loading')]).map((line, index) => (jsxRuntimeExports.jsxs("div", { className: "fusioni-stream-message-item", children: [jsxRuntimeExports.jsx("div", { className: "fusioni-stream-message-logo-wrap", children: jsxRuntimeExports.jsx("div", { className: "fusioni-stream-message-logo-frame", children: jsxRuntimeExports.jsx("img", { className: "fusioni-stream-message-logo-img", src: FUSIONI_LOGO_BASE64, alt: "", width: 32, height: 32 }) }) }), jsxRuntimeExports.jsx(Spotlight, { className: "fusioni-stream-message-spotlight", text: line })] }, streamMessages.length > 0 ? `${index}-${line}` : 'loading-placeholder'))) })), !message.loading && extractedUrls.length > 0 && message.role !== 'user' && (jsxRuntimeExports.jsx("div", { className: "fusioni-message-url-previews", children: extractedUrls.map((url) => (jsxRuntimeExports.jsx(UrlPreview, { url: url, agencyId: agencyId, showCloseButton: false, compact: true, autoFetch: true, apiBaseUrl: apiBaseUrl, apiKey: apiKey }, url))) })), message.extra_data && (jsxRuntimeExports.jsxs("div", { className: "fusioni-message-extra m2", children: [message.extra_data.document_images &&
|
|
5656
5657
|
message.extra_data.document_images.length > 0 &&
|
|
5657
5658
|
onOpenGallery && (jsxRuntimeExports.jsx(DocumentImageGrid, { images: message.extra_data.document_images, onOpenGallery: onOpenGallery, attachedImagesLabel: t('chat.attachedImages') })), message.extra_data.document_videos &&
|
|
5658
5659
|
message.extra_data.document_videos.length > 0 && (jsxRuntimeExports.jsx(DocumentVideoGrid, { videos: message.extra_data.document_videos, attachedVideosLabel: t('chat.attachedVideos') })), message.extra_data.image && renderImage(message.extra_data.image), message.extra_data.image_ref && renderImage(message.extra_data.image_ref), message.extra_data.audio_ref && renderAudio(message.extra_data.audio_ref, message.extra_data.duration), message.extra_data.coordinates && renderMap(message.extra_data.coordinates), message.extra_data.map && (jsxRuntimeExports.jsx("div", { className: "fusioni-message-map", children: jsxRuntimeExports.jsx(Map$1, { lat: message.extra_data.map.lat, lng: message.extra_data.map.lng, zoom: message.extra_data.map.zoom, staticMap: true, width: 600, height: 400, apiBaseUrl: apiBaseUrl, apiKey: apiKey, agencyId: agencyId }) }))] })), message.extra_data?.widget === 'Confirmation' && (jsxRuntimeExports.jsxs("div", { className: "fusioni-confirmation-widget", children: [jsxRuntimeExports.jsx("button", { type: "button", disabled: !enableButtons, onClick: () => sendConfirmation('Confirmed', message.extra_data?.key), className: "fusioni-btn fusioni-btn-primary fusioni-btn-confirm", children: t('common.yes') }), jsxRuntimeExports.jsx("button", { type: "button", disabled: !enableButtons, onClick: () => sendConfirmation('NotConfirmed', message.extra_data?.key), className: "fusioni-btn fusioni-btn-secondary fusioni-btn-cancel", children: t('common.no') })] })), showThoughts && message.thoughts && (jsxRuntimeExports.jsx("div", { className: "fusioni-message-thoughts", children: jsxRuntimeExports.jsxs("details", { children: [jsxRuntimeExports.jsx("summary", { children: "AI Thoughts" }), jsxRuntimeExports.jsx("p", { children: message.thoughts })] }) })), message.has_error && (jsxRuntimeExports.jsxs("div", { className: "fusioni-message-error-indicator", children: [jsxRuntimeExports.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", children: [jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }), jsxRuntimeExports.jsx("line", { x1: "15", y1: "9", x2: "9", y2: "15", stroke: "currentColor", strokeWidth: "2" }), jsxRuntimeExports.jsx("line", { x1: "9", y1: "9", x2: "15", y2: "15", stroke: "currentColor", strokeWidth: "2" })] }), jsxRuntimeExports.jsx("span", { children: "Error occurred" })] }))] }));
|
|
@@ -7052,7 +7053,7 @@ var Fusioni = (function () {
|
|
|
7052
7053
|
const Fusioni = {
|
|
7053
7054
|
init,
|
|
7054
7055
|
mount,
|
|
7055
|
-
version: "1.1.
|
|
7056
|
+
version: "1.1.2",
|
|
7056
7057
|
};
|
|
7057
7058
|
if (typeof window !== 'undefined') {
|
|
7058
7059
|
window.Fusioni = Fusioni;
|