
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@arifdroid/enhanced-chat
Advanced tools
Enhanced chat widget combining modern n8n styling with advanced voice features and alert mode
A modern, feature-rich chat widget that combines the elegant styling of n8n chat with advanced voice capabilities. Perfect for AI chatbots, customer support, and interactive applications.
<script src="https://cdn.jsdelivr.net/npm/@yourorg/enhanced-chat@latest/dist/enhanced-chat.bundle.js"></script>
<script>
createChat({
webhookUrl: 'https://your-webhook-url.com/webhook/...',
initialMessages: [
'Hi there! Welcome to our chat!',
'I can handle both text and voice messages. How can I help you?'
]
});
</script>
npm install @yourorg/enhanced-chat
import { createChat } from '@yourorg/enhanced-chat';
createChat({
webhookUrl: 'https://your-webhook-url.com/webhook/...',
// ... other options
});
Creates and initializes a new chat widget.
| Option | Type | Default | Description |
|---|---|---|---|
webhookUrl | string | required | Your webhook endpoint URL |
target | string|Element | 'body' | Target element to attach the chat widget |
mode | 'window'|'fullscreen' | 'window' | Display mode of the chat |
theme | object | {} | Theme customization options |
initialMessages | string[] | [] | Initial messages to display |
voiceEnabled | boolean | true | Enable voice recording feature |
textToSpeechEnabled | boolean | true | Enable text-to-speech for user messages |
autoPlayResponses | boolean | true | Auto-play audio responses from bot |
placeholder | string | 'Type your message...' | Input placeholder text |
showWindowCloseButton | boolean | true | Show close button in window mode |
theme: {
primaryColor: '#007bff', // Primary theme color
secondaryColor: '#28a745', // Secondary color (voice buttons)
backgroundColor: '#ffffff', // Background color
textColor: '#333333', // Text color
borderRadius: '12px', // Border radius for elements
boxShadow: '0 8px 32px rgba(0,0,0,0.1)' // Box shadow
}
The createChat() function returns a widget instance with the following methods:
const chatWidget = createChat({ /* options */ });
// Control visibility
chatWidget.open(); // Show the chat widget
chatWidget.close(); // Hide the chat widget
chatWidget.toggle(); // Toggle visibility
// Window state
chatWidget.minimize(); // Minimize to toggle button
chatWidget.maximize(); // Restore from minimized state
// Programmatic messaging
chatWidget.addMessage('Hello!', false); // Add bot message
chatWidget.addMessage('Hi there!', true); // Add user message
// Voice features
chatWidget.playUserMessage('Text to speak'); // Play text using TTS
// Alert system
chatWidget.showAlert('Success!', 'success', 3000); // Show alert
chatWidget.hideAlert(); // Hide current alert
chatWidget.toggleAlertMode(); // Toggle voice-only mode
// Utility
chatWidget.scrollToBottom(); // Scroll messages to bottom
chatWidget.destroy(); // Clean up and remove widget
createChat({
webhookUrl: 'https://your-webhook.com/...',
theme: {
primaryColor: '#6c5ce7',
secondaryColor: '#00b894',
backgroundColor: '#2d3436',
textColor: '#ddd',
borderRadius: '8px'
}
});
createChat({
webhookUrl: 'https://your-webhook.com/...',
mode: 'fullscreen',
initialMessages: ['Welcome to fullscreen chat!']
});
createChat({
webhookUrl: 'https://your-webhook.com/...',
target: '#my-chat-container'
});
alertMode: true flag in webhook payloadgit clone <repository-url>
cd enhanced-chat
npm install
# Development build with watching
npm run dev
# Production build
npm run build
# Clean build artifacts
npm run clean
# Serve demo locally
npm run serve
# Open demo.html in browser
open http://localhost:3000/demo.html
The build process creates several optimized bundles:
dist/enhanced-chat.bundle.js - UMD bundle for browsersdist/enhanced-chat.esm.js - ES Module bundledist/enhanced-chat.min.js - Minified UMD bundle for productionMIT License - see LICENSE file for details.
Made with ❤️ for the developer community
FAQs
Enhanced chat widget combining modern n8n styling with advanced voice features and alert mode
We found that @arifdroid/enhanced-chat demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.