@blumessage/react-chat 1.1.0 → 1.1.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.
@@ -57,6 +57,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
57
57
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
58
58
  import React, { useState, useEffect, useRef } from "react";
59
59
  import ReactMarkdown from 'react-markdown';
60
+ import remarkGfm from 'remark-gfm';
60
61
  import { MessageCircle, AlertTriangle, Loader2, Send, X, Maximize, Minimize2, Bot, MessageSquare, Phone, Mail, Headphones, Users, User, Heart, Star, Zap } from "lucide-react";
61
62
  // Custom CSS animations that don't depend on Tailwind
62
63
  var customStyles = "\n @keyframes bounce {\n 0%, 100% {\n transform: translateY(0);\n }\n 50% {\n transform: translateY(-25%);\n }\n }\n \n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n \n .blumessage-animate-bounce {\n animation: bounce 1s infinite;\n }\n \n .blumessage-animate-spin {\n animation: spin 1s linear infinite;\n }\n";
@@ -605,7 +606,7 @@ export var BlumessageChat = function (_a) {
605
606
  ? 'blumessage-bg-gradient-to-r blumessage-from-blue-500 blumessage-to-purple-600 blumessage-text-white'
606
607
  : theme === 'light'
607
608
  ? 'blumessage-bg-gray-100'
608
- : 'blumessage-bg-gray-700'), children: message.role === 'assistant' ? (_jsx("div", { className: "blumessage-prose ".concat(theme === 'dark' ? 'blumessage-text-white' : 'blumessage-text-gray-900'), children: _jsx(ReactMarkdown, { children: message.content }) })) : (_jsx("p", { className: "blumessage-text-sm blumessage-whitespace-pre-wrap", children: message.content })) }), showTimestamps && (_jsx("span", { className: "blumessage-text-xs blumessage-text-gray-500", children: formatTimestamp(message.timestamp) }))] }) }, message.id));
609
+ : 'blumessage-bg-gray-700'), children: message.role === 'assistant' ? (_jsx("div", { className: "blumessage-prose ".concat(theme === 'dark' ? 'blumessage-text-white' : 'blumessage-text-gray-900'), children: _jsx(ReactMarkdown, { remarkPlugins: [remarkGfm], children: message.content }) })) : (_jsx("p", { className: "blumessage-text-sm blumessage-whitespace-pre-wrap", children: message.content })) }), showTimestamps && (_jsx("span", { className: "blumessage-text-xs blumessage-text-gray-500", children: formatTimestamp(message.timestamp) }))] }) }, message.id));
609
610
  };
610
611
  // Render chat window component
611
612
  var renderChatWindow = function () {
@@ -635,7 +636,7 @@ export var BlumessageChat = function (_a) {
635
636
  ? 'text-white'
636
637
  : theme === 'dark'
637
638
  ? 'bg-gray-700 text-gray-100 border border-gray-600 shadow-sm'
638
- : 'bg-white text-gray-800 border border-gray-200 shadow-sm'), style: message.role === 'user' ? { backgroundImage: primaryColor } : {}, children: [_jsx("div", { className: "inline-block", children: message.content }), showTimestamps && (_jsx("div", { className: "text-[10px] mt-1 opacity-75 ".concat(message.role === 'user'
639
+ : 'bg-white text-gray-800 border border-gray-200 shadow-sm'), style: message.role === 'user' ? { backgroundImage: primaryColor } : {}, children: [message.role === 'assistant' ? (_jsx(ReactMarkdown, { remarkPlugins: [remarkGfm], children: message.content })) : (_jsx("div", { className: "inline-block", children: message.content })), showTimestamps && (_jsx("div", { className: "text-[10px] mt-1 opacity-75 ".concat(message.role === 'user'
639
640
  ? 'text-white/75'
640
641
  : theme === 'dark'
641
642
  ? 'text-gray-400'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blumessage/react-chat",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "A React TypeScript chat widget component with floating button, theming, and Blumessage API integration",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Blumessage <contact@blumessage.com>",
@@ -42,7 +42,8 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "lucide-react": "^0.294.0",
45
- "react-markdown": "^9.0.1"
45
+ "react-markdown": "^9.0.1",
46
+ "remark-gfm": "^4.0.1"
46
47
  },
47
48
  "devDependencies": {
48
49
  "@types/react": "^18.2.45",